Bug 1255384 - fix getCSSValuesForProperty for counter-*; r?heycam
This bug notes that getCSSValuesForProperty does not mention the
"none" value for counter-increment and counter-reset. This fixes the
problem by mentioning the variants in the entries in nsCSSPropList.h.
MozReview-Commit-ID: HpZIMIIejHc
--- a/devtools/shared/css/generated/properties-db.js
+++ b/devtools/shared/css/generated/properties-db.js
@@ -5251,28 +5251,30 @@ exports.CSS_PROPERTIES = {
"isInherited": false,
"subproperties": [
"counter-increment"
],
"supports": [],
"values": [
"inherit",
"initial",
+ "none",
"unset"
]
},
"counter-reset": {
"isInherited": false,
"subproperties": [
"counter-reset"
],
"supports": [],
"values": [
"inherit",
"initial",
+ "none",
"unset"
]
},
"cursor": {
"isInherited": true,
"subproperties": [
"cursor"
],
--- a/layout/inspector/tests/test_bug877690.html
+++ b/layout/inspector/tests/test_bug877690.html
@@ -217,16 +217,23 @@ function do_test() {
var expected = [ "inherit", "initial", "unset" ];
ok(testValues(values, expected), "property all's values.");
var prop = "quotes"
var values = InspectorUtils.getCSSValuesForProperty(prop);
var expected = [ "inherit", "initial", "unset", "none" ];
ok(testValues(values, expected), "property quotes's values.");
+ // Regression test for bug 1255384.
+ for (prop of ["counter-increment", "counter-reset"]) {
+ var values = InspectorUtils.getCSSValuesForProperty(prop);
+ var expected = [ "inherit", "initial", "unset", "none" ];
+ ok(testValues(values, expected), "property " + prop + "'s values.");
+ }
+
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
addLoadEvent(do_test);
</script>
</head>
--- a/layout/style/nsCSSPropList.h
+++ b/layout/style/nsCSSPropList.h
@@ -1647,27 +1647,27 @@ CSS_PROP_TEXT(
eStyleAnimType_None)
#endif // CSS_PROP_LIST_EXCLUDE_INTERNAL
CSS_PROP_CONTENT(
counter-increment,
counter_increment,
CounterIncrement,
CSS_PROPERTY_PARSE_FUNCTION,
"",
- 0,
+ VARIANT_INHERIT | VARIANT_NONE,
nullptr,
CSS_PROP_NO_OFFSET,
eStyleAnimType_Discrete) // XXX bug 137285
CSS_PROP_CONTENT(
counter-reset,
counter_reset,
CounterReset,
CSS_PROPERTY_PARSE_FUNCTION,
"",
- 0,
+ VARIANT_INHERIT | VARIANT_NONE,
nullptr,
CSS_PROP_NO_OFFSET,
eStyleAnimType_Discrete) // XXX bug 137285
CSS_PROP_USERINTERFACE(
cursor,
cursor,
Cursor,
CSS_PROPERTY_PARSE_FUNCTION |