Backed out changeset e3007422b989 (bug 774122)

This commit is contained in:
Gavin Sharp 2012-07-16 01:04:29 -07:00
parent 81f329b160
commit 3989cf03ee
4 changed files with 94 additions and 172 deletions

View File

@ -656,9 +656,6 @@ protected:
// True when the hashless color quirk applies.
bool mHashlessColorQuirk : 1;
// True when the unitless length quirk applies.
bool mUnitlessLengthQuirk : 1;
// True if unsafe rules should be allowed
bool mUnsafeRulesEnabled : 1;
@ -753,7 +750,6 @@ CSSParserImpl::CSSParserImpl()
mHavePushBack(false),
mNavQuirkMode(false),
mHashlessColorQuirk(false),
mUnitlessLengthQuirk(false),
mUnsafeRulesEnabled(false),
mHTMLMediaMode(false),
mParsingCompoundProperty(false)
@ -4399,15 +4395,9 @@ CSSParserImpl::ParseVariant(nsCSSValue& aValue,
PRInt32 aVariantMask,
const PRInt32 aKeywordTable[])
{
NS_ASSERTION(!(mHashlessColorQuirk && (aVariantMask & VARIANT_COLOR)) ||
!(aVariantMask & VARIANT_NUMBER),
"can't distinguish colors from numbers");
NS_ASSERTION(!(mHashlessColorQuirk && (aVariantMask & VARIANT_COLOR)) ||
!(mUnitlessLengthQuirk && (aVariantMask & VARIANT_LENGTH)),
"can't distinguish colors from lengths");
NS_ASSERTION(!(mUnitlessLengthQuirk && (aVariantMask & VARIANT_LENGTH)) ||
!(aVariantMask & VARIANT_NUMBER),
"can't distinguish lengths from numbers");
NS_ASSERTION(IsParsingCompoundProperty() ||
((~aVariantMask) & (VARIANT_LENGTH|VARIANT_COLOR)),
"cannot distinguish lengths and colors in quirks mode");
NS_ABORT_IF_FALSE(!(aVariantMask & VARIANT_IDENTIFIER) ||
!(aVariantMask & VARIANT_IDENTIFIER_NO_INHERIT),
"must not set both VARIANT_IDENTIFIER and "
@ -4511,7 +4501,7 @@ CSSParserImpl::ParseVariant(nsCSSValue& aValue,
aValue.SetPercentValue(tk->mNumber);
return true;
}
if (mUnitlessLengthQuirk) { // NONSTANDARD: Nav interprets unitless numbers as px
if (mNavQuirkMode && !IsParsingCompoundProperty()) { // NONSTANDARD: Nav interprets unitless numbers as px
if (((aVariantMask & VARIANT_LENGTH) != 0) &&
(eCSSToken_Number == tk->mType)) {
aValue.SetFloatValue(tk->mNumber, eCSSUnit_Pixel);
@ -5631,13 +5621,9 @@ CSSParserImpl::ParseProperty(nsCSSProperty aPropID)
// Can't use AutoRestore<bool> because it's a bitfield.
NS_ABORT_IF_FALSE(!mHashlessColorQuirk,
"hashless color quirk should not be set");
NS_ABORT_IF_FALSE(!mUnitlessLengthQuirk,
"unitless length quirk should not be set");
if (mNavQuirkMode) {
mHashlessColorQuirk =
nsCSSProps::PropHasFlags(aPropID, CSS_PROPERTY_HASHLESS_COLOR_QUIRK);
mUnitlessLengthQuirk =
nsCSSProps::PropHasFlags(aPropID, CSS_PROPERTY_UNITLESS_LENGTH_QUIRK);
}
NS_ASSERTION(aPropID < eCSSProperty_COUNT, "index out of range");
@ -5681,7 +5667,6 @@ CSSParserImpl::ParseProperty(nsCSSProperty aPropID)
if (mNavQuirkMode) {
mHashlessColorQuirk = false;
mUnitlessLengthQuirk = false;
}
return result;

View File

@ -629,8 +629,7 @@ CSS_PROP_BORDER(
BorderBottomWidth,
CSS_PROPERTY_PARSE_VALUE |
CSS_PROPERTY_VALUE_NONNEGATIVE |
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
"",
VARIANT_HKL | VARIANT_CALC,
kBorderWidthKTable,
@ -893,8 +892,7 @@ CSS_PROP_SHORTHAND(
border-left-width,
border_left_width,
BorderLeftWidth,
CSS_PROPERTY_PARSE_FUNCTION |
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK,
CSS_PROPERTY_PARSE_FUNCTION,
"")
#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
CSS_PROP_BORDER(
@ -1049,8 +1047,7 @@ CSS_PROP_SHORTHAND(
border-right-width,
border_right_width,
BorderRightWidth,
CSS_PROPERTY_PARSE_FUNCTION |
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK,
CSS_PROPERTY_PARSE_FUNCTION,
"")
#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
CSS_PROP_BORDER(
@ -1220,8 +1217,7 @@ CSS_PROP_BORDER(
BorderTopWidth,
CSS_PROPERTY_PARSE_VALUE |
CSS_PROPERTY_VALUE_NONNEGATIVE |
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
"",
VARIANT_HKL | VARIANT_CALC,
kBorderWidthKTable,
@ -1231,8 +1227,7 @@ CSS_PROP_SHORTHAND(
border-width,
border_width,
BorderWidth,
CSS_PROPERTY_PARSE_FUNCTION |
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK,
CSS_PROPERTY_PARSE_FUNCTION,
"")
CSS_PROP_SHORTHAND(
border-radius,
@ -1351,8 +1346,7 @@ CSS_PROP_DISPLAY(
clip,
clip,
Clip,
CSS_PROPERTY_PARSE_FUNCTION |
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK,
CSS_PROPERTY_PARSE_FUNCTION,
"",
0,
nsnull,
@ -1693,8 +1687,7 @@ CSS_PROP_FONT(
FontSize,
CSS_PROPERTY_PARSE_VALUE |
CSS_PROPERTY_VALUE_NONNEGATIVE |
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE,
"",
VARIANT_HKLP | VARIANT_SYSFONT | VARIANT_CALC,
kFontSizeKTable,
@ -1777,8 +1770,7 @@ CSS_PROP_POSITION(
Height,
CSS_PROPERTY_PARSE_VALUE |
CSS_PROPERTY_VALUE_NONNEGATIVE |
CSS_PROPERTY_STORES_CALC |
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK,
CSS_PROPERTY_STORES_CALC,
"",
VARIANT_AHLP | VARIANT_CALC,
nsnull,
@ -1809,8 +1801,7 @@ CSS_PROP_POSITION(
left,
Left,
CSS_PROPERTY_PARSE_VALUE |
CSS_PROPERTY_STORES_CALC |
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK,
CSS_PROPERTY_STORES_CALC,
"",
VARIANT_AHLP | VARIANT_CALC,
nsnull,
@ -1821,8 +1812,7 @@ CSS_PROP_TEXT(
letter_spacing,
LetterSpacing,
CSS_PROPERTY_PARSE_VALUE |
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE,
"",
VARIANT_HL | VARIANT_NORMAL | VARIANT_CALC,
nsnull,
@ -1881,8 +1871,7 @@ CSS_PROP_SHORTHAND(
margin,
margin,
Margin,
CSS_PROPERTY_PARSE_FUNCTION |
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK,
CSS_PROPERTY_PARSE_FUNCTION,
"")
CSS_PROP_MARGIN(
margin-bottom,
@ -1890,8 +1879,7 @@ CSS_PROP_MARGIN(
MarginBottom,
CSS_PROPERTY_PARSE_VALUE |
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
CSS_PROPERTY_STORES_CALC |
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK,
CSS_PROPERTY_STORES_CALC,
"",
VARIANT_AHLP | VARIANT_CALC,
nsnull,
@ -1921,8 +1909,7 @@ CSS_PROP_SHORTHAND(
margin-left,
margin_left,
MarginLeft,
CSS_PROPERTY_PARSE_FUNCTION |
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK,
CSS_PROPERTY_PARSE_FUNCTION,
"")
#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
CSS_PROP_MARGIN(
@ -1967,8 +1954,7 @@ CSS_PROP_SHORTHAND(
margin-right,
margin_right,
MarginRight,
CSS_PROPERTY_PARSE_FUNCTION |
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK,
CSS_PROPERTY_PARSE_FUNCTION,
"")
#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
CSS_PROP_MARGIN(
@ -2035,8 +2021,7 @@ CSS_PROP_MARGIN(
MarginTop,
CSS_PROPERTY_PARSE_VALUE |
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
CSS_PROPERTY_STORES_CALC |
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK,
CSS_PROPERTY_STORES_CALC,
"",
VARIANT_AHLP | VARIANT_CALC,
nsnull,
@ -2216,8 +2201,7 @@ CSS_PROP_SHORTHAND(
padding,
padding,
Padding,
CSS_PROPERTY_PARSE_FUNCTION |
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK,
CSS_PROPERTY_PARSE_FUNCTION,
"")
CSS_PROP_PADDING(
padding-bottom,
@ -2226,8 +2210,7 @@ CSS_PROP_PADDING(
CSS_PROPERTY_PARSE_VALUE |
CSS_PROPERTY_VALUE_NONNEGATIVE |
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
CSS_PROPERTY_STORES_CALC |
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK,
CSS_PROPERTY_STORES_CALC,
"",
VARIANT_HLP | VARIANT_CALC,
nsnull,
@ -2258,8 +2241,7 @@ CSS_PROP_SHORTHAND(
padding-left,
padding_left,
PaddingLeft,
CSS_PROPERTY_PARSE_FUNCTION |
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK,
CSS_PROPERTY_PARSE_FUNCTION,
"")
#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
CSS_PROP_PADDING(
@ -2305,8 +2287,7 @@ CSS_PROP_SHORTHAND(
padding-right,
padding_right,
PaddingRight,
CSS_PROPERTY_PARSE_FUNCTION |
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK,
CSS_PROPERTY_PARSE_FUNCTION,
"")
#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
CSS_PROP_PADDING(
@ -2376,8 +2357,7 @@ CSS_PROP_PADDING(
CSS_PROPERTY_PARSE_VALUE |
CSS_PROPERTY_VALUE_NONNEGATIVE |
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
CSS_PROPERTY_STORES_CALC |
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK,
CSS_PROPERTY_STORES_CALC,
"",
VARIANT_HLP | VARIANT_CALC,
nsnull,
@ -2464,8 +2444,7 @@ CSS_PROP_POSITION(
right,
Right,
CSS_PROPERTY_PARSE_VALUE |
CSS_PROPERTY_STORES_CALC |
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK,
CSS_PROPERTY_STORES_CALC,
"",
VARIANT_AHLP | VARIANT_CALC,
nsnull,
@ -2687,8 +2666,7 @@ CSS_PROP_POSITION(
top,
Top,
CSS_PROPERTY_PARSE_VALUE |
CSS_PROPERTY_STORES_CALC |
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK,
CSS_PROPERTY_STORES_CALC,
"",
VARIANT_AHLP | VARIANT_CALC,
nsnull,
@ -2845,8 +2823,7 @@ CSS_PROP_POSITION(
Width,
CSS_PROPERTY_PARSE_VALUE |
CSS_PROPERTY_VALUE_NONNEGATIVE |
CSS_PROPERTY_STORES_CALC |
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK,
CSS_PROPERTY_STORES_CALC,
"",
VARIANT_AHKLP | VARIANT_CALC,
kWidthKTable,
@ -2877,8 +2854,7 @@ CSS_PROP_TEXT(
word_spacing,
WordSpacing,
CSS_PROPERTY_PARSE_VALUE |
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE,
"",
VARIANT_HL | VARIANT_NORMAL | VARIANT_CALC,
nsnull,

View File

@ -95,9 +95,6 @@ MOZ_STATIC_ASSERT((CSS_PROPERTY_PARSE_PROPERTY_MASK &
// Does this property suppor the hashless hex color quirk in quirks mode?
#define CSS_PROPERTY_HASHLESS_COLOR_QUIRK (1<<15)
// Does this property suppor the unitless length quirk in quirks mode?
#define CSS_PROPERTY_UNITLESS_LENGTH_QUIRK (1<<16)
/**
* Types of animatable values.
*/

View File

@ -159,7 +159,7 @@ var gCSSProperties = {
subproperties: [ "-moz-border-end-color", "-moz-border-end-style", "-moz-border-end-width" ],
initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ],
other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ],
invalid_values: [ "5%", "5", "5 green none" ]
invalid_values: [ "5%" ]
},
"-moz-border-end-color": {
domProp: "MozBorderEndColor",
@ -197,7 +197,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 5em)",
],
invalid_values: [ "5%", "5" ]
invalid_values: [ "5%" ]
},
"border-image": {
domProp: "borderImage",
@ -303,7 +303,7 @@ var gCSSProperties = {
"2px 2px calc(2px + 1%) 2px",
"1px 2px 2px 2px / 2px 2px calc(2px + 1%) 2px",
],
invalid_values: [ "2px -2px", "inherit 2px", "inherit / 2px", "2px inherit", "2px / inherit", "2px 2px 2px 2px 2px", "1px / 2px 2px 2px 2px 2px", "2", "2 2", "2px 2px 2px 2px / 2px 2px 2 2px" ]
invalid_values: [ "2px -2px", "inherit 2px", "inherit / 2px", "2px inherit", "2px / inherit", "2px 2px 2px 2px 2px", "1px / 2px 2px 2px 2px 2px" ]
},
"border-bottom-left-radius": {
domProp: "borderBottomLeftRadius",
@ -322,7 +322,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit" ]
},
"border-bottom-right-radius": {
domProp: "borderBottomRightRadius",
@ -341,7 +341,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit" ]
},
"border-top-left-radius": {
domProp: "borderTopLeftRadius",
@ -360,7 +360,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit" ]
},
"border-top-right-radius": {
domProp: "borderTopRightRadius",
@ -379,7 +379,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit" ]
},
"-moz-border-right-colors": {
domProp: "MozBorderRightColors",
@ -396,7 +396,7 @@ var gCSSProperties = {
subproperties: [ "-moz-border-start-color", "-moz-border-start-style", "-moz-border-start-width" ],
initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ],
other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ],
invalid_values: [ "5%", "5", "5 green solid" ]
invalid_values: [ "5%" ]
},
"-moz-border-start-color": {
domProp: "MozBorderStartColor",
@ -434,7 +434,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 5em)",
],
invalid_values: [ "5%", "5" ]
invalid_values: [ "5%" ]
},
"-moz-border-top-colors": {
domProp: "MozBorderTopColors",
@ -534,7 +534,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 5em)",
],
invalid_values: [ "3%", "-1px", "4" ]
invalid_values: [ "3%", "-1px" ]
},
"-moz-column-rule": {
domProp: "MozColumnRule",
@ -542,9 +542,9 @@ var gCSSProperties = {
type: CSS_TYPE_TRUE_SHORTHAND,
prerequisites: { "color": "green" },
subproperties: [ "-moz-column-rule-width", "-moz-column-rule-style", "-moz-column-rule-color" ],
initial_values: [ "medium none currentColor", "none", "medium", "currentColor" ],
other_values: [ "2px blue solid", "red dotted 1px", "ridge 4px orange", "5px solid" ],
invalid_values: [ "2px 3px 4px red", "dotted dashed", "5px dashed green 3px", "5 solid", "5 green solid" ]
initial_values: [ "medium none currentColor" ],
other_values: [ "2px blue solid", "red dotted 1px", "ridge 4px orange" ],
invalid_values: [ "2px 3px 4px red", "dotted dashed", "5px dashed green 3px" ]
},
"-moz-column-rule-width": {
domProp: "MozColumnRuleWidth",
@ -1037,7 +1037,7 @@ var gCSSProperties = {
type: CSS_TYPE_LONGHAND,
initial_values: [ "auto" ],
other_values: [ "rect(3px 20px 15px 4px)", "rect(17px, 21px, 33px, 2px)" ],
invalid_values: [ "rect(17px, 21px, 33, 2px)" ]
invalid_values: []
},
"-moz-margin-end": {
domProp: "MozMarginEnd",
@ -1055,7 +1055,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [ "5" ]
invalid_values: []
},
"-moz-margin-start": {
domProp: "MozMarginStart",
@ -1073,7 +1073,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [ "5" ]
invalid_values: []
},
"-moz-outline-radius": {
domProp: "MozOutlineRadius",
@ -1095,7 +1095,7 @@ var gCSSProperties = {
"2px 2px calc(2px + 1%) 2px",
"1px 2px 2px 2px / 2px 2px calc(2px + 1%) 2px",
],
invalid_values: [ "2px -2px", "inherit 2px", "inherit / 2px", "2px inherit", "2px / inherit", "2px 2px 2px 2px 2px", "1px / 2px 2px 2px 2px 2px", "2", "2 2", "2px 2px 2px 2px / 2px 2px 2 2px" ]
invalid_values: [ "2px -2px", "inherit 2px", "inherit / 2px", "2px inherit", "2px / inherit", "2px 2px 2px 2px 2px", "1px / 2px 2px 2px 2px 2px" ]
},
"-moz-outline-radius-bottomleft": {
domProp: "MozOutlineRadiusBottomleft",
@ -1114,7 +1114,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit" ]
},
"-moz-outline-radius-bottomright": {
domProp: "MozOutlineRadiusBottomright",
@ -1133,7 +1133,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit" ]
},
"-moz-outline-radius-topleft": {
domProp: "MozOutlineRadiusTopleft",
@ -1152,7 +1152,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit" ]
},
"-moz-outline-radius-topright": {
domProp: "MozOutlineRadiusTopright",
@ -1171,7 +1171,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit" ]
},
"-moz-padding-end": {
domProp: "MozPaddingEnd",
@ -1187,7 +1187,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [ "5" ]
invalid_values: []
},
"-moz-padding-start": {
domProp: "MozPaddingStart",
@ -1203,7 +1203,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [ "5" ]
invalid_values: []
},
"resize": {
domProp: "resize",
@ -1276,8 +1276,6 @@ var gCSSProperties = {
"matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)",
] : []),
invalid_values: ["1px", "#0000ff", "red", "auto",
"translatex(1)", "translatey(1)", "translate(2)",
"translate(-3, -4)",
"translatex(1px 1px)", "translatex(translatex(1px))",
"translatex(#0000ff)", "translatex(red)", "translatey()",
"matrix(1px, 2px, 3px, 4px, 5px, 6px)", "scale(150%)",
@ -1474,10 +1472,6 @@ var gCSSProperties = {
"50% left", "top 50%",
/* no quirks mode colors */
"-moz-radial-gradient(10% bottom, ffffff, black) scroll no-repeat",
/* no quirks mode lengths */
"-moz-linear-gradient(10 10px -45deg, red, blue) repeat",
"-moz-linear-gradient(10px 10 -45deg, red, blue) repeat",
"linear-gradient(red -99, yellow, green, blue 120%)",
/* bug 258080: don't accept background-position separated */
"left url(404.png) top", "top url(404.png) left",
/* not allowed to have color in non-bottom layer */
@ -1806,12 +1800,6 @@ var gCSSProperties = {
"-moz-element(#a()",
/* no quirks mode colors */
"linear-gradient(red, ff00ff)",
/* no quirks mode colors */
"-moz-radial-gradient(10% bottom, ffffff, black) scroll no-repeat",
/* no quirks mode lengths */
"-moz-linear-gradient(10 10px -45deg, red, blue) repeat",
"-moz-linear-gradient(10px 10 -45deg, red, blue) repeat",
"linear-gradient(red -99, yellow, green, blue 120%)",
/* Old syntax */
"-moz-linear-gradient(10px 10px, 20px, 30px 30px, 40px, from(blue), to(red))",
"-moz-radial-gradient(20px 20px, 10px 10px, from(green), to(#ff00ff))",
@ -2074,7 +2062,7 @@ var gCSSProperties = {
"top 20%", "bottom 20%", "50% left", "top 50%",
"50% bottom 10%", "right 10% 50%", "left right",
"top bottom", "left 10% right",
"top 20px bottom 20px", "left left", "20 20" ]
"top 20px bottom 20px", "left left" ]
},
"background-repeat": {
domProp: "backgroundRepeat",
@ -2115,7 +2103,7 @@ var gCSSProperties = {
"calc(-20px) calc(-50%)",
"calc(-20%) calc(-50%)"
],
invalid_values: [ "contain contain", "cover cover", "cover auto", "auto cover", "contain cover", "cover contain", "-5px 3px", "3px -5px", "auto -5px", "-5px auto", "5 3" ]
invalid_values: [ "contain contain", "cover cover", "cover auto", "auto cover", "contain cover", "cover contain", "-5px 3px", "3px -5px", "auto -5px", "-5px auto" ]
},
"border": {
domProp: "border",
@ -2124,7 +2112,7 @@ var gCSSProperties = {
subproperties: [ "border-bottom-color", "border-bottom-style", "border-bottom-width", "border-left-color", "border-left-style", "border-left-width", "border-right-color", "border-right-style", "border-right-width", "border-top-color", "border-top-style", "border-top-width", "-moz-border-top-colors", "-moz-border-right-colors", "-moz-border-bottom-colors", "-moz-border-left-colors", "border-image-source", "border-image-slice", "border-image-width", "border-image-outset", "border-image-repeat" ],
initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor", "calc(4px - 1px) none" ],
other_values: [ "solid", "medium solid", "green solid", "10px solid", "thick solid", "calc(2px) solid blue" ],
invalid_values: [ "5%", "medium solid ff00ff", "5 solid green" ]
invalid_values: [ "5%", "medium solid ff00ff" ]
},
"border-bottom": {
domProp: "borderBottom",
@ -2133,7 +2121,7 @@ var gCSSProperties = {
subproperties: [ "border-bottom-color", "border-bottom-style", "border-bottom-width" ],
initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ],
other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ],
invalid_values: [ "5%", "5", "5 solid green" ]
invalid_values: [ "5%" ]
},
"border-bottom-color": {
domProp: "borderBottomColor",
@ -2170,8 +2158,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 5em)",
],
invalid_values: [ "5%" ],
quirks_values: { "5": "5px" },
invalid_values: [ "5%" ]
},
"border-collapse": {
domProp: "borderCollapse",
@ -2198,7 +2185,7 @@ var gCSSProperties = {
subproperties: [ "border-left-color", "border-left-style", "border-left-width" ],
initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ],
other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ],
invalid_values: [ "5%", "5", "5 solid green" ]
invalid_values: [ "5%" ]
},
"border-left-color": {
domProp: "borderLeftColor",
@ -2235,8 +2222,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 5em)",
],
invalid_values: [ "5%" ],
quirks_values: { "5": "5px" },
invalid_values: [ "5%" ]
},
"border-right": {
domProp: "borderRight",
@ -2245,7 +2231,7 @@ var gCSSProperties = {
subproperties: [ "border-right-color", "border-right-style", "border-right-width" ],
initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ],
other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ],
invalid_values: [ "5%", "5", "5 solid green" ]
invalid_values: [ "5%" ]
},
"border-right-color": {
domProp: "borderRightColor",
@ -2282,8 +2268,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 5em)",
],
invalid_values: [ "5%" ],
quirks_values: { "5": "5px" },
invalid_values: [ "5%" ]
},
"border-spacing": {
domProp: "borderSpacing",
@ -2310,7 +2295,7 @@ var gCSSProperties = {
subproperties: [ "border-top-color", "border-top-style", "border-top-width" ],
initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ],
other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ],
invalid_values: [ "5%", "5", "5 solid green" ]
invalid_values: [ "5%" ]
},
"border-top-color": {
domProp: "borderTopColor",
@ -2347,8 +2332,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 5em)",
],
invalid_values: [ "5%" ],
quirks_values: { "5": "5px" },
invalid_values: [ "5%" ]
},
"border-width": {
domProp: "borderWidth",
@ -2358,8 +2342,7 @@ var gCSSProperties = {
prerequisites: { "border-style": "solid" },
initial_values: [ "medium", "3px", "medium medium", "3px medium medium", "medium 3px medium medium", "calc(3px) 3px calc(5px - 2px) calc(2px - -1px)" ],
other_values: [ "thin", "thick", "1px", "2em", "2px 0 0px 1em", "calc(2em)" ],
invalid_values: [ "5%" ],
quirks_values: { "5": "5px" },
invalid_values: [ "5%" ]
},
"bottom": {
domProp: "bottom",
@ -2377,7 +2360,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [ "5" ]
invalid_values: []
},
"box-shadow": {
domProp: "boxShadow",
@ -2399,7 +2382,7 @@ var gCSSProperties = {
"calc(2px) calc(2px) calc(2px)",
"calc(2px) calc(2px) calc(2px) calc(2px)"
],
invalid_values: [ "3% 3%", "1px 1px 1px 1px 1px", "2px 2px, none", "red 2px 2px blue", "inherit, 2px 2px", "2px 2px, inherit", "2px 2px -5px", "inset 4px 4px black inset", "inset inherit", "inset none", "3 3", "3px 3", "3 3px", "3px 3px 3", "3px 3px 3px 3" ]
invalid_values: [ "3% 3%", "1px 1px 1px 1px 1px", "2px 2px, none", "red 2px 2px blue", "inherit, 2px 2px", "2px 2px, inherit", "2px 2px -5px", "inset 4px 4px black inset", "inset inherit", "inset none" ]
},
"caption-side": {
domProp: "captionSide",
@ -2423,8 +2406,7 @@ var gCSSProperties = {
type: CSS_TYPE_LONGHAND,
initial_values: [ "auto" ],
other_values: [ "rect(0 0 0 0)", "rect(auto,auto,auto,auto)", "rect(3px, 4px, 4em, 0)", "rect(auto, 3em, 4pt, 2px)", "rect(2px 3px 4px 5px)" ],
invalid_values: [ "rect(auto, 3em, 2%, 5px)" ],
quirks_values: { "rect(1, 2, 3, 4)": "rect(1px, 2px, 3px, 4px)" },
invalid_values: [ "rect(auto, 3em, 2%, 5px)" ]
},
"color": {
domProp: "color",
@ -2530,7 +2512,7 @@ var gCSSProperties = {
subproperties: [ "font-style", "font-variant", "font-weight", "font-size", "line-height", "font-family", "font-stretch", "font-size-adjust", "-moz-font-feature-settings", "-moz-font-language-override" ],
initial_values: [ (gInitialFontFamilyIsSansSerif ? "medium sans-serif" : "medium serif") ],
other_values: [ "large serif", "9px fantasy", "bold italic small-caps 24px/1.4 Times New Roman, serif", "caption", "icon", "menu", "message-box", "small-caption", "status-bar" ],
invalid_values: [ "9 fantasy" ]
invalid_values: []
},
"font-family": {
domProp: "fontFamily",
@ -2585,8 +2567,7 @@ var gCSSProperties = {
"calc(-50%)",
"calc(-1px)"
],
invalid_values: [ "-2em", "-50%", "-1px" ],
quirks_values: { "5": "5px" },
invalid_values: [ "-2em", "-50%", "-1px" ]
},
"font-size-adjust": {
domProp: "fontSizeAdjust",
@ -2643,8 +2624,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [ "none", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available" ],
quirks_values: { "5": "5px" },
invalid_values: [ "none", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available" ]
},
"ime-mode": {
domProp: "imeMode",
@ -2670,8 +2650,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [],
quirks_values: { "5": "5px" },
invalid_values: []
},
"letter-spacing": {
domProp: "letterSpacing",
@ -2682,8 +2661,7 @@ var gCSSProperties = {
"calc(0px)", "calc(1em)", "calc(1em + 3px)",
"calc(15px / 2)", "calc(15px/2)", "calc(-3px)"
],
invalid_values: [],
quirks_values: { "5": "5px" },
invalid_values: []
},
"line-height": {
domProp: "lineHeight",
@ -2763,8 +2741,7 @@ var gCSSProperties = {
subproperties: [ "margin-top", "margin-right", "margin-bottom", "margin-left" ],
initial_values: [ "0", "0px 0 0em", "0% 0px 0em 0pt" ],
other_values: [ "3px 0", "2em 4px 2pt", "1em 2em 3px 4px" ],
invalid_values: [],
quirks_values: { "5": "5px", "3px 6px 2 5px": "3px 6px 2px 5px" },
invalid_values: []
},
"margin-bottom": {
domProp: "marginBottom",
@ -2780,8 +2757,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [ ],
quirks_values: { "5": "5px" },
invalid_values: [ ]
},
"margin-left": {
domProp: "marginLeft",
@ -2798,8 +2774,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [ "..25px", ".+5px", ".px", "-.px", "++5px", "-+4px", "+-3px", "--7px", "+-.6px", "-+.5px", "++.7px", "--.4px" ],
quirks_values: { "5": "5px" },
invalid_values: [ "..25px", ".+5px", ".px", "-.px", "++5px", "-+4px", "+-3px", "--7px", "+-.6px", "-+.5px", "++.7px", "--.4px" ]
},
"margin-right": {
domProp: "marginRight",
@ -2816,8 +2791,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [ ],
quirks_values: { "5": "5px" },
invalid_values: [ ]
},
"margin-top": {
domProp: "marginTop",
@ -2833,8 +2807,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [ ],
quirks_values: { "5": "5px" },
invalid_values: [ ]
},
"marker-offset": {
domProp: "markerOffset",
@ -2869,7 +2842,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [ "auto", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", "5" ]
invalid_values: [ "auto", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available" ]
},
"max-width": {
domProp: "maxWidth",
@ -2886,7 +2859,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [ "auto", "5" ]
invalid_values: [ "auto" ]
},
"min-height": {
domProp: "minHeight",
@ -2901,7 +2874,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [ "none", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", "5" ]
invalid_values: [ "none", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available" ]
},
"min-width": {
domProp: "minWidth",
@ -2916,7 +2889,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [ "none", "5" ]
invalid_values: [ "none" ]
},
"opacity": {
domProp: "opacity",
@ -2956,7 +2929,7 @@ var gCSSProperties = {
"currentColor", "none medium currentcolor"
],
other_values: [ "solid", "medium solid", "green solid", "10px solid", "thick solid" ],
invalid_values: [ "5%", "5", "5 solid green" ]
invalid_values: [ "5%" ]
},
"outline-color": {
domProp: "outlineColor",
@ -3000,7 +2973,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 5em)",
],
invalid_values: [ "5%", "5" ]
invalid_values: [ "5%" ]
},
"overflow": {
domProp: "overflow",
@ -3037,8 +3010,7 @@ var gCSSProperties = {
subproperties: [ "padding-top", "padding-right", "padding-bottom", "padding-left" ],
initial_values: [ "0", "0px 0 0em", "0% 0px 0em 0pt", "calc(0px) calc(0em) calc(-2px) calc(-1%)" ],
other_values: [ "3px 0", "2em 4px 2pt", "1em 2em 3px 4px" ],
invalid_values: [],
quirks_values: { "5": "5px", "3px 6px 2 5px": "3px 6px 2px 5px" },
invalid_values: []
},
"padding-bottom": {
domProp: "paddingBottom",
@ -3052,8 +3024,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [ ],
quirks_values: { "5": "5px" },
invalid_values: [ ]
},
"padding-left": {
domProp: "paddingLeft",
@ -3068,8 +3039,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [ ],
quirks_values: { "5": "5px" },
invalid_values: [ ]
},
"padding-right": {
domProp: "paddingRight",
@ -3084,8 +3054,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [ ],
quirks_values: { "5": "5px" },
invalid_values: [ ]
},
"padding-top": {
domProp: "paddingTop",
@ -3099,8 +3068,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [ ],
quirks_values: { "5": "5px" },
invalid_values: [ ]
},
"page": {
domProp: "page",
@ -3178,8 +3146,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [],
quirks_values: { "5": "5px" },
invalid_values: []
},
"size": {
/* XXX not a real property; applies only to page context */
@ -3275,7 +3242,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [ "5" ]
invalid_values: []
},
"text-overflow": {
domProp: "textOverflow",
@ -3304,7 +3271,7 @@ var gCSSProperties = {
"calc(2px) calc(2px)",
"calc(2px) calc(2px) calc(2px)",
],
invalid_values: [ "3% 3%", "2px 2px -5px", "2px 2px 2px 2px", "2px 2px, none", "none, 2px 2px", "inherit, 2px 2px", "2px 2px, inherit", "2 2px", "2px 2", "2px 2px 2", "2px 2px 2px 2",
invalid_values: [ "3% 3%", "2px 2px -5px", "2px 2px 2px 2px", "2px 2px, none", "none, 2px 2px", "inherit, 2px 2px", "2px 2px, inherit",
"calc(2px) calc(2px) calc(2px) calc(2px)"
]
},
@ -3332,8 +3299,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [],
quirks_values: { "5": "5px" },
invalid_values: []
},
"transition": {
domProp: "transition",
@ -3397,7 +3363,7 @@ var gCSSProperties = {
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [ "5" ]
invalid_values: []
},
"visibility": {
domProp: "visibility",
@ -3519,8 +3485,7 @@ var gCSSProperties = {
"calc(3em / 100% * 3em)",
"calc(3em * (3em / 100%))",
"calc(3em * 3em / 100%)",
],
quirks_values: { "5": "5px" },
]
},
"word-break": {
domProp: "wordBreak",
@ -3542,8 +3507,7 @@ var gCSSProperties = {
"calc(15px / 2)", "calc(15px/2)",
"calc(-2em)"
],
invalid_values: [],
quirks_values: { "5": "5px" },
invalid_values: []
},
"word-wrap": {
domProp: "wordWrap",