-moz-box-ordinal-group should not accept 0, since the code that uses the property ignores values of 0. (Bug 636034) r=bzbarsky
authorL. David Baron <dbaron@dbaron.org>
Thu, 03 Mar 2011 13:18:42 -0800
changeset 63571 b478771d0761fe1639480f2ac8d4a1de8a3e7ba7
parent 63570 ab94c1fd24cda2e7e65db9b3b552eb96c9494c0f
child 63572 63aee8dc13c664f21b3eda909cc9f1658fdf6d7e
push id19244
push userdbaron@mozilla.com
push dateWed, 23 Mar 2011 19:37:11 +0000
treeherdermozilla-central@6eb93bfd55b7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky
bugs636034
milestone2.0b13pre
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
-moz-box-ordinal-group should not accept 0, since the code that uses the property ignores values of 0. (Bug 636034) r=bzbarsky
layout/style/nsCSSParser.cpp
layout/style/test/property_database.js
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -5689,17 +5689,17 @@ CSSParserImpl::ParseSingleValueProperty(
     return ParseNonNegativeVariant(aValue, VARIANT_HN, nsnull);
   case eCSSProperty_box_orient:
     return ParseVariant(aValue, VARIANT_HK,
                         nsCSSProps::kBoxOrientKTable);
   case eCSSProperty_box_pack:
     return ParseVariant(aValue, VARIANT_HK,
                         nsCSSProps::kBoxPackKTable);
   case eCSSProperty_box_ordinal_group:
-    return ParseNonNegativeVariant(aValue, VARIANT_HI, nsnull);
+    return ParsePositiveNonZeroVariant(aValue, VARIANT_HI, nsnull);
 #ifdef MOZ_SVG
   case eCSSProperty_clip_path:
     return ParseVariant(aValue, VARIANT_HUO, nsnull);
   case eCSSProperty_clip_rule:
     return ParseVariant(aValue, VARIANT_HK,
                         nsCSSProps::kFillRuleKTable);
   case eCSSProperty_color_interpolation:
   case eCSSProperty_color_interpolation_filters:
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -364,18 +364,18 @@ var gCSSProperties = {
 		other_values: [ "1", "100", "0.1" ],
 		invalid_values: [ "10px", "-1" ]
 	},
 	"-moz-box-ordinal-group": {
 		domProp: "MozBoxOrdinalGroup",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "1" ],
-		other_values: [ "0", "100" ],
-		invalid_values: [ "1.0", "-1", "-1000" ]
+		other_values: [ "2", "100" ],
+		invalid_values: [ "1.0", "-1", "-1000", "0" ]
 	},
 	"-moz-box-orient": {
 		domProp: "MozBoxOrient",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "horizontal", "inline-axis" ],
 		other_values: [ "vertical", "block-axis" ],
 		invalid_values: []