Backed out changeset ac282e15dc02 (bug 774122)
authorGavin Sharp <gavin@gavinsharp.com>
Mon, 16 Jul 2012 01:04:31 -0700
changeset 99399 33ebe0407469111eee758b11e4bb3cd8a1236a3d
parent 99398 588ea3ebb1ef1690b451d8c96ee108fb65ca5d4e
child 99400 6c581f1010fac835844b05043b4d30d73e543de3
push id11977
push usergsharp@mozilla.com
push dateMon, 16 Jul 2012 08:05:43 +0000
treeherdermozilla-inbound@6c581f1010fa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs774122
milestone16.0a1
backs outac282e15dc027d7b3898e817b46f7c4ffb07fb09
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset ac282e15dc02 (bug 774122)
layout/style/nsCSSParser.cpp
layout/style/nsCSSPropList.h
layout/style/nsCSSProps.h
layout/style/test/property_database.js
layout/style/test/test_property_syntax_errors.html
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -648,19 +648,16 @@ protected:
 
   // After an UngetToken is done this flag is true. The next call to
   // GetToken clears the flag.
   bool mHavePushBack : 1;
 
   // True if we are in quirks mode; false in standards or almost standards mode
   bool          mNavQuirkMode : 1;
 
-  // True when the hashless color quirk applies.
-  bool mHashlessColorQuirk : 1;
-
   // True if unsafe rules should be allowed
   bool mUnsafeRulesEnabled : 1;
 
   // True for parsing media lists for HTML attributes, where we have to
   // ignore CSS comments.
   bool mHTMLMediaMode : 1;
 
   // This flag is set when parsing a non-box shorthand; it's used to not apply
@@ -744,17 +741,16 @@ static void AppendRuleToSheet(css::Rule*
 CSSParserImpl::CSSParserImpl()
   : mToken(),
     mScanner(),
     mChildLoader(nsnull),
     mSection(eCSSSection_Charset),
     mNameSpaceMap(nsnull),
     mHavePushBack(false),
     mNavQuirkMode(false),
-    mHashlessColorQuirk(false),
     mUnsafeRulesEnabled(false),
     mHTMLMediaMode(false),
     mParsingCompoundProperty(false)
 #ifdef DEBUG
     , mScannerInited(false)
 #endif
     , mNextFree(nsnull)
 {
@@ -3751,17 +3747,17 @@ CSSParserImpl::ParseColor(nsCSSValue& aV
         return false;
       }
       break;
     default:
       break;
   }
 
   // try 'xxyyzz' without '#' prefix for compatibility with IE and Nav4x (bug 23236 and 45804)
-  if (mHashlessColorQuirk) {
+  if (mNavQuirkMode && !IsParsingCompoundProperty()) {
     // - If the string starts with 'a-f', the nsCSSScanner builds the
     //   token as a eCSSToken_Ident and we can parse the string as a
     //   'xxyyzz' RGB color.
     // - If it only contains '0-9' digits, the token is a
     //   eCSSToken_Number and it must be converted back to a 6
     //   characters string to be parsed as a RGB color.
     // - If it starts with '0-9' and contains any 'a-f', the token is a
     //   eCSSToken_Dimension, the mNumber part must be converted back to
@@ -4552,17 +4548,17 @@ CSSParserImpl::ParseVariant(nsCSSValue& 
     return ParseImageRect(aValue);
   }
   if ((aVariantMask & VARIANT_ELEMENT) != 0 &&
       eCSSToken_Function == tk->mType &&
       tk->mIdent.LowerCaseEqualsLiteral("-moz-element")) {
     return ParseElement(aValue);
   }
   if ((aVariantMask & VARIANT_COLOR) != 0) {
-    if (mHashlessColorQuirk || // NONSTANDARD: Nav interprets 'xxyyzz' values even without '#' prefix
+    if ((mNavQuirkMode && !IsParsingCompoundProperty()) || // NONSTANDARD: Nav interprets 'xxyyzz' values even without '#' prefix
         (eCSSToken_ID == tk->mType) ||
         (eCSSToken_Ref == tk->mType) ||
         (eCSSToken_Ident == tk->mType) ||
         ((eCSSToken_Function == tk->mType) &&
          (tk->mIdent.LowerCaseEqualsLiteral("rgb") ||
           tk->mIdent.LowerCaseEqualsLiteral("hsl") ||
           tk->mIdent.LowerCaseEqualsLiteral("-moz-rgba") ||
           tk->mIdent.LowerCaseEqualsLiteral("-moz-hsla") ||
@@ -5613,68 +5609,46 @@ static const nsCSSProperty kOutlineRadiu
   eCSSProperty__moz_outline_radius_topRight,
   eCSSProperty__moz_outline_radius_bottomRight,
   eCSSProperty__moz_outline_radius_bottomLeft
 };
 
 bool
 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");
-  if (mNavQuirkMode) {
-    mHashlessColorQuirk =
-      nsCSSProps::PropHasFlags(aPropID, CSS_PROPERTY_HASHLESS_COLOR_QUIRK);
-  }
-
   NS_ASSERTION(aPropID < eCSSProperty_COUNT, "index out of range");
-  bool result;
   switch (nsCSSProps::PropertyParseType(aPropID)) {
     case CSS_PROPERTY_PARSE_INACCESSIBLE: {
       // The user can't use these
       REPORT_UNEXPECTED(PEInaccessibleProperty2);
-      result = false;
-      break;
+      return false;
     }
     case CSS_PROPERTY_PARSE_FUNCTION: {
-      result = ParsePropertyByFunction(aPropID);
-      break;
+      return ParsePropertyByFunction(aPropID);
     }
     case CSS_PROPERTY_PARSE_VALUE: {
-      result = false;
       nsCSSValue value;
       if (ParseSingleValueProperty(value, aPropID)) {
         if (ExpectEndProperty()) {
           AppendValue(aPropID, value);
-          result = true;
+          return true;
         }
         // XXX Report errors?
       }
       // XXX Report errors?
-      break;
+      return false;
     }
     case CSS_PROPERTY_PARSE_VALUE_LIST: {
-      result = ParseValueList(aPropID);
-      break;
-    }
-    default: {
-      result = false;
-      NS_ABORT_IF_FALSE(false,
-                        "Property's flags field in nsCSSPropList.h is missing "
-                        "one of the CSS_PROPERTY_PARSE_* constants");
-      break;
-    }
-  }
-
-  if (mNavQuirkMode) {
-    mHashlessColorQuirk = false;
-  }
-
-  return result;
+      return ParseValueList(aPropID);
+    }
+  }
+  NS_ABORT_IF_FALSE(false,
+                    "Property's flags field in nsCSSPropList.h is missing "
+                    "one of the CSS_PROPERTY_PARSE_* constants");
+  return false;
 }
 
 bool
 CSSParserImpl::ParsePropertyByFunction(nsCSSProperty aPropID)
 {
   switch (aPropID) {  // handle shorthand or multiple properties
   case eCSSProperty_background:
     return ParseBackground();
--- a/layout/style/nsCSSPropList.h
+++ b/layout/style/nsCSSPropList.h
@@ -477,18 +477,17 @@ CSS_PROP_BACKGROUND(
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_BACKGROUND(
     background-color,
     background_color,
     BackgroundColor,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
-        CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED |
-        CSS_PROPERTY_HASHLESS_COLOR_QUIRK,
+        CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED,
     "",
     VARIANT_HC,
     nsnull,
     offsetof(nsStyleBackground, mBackgroundColor),
     eStyleAnimType_Color)
 CSS_PROP_BACKGROUND(
     background-image,
     background_image,
@@ -588,18 +587,17 @@ CSS_PROP_SHORTHAND(
     CSS_PROPERTY_PARSE_FUNCTION,
     "")
 CSS_PROP_BORDER(
     border-bottom-color,
     border_bottom_color,
     BorderBottomColor,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
-        CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED |
-        CSS_PROPERTY_HASHLESS_COLOR_QUIRK,
+        CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED,
     "",
     VARIANT_HCK,
     kBorderColorKTable,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_Custom)
 CSS_PROP_BORDER(
     -moz-border-bottom-colors,
     border_bottom_colors,
@@ -644,18 +642,17 @@ CSS_PROP_TABLEBORDER(
     VARIANT_HK,
     kBorderCollapseKTable,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_SHORTHAND(
     border-color,
     border_color,
     BorderColor,
-    CSS_PROPERTY_PARSE_FUNCTION |
-        CSS_PROPERTY_HASHLESS_COLOR_QUIRK,
+    CSS_PROPERTY_PARSE_FUNCTION,
     "")
 CSS_PROP_SHORTHAND(
     -moz-border-end,
     border_end,
     CSS_PROP_DOMPROP_PREFIXED(BorderEnd),
     CSS_PROPERTY_PARSE_FUNCTION,
     "")
 CSS_PROP_SHORTHAND(
@@ -783,18 +780,17 @@ CSS_PROP_SHORTHAND(
     border_left,
     BorderLeft,
     CSS_PROPERTY_PARSE_FUNCTION,
     "")
 CSS_PROP_SHORTHAND(
     border-left-color,
     border_left_color,
     BorderLeftColor,
-    CSS_PROPERTY_PARSE_FUNCTION |
-        CSS_PROPERTY_HASHLESS_COLOR_QUIRK,
+    CSS_PROPERTY_PARSE_FUNCTION,
     "")
 #ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
 CSS_PROP_BORDER(
     border-left-color-value,
     border_left_color_value,
     BorderLeftColorValue,
     CSS_PROPERTY_PARSE_INACCESSIBLE |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
@@ -938,18 +934,17 @@ CSS_PROP_SHORTHAND(
     border_right,
     BorderRight,
     CSS_PROPERTY_PARSE_FUNCTION,
     "")
 CSS_PROP_SHORTHAND(
     border-right-color,
     border_right_color,
     BorderRightColor,
-    CSS_PROPERTY_PARSE_FUNCTION |
-        CSS_PROPERTY_HASHLESS_COLOR_QUIRK,
+    CSS_PROPERTY_PARSE_FUNCTION,
     "")
 #ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
 CSS_PROP_BORDER(
     border-right-color-value,
     border_right_color_value,
     BorderRightColorValue,
     CSS_PROPERTY_PARSE_INACCESSIBLE |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
@@ -1176,18 +1171,17 @@ CSS_PROP_SHORTHAND(
     CSS_PROPERTY_PARSE_FUNCTION,
     "")
 CSS_PROP_BORDER(
     border-top-color,
     border_top_color,
     BorderTopColor,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
-        CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED |
-        CSS_PROPERTY_HASHLESS_COLOR_QUIRK,
+        CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED,
     "",
     VARIANT_HCK,
     kBorderColorKTable,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_Custom)
 CSS_PROP_BORDER(
     -moz-border-top-colors,
     border_top_colors,
@@ -1353,18 +1347,17 @@ CSS_PROP_DISPLAY(
     offsetof(nsStyleDisplay, mClip),
     eStyleAnimType_Custom)
 CSS_PROP_COLOR(
     color,
     color,
     Color,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
-        CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED |
-        CSS_PROPERTY_HASHLESS_COLOR_QUIRK,
+        CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED,
     "",
     VARIANT_HC,
     nsnull,
     offsetof(nsStyleColor, mColor),
     eStyleAnimType_Color)
 CSS_PROP_SHORTHAND(
     -moz-columns,
     _moz_columns,
--- a/layout/style/nsCSSProps.h
+++ b/layout/style/nsCSSProps.h
@@ -87,18 +87,17 @@ MOZ_STATIC_ASSERT((CSS_PROPERTY_PARSE_PR
 #define CSS_PROPERTY_VALUE_RESTRICTION_MASK       (3<<13)
 // The parser (in particular, CSSParserImpl::ParseSingleValueProperty)
 // should enforce that the value of this property must be 0 or larger.
 #define CSS_PROPERTY_VALUE_NONNEGATIVE            (1<<13)
 // The parser (in particular, CSSParserImpl::ParseSingleValueProperty)
 // should enforce that the value of this property must be 1 or larger.
 #define CSS_PROPERTY_VALUE_AT_LEAST_ONE           (2<<13)
 
-// Does this property suppor the hashless hex color quirk in quirks mode?
-#define CSS_PROPERTY_HASHLESS_COLOR_QUIRK         (1<<15)
+// NOTE: next free bit is (1<<15)
 
 /**
  * Types of animatable values.
  */
 enum nsStyleAnimType {
   // requires a custom implementation in
   // nsStyleAnimation::ExtractComputedValue
   eStyleAnimType_Custom,
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -24,18 +24,16 @@ const CSS_TYPE_SHORTHAND_AND_LONGHAND = 
 //	 initial_values: Values whose computed value should be the same as the
 //	   computed value for the property's initial value.
 //	 other_values: Values whose computed value should be different from the
 //	   computed value for the property's initial value.
 //	 XXX Should have a third field for values whose computed value may or
 //	   may not be the same as for the property's initial value.
 //	 invalid_values: Things that are not values for the property and
 //	   should be rejected.
-//	 quirks_values: Values that should be accepted in quirks mode only,
-//	   mapped to the values they are equivalent to.
 
 // Helper functions used to construct gCSSProperties.
 
 function initial_font_family_is_sans_serif()
 {
 	// The initial value of 'font-family' might be 'serif' or
 	// 'sans-serif'.
 	var div = document.createElement("div");
@@ -145,17 +143,17 @@ var gCSSProperties = {
 		invalid_values: []
 	},
 	"-moz-border-bottom-colors": {
 		domProp: "MozBorderBottomColors",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "none" ],
 		other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ],
-		invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ]
+		invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red" ]
 	},
 	"-moz-border-end": {
 		domProp: "MozBorderEnd",
 		inherited: false,
 		type: CSS_TYPE_TRUE_SHORTHAND,
 		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" ],
@@ -163,17 +161,17 @@ var gCSSProperties = {
 	},
 	"-moz-border-end-color": {
 		domProp: "MozBorderEndColor",
 		inherited: false,
 		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
 		get_computed: logical_box_prop_get_computed,
 		initial_values: [ "currentColor" ],
 		other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
-		invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "000000" ]
+		invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000" ]
 	},
 	"-moz-border-end-style": {
 		domProp: "MozBorderEndStyle",
 		inherited: false,
 		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
 		get_computed: logical_box_prop_get_computed,
 		/* XXX hidden is sometimes the same as initial */
 		initial_values: [ "none" ],
@@ -276,17 +274,17 @@ var gCSSProperties = {
 		invalid_values: [ "none", "stretch stretch stretch", "0", "10", "0%", "0px" ]
 	},
 	"-moz-border-left-colors": {
 		domProp: "MozBorderLeftColors",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "none" ],
 		other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ],
-		invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ]
+		invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red" ]
 	},
 	"border-radius": {
 		domProp: "borderRadius",
 		inherited: false,
 		type: CSS_TYPE_TRUE_SHORTHAND,
 		prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
 		subproperties: [ "border-bottom-left-radius", "border-bottom-right-radius", "border-top-left-radius", "border-top-right-radius" ],
 		initial_values: [ "0", "0px", "0%", "0px 0 0 0px", "calc(-2px)", "calc(-1%)", "calc(0px) calc(0pt) calc(0%) calc(0em)" ],
@@ -382,17 +380,17 @@ var gCSSProperties = {
 		invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit" ]
 	},
 	"-moz-border-right-colors": {
 		domProp: "MozBorderRightColors",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "none" ],
 		other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ],
-		invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ]
+		invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red" ]
 	},
 	"-moz-border-start": {
 		domProp: "MozBorderStart",
 		inherited: false,
 		type: CSS_TYPE_TRUE_SHORTHAND,
 		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" ],
@@ -400,17 +398,17 @@ var gCSSProperties = {
 	},
 	"-moz-border-start-color": {
 		domProp: "MozBorderStartColor",
 		inherited: false,
 		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
 		get_computed: logical_box_prop_get_computed,
 		initial_values: [ "currentColor" ],
 		other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
-		invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "000000" ]
+		invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000" ]
 	},
 	"-moz-border-start-style": {
 		domProp: "MozBorderStartStyle",
 		inherited: false,
 		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
 		get_computed: logical_box_prop_get_computed,
 		/* XXX hidden is sometimes the same as initial */
 		initial_values: [ "none" ],
@@ -437,17 +435,17 @@ var gCSSProperties = {
 		invalid_values: [ "5%" ]
 	},
 	"-moz-border-top-colors": {
 		domProp: "MozBorderTopColors",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "none" ],
 		other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ],
-		invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ]
+		invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red" ]
 	},
 	"-moz-box-align": {
 		domProp: "MozBoxAlign",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "stretch" ],
 		other_values: [ "start", "center", "baseline", "end" ],
 		invalid_values: []
@@ -826,17 +824,17 @@ var gCSSProperties = {
 	},
 	"-moz-column-rule-color": {
 		domProp: "MozColumnRuleColor",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		prerequisites: { "color": "green" },
 		initial_values: [ "currentColor", "-moz-use-text-color" ],
 		other_values: [ "red", "blue", "#ffff00" ],
-		invalid_values: [ "ffff00" ]
+		invalid_values: [ ]
 	},
 	"-moz-column-width": {
 		domProp: "MozColumnWidth",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "auto" ],
 		other_values: [
 			"15px",
@@ -1465,18 +1463,16 @@ var gCSSProperties = {
 				/* test cases with clip+origin in the shorthand */
 				"url(404.png) green padding-box",
 				"url(404.png) border-box transparent",
 				"content-box url(404.png) blue",
 		],
 		invalid_values: [
 			/* mixes with keywords have to be in correct order */
 			"50% left", "top 50%",
-			/* no quirks mode colors */
-			"-moz-radial-gradient(10% bottom, ffffff, black) scroll no-repeat",
 			/* 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 */
 			"url(404.png) transparent, url(404.png)",
 			"url(404.png) red, url(404.png)",
 			"url(404.png) transparent, url(404.png) transparent",
 			"url(404.png) transparent red, url(404.png) transparent red",
 			"url(404.png) red, url(404.png) red",
@@ -1511,18 +1507,17 @@ var gCSSProperties = {
 		invalid_values: [ "margin-box", "border-box border-box" ]
 	},
 	"background-color": {
 		domProp: "backgroundColor",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "transparent", "rgba(255, 127, 15, 0)", "hsla(240, 97%, 50%, 0.0)", "rgba(0, 0, 0, 0)", "rgba(255,255,255,-3.7)" ],
 		other_values: [ "green", "rgb(255, 0, 128)", "#fc2", "#96ed2a", "black", "rgba(255,255,0,3)" ],
-		invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "rgb(255.0,0.387,3489)" ],
-		quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
+		invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "rgb(255.0,0.387,3489)" ]
 	},
 	"background-image": {
 		domProp: "backgroundImage",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "none" ],
 		other_values: [
 		"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')", 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
@@ -1793,18 +1788,16 @@ var gCSSProperties = {
 		"-moz-radial-gradient(left calc(100px + -25px), red, blue)",
 		],
 		invalid_values: [
 			"-moz-element(#a:1)",
 			"-moz-element(a#a)",
 			"-moz-element(#a a)",
 			"-moz-element(#a+a)",
 			"-moz-element(#a()",
-			/* no quirks mode colors */
-			"linear-gradient(red, ff00ff)",
 			/* 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))",
 			"-moz-radial-gradient(10px 10px, 20%, 40px 40px, 10px, from(green), to(#ff00ff))",
 			"-moz-linear-gradient(10px, 20px, 30px, 40px, color-stop(0.5, #00ccff))",
 			"-moz-linear-gradient(20px 20px, from(blue), to(red))",
 			"-moz-linear-gradient(40px 40px, 10px 10px, from(blue) to(red) color-stop(10%, fuchsia))",
 			"-moz-linear-gradient(20px 20px 30px, 10px 10px, from(red), to(#ff0000))",
@@ -2107,17 +2100,17 @@ var gCSSProperties = {
 	},
 	"border": {
 		domProp: "border",
 		inherited: false,
 		type: CSS_TYPE_TRUE_SHORTHAND,
 		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" ]
+		invalid_values: [ "5%" ]
 	},
 	"border-bottom": {
 		domProp: "borderBottom",
 		inherited: false,
 		type: CSS_TYPE_TRUE_SHORTHAND,
 		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" ],
@@ -2125,18 +2118,17 @@ var gCSSProperties = {
 	},
 	"border-bottom-color": {
 		domProp: "borderBottomColor",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		prerequisites: { "color": "black" },
 		initial_values: [ "currentColor", "-moz-use-text-color" ],
 		other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
-		invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000" ],
-		quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
+		invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000" ]
 	},
 	"border-bottom-style": {
 		domProp: "borderBottomStyle",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		/* XXX hidden is sometimes the same as initial */
 		initial_values: [ "none" ],
 		other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ],
@@ -2170,18 +2162,17 @@ var gCSSProperties = {
 	},
 	"border-color": {
 		domProp: "borderColor",
 		inherited: false,
 		type: CSS_TYPE_TRUE_SHORTHAND,
 		subproperties: [ "border-top-color", "border-right-color", "border-bottom-color", "border-left-color" ],
 		initial_values: [ "currentColor", "currentColor currentColor", "currentColor currentColor currentColor", "currentColor currentColor currentcolor CURRENTcolor" ],
 		other_values: [ "green", "currentColor green", "currentColor currentColor green", "currentColor currentColor currentColor green", "rgba(255,128,0,0.5)", "transparent" ],
-		invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000" ],
-		quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
+		invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000" ]
 	},
 	"border-left": {
 		domProp: "borderLeft",
 		inherited: false,
 		type: CSS_TYPE_TRUE_SHORTHAND,
 		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" ],
@@ -2189,18 +2180,17 @@ var gCSSProperties = {
 	},
 	"border-left-color": {
 		domProp: "borderLeftColor",
 		inherited: false,
 		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
 		prerequisites: { "color": "black" },
 		initial_values: [ "currentColor", "-moz-use-text-color" ],
 		other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
-		invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000" ],
-		quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
+		invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000" ]
 	},
 	"border-left-style": {
 		domProp: "borderLeftStyle",
 		inherited: false,
 		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
 		/* XXX hidden is sometimes the same as initial */
 		initial_values: [ "none" ],
 		other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ],
@@ -2235,18 +2225,17 @@ var gCSSProperties = {
 	},
 	"border-right-color": {
 		domProp: "borderRightColor",
 		inherited: false,
 		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
 		prerequisites: { "color": "black" },
 		initial_values: [ "currentColor", "-moz-use-text-color" ],
 		other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
-		invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000" ],
-		quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
+		invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000" ]
 	},
 	"border-right-style": {
 		domProp: "borderRightStyle",
 		inherited: false,
 		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
 		/* XXX hidden is sometimes the same as initial */
 		initial_values: [ "none" ],
 		other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ],
@@ -2299,18 +2288,17 @@ var gCSSProperties = {
 	},
 	"border-top-color": {
 		domProp: "borderTopColor",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		prerequisites: { "color": "black" },
 		initial_values: [ "currentColor", "-moz-use-text-color" ],
 		other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
-		invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000" ],
-		quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
+		invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000" ]
 	},
 	"border-top-style": {
 		domProp: "borderTopStyle",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		/* XXX hidden is sometimes the same as initial */
 		initial_values: [ "none" ],
 		other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ],
@@ -2410,18 +2398,17 @@ var gCSSProperties = {
 	},
 	"color": {
 		domProp: "color",
 		inherited: true,
 		type: CSS_TYPE_LONGHAND,
 		/* XXX should test currentColor, but may or may not be initial */
 		initial_values: [ "black", "#000" ],
 		other_values: [ "green", "#f3c", "#fed292", "rgba(45,300,12,2)", "transparent", "-moz-nativehyperlinktext", "rgba(255,128,0,0.5)" ],
-		invalid_values: [ "#f", "#ff", "#ffff", "#fffff", "#fffffff", "#ffffffff", "#fffffffff" ],
-		quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a", "fff": "#ffffff", "ffffff": "#ffffff", },
+		invalid_values: [ "fff", "ffffff", "#f", "#ff", "#ffff", "#fffff", "#fffffff", "#ffffffff", "#fffffffff" ]
 	},
 	"content": {
 		domProp: "content",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		/* XXX needs to be on pseudo-elements */
 		initial_values: [ "normal", "none" ],
 		other_values: [ '""', "''", '"hello"', "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')", 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', 'counter(foo)', 'counter(bar, upper-roman)', 'counters(foo, ".")', "counters(bar, '-', lower-greek)", "'-' counter(foo) '.'", "attr(title)", "open-quote", "close-quote", "no-open-quote", "no-close-quote", "close-quote attr(title) counters(foo, '.', upper-alpha)", "counter(foo, none)", "counters(bar, '.', none)", "attr(\\32)", "attr(\\2)", "attr(-\\2)", "attr(-\\32)", "counter(\\2)", "counters(\\32, '.')", "counter(-\\32, upper-roman)", "counters(-\\2, '-', lower-greek)", "counter(\\()", "counters(a\\+b, '.')", "counter(\\}, upper-alpha)", "-moz-alt-content" ],
@@ -2933,17 +2920,17 @@ var gCSSProperties = {
 	},
 	"outline-color": {
 		domProp: "outlineColor",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		prerequisites: { "color": "black" },
 		initial_values: [ "currentColor", "-moz-use-text-color" ], // XXX should be invert
 		other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
-		invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "000000", "cc00ff" ]
+		invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000" ]
 	},
 	"outline-offset": {
 		domProp: "outlineOffset",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "0", "0px", "-0", "calc(0px)", "calc(3em + 2px - 2px - 3em)", "calc(-0em)" ],
 		other_values: [ "-3px", "1em", "calc(3em)", "calc(7pt + 3 * 2em)", "calc(-3px)" ],
 		invalid_values: [ "5%" ]
@@ -3206,17 +3193,17 @@ var gCSSProperties = {
 	},
 	"-moz-text-decoration-color": {
 		domProp: "MozTextDecorationColor",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		prerequisites: { "color": "black" },
 		initial_values: [ "currentColor", "-moz-use-text-color" ],
 		other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
-		invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "000000", "ff00ff" ]
+		invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000" ]
 	},
 	"-moz-text-decoration-line": {
 		domProp: "MozTextDecorationLine",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "none" ],
 		other_values: [ "underline", "overline", "line-through", "line-through underline", "underline overline line-through", "-moz-anchor-decoration", "-moz-anchor-decoration" ],
 		invalid_values: [ "none none", "underline none", "none underline", "line-through blink line-through", "underline overline line-through blink none", "underline overline line-throuh blink blink" ]
@@ -3577,17 +3564,17 @@ var gCSSProperties = {
 	},
 	"fill": {
 		domProp: "fill",
 		inherited: true,
 		type: CSS_TYPE_LONGHAND,
 		prerequisites: { "color": "blue" },
 		initial_values: [ "black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)" ],
 		other_values: [ "green", "#fc3", "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "none", "currentColor" ],
-		invalid_values: [ "000000", "ff00ff" ]
+		invalid_values: []
 	},
 	"fill-opacity": {
 		domProp: "fillOpacity",
 		inherited: true,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "1", "2.8", "1.000" ],
 		other_values: [ "0", "0.3", "-7.3" ],
 		invalid_values: []
@@ -3610,17 +3597,17 @@ var gCSSProperties = {
 	},
 	"flood-color": {
 		domProp: "floodColor",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		prerequisites: { "color": "blue" },
 		initial_values: [ "black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)" ],
 		other_values: [ "green", "#fc3", "currentColor" ],
-		invalid_values: [ "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "000000", "ff00ff" ]
+		invalid_values: [ "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green' ]
 	},
 	"flood-opacity": {
 		domProp: "floodOpacity",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "1", "2.8", "1.000" ],
 		other_values: [ "0", "0.3", "-7.3" ],
 		invalid_values: []
@@ -3635,17 +3622,17 @@ var gCSSProperties = {
 	},
 	"lighting-color": {
 		domProp: "lightingColor",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		prerequisites: { "color": "blue" },
 		initial_values: [ "white", "#fff", "#ffffff", "rgb(255,255,255)", "rgba(255,255,255,1.0)", "rgba(255,255,255,42.0)" ],
 		other_values: [ "green", "#fc3", "currentColor" ],
-		invalid_values: [ "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "000000", "ff00ff" ]
+		invalid_values: [ "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green' ]
 	},
 	"marker": {
 		domProp: "marker",
 		inherited: true,
 		type: CSS_TYPE_TRUE_SHORTHAND,
 		subproperties: [ "marker-start", "marker-mid", "marker-end" ],
 		initial_values: [ "none" ],
 		other_values: [ "url(#mysym)" ],
@@ -3693,33 +3680,33 @@ var gCSSProperties = {
 	},
 	"stop-color": {
 		domProp: "stopColor",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		prerequisites: { "color": "blue" },
 		initial_values: [ "black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)" ],
 		other_values: [ "green", "#fc3", "currentColor" ],
-		invalid_values: [ "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "000000", "ff00ff" ]
+		invalid_values: [ "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green' ]
 	},
 	"stop-opacity": {
 		domProp: "stopOpacity",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "1", "2.8", "1.000" ],
 		other_values: [ "0", "0.3", "-7.3" ],
 		invalid_values: []
 	},
 	"stroke": {
 		domProp: "stroke",
 		inherited: true,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "none" ],
 		other_values: [ "black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)", "green", "#fc3", "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "currentColor" ],
-		invalid_values: [ "000000", "ff00ff" ]
+		invalid_values: []
 	},
 	"stroke-dasharray": {
 		domProp: "strokeDasharray",
 		inherited: true,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "none" ],
 		other_values: [ "5px,3px,2px", "5px 3px 2px", "  5px ,3px	, 2px ", "1px", "5%", "3em" ],
 		invalid_values: [ "-5px,3px,2px", "5px,3px,-2px" ]
--- a/layout/style/test/test_property_syntax_errors.html
+++ b/layout/style/test/test_property_syntax_errors.html
@@ -3,95 +3,60 @@
 <!--
 -->
 <head>
   <title>Test that we reject syntax errors listed in property_database.js</title>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <script type="text/javascript" src="property_database.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
-<body onload="run()">
+<body>
 <p id="display"></p>
-<iframe id="quirks" src="data:text/html,<div id='testnode'></div>"></iframe>
 <div id="content" style="display: none">
 
 <div id="testnode"></div>
   
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
-SimpleTest.waitForExplicitFinish();
-
-function check_not_accepted(decl, property, info, badval)
-{
-  decl.setProperty(property, badval, "");
-
-  is(decl.getPropertyValue(property), "",
-     "invalid value '" + badval + "' not accepted for '" + property +
-     "' property");
+var gDeclaration = document.getElementById("testnode").style;
 
-  if ("subproperties" in info) {
-    for (var sidx in info.subproperties) {
-      var subprop = info.subproperties[sidx];
-      is(decl.getPropertyValue(subprop), "",
-         "invalid value '" + badval + "' not accepted for '" + property +
-         "' property when testing subproperty '" + subprop + "'");
-    }
-  }
-
-  decl.removeProperty(property);
+var gKnownFails = {
+  "pitch-range": [ " -0.01", "100.2", "108", "-3" ],
+  "richness": [ " -0.01", "100.2", "108", "-3" ],
+  "stress": [ " -0.01", "100.2", "108", "-3" ],
+  "volume": [ " -0.01", "100.2", "108", "-3" ]
 }
 
-function run()
-{
-  var gDeclaration = document.getElementById("testnode").style;
-  var gQuirksDeclaration = document.getElementById("quirks").contentDocument
-                             .getElementById("testnode").style;
+for (var property in gCSSProperties) {
+  var info = gCSSProperties[property];
+  for (var idx in info.invalid_values) {
+    var badval = info.invalid_values[idx];
+
+    gDeclaration.setProperty(property, badval, "");
+
+    var func = is;
+    if (property in gKnownFails &&
+        gKnownFails[property].indexOf(badval) != -1)
+      func = todo_is;
 
-  for (var property in gCSSProperties) {
-    var info = gCSSProperties[property];
-    for (var idx in info.invalid_values) {
-      check_not_accepted(gDeclaration, property, info,
-                         info.invalid_values[idx]);
-      check_not_accepted(gQuirksDeclaration, property, info,
-                         info.invalid_values[idx]);
+    func(gDeclaration.getPropertyValue(property), "",
+         "invalid value '" + badval + "' not accepted for '" + property +
+         "' property");
+
+    if ("subproperties" in info) {
+      for (var sidx in info.subproperties) {
+        var subprop = info.subproperties[sidx];
+        func(gDeclaration.getPropertyValue(subprop), "",
+             "invalid value '" + badval + "' not accepted for '" + property +
+             "' property when testing subproperty '" + subprop + "'");
+      }
     }
 
-    if ("quirks_values" in info) {
-      for (var quirkval in info.quirks_values) {
-        var standardval = info.quirks_values[quirkval];
-        check_not_accepted(gDeclaration, property, info, quirkval);
-
-        gQuirksDeclaration.setProperty(property, quirkval, "");
-        gDeclaration.setProperty(property, standardval, "");
-        var quirkret = gQuirksDeclaration.getPropertyValue(property);
-        var standardret = gDeclaration.getPropertyValue(property);
-        isnot(quirkret, "", property + ": " + quirkval +
-                            " should be accepted in quirks mode");
-        is(quirkret, standardret, property + ": " + quirkval + " result");
-
-        if ("subproperties" in info) {
-          for (var sidx in info.subproperties) {
-            var subprop = info.subproperties[sidx];
-            var quirksub = gQuirksDeclaration.getPropertyValue(subprop);
-            var standardsub = gDeclaration.getPropertyValue(subprop);
-            isnot(quirksub, "", property + ": " + quirkval +
-                                " should be accepted in quirks mode" +
-                                " when testing subproperty " + subprop);
-            is(quirksub, standardsub, property + ": " + quirkval + " result" +
-                                      " when testing subproperty " + subprop);
-          }
-        }
-
-        gQuirksDeclaration.removeProperty(property);
-        gDeclaration.removeProperty(property);
-      }
-    }
+    gDeclaration.removeProperty(property);
   }
-
-  SimpleTest.finish();
 }
 
 </script>
 </pre>
 </body>
 </html>