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:
Hiroyuki Ikezoe 2017-05-13 18:33:14 +09:00
parent b80d4acef4
commit fcc50ea421
23 changed files with 85 additions and 85 deletions

View file

@ -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)