mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Auto merge of #15338 - upsuper:parse_one_decl, r=emilio
Parse value entirely for setting property via CSSOM Fixes #15037 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15338) <!-- Reviewable:end -->
This commit is contained in:
commit
812a3a1c46
1 changed files with 7 additions and 5 deletions
|
@ -520,11 +520,13 @@ pub fn parse_one_declaration(id: PropertyId,
|
||||||
extra_data: ParserContextExtraData)
|
extra_data: ParserContextExtraData)
|
||||||
-> Result<Vec<(PropertyDeclaration, Importance)>, ()> {
|
-> Result<Vec<(PropertyDeclaration, Importance)>, ()> {
|
||||||
let context = ParserContext::new_with_extra_data(Origin::Author, base_url, error_reporter, extra_data);
|
let context = ParserContext::new_with_extra_data(Origin::Author, base_url, error_reporter, extra_data);
|
||||||
let mut results = vec![];
|
Parser::new(input).parse_entirely(|parser| {
|
||||||
match PropertyDeclaration::parse(id, &context, &mut Parser::new(input), &mut results, false) {
|
let mut results = vec![];
|
||||||
PropertyDeclarationParseResult::ValidOrIgnoredDeclaration => Ok(results),
|
match PropertyDeclaration::parse(id, &context, parser, &mut results, false) {
|
||||||
_ => Err(())
|
PropertyDeclarationParseResult::ValidOrIgnoredDeclaration => Ok(results),
|
||||||
}
|
_ => Err(())
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A struct to parse property declarations.
|
/// A struct to parse property declarations.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue