зеркало из https://github.com/mozilla/gecko-dev.git
Bug 893319 - Remove -moz-rgba() and -moz-hsla(). r=bz
This commit is contained in:
Родитель
633b59f1ac
Коммит
f6af37ece9
|
@ -534,8 +534,6 @@ static void GetOtherValuesForProperty(const uint32_t aParserVariant,
|
|||
if (aParserVariant & VARIANT_COLOR) {
|
||||
InsertNoDuplicates(aArray, NS_LITERAL_STRING("rgb"));
|
||||
InsertNoDuplicates(aArray, NS_LITERAL_STRING("hsl"));
|
||||
InsertNoDuplicates(aArray, NS_LITERAL_STRING("-moz-rgba"));
|
||||
InsertNoDuplicates(aArray, NS_LITERAL_STRING("-moz-hsla"));
|
||||
InsertNoDuplicates(aArray, NS_LITERAL_STRING("rgba"));
|
||||
InsertNoDuplicates(aArray, NS_LITERAL_STRING("hsla"));
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ function do_test() {
|
|||
"purple", "red", "rosybrown", "royalblue", "saddlebrown", "salmon", "sandybrown", "seagreen",
|
||||
"seashell", "sienna", "silver", "skyblue", "slateblue", "slategray", "slategrey", "snow", "springgreen",
|
||||
"steelblue", "tan", "teal", "thistle", "tomato", "transparent", "turquoise", "violet", "wheat",
|
||||
"white", "whitesmoke", "yellow", "yellowgreen", "rgb", "hsl", "-moz-rgba", "-moz-hsla", "rgba", "hsla" ];
|
||||
"white", "whitesmoke", "yellow", "yellowgreen", "rgb", "hsl", "rgba", "hsla" ];
|
||||
ok(testValues(values, expected), "property color's values.");
|
||||
|
||||
// test a shorthand property
|
||||
|
@ -91,12 +91,12 @@ function do_test() {
|
|||
"violet", "wheat", "white", "whitesmoke", "yellow", "yellowgreen", "no-repeat", "repeat",
|
||||
"repeat-x", "repeat-y", "fixed", "scroll", "local", "center", "top", "bottom", "left", "right",
|
||||
"border-box", "padding-box", "content-box", "border-box", "padding-box", "content-box", "contain",
|
||||
"cover", "rgb", "hsl", "-moz-rgba", "-moz-hsla", "rgba", "hsla", "none", "-moz-element", "-moz-image-rect", "url" ];
|
||||
"cover", "rgb", "hsl", "rgba", "hsla", "none", "-moz-element", "-moz-image-rect", "url" ];
|
||||
ok(testValues(values, expected), "Shorthand property values.");
|
||||
|
||||
var prop = "border";
|
||||
var values = utils.getCSSValuesForProperty(prop);
|
||||
var expected = [ "-moz-calc", "-moz-hsla", "-moz-initial", "-moz-rgba", "-moz-use-text-color", "aliceblue",
|
||||
var expected = [ "-moz-calc", "-moz-initial", "-moz-use-text-color", "aliceblue",
|
||||
"antiquewhite", "aqua", "aquamarine", "azure", "beige", "bisque", "black", "blanchedalmond", "blue", "blueviolet",
|
||||
"brown", "burlywood", "cadetblue", "calc", "chartreuse", "chocolate", "coral", "cornflowerblue", "cornsilk",
|
||||
"crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod", "darkgray", "darkgreen", "darkgrey", "darkkhaki",
|
||||
|
@ -143,7 +143,7 @@ function do_test() {
|
|||
"purple", "red", "rosybrown", "royalblue", "saddlebrown", "salmon", "sandybrown", "seagreen", "seashell",
|
||||
"sienna", "silver", "skyblue", "slateblue", "slategray", "slategrey", "snow", "springgreen", "steelblue",
|
||||
"tan", "teal", "thistle", "tomato", "transparent", "turquoise", "violet", "wheat", "white", "whitesmoke",
|
||||
"yellow", "yellowgreen", "calc", "-moz-calc", "rgb", "hsl", "-moz-rgba", "-moz-hsla", "rgba", "hsla" ];
|
||||
"yellow", "yellowgreen", "calc", "-moz-calc", "rgb", "hsl", "rgba", "hsla" ];
|
||||
ok(testValues(values, expected), "property border-top's values.");
|
||||
|
||||
// tests no keywords or colors
|
||||
|
|
|
@ -4360,8 +4360,7 @@ CSSParserImpl::ParseColor(nsCSSValue& aValue)
|
|||
SkipUntil(')');
|
||||
return false;
|
||||
}
|
||||
else if (mToken.mIdent.LowerCaseEqualsLiteral("-moz-rgba") ||
|
||||
mToken.mIdent.LowerCaseEqualsLiteral("rgba")) {
|
||||
else if (mToken.mIdent.LowerCaseEqualsLiteral("rgba")) {
|
||||
// rgba ( component , component , component , opacity )
|
||||
uint8_t r, g, b, a;
|
||||
int32_t type = COLOR_TYPE_UNKNOWN;
|
||||
|
@ -4385,8 +4384,7 @@ CSSParserImpl::ParseColor(nsCSSValue& aValue)
|
|||
SkipUntil(')');
|
||||
return false;
|
||||
}
|
||||
else if (mToken.mIdent.LowerCaseEqualsLiteral("-moz-hsla") ||
|
||||
mToken.mIdent.LowerCaseEqualsLiteral("hsla")) {
|
||||
else if (mToken.mIdent.LowerCaseEqualsLiteral("hsla")) {
|
||||
// hsla ( hue , saturation , lightness , opacity )
|
||||
// "hue" is a number, "saturation" and "lightness" are percentages,
|
||||
// "opacity" is a number.
|
||||
|
@ -5254,8 +5252,6 @@ CSSParserImpl::ParseVariant(nsCSSValue& aValue,
|
|||
((eCSSToken_Function == tk->mType) &&
|
||||
(tk->mIdent.LowerCaseEqualsLiteral("rgb") ||
|
||||
tk->mIdent.LowerCaseEqualsLiteral("hsl") ||
|
||||
tk->mIdent.LowerCaseEqualsLiteral("-moz-rgba") ||
|
||||
tk->mIdent.LowerCaseEqualsLiteral("-moz-hsla") ||
|
||||
tk->mIdent.LowerCaseEqualsLiteral("rgba") ||
|
||||
tk->mIdent.LowerCaseEqualsLiteral("hsla"))))
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче