servo: Merge #15338 - Parse value entirely for setting property via CSSOM (from upsuper:parse_one_decl); r=emilio

Fixes #15037

Source-Repo: https://github.com/servo/servo
Source-Revision: 812a3a1c4663738511f55fa84c7328231df2d399

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 886c15a95527f48f36c4e33bff350eece7a1eba6
This commit is contained in:
Xidorn Quan 2017-02-03 11:48:28 -08:00
Родитель f070dfd730
Коммит 168749a3e5
1 изменённых файлов: 7 добавлений и 5 удалений

Просмотреть файл

@ -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);
Parser::new(input).parse_entirely(|parser| {
let mut results = vec![];
match PropertyDeclaration::parse(id, &context, &mut Parser::new(input), &mut results, false) {
match PropertyDeclaration::parse(id, &context, parser, &mut results, false) {
PropertyDeclarationParseResult::ValidOrIgnoredDeclaration => Ok(results),
_ => Err(())
}
})
}
/// A struct to parse property declarations.