mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +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
|
@ -5,7 +5,7 @@
|
|||
use cssparser::Parser;
|
||||
use media_queries::CSSErrorReporterTest;
|
||||
use style::parser::ParserContext;
|
||||
use style::stylesheets::Origin;
|
||||
use style::stylesheets::{CssRuleType, Origin};
|
||||
use style_traits::ToCss;
|
||||
|
||||
#[test]
|
||||
|
@ -29,7 +29,7 @@ fn test_outline_style() {
|
|||
|
||||
let url = ::servo_url::ServoUrl::parse("http://localhost").unwrap();
|
||||
let reporter = CSSErrorReporterTest;
|
||||
let context = ParserContext::new(Origin::Author, &url, &reporter);
|
||||
let context = ParserContext::new(Origin::Author, &url, &reporter, Some(CssRuleType::Style));
|
||||
let mut parser = Parser::new(r#"hidden"#);
|
||||
let parsed = outline_style::parse(&context, &mut parser);
|
||||
assert!(parsed.is_err());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue