Skip to content

Commit

Permalink
Parse value entirely for setting property via CSSOM
Browse files Browse the repository at this point in the history
Fixes #15037
  • Loading branch information
upsuper committed Feb 2, 2017
1 parent 8b9dc93 commit d06ffc2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions components/style/properties/declaration_block.rs
Expand Up @@ -520,11 +520,13 @@ pub fn parse_one_declaration(id: PropertyId,
extra_data: ParserContextExtraData)
-> Result<Vec<(PropertyDeclaration, Importance)>, ()> {
let context = ParserContext::new_with_extra_data(Origin::Author, base_url, error_reporter, extra_data);
let mut results = vec![];
match PropertyDeclaration::parse(id, &context, &mut Parser::new(input), &mut results, false) {
PropertyDeclarationParseResult::ValidOrIgnoredDeclaration => Ok(results),
_ => Err(())
}
Parser::new(input).parse_entirely(|parser| {
let mut results = vec![];
match PropertyDeclaration::parse(id, &context, parser, &mut results, false) {
PropertyDeclarationParseResult::ValidOrIgnoredDeclaration => Ok(results),
_ => Err(())
}
})
}

/// A struct to parse property declarations.
Expand Down

0 comments on commit d06ffc2

Please sign in to comment.