mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +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
|
@ -16,7 +16,7 @@ use dom_struct::dom_struct;
|
|||
use std::sync::Arc;
|
||||
use style::parser::ParserContext;
|
||||
use style::shared_lock::{Locked, ToCssWithGuard};
|
||||
use style::stylesheets::SupportsRule;
|
||||
use style::stylesheets::{CssRuleType, SupportsRule};
|
||||
use style::supports::SupportsCondition;
|
||||
use style_traits::ToCss;
|
||||
|
||||
|
@ -61,7 +61,7 @@ impl CSSSupportsRule {
|
|||
let global = self.global();
|
||||
let win = global.as_window();
|
||||
let url = win.Document().url();
|
||||
let context = ParserContext::new_for_cssom(&url, win.css_error_reporter());
|
||||
let context = ParserContext::new_for_cssom(&url, win.css_error_reporter(), Some(CssRuleType::Supports));
|
||||
let enabled = cond.eval(&context);
|
||||
let mut guard = self.cssconditionrule.shared_lock().write();
|
||||
let rule = self.supportsrule.write_with(&mut guard);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue