Skip to content

Commit

Permalink
Bug 1255384 - fix getCSSValuesForProperty for counter-*; r=heycam
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tromey committed Jan 12, 2018
1 parent a2051e8 commit b887e4d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions devtools/shared/css/generated/properties-db.js
Original file line number Diff line number Diff line change
Expand Up @@ -5256,6 +5256,7 @@ exports.CSS_PROPERTIES = {
"values": [
"inherit",
"initial",
"none",
"unset"
]
},
Expand All @@ -5268,6 +5269,7 @@ exports.CSS_PROPERTIES = {
"values": [
"inherit",
"initial",
"none",
"unset"
]
},
Expand Down
7 changes: 7 additions & 0 deletions layout/inspector/tests/test_bug877690.html
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,13 @@
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();
}

Expand Down
4 changes: 2 additions & 2 deletions layout/style/nsCSSPropList.h
Original file line number Diff line number Diff line change
Expand Up @@ -1652,7 +1652,7 @@ CSS_PROP_CONTENT(
CounterIncrement,
CSS_PROPERTY_PARSE_FUNCTION,
"",
0,
VARIANT_INHERIT | VARIANT_NONE,
nullptr,
CSS_PROP_NO_OFFSET,
eStyleAnimType_Discrete) // XXX bug 137285
Expand All @@ -1662,7 +1662,7 @@ CSS_PROP_CONTENT(
CounterReset,
CSS_PROPERTY_PARSE_FUNCTION,
"",
0,
VARIANT_INHERIT | VARIANT_NONE,
nullptr,
CSS_PROP_NO_OFFSET,
eStyleAnimType_Discrete) // XXX bug 137285
Expand Down

0 comments on commit b887e4d

Please sign in to comment.