diff --git a/components/style/properties.mako.rs b/components/style/properties.mako.rs index 7bb31d0fc5b..a9f9b92156b 100644 --- a/components/style/properties.mako.rs +++ b/components/style/properties.mako.rs @@ -5615,24 +5615,25 @@ mod property_bit_field { // As of this writing, only the base URL is used for property values: let context = ParserContext::new( ::stylesheets::Origin::Author, base_url); - let mut input = Parser::new(&css); - match from_shorthand { - Shorthand::None => { - longhands::${property.ident}::parse_specified(&context, &mut input) + Parser::new(&css).parse_entirely(|input| { + match from_shorthand { + Shorthand::None => { + longhands::${property.ident}::parse_specified(&context, input) + } + % for shorthand in SHORTHANDS: + % if property in shorthand.sub_properties: + Shorthand::${shorthand.camel_case} => { + shorthands::${shorthand.ident}::parse_value(&context, input) + .map(|result| match result.${property.ident} { + Some(value) => DeclaredValue::Value(value), + None => DeclaredValue::Initial, + }) + } + % endif + % endfor + _ => unreachable!() } - % for shorthand in SHORTHANDS: - % if property in shorthand.sub_properties: - Shorthand::${shorthand.camel_case} => { - shorthands::${shorthand.ident}::parse_value(&context, &mut input) - .map(|result| match result.${property.ident} { - Some(value) => DeclaredValue::Value(value), - None => DeclaredValue::Initial, - }) - } - % endif - % endfor - _ => unreachable!() - } + }) }) .unwrap_or( // Invalid at computed-value time. diff --git a/tests/wpt/metadata-css/css-variables-1_dev/html/variable-declaration-24.htm.ini b/tests/wpt/metadata-css/css-variables-1_dev/html/variable-declaration-24.htm.ini deleted file mode 100644 index ba980233612..00000000000 --- a/tests/wpt/metadata-css/css-variables-1_dev/html/variable-declaration-24.htm.ini +++ /dev/null @@ -1,3 +0,0 @@ -[variable-declaration-24.htm] - type: reftest - expected: FAIL