Check context to test keyframe rule_type

Now that the `context` contains the `rule_type`, we can remove the `in_keyframe`
arg and check the `rule_type` to achieve the same thing.

MozReview-Commit-ID: oXrFBPuKMz
This commit is contained in:
J. Ryan Stinnett 2017-04-10 15:36:49 +08:00
parent 997015a4f7
commit 1ae1d370f2
5 changed files with 8 additions and 9 deletions

View file

@ -628,7 +628,7 @@ pub fn parse_one_declaration(id: PropertyId,
-> Result<ParsedDeclaration, ()> {
let context = ParserContext::new(Origin::Author, url_data, error_reporter, Some(CssRuleType::Style));
Parser::new(input).parse_entirely(|parser| {
ParsedDeclaration::parse(id, &context, parser, false)
ParsedDeclaration::parse(id, &context, parser)
.map_err(|_| ())
})
}
@ -653,7 +653,7 @@ impl<'a, 'b> DeclarationParser for PropertyDeclarationParser<'a, 'b> {
-> Result<(ParsedDeclaration, Importance), ()> {
let id = try!(PropertyId::parse(name.into()));
let parsed = input.parse_until_before(Delimiter::Bang, |input| {
ParsedDeclaration::parse(id, self.context, input, false)
ParsedDeclaration::parse(id, self.context, input)
.map_err(|_| ())
})?;
let importance = match input.try(parse_important) {