mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Pull rule_type into ParserContext
Absorb `rule_type` into the `ParserContext` so that it's easier to pass down to deeper levels of the parser. MozReview-Commit-ID: DjBNytLxGKX
This commit is contained in:
parent
a093b0a087
commit
4574cd8ea6
35 changed files with 125 additions and 97 deletions
|
@ -212,7 +212,8 @@ impl Declaration {
|
|||
return false
|
||||
};
|
||||
let mut input = Parser::new(&self.val);
|
||||
let res = ParsedDeclaration::parse(id, cx, &mut input, /* in_keyframe */ false, CssRuleType::Style);
|
||||
let context = ParserContext::new_with_rule_type(cx, Some(CssRuleType::Style));
|
||||
let res = ParsedDeclaration::parse(id, &context, &mut input, /* in_keyframe */ false);
|
||||
let _ = input.try(parse_important);
|
||||
res.is_ok() && input.is_exhausted()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue