diff --git a/components/style/properties.mako.rs b/components/style/properties.mako.rs index 562c2876246..a0ae4363037 100644 --- a/components/style/properties.mako.rs +++ b/components/style/properties.mako.rs @@ -1305,6 +1305,10 @@ pub mod longhands { } pub fn parse(_: &ParserContext, input: &mut Parser) -> Result { + parse_common(1, input) + } + + pub fn parse_common(default_value: i32, input: &mut Parser) -> Result { if input.try(|input| input.expect_ident_matching("none")).is_ok() { return Ok(SpecifiedValue(Vec::new())) } @@ -1320,7 +1324,7 @@ pub mod longhands { return Err(()) } let counter_delta = - input.try(|input| specified::parse_integer(input)).unwrap_or(1); + input.try(|input| specified::parse_integer(input)).unwrap_or(default_value); counters.push((counter_name, counter_delta)) } @@ -1334,7 +1338,11 @@ pub mod longhands { <%self:longhand name="counter-reset"> pub use super::counter_increment::{SpecifiedValue, computed_value, get_initial_value}; - pub use super::counter_increment::{parse}; + use super::counter_increment::{parse_common}; + + pub fn parse(_: &ParserContext, input: &mut Parser) -> Result { + parse_common(0, input) + } // CSS 2.1, Section 13 - Paged media diff --git a/tests/wpt/metadata-css/css21_dev/html4/counters-001.htm.ini b/tests/wpt/metadata-css/css21_dev/html4/counters-001.htm.ini deleted file mode 100644 index 3dae056be5b..00000000000 --- a/tests/wpt/metadata-css/css21_dev/html4/counters-001.htm.ini +++ /dev/null @@ -1,3 +0,0 @@ -[counters-001.htm] - type: reftest - expected: FAIL diff --git a/tests/wpt/metadata-css/css21_dev/html4/counters-004.htm.ini b/tests/wpt/metadata-css/css21_dev/html4/counters-004.htm.ini deleted file mode 100644 index 0c625b12c29..00000000000 --- a/tests/wpt/metadata-css/css21_dev/html4/counters-004.htm.ini +++ /dev/null @@ -1,3 +0,0 @@ -[counters-004.htm] - type: reftest - expected: FAIL diff --git a/tests/wpt/metadata-css/css21_dev/html4/counters-006.htm.ini b/tests/wpt/metadata-css/css21_dev/html4/counters-006.htm.ini deleted file mode 100644 index 52b4b93c338..00000000000 --- a/tests/wpt/metadata-css/css21_dev/html4/counters-006.htm.ini +++ /dev/null @@ -1,3 +0,0 @@ -[counters-006.htm] - type: reftest - expected: FAIL diff --git a/tests/wpt/metadata-css/css21_dev/html4/counters-008.htm.ini b/tests/wpt/metadata-css/css21_dev/html4/counters-008.htm.ini deleted file mode 100644 index 47b9ddec662..00000000000 --- a/tests/wpt/metadata-css/css21_dev/html4/counters-008.htm.ini +++ /dev/null @@ -1,3 +0,0 @@ -[counters-008.htm] - type: reftest - expected: FAIL diff --git a/tests/wpt/mozilla/meta/css/test_variable_serialization_computed.html.ini b/tests/wpt/mozilla/meta/css/test_variable_serialization_computed.html.ini index 1e88bbd62e9..5c5d1ba2ebf 100644 --- a/tests/wpt/mozilla/meta/css/test_variable_serialization_computed.html.ini +++ b/tests/wpt/mozilla/meta/css/test_variable_serialization_computed.html.ini @@ -9,9 +9,6 @@ [subtest #22 with `--a: var(--b,orange)var(--c); --c:red;`] expected: FAIL - [subtest #23 with `counter-reset: var(--a)red; --a:orange;`] - expected: FAIL - [subtest #24 with `--a: var(--b)var(--c); --c:[c\]; --b:('ab`] expected: FAIL