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

@ -13,7 +13,7 @@ use dom::cssrule::SpecificCSSRule;
use dom::cssstylesheet::CSSStyleSheet;
use dom::window::Window;
use dom_struct::dom_struct;
use style::parser::{ParsingMode, ParserContext};
use style::parser::{PARSING_MODE_DEFAULT, ParserContext};
use style::shared_lock::{Locked, ToCssWithGuard};
use style::stylearc::Arc;
use style::stylesheets::{CssRuleType, SupportsRule};
@ -63,7 +63,7 @@ impl CSSSupportsRule {
let url = win.Document().url();
let quirks_mode = win.Document().quirks_mode();
let context = ParserContext::new_for_cssom(&url, win.css_error_reporter(), Some(CssRuleType::Supports),
ParsingMode::Default,
PARSING_MODE_DEFAULT,
quirks_mode);
let enabled = cond.eval(&context);
let mut guard = self.cssconditionrule.shared_lock().write();