mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 752187 - Part 6: Rename mIsToCorner to mIsLegacySyntax. r=dbaron
This commit is contained in:
parent
36da902f60
commit
68b09c47fc
@ -5005,7 +5005,7 @@ CSSParserImpl::ParseLinearGradient(nsCSSValue& aValue, bool aIsRepeating)
|
||||
|
||||
nsCSSTokenType ty = mToken.mType;
|
||||
nsString id = mToken.mIdent;
|
||||
cssGradient->mIsToCorner = toCorner;
|
||||
cssGradient->mIsLegacySyntax = !toCorner;
|
||||
UngetToken();
|
||||
|
||||
// <legacy-gradient-line>
|
||||
@ -5075,6 +5075,7 @@ CSSParserImpl::ParseRadialGradient(nsCSSValue& aValue, bool aIsRepeating)
|
||||
{
|
||||
nsRefPtr<nsCSSValueGradient> cssGradient
|
||||
= new nsCSSValueGradient(true, aIsRepeating);
|
||||
cssGradient->mIsLegacySyntax = true;
|
||||
|
||||
// <gradient-line>
|
||||
if (!GetToken(true)) {
|
||||
|
@ -920,7 +920,7 @@ nsCSSValue::AppendToString(nsCSSProperty aProperty, nsAString& aResult) const
|
||||
aResult.AppendLiteral("-moz-linear-gradient(");
|
||||
}
|
||||
|
||||
if (gradient->mIsToCorner) {
|
||||
if (!gradient->mIsLegacySyntax) {
|
||||
aResult.AppendLiteral("to");
|
||||
NS_ABORT_IF_FALSE(gradient->mBgPos.mXValue.GetUnit() == eCSSUnit_Enumerated &&
|
||||
gradient->mBgPos.mYValue.GetUnit() == eCSSUnit_Enumerated,
|
||||
@ -1699,7 +1699,7 @@ nsCSSValueGradient::nsCSSValueGradient(bool aIsRadial,
|
||||
bool aIsRepeating)
|
||||
: mIsRadial(aIsRadial),
|
||||
mIsRepeating(aIsRepeating),
|
||||
mIsToCorner(false),
|
||||
mIsLegacySyntax(false),
|
||||
mBgPos(eCSSUnit_None),
|
||||
mAngle(eCSSUnit_None),
|
||||
mRadialShape(eCSSUnit_None),
|
||||
|
@ -1043,7 +1043,7 @@ struct nsCSSValueGradient {
|
||||
// true if gradient is radial, false if it is linear
|
||||
bool mIsRadial;
|
||||
bool mIsRepeating;
|
||||
bool mIsToCorner;
|
||||
bool mIsLegacySyntax;
|
||||
// line position and angle
|
||||
nsCSSValuePair mBgPos;
|
||||
nsCSSValue mAngle;
|
||||
@ -1058,7 +1058,7 @@ struct nsCSSValueGradient {
|
||||
{
|
||||
if (mIsRadial != aOther.mIsRadial ||
|
||||
mIsRepeating != aOther.mIsRepeating ||
|
||||
mIsToCorner != aOther.mIsToCorner ||
|
||||
mIsLegacySyntax != aOther.mIsLegacySyntax ||
|
||||
mBgPos != aOther.mBgPos ||
|
||||
mAngle != aOther.mAngle ||
|
||||
mRadialShape != aOther.mRadialShape ||
|
||||
|
@ -857,7 +857,7 @@ static void SetGradient(const nsCSSValue& aValue, nsPresContext* aPresContext,
|
||||
aResult.mShape = NS_STYLE_GRADIENT_SHAPE_LINEAR;
|
||||
aResult.mSize = NS_STYLE_GRADIENT_SIZE_FARTHEST_CORNER;
|
||||
|
||||
aResult.mToCorner = gradient->mIsToCorner;
|
||||
aResult.mToCorner = !gradient->mIsLegacySyntax;
|
||||
}
|
||||
|
||||
// bg-position
|
||||
|
Loading…
Reference in New Issue
Block a user