Make ParsingMode bitflags.

assert_parsing_mode_match() is mostly the same as
assert_restyle_hints_match().
This commit is contained in:
Hiroyuki Ikezoe 2017-05-13 18:33:48 +09:00
parent fcc50ea421
commit b6b3187efa
19 changed files with 88 additions and 58 deletions

View file

@ -9,7 +9,7 @@
use cssparser::{AtRuleParser, Parser, QualifiedRuleParser, RuleListParser};
use cssparser::{DeclarationListParser, DeclarationParser, parse_one_rule};
use error_reporting::NullReporter;
use parser::{ParsingMode, ParserContext, log_css_error};
use parser::{PARSING_MODE_DEFAULT, ParserContext, log_css_error};
use properties::{Importance, PropertyDeclaration, PropertyDeclarationBlock, PropertyId};
use properties::{PropertyDeclarationId, LonghandId, ParsedDeclaration};
use properties::LonghandIdSet;
@ -131,7 +131,7 @@ impl Keyframe {
&parent_stylesheet.url_data,
&error_reporter,
Some(CssRuleType::Keyframe),
ParsingMode::Default,
PARSING_MODE_DEFAULT,
parent_stylesheet.quirks_mode);
let mut input = Parser::new(css);