Skip to content

Commit

Permalink
Auto merge of #15338 - upsuper:parse_one_decl, r=<try>
Browse files Browse the repository at this point in the history
Parse value entirely for setting property via CSSOM

Fixes #15037
  • Loading branch information
bors-servo committed Feb 2, 2017
2 parents 8b9dc93 + d06ffc2 commit 687d463
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 687d463

Please sign in to comment.