mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +01:00
style: Remove dependency on servo_url (#31358)
In order for stylo to be a separate crate, it needs to depend on less things from Servo. This change makes it so that stylo no longer depends on servo_url.
This commit is contained in:
parent
29e1dfe1e4
commit
9a6973d629
42 changed files with 236 additions and 144 deletions
|
@ -9,6 +9,7 @@ use style::context::QuirksMode;
|
|||
use style::parser::ParserContext;
|
||||
use style::stylesheets::{CssRuleType, Origin};
|
||||
use style_traits::{ParseError, ParsingMode};
|
||||
use url::Url;
|
||||
|
||||
fn parse<T, F>(f: F, s: &'static str) -> Result<T, ParseError<'static>>
|
||||
where
|
||||
|
@ -22,10 +23,10 @@ fn parse_input<'i: 't, 't, T, F>(f: F, input: &'t mut ParserInput<'i>) -> Result
|
|||
where
|
||||
F: Fn(&ParserContext, &mut Parser<'i, 't>) -> Result<T, ParseError<'i>>,
|
||||
{
|
||||
let url = ::servo_url::ServoUrl::parse("http://localhost").unwrap();
|
||||
let url_data = Url::parse("http://localhost").unwrap().into();
|
||||
let context = ParserContext::new(
|
||||
Origin::Author,
|
||||
&url,
|
||||
&url_data,
|
||||
Some(CssRuleType::Style),
|
||||
ParsingMode::DEFAULT,
|
||||
QuirksMode::NoQuirks,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue