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
This commit is contained in:
Tom Tromey 2018-01-11 12:08:02 -07:00
Родитель 5167aaf995
Коммит 9992b11faa
3 изменённых файлов: 11 добавлений и 2 удалений

Просмотреть файл

@ -5256,6 +5256,7 @@ exports.CSS_PROPERTIES = {
"values": [
"inherit",
"initial",
"none",
"unset"
]
},
@ -5268,6 +5269,7 @@ exports.CSS_PROPERTIES = {
"values": [
"inherit",
"initial",
"none",
"unset"
]
},

Просмотреть файл

@ -222,6 +222,13 @@ function do_test() {
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();
}

Просмотреть файл

@ -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
@ -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