From 69d398f29ab850a5c76e0c996e165a27503a6444 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Fri, 9 Oct 2015 23:59:04 +0200 Subject: [PATCH] Update to rust-cssparser 0.4.0 --- components/canvas/Cargo.toml | 5 +-- components/canvas_traits/Cargo.toml | 5 +-- components/layout/Cargo.toml | 9 ++---- components/script/Cargo.toml | 9 ++---- components/servo/Cargo.lock | 36 ++++++++++----------- components/style/Cargo.toml | 10 ++---- components/style/font_face.rs | 25 ++++----------- components/style/properties.mako.rs | 12 +++---- components/style/values.rs | 41 +++++++++++++++-------- components/style_traits/Cargo.toml | 10 ++---- components/util/Cargo.toml | 9 ++---- ports/cef/Cargo.lock | 50 ++++++++++++++++++++--------- ports/gonk/Cargo.lock | 50 ++++++++++++++++++++--------- tests/unit/style/Cargo.toml | 6 ++-- 14 files changed, 141 insertions(+), 136 deletions(-) diff --git a/components/canvas/Cargo.toml b/components/canvas/Cargo.toml index 37276b5baf0..e3300568270 100644 --- a/components/canvas/Cargo.toml +++ b/components/canvas/Cargo.toml @@ -34,11 +34,8 @@ features = ["texture_surface"] [dependencies.ipc-channel] git = "https://github.com/pcwalton/ipc-channel" -[dependencies.cssparser] -version = "0.3" -features = [ "serde-serialization" ] - [dependencies] +cssparser = { version = "0.4", features = [ "serde-serialization" ] } log = "0.3" num = "0.1.24" gleam = "0.1" diff --git a/components/canvas_traits/Cargo.toml b/components/canvas_traits/Cargo.toml index cd854a761b9..ec49ede4d32 100644 --- a/components/canvas_traits/Cargo.toml +++ b/components/canvas_traits/Cargo.toml @@ -28,10 +28,6 @@ git = "https://github.com/pcwalton/ipc-channel" version = "0.6" features = [ "nightly" ] -[dependencies.cssparser] -version = "0.3" -features = [ "serde-serialization" ] - [dependencies.plugins] path = "../plugins" @@ -39,6 +35,7 @@ path = "../plugins" path = "../util" [dependencies] +cssparser = { version = "0.4", features = [ "serde-serialization" ] } euclid = {version = "0.3", features = ["plugins"]} serde_macros = "0.6" diff --git a/components/layout/Cargo.toml b/components/layout/Cargo.toml index 10af4f1566d..8697897c7b5 100644 --- a/components/layout/Cargo.toml +++ b/components/layout/Cargo.toml @@ -50,16 +50,9 @@ path = "../profile_traits" [dependencies.util] path = "../util" -[dependencies.selectors] -git = "https://github.com/servo/rust-selectors" - [dependencies.clock_ticks] git = "https://github.com/tomaka/clock_ticks" -[dependencies.cssparser] -version = "0.3" -features = [ "serde-serialization" ] - [dependencies.ipc-channel] git = "https://github.com/pcwalton/ipc-channel" @@ -69,12 +62,14 @@ features = [ "serde_serialization" ] [dependencies] app_units = {version = "0.1", features = ["plugins"]} +cssparser = { version = "0.4", features = [ "serde-serialization" ] } log = "0.3" encoding = "0.2" fnv = "1.0" bitflags = "0.3" rustc-serialize = "0.3" libc = "0.1" +selectors = "0.2" smallvec = "0.1" string_cache = "0.1" string_cache_plugin = "0.1" diff --git a/components/script/Cargo.toml b/components/script/Cargo.toml index b2b96d04f72..34043b52a75 100644 --- a/components/script/Cargo.toml +++ b/components/script/Cargo.toml @@ -42,9 +42,6 @@ path = "../canvas" [dependencies.canvas_traits] path = "../canvas_traits" -[dependencies.selectors] -git = "https://github.com/servo/rust-selectors" - [dependencies.js] git = "https://github.com/servo/rust-mozjs" @@ -59,10 +56,6 @@ git = "https://github.com/ecoal95/rust-offscreen-rendering-context" git = "https://github.com/ecoal95/angle" branch = "servo" -[dependencies.cssparser] -version = "0.3" -features = [ "serde-serialization" ] - [dependencies.ipc-channel] git = "https://github.com/pcwalton/ipc-channel" @@ -76,6 +69,7 @@ features = ["unstable"] [dependencies] app_units = {version = "0.1", features = ["plugins"]} +cssparser = { version = "0.4", features = [ "serde-serialization" ] } log = "0.3" encoding = "0.2" fnv = "1.0" @@ -89,6 +83,7 @@ websocket = "0.12.0" uuid = "0.1.16" smallvec = "0.1" html5ever = { version = "0.2.1", features = ["unstable"] } +selectors = "0.2" string_cache = { version = "0.1.15", features = ["unstable"] } string_cache_plugin = "0.1" euclid = {version = "0.3", features = ["plugins"]} diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock index 9d612376904..f3846c7bd7d 100644 --- a/components/servo/Cargo.lock +++ b/components/servo/Cargo.lock @@ -151,7 +151,7 @@ version = "0.0.1" dependencies = [ "azure 0.2.0 (git+https://github.com/servo/rust-azure)", "canvas_traits 0.0.1", - "cssparser 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", "gleam 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -169,7 +169,7 @@ name = "canvas_traits" version = "0.0.1" dependencies = [ "azure 0.2.0 (git+https://github.com/servo/rust-azure)", - "cssparser 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", "ipc-channel 0.1.0 (git+https://github.com/pcwalton/ipc-channel)", @@ -321,7 +321,7 @@ dependencies = [ [[package]] name = "cssparser" -version = "0.3.9" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", @@ -994,7 +994,7 @@ dependencies = [ "canvas 0.0.1", "canvas_traits 0.0.1", "clock_ticks 0.0.6 (git+https://github.com/tomaka/clock_ticks)", - "cssparser 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1011,7 +1011,7 @@ dependencies = [ "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "script 0.0.1", "script_traits 0.0.1", - "selectors 0.2.0 (git+https://github.com/servo/rust-selectors)", + "selectors 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1500,7 +1500,7 @@ dependencies = [ "canvas 0.0.1", "canvas_traits 0.0.1", "caseless 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "devtools_traits 0.0.1", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1521,7 +1521,7 @@ dependencies = [ "rand 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "script_traits 0.0.1", - "selectors 0.2.0 (git+https://github.com/servo/rust-selectors)", + "selectors 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1568,11 +1568,11 @@ dependencies = [ [[package]] name = "selectors" -version = "0.2.0" -source = "git+https://github.com/servo/rust-selectors#53f5e09a37684f6a42eb894d7a6fd0b14380a1c6" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "quickersort 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1716,7 +1716,7 @@ version = "0.0.1" dependencies = [ "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1726,7 +1726,7 @@ dependencies = [ "num 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "plugins 0.0.1", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", - "selectors 0.2.0 (git+https://github.com/servo/rust-selectors)", + "selectors 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1742,9 +1742,9 @@ name = "style_tests" version = "0.0.1" dependencies = [ "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "selectors 0.2.0 (git+https://github.com/servo/rust-selectors)", + "selectors 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache_plugin 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "style 0.0.1", @@ -1757,14 +1757,14 @@ dependencies = [ name = "style_traits" version = "0.0.1" dependencies = [ - "cssparser 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "plugins 0.0.1", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", - "selectors 0.2.0 (git+https://github.com/servo/rust-selectors)", + "selectors 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1893,7 +1893,7 @@ dependencies = [ "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "azure 0.2.0 (git+https://github.com/servo/rust-azure)", "bitflags 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "html5ever 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1909,7 +1909,7 @@ dependencies = [ "plugins 0.0.1", "rand 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", - "selectors 0.2.0 (git+https://github.com/servo/rust-selectors)", + "selectors 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/components/style/Cargo.toml b/components/style/Cargo.toml index 9f0a2dfdcfc..d3014bf38dd 100644 --- a/components/style/Cargo.toml +++ b/components/style/Cargo.toml @@ -18,20 +18,13 @@ path = "../util" [dependencies.style_traits] path = "../style_traits" -[dependencies.selectors] -git = "https://github.com/servo/rust-selectors" -features = ["unstable"] - -[dependencies.cssparser] -version = "0.3.9" -features = [ "serde-serialization" ] - [dependencies.url] version = "0.2" features = [ "serde_serialization" ] [dependencies] app_units = {version = "0.1", features = ["plugins"]} +cssparser = { version = "0.4", features = [ "serde-serialization" ] } log = "0.3" encoding = "0.2" fnv = "1.0" @@ -40,6 +33,7 @@ matches = "0.1" bitflags = "0.3" num = "0.1.24" lazy_static = "0.1.10" +selectors = { version = "0.2", features = ["unstable"] } smallvec = "0.1" string_cache = "0.1" string_cache_plugin = "0.1" diff --git a/components/style/font_face.rs b/components/style/font_face.rs index 54ffdcc7891..eea501b9cf2 100644 --- a/components/style/font_face.rs +++ b/components/style/font_face.rs @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use computed_values::font_family::FontFamily; -use cssparser::{AtRuleParser, DeclarationListParser, DeclarationParser, Parser, Token}; +use cssparser::{AtRuleParser, DeclarationListParser, DeclarationParser, Parser}; use parser::{ParserContext, log_css_error}; use properties::longhands::font_family::parse_one_family; use std::ascii::AsciiExt; @@ -106,23 +106,12 @@ fn parse_one_non_generic_family_name(input: &mut Parser) -> Result { fn parse_one_src(context: &ParserContext, input: &mut Parser) -> Result { - let url = match input.next() { - // Parsing url() - Ok(Token::Url(url)) => { - UrlParser::new().base_url(context.base_url).parse(&url).unwrap_or_else( - |_error| Url::parse("about:invalid").unwrap()) - }, - // Parsing local() with early return - Ok(Token::Function(name)) => { - if name.eq_ignore_ascii_case("local") { - return Ok(Source::Local(try!(input.parse_nested_block(|input| { - parse_one_non_generic_family_name(input) - })))) - } - return Err(()) - }, - _ => return Err(()) - }; + if input.try(|input| input.expect_function_matching("local")).is_ok() { + return Ok(Source::Local(try!(input.parse_nested_block(parse_one_non_generic_family_name)))) + } + let url = try!(input.expect_url()); + let url = UrlParser::new().base_url(context.base_url).parse(&url).unwrap_or_else( + |_error| Url::parse("about:invalid").unwrap()); // Parsing optional format() let format_hints = if input.try(|input| input.expect_function_matching("format")).is_ok() { diff --git a/components/style/properties.mako.rs b/components/style/properties.mako.rs index a0ae4363037..871b3ed6d2e 100644 --- a/components/style/properties.mako.rs +++ b/components/style/properties.mako.rs @@ -1138,6 +1138,7 @@ pub mod longhands { use std::fmt; use url::Url; use values::computed::Context; + use values::LocalToCss; #[derive(Clone, PartialEq, Eq)] pub enum SpecifiedValue { @@ -1149,9 +1150,7 @@ pub mod longhands { fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { match *self { SpecifiedValue::None => dest.write_str("none"), - SpecifiedValue::Url(ref url) => { - Token::Url(url.to_string().into()).to_css(dest) - } + SpecifiedValue::Url(ref url) => url.to_css(dest), } } } @@ -1160,6 +1159,7 @@ pub mod longhands { use cssparser::{ToCss, Token}; use std::fmt; use url::Url; + use values::LocalToCss; #[derive(Clone, PartialEq, HeapSizeOf)] pub struct T(pub Option); @@ -1168,7 +1168,7 @@ pub mod longhands { fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { match self.0 { None => dest.write_str("none"), - Some(ref url) => Token::Url(url.to_string().into()).to_css(dest) + Some(ref url) => url.to_css(dest), } } } @@ -1359,6 +1359,7 @@ pub mod longhands { use std::fmt; use values::computed::Context; use values::specified::Image; + use values::LocalToCss; pub mod computed_value { use values::computed; @@ -1370,8 +1371,7 @@ pub mod longhands { fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { match self.0 { None => dest.write_str("none"), - Some(computed::Image::Url(ref url)) => - ::cssparser::Token::Url(url.to_string().into()).to_css(dest), + Some(computed::Image::Url(ref url)) => url.to_css(dest), Some(computed::Image::LinearGradient(ref gradient)) => gradient.to_css(dest) } diff --git a/components/style/values.rs b/components/style/values.rs index a32b668fa9c..b6f630142b9 100644 --- a/components/style/values.rs +++ b/components/style/values.rs @@ -5,7 +5,10 @@ pub use cssparser::RGBA; use app_units::Au; -use std::fmt; +use cssparser::CssStringWriter; +use std::fmt::{self, Write}; +use url::Url; + // This is a re-implementation of the ToCss trait in cssparser. // It's done here because the app_units crate shouldn't depend @@ -64,6 +67,22 @@ macro_rules! define_numbered_css_keyword_enum { } } +/// The real ToCss trait can’t be implemented for Url +/// since neither rust-url or rust-cssparser depend on the other. +pub trait LocalToCss { + fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write; +} + +impl LocalToCss for Url { + fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { + try!(dest.write_str("url(\"")); + try!(write!(CssStringWriter::new(dest), "{}", self)); + try!(dest.write_str("\")")); + Ok(()) + } +} + + pub type CSSFloat = f32; pub const FONT_MEDIUM_PX: i32 = 16; @@ -1177,20 +1196,16 @@ pub mod specified { impl Image { pub fn parse(context: &ParserContext, input: &mut Parser) -> Result { - match try!(input.next()) { - Token::Url(url) => { - Ok(Image::Url(context.parse_url(&url))) - } - Token::Function(name) => { - match_ignore_ascii_case! { name, - "linear-gradient" => { - Ok(Image::LinearGradient(try!( - input.parse_nested_block(LinearGradient::parse_function)))) - } - _ => Err(()) + if let Ok(url) = input.try(|input| input.expect_url()) { + Ok(Image::Url(context.parse_url(&url))) + } else { + match_ignore_ascii_case! { try!(input.expect_function()), + "linear-gradient" => { + Ok(Image::LinearGradient(try!( + input.parse_nested_block(LinearGradient::parse_function)))) } + _ => Err(()) } - _ => Err(()) } } } diff --git a/components/style_traits/Cargo.toml b/components/style_traits/Cargo.toml index 414bdf87ce2..7db0ab0298a 100644 --- a/components/style_traits/Cargo.toml +++ b/components/style_traits/Cargo.toml @@ -10,26 +10,20 @@ path = "lib.rs" [dependencies.util] path = "../util" -[dependencies.cssparser] -version = "0.3" -features = [ "serde-serialization" ] - [dependencies.plugins] path = "../plugins" -[dependencies.selectors] -git = "https://github.com/servo/rust-selectors" -features = ["unstable"] - [dependencies.url] version = "0.2" features = [ "serde_serialization" ] [dependencies] +cssparser = { version = "0.4", features = [ "serde-serialization" ] } euclid = {version = "0.3", features = ["plugins"]} log = "0.3" lazy_static = "0.1.10" num = "0.1.24" rustc-serialize = "0.3" +selectors = "0.2" serde = "0.6" serde_macros = "0.6" diff --git a/components/util/Cargo.toml b/components/util/Cargo.toml index 7eac36662d3..480324f0578 100644 --- a/components/util/Cargo.toml +++ b/components/util/Cargo.toml @@ -29,10 +29,6 @@ git = "https://github.com/servo/rust-mozjs" git = "https://github.com/servo/rust-layers" features = ["plugins"] -[dependencies.cssparser] -version = "0.3" -features = [ "serde-serialization" ] - [dependencies.ipc-channel] git = "https://github.com/pcwalton/ipc-channel" @@ -40,11 +36,9 @@ git = "https://github.com/pcwalton/ipc-channel" version = "0.2" features = [ "serde_serialization" ] -[dependencies.selectors] -git = "https://github.com/servo/rust-selectors" - [dependencies] app_units = {version = "0.1", features = ["plugins"]} +cssparser = { version = "0.4", features = [ "serde-serialization" ] } log = "0.3" bitflags = "0.3" html5ever = { version = "0.2.1", features = ["unstable"] } @@ -55,6 +49,7 @@ smallvec = "0.1" num_cpus = "0.2.2" num = "0.1.24" euclid = {version = "0.3", features = ["plugins"]} +selectors = "0.2" serde = "0.6" serde_macros = "0.6" string_cache = "0.1" diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock index 206b1d56e57..c8ba2a16498 100644 --- a/ports/cef/Cargo.lock +++ b/ports/cef/Cargo.lock @@ -144,7 +144,7 @@ version = "0.0.1" dependencies = [ "azure 0.2.0 (git+https://github.com/servo/rust-azure)", "canvas_traits 0.0.1", - "cssparser 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", "gleam 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -162,7 +162,7 @@ name = "canvas_traits" version = "0.0.1" dependencies = [ "azure 0.2.0 (git+https://github.com/servo/rust-azure)", - "cssparser 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", "ipc-channel 0.1.0 (git+https://github.com/pcwalton/ipc-channel)", @@ -314,7 +314,7 @@ dependencies = [ [[package]] name = "cssparser" -version = "0.3.9" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", @@ -947,7 +947,7 @@ dependencies = [ "canvas 0.0.1", "canvas_traits 0.0.1", "clock_ticks 0.0.6 (git+https://github.com/tomaka/clock_ticks)", - "cssparser 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -964,7 +964,7 @@ dependencies = [ "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "script 0.0.1", "script_traits 0.0.1", - "selectors 0.2.0 (git+https://github.com/servo/rust-selectors)", + "selectors 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1435,7 +1435,7 @@ dependencies = [ "canvas 0.0.1", "canvas_traits 0.0.1", "caseless 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "devtools_traits 0.0.1", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1456,7 +1456,7 @@ dependencies = [ "rand 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "script_traits 0.0.1", - "selectors 0.2.0 (git+https://github.com/servo/rust-selectors)", + "selectors 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1469,6 +1469,7 @@ dependencies = [ "util 0.0.1", "uuid 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "websocket 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", + "xml5ever 0.1.0 (git+https://github.com/Ygg01/xml5ever)", ] [[package]] @@ -1493,11 +1494,11 @@ dependencies = [ [[package]] name = "selectors" -version = "0.2.0" -source = "git+https://github.com/servo/rust-selectors#53f5e09a37684f6a42eb894d7a6fd0b14380a1c6" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "quickersort 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1675,7 +1676,7 @@ version = "0.0.1" dependencies = [ "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1685,7 +1686,7 @@ dependencies = [ "num 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "plugins 0.0.1", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", - "selectors 0.2.0 (git+https://github.com/servo/rust-selectors)", + "selectors 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1700,14 +1701,14 @@ dependencies = [ name = "style_traits" version = "0.0.1" dependencies = [ - "cssparser 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "plugins 0.0.1", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", - "selectors 0.2.0 (git+https://github.com/servo/rust-selectors)", + "selectors 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1836,7 +1837,7 @@ dependencies = [ "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "azure 0.2.0 (git+https://github.com/servo/rust-azure)", "bitflags 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "html5ever 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1852,7 +1853,7 @@ dependencies = [ "plugins 0.0.1", "rand 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", - "selectors 0.2.0 (git+https://github.com/servo/rust-selectors)", + "selectors 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1988,3 +1989,20 @@ dependencies = [ "bitflags 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "xml5ever" +version = "0.1.0" +source = "git+https://github.com/Ygg01/xml5ever#0c36f2d93532b2d7b1ccfbd6019a6d53a1fcac69" +dependencies = [ + "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "phf 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_codegen 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_plugin 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tendril 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", +] + diff --git a/ports/gonk/Cargo.lock b/ports/gonk/Cargo.lock index 39166896bb1..5a2ffb7c8d9 100644 --- a/ports/gonk/Cargo.lock +++ b/ports/gonk/Cargo.lock @@ -136,7 +136,7 @@ version = "0.0.1" dependencies = [ "azure 0.2.0 (git+https://github.com/servo/rust-azure)", "canvas_traits 0.0.1", - "cssparser 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", "gleam 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -154,7 +154,7 @@ name = "canvas_traits" version = "0.0.1" dependencies = [ "azure 0.2.0 (git+https://github.com/servo/rust-azure)", - "cssparser 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", "ipc-channel 0.1.0 (git+https://github.com/pcwalton/ipc-channel)", @@ -306,7 +306,7 @@ dependencies = [ [[package]] name = "cssparser" -version = "0.3.9" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", @@ -927,7 +927,7 @@ dependencies = [ "canvas 0.0.1", "canvas_traits 0.0.1", "clock_ticks 0.0.6 (git+https://github.com/tomaka/clock_ticks)", - "cssparser 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -944,7 +944,7 @@ dependencies = [ "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "script 0.0.1", "script_traits 0.0.1", - "selectors 0.2.0 (git+https://github.com/servo/rust-selectors)", + "selectors 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1415,7 +1415,7 @@ dependencies = [ "canvas 0.0.1", "canvas_traits 0.0.1", "caseless 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "devtools_traits 0.0.1", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1436,7 +1436,7 @@ dependencies = [ "rand 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "script_traits 0.0.1", - "selectors 0.2.0 (git+https://github.com/servo/rust-selectors)", + "selectors 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1449,6 +1449,7 @@ dependencies = [ "util 0.0.1", "uuid 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "websocket 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", + "xml5ever 0.1.0 (git+https://github.com/Ygg01/xml5ever)", ] [[package]] @@ -1473,11 +1474,11 @@ dependencies = [ [[package]] name = "selectors" -version = "0.2.0" -source = "git+https://github.com/servo/rust-selectors#53f5e09a37684f6a42eb894d7a6fd0b14380a1c6" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "quickersort 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1653,7 +1654,7 @@ version = "0.0.1" dependencies = [ "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1663,7 +1664,7 @@ dependencies = [ "num 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "plugins 0.0.1", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", - "selectors 0.2.0 (git+https://github.com/servo/rust-selectors)", + "selectors 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1678,14 +1679,14 @@ dependencies = [ name = "style_traits" version = "0.0.1" dependencies = [ - "cssparser 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "plugins 0.0.1", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", - "selectors 0.2.0 (git+https://github.com/servo/rust-selectors)", + "selectors 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1814,7 +1815,7 @@ dependencies = [ "app_units 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "azure 0.2.0 (git+https://github.com/servo/rust-azure)", "bitflags 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "html5ever 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1830,7 +1831,7 @@ dependencies = [ "plugins 0.0.1", "rand 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", - "selectors 0.2.0 (git+https://github.com/servo/rust-selectors)", + "selectors 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1936,3 +1937,20 @@ dependencies = [ "bitflags 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "xml5ever" +version = "0.1.0" +source = "git+https://github.com/Ygg01/xml5ever#0c36f2d93532b2d7b1ccfbd6019a6d53a1fcac69" +dependencies = [ + "log 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "phf 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_codegen 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_plugin 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tendril 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", +] + diff --git a/tests/unit/style/Cargo.toml b/tests/unit/style/Cargo.toml index b8f0cb51476..30140cecbd7 100644 --- a/tests/unit/style/Cargo.toml +++ b/tests/unit/style/Cargo.toml @@ -17,13 +17,11 @@ path = "../../../components/style_traits" [dependencies.util] path = "../../../components/util" -[dependencies.selectors] -git = "https://github.com/servo/rust-selectors" - [dependencies] app_units = {version = "0.1", features = ["plugins"]} url = "0.2" -cssparser = "0.3.1" +cssparser = "0.4" +selectors = "0.2" string_cache = "0.1" string_cache_plugin = "0.1" euclid = {version = "0.3", features = ["plugins"]}