mirror of
https://github.com/servo/servo.git
synced 2025-08-11 16:35:33 +01:00
Rename LengthParsingMode to ParsingMode and LengthParsingMode::SVG to PasingMode::AllowUnitlessLength.
We need another flag that represents allow-negative-number for SMIL, so this enum will also comprise the another parsing mode that allows negative number.
This commit is contained in:
parent
b80d4acef4
commit
fcc50ea421
23 changed files with 85 additions and 85 deletions
|
@ -7,14 +7,14 @@
|
|||
use cssparser::Parser;
|
||||
use media_queries::CSSErrorReporterTest;
|
||||
use style::context::QuirksMode;
|
||||
use style::parser::{LengthParsingMode, ParserContext};
|
||||
use style::parser::{ParsingMode, ParserContext};
|
||||
use style::stylesheets::{CssRuleType, Origin};
|
||||
|
||||
fn parse<T, F: Fn(&ParserContext, &mut Parser) -> Result<T, ()>>(f: F, s: &str) -> Result<T, ()> {
|
||||
let url = ::servo_url::ServoUrl::parse("http://localhost").unwrap();
|
||||
let reporter = CSSErrorReporterTest;
|
||||
let context = ParserContext::new(Origin::Author, &url, &reporter, Some(CssRuleType::Style),
|
||||
LengthParsingMode::Default,
|
||||
ParsingMode::Default,
|
||||
QuirksMode::NoQuirks);
|
||||
let mut parser = Parser::new(s);
|
||||
f(&context, &mut parser)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue