mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Don’t ignore input at the end of a declaration with var().
This commit is contained in:
parent
54ef8055ec
commit
70ea5f61a2
2 changed files with 18 additions and 20 deletions
|
@ -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.
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
[variable-declaration-24.htm]
|
||||
type: reftest
|
||||
expected: FAIL
|
Loading…
Add table
Add a link
Reference in a new issue