mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
Devirtualize CSS error reporting.
This commit is contained in:
parent
2e775abfa4
commit
1297c0ff51
28 changed files with 255 additions and 211 deletions
|
@ -3,7 +3,6 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use cssparser::{Parser, ParserInput};
|
||||
use media_queries::CSSErrorReporterTest;
|
||||
use parsing::parse;
|
||||
use style::context::QuirksMode;
|
||||
use style::parser::{Parse, ParserContext};
|
||||
|
@ -41,8 +40,7 @@ fn test_parsing_modes() {
|
|||
|
||||
// In SVG length mode, non-zero lengths are assumed to be px.
|
||||
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,
|
||||
Some(CssRuleType::Style), PARSING_MODE_ALLOW_UNITLESS_LENGTH,
|
||||
QuirksMode::NoQuirks);
|
||||
let mut input = ParserInput::new("1");
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
//! Tests for parsing and serialization of values/properties
|
||||
|
||||
use cssparser::{Parser, ParserInput};
|
||||
use media_queries::CSSErrorReporterTest;
|
||||
use style::context::QuirksMode;
|
||||
use style::parser::ParserContext;
|
||||
use style::stylesheets::{CssRuleType, Origin};
|
||||
|
@ -20,8 +19,7 @@ where F: for<'t> Fn(&ParserContext, &mut Parser<'static, 't>) -> Result<T, Parse
|
|||
fn parse_input<'i: 't, 't, T, F>(f: F, input: &'t mut ParserInput<'i>) -> Result<T, ParseError<'i>>
|
||||
where F: Fn(&ParserContext, &mut Parser<'i, 't>) -> Result<T, ParseError<'i>> {
|
||||
let url = ::servo_url::ServoUrl::parse("http://localhost").unwrap();
|
||||
let reporter = CSSErrorReporterTest;
|
||||
let context = ParserContext::new(Origin::Author, &url, &reporter, Some(CssRuleType::Style),
|
||||
let context = ParserContext::new(Origin::Author, &url, Some(CssRuleType::Style),
|
||||
PARSING_MODE_DEFAULT,
|
||||
QuirksMode::NoQuirks);
|
||||
let mut parser = Parser::new(input);
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
use app_units::Au;
|
||||
use cssparser::{Parser, ParserInput};
|
||||
use media_queries::CSSErrorReporterTest;
|
||||
use style::context::QuirksMode;
|
||||
use style::parser::ParserContext;
|
||||
use style::stylesheets::{CssRuleType, Origin};
|
||||
|
@ -23,8 +22,7 @@ fn length_has_viewport_percentage() {
|
|||
fn test_parsing_allo_all_numeric_values() {
|
||||
// In SVG length mode, non-zero lengths are assumed to be px.
|
||||
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,
|
||||
Some(CssRuleType::Style), PARSING_MODE_ALLOW_ALL_NUMERIC_VALUES,
|
||||
QuirksMode::NoQuirks);
|
||||
let mut input = ParserInput::new("-1");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue