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

@ -32,7 +32,7 @@ use std::cell::Cell;
use std::default::Default;
use style::attr::AttrValue;
use style::media_queries::parse_media_query_list;
use style::parser::{ParsingMode, ParserContext as CssParserContext};
use style::parser::{PARSING_MODE_DEFAULT, ParserContext as CssParserContext};
use style::str::HTML_SPACE_CHARACTERS;
use style::stylearc::Arc;
use style::stylesheets::{CssRuleType, Stylesheet};
@ -282,7 +282,7 @@ impl HTMLLinkElement {
let win = document.window();
let doc_url = document.url();
let context = CssParserContext::new_for_cssom(&doc_url, win.css_error_reporter(), Some(CssRuleType::Media),
ParsingMode::Default,
PARSING_MODE_DEFAULT,
document.quirks_mode());
let media = parse_media_query_list(&context, &mut css_parser);