Don’t ignore input at the end of a declaration with var().

This commit is contained in:
Simon Sapin 2015-09-07 17:28:03 +02:00
parent 54ef8055ec
commit 70ea5f61a2
2 changed files with 18 additions and 20 deletions

View file

@ -5615,15 +5615,15 @@ 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);
Parser::new(&css).parse_entirely(|input| {
match from_shorthand {
Shorthand::None => {
longhands::${property.ident}::parse_specified(&context, &mut input)
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, &mut input)
shorthands::${shorthand.ident}::parse_value(&context, input)
.map(|result| match result.${property.ident} {
Some(value) => DeclaredValue::Value(value),
None => DeclaredValue::Initial,
@ -5634,6 +5634,7 @@ mod property_bit_field {
_ => unreachable!()
}
})
})
.unwrap_or(
// Invalid at computed-value time.
DeclaredValue::${"Inherit" if property.style_struct.inherited else "Initial"}

View file

@ -1,3 +0,0 @@
[variable-declaration-24.htm]
type: reftest
expected: FAIL