diff options
-rw-r--r-- | components/canvas_traits/Cargo.toml | 2 | ||||
-rw-r--r-- | components/layout/Cargo.toml | 2 | ||||
-rw-r--r-- | components/msg/Cargo.toml | 2 | ||||
-rw-r--r-- | components/script/Cargo.toml | 2 | ||||
-rw-r--r-- | components/script_layout_interface/Cargo.toml | 2 | ||||
-rw-r--r-- | components/servo/Cargo.lock | 36 | ||||
-rw-r--r-- | components/style/Cargo.toml | 2 | ||||
-rw-r--r-- | components/style/font_face.rs | 2 | ||||
-rw-r--r-- | components/style/keyframes.rs | 6 | ||||
-rw-r--r-- | components/style/properties/properties.mako.rs | 2 | ||||
-rw-r--r-- | components/style/stylesheets.rs | 55 | ||||
-rw-r--r-- | components/style/viewport.rs | 2 | ||||
-rw-r--r-- | components/style_traits/Cargo.toml | 2 | ||||
-rw-r--r-- | ports/cef/Cargo.lock | 32 | ||||
-rw-r--r-- | ports/geckolib/Cargo.lock | 20 | ||||
-rw-r--r-- | tests/unit/style/Cargo.toml | 2 |
16 files changed, 86 insertions, 85 deletions
diff --git a/components/canvas_traits/Cargo.toml b/components/canvas_traits/Cargo.toml index b20df544167..272387f6fdf 100644 --- a/components/canvas_traits/Cargo.toml +++ b/components/canvas_traits/Cargo.toml @@ -11,7 +11,7 @@ path = "lib.rs" [dependencies] azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]} -cssparser = {version = "0.6", features = ["heap_size", "serde-serialization"]} +cssparser = {version = "0.7", features = ["heap_size", "serde-serialization"]} euclid = "0.10.1" gfx_traits = {path = "../gfx_traits"} heapsize = "0.3.0" diff --git a/components/layout/Cargo.toml b/components/layout/Cargo.toml index 460cd5f0c07..68289ce2203 100644 --- a/components/layout/Cargo.toml +++ b/components/layout/Cargo.toml @@ -14,7 +14,7 @@ app_units = "0.3" azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]} bitflags = "0.7" canvas_traits = {path = "../canvas_traits"} -cssparser = {version = "0.6", features = ["heap_size", "serde-serialization"]} +cssparser = {version = "0.7", features = ["heap_size", "serde-serialization"]} euclid = "0.10.1" fnv = "1.0" gfx = {path = "../gfx"} diff --git a/components/msg/Cargo.toml b/components/msg/Cargo.toml index df70f67c986..44bcaf97e8e 100644 --- a/components/msg/Cargo.toml +++ b/components/msg/Cargo.toml @@ -11,7 +11,7 @@ path = "lib.rs" [dependencies] bitflags = "0.7" -cssparser = {version = "0.6", features = ["heap_size", "serde-serialization"]} +cssparser = {version = "0.7", features = ["heap_size", "serde-serialization"]} heapsize = "0.3.0" heapsize_plugin = "0.1.2" hyper = "0.9.9" diff --git a/components/script/Cargo.toml b/components/script/Cargo.toml index 3e8e216c986..836a0ff7efc 100644 --- a/components/script/Cargo.toml +++ b/components/script/Cargo.toml @@ -27,7 +27,7 @@ bitflags = "0.7" canvas_traits = {path = "../canvas_traits"} caseless = "0.1.0" cookie = {version = "0.2.5", features = ["serialize-rustc"]} -cssparser = {version = "0.6", features = ["heap_size", "serde-serialization"]} +cssparser = {version = "0.7", features = ["heap_size", "serde-serialization"]} devtools_traits = {path = "../devtools_traits"} encoding = "0.2" euclid = "0.10.1" diff --git a/components/script_layout_interface/Cargo.toml b/components/script_layout_interface/Cargo.toml index ad051d4a9ae..18c90e2cf59 100644 --- a/components/script_layout_interface/Cargo.toml +++ b/components/script_layout_interface/Cargo.toml @@ -13,7 +13,7 @@ path = "lib.rs" app_units = "0.3" bitflags = "0.7" canvas_traits = {path = "../canvas_traits"} -cssparser = {version = "0.6", features = ["heap_size", "serde-serialization"]} +cssparser = {version = "0.7", features = ["heap_size", "serde-serialization"]} euclid = "0.10.1" gfx_traits = {path = "../gfx_traits"} heapsize = "0.3.0" diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock index a7bf8c48ed4..f402fc54aa3 100644 --- a/components/servo/Cargo.lock +++ b/components/servo/Cargo.lock @@ -235,7 +235,7 @@ name = "canvas_traits" version = "0.0.1" dependencies = [ "azure 0.8.0 (git+https://github.com/servo/rust-azure)", - "cssparser 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -436,7 +436,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cssparser" -version = "0.6.0" +version = "0.7.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)", @@ -1151,7 +1151,7 @@ dependencies = [ "azure 0.8.0 (git+https://github.com/servo/rust-azure)", "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "canvas_traits 0.0.1", - "cssparser 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "gfx 0.0.1", @@ -1170,7 +1170,7 @@ dependencies = [ "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "script_layout_interface 0.0.1", "script_traits 0.0.1", - "selectors 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "selectors 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1384,7 +1384,7 @@ name = "msg" version = "0.0.1" dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1901,7 +1901,7 @@ dependencies = [ "caseless 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "cmake 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.7.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.10.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1935,7 +1935,7 @@ dependencies = [ "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "script_layout_interface 0.0.1", "script_traits 0.0.1", - "selectors 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "selectors 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1957,7 +1957,7 @@ dependencies = [ "app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "canvas_traits 0.0.1", - "cssparser 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1971,7 +1971,7 @@ dependencies = [ "profile_traits 0.0.1", "range 0.0.1", "script_traits 0.0.1", - "selectors 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "selectors 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)", "style 0.0.1", "url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2020,11 +2020,11 @@ dependencies = [ [[package]] name = "selectors" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2223,7 +2223,7 @@ version = "0.0.1" dependencies = [ "app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2242,7 +2242,7 @@ dependencies = [ "quickersort 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", - "selectors 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "selectors 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2259,10 +2259,10 @@ name = "style_tests" version = "0.0.1" dependencies = [ "app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", - "selectors 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "selectors 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)", "style 0.0.1", "style_traits 0.0.1", @@ -2275,7 +2275,7 @@ name = "style_traits" version = "0.0.1" dependencies = [ "app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2755,7 +2755,7 @@ dependencies = [ "checksum core-graphics 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f0c1e70c26fbf342d448e01510360eefeb20a4f26c9e47d687843212f14e5122" "checksum core-text 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2debbf22a8358e5e270e958b6d65694667be7a2ef9c3a2bf05a0872a3124dc98" "checksum crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0c5ea215664ca264da8a9d9c3be80d2eaf30923c259d03e870388eb927508f97" -"checksum cssparser 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e071724b9769173d83934933953dc57e77800ee18e9c3d2f61d2a10d8fe23547" +"checksum cssparser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8175947c6e986d7578e64c33c76f6dd47884265e9cad2f4d28f76f257f433282" "checksum dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850" "checksum dbus 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "94d266a872aaf68b50d02083c429a3686935ab6ab54824290509cdc422673eaf" "checksum debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9a032eac705ca39214d169f83e3d3da290af06d8d1d344d1baad2fd002dca4b3" @@ -2877,7 +2877,7 @@ dependencies = [ "checksum rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "6159e4e6e559c81bd706afe9c8fd68f547d3e851ce12e76b1de7914bab61691b" "checksum rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c5f5376ea5e30ce23c03eb77cbe4962b988deead10910c372b226388b594c084" "checksum scoped_threadpool 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "3ef399c8893e8cb7aa9696e895427fab3a6bf265977bb96e126f24ddd2cda85a" -"checksum selectors 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9eee17ca1807581fc4cf0bfddda311dc421f295a71314b9276ecc787cc63ed6f" +"checksum selectors 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1f844a32e73a0d8e59a76036751fcb5581ca1ded4f2f2f3dc21720a80ba908af" "checksum semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "d4f410fedcf71af0345d7607d246e7ad15faaadd49d240ee3b24e5dc21a820ac" "checksum serde 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9e1979331bc87240ef63a5cd79c69cced8261185d9ca5647ae357f17eaef16f4" "checksum serde_codegen 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)" = "aec103831a0b4143957c124e2a9a168e43158f8bf0964b21d5818789eb62d5ac" diff --git a/components/style/Cargo.toml b/components/style/Cargo.toml index f782f62d70a..27dd88566ff 100644 --- a/components/style/Cargo.toml +++ b/components/style/Cargo.toml @@ -22,7 +22,7 @@ servo = ["serde", "serde/unstable", "serde_macros", "heapsize", "heapsize_plugin [dependencies] app_units = "0.3" bitflags = "0.7" -cssparser = "0.6" +cssparser = "0.7" deque = "0.3.1" encoding = "0.2" euclid = "0.10.1" diff --git a/components/style/font_face.rs b/components/style/font_face.rs index ed42376fbbe..c01d26c1b32 100644 --- a/components/style/font_face.rs +++ b/components/style/font_face.rs @@ -119,7 +119,7 @@ impl<'a, 'b> AtRuleParser for FontFaceRuleParser<'a, 'b> { impl<'a, 'b> DeclarationParser for FontFaceRuleParser<'a, 'b> { type Declaration = FontFaceDescriptorDeclaration; - fn parse_value(&self, name: &str, input: &mut Parser) -> Result<FontFaceDescriptorDeclaration, ()> { + fn parse_value(&mut self, name: &str, input: &mut Parser) -> Result<FontFaceDescriptorDeclaration, ()> { match_ignore_ascii_case! { name, "font-family" => { Ok(FontFaceDescriptorDeclaration::Family(try!( diff --git a/components/style/keyframes.rs b/components/style/keyframes.rs index 8253717019c..f874f788cbe 100644 --- a/components/style/keyframes.rs +++ b/components/style/keyframes.rs @@ -232,7 +232,7 @@ impl<'a> QualifiedRuleParser for KeyframeListParser<'a> { type Prelude = KeyframeSelector; type QualifiedRule = Arc<Keyframe>; - fn parse_prelude(&self, input: &mut Parser) -> Result<Self::Prelude, ()> { + fn parse_prelude(&mut self, input: &mut Parser) -> Result<Self::Prelude, ()> { let start = input.position(); match input.parse_comma_separated(|input| KeyframePercentage::parse(input)) { Ok(percentages) => Ok(KeyframeSelector(percentages)), @@ -244,7 +244,7 @@ impl<'a> QualifiedRuleParser for KeyframeListParser<'a> { } } - fn parse_block(&self, prelude: Self::Prelude, input: &mut Parser) + fn parse_block(&mut self, prelude: Self::Prelude, input: &mut Parser) -> Result<Self::QualifiedRule, ()> { let mut declarations = Vec::new(); let parser = KeyframeDeclarationParser { @@ -286,7 +286,7 @@ impl<'a, 'b> AtRuleParser for KeyframeDeclarationParser<'a, 'b> { impl<'a, 'b> DeclarationParser for KeyframeDeclarationParser<'a, 'b> { type Declaration = Vec<PropertyDeclaration>; - fn parse_value(&self, name: &str, input: &mut Parser) -> Result<Vec<PropertyDeclaration>, ()> { + fn parse_value(&mut self, name: &str, input: &mut Parser) -> Result<Vec<PropertyDeclaration>, ()> { let mut results = Vec::new(); match PropertyDeclaration::parse(name, self.context, input, &mut results, true) { PropertyDeclarationParseResult::ValidOrIgnoredDeclaration => {} diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index e3f2b6199ab..6cbb487b309 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -544,7 +544,7 @@ impl<'a, 'b> AtRuleParser for PropertyDeclarationParser<'a, 'b> { impl<'a, 'b> DeclarationParser for PropertyDeclarationParser<'a, 'b> { type Declaration = (Vec<PropertyDeclaration>, Importance); - fn parse_value(&self, name: &str, input: &mut Parser) + fn parse_value(&mut self, name: &str, input: &mut Parser) -> Result<(Vec<PropertyDeclaration>, Importance), ()> { let mut results = vec![]; try!(input.parse_until_before(Delimiter::Bang, |input| { diff --git a/components/style/stylesheets.rs b/components/style/stylesheets.rs index 6c4f452f7d9..c2de24847da 100644 --- a/components/style/stylesheets.rs +++ b/components/style/stylesheets.rs @@ -160,19 +160,7 @@ impl Stylesheet { let mut iter = RuleListParser::new_for_stylesheet(&mut input, rule_parser); while let Some(result) = iter.next() { match result { - Ok(rule) => { - if let CSSRule::Namespace(ref rule) = rule { - if let Some(ref prefix) = rule.prefix { - iter.parser.context.selector_context.namespace_prefixes.insert( - prefix.clone(), rule.url.clone()); - } else { - iter.parser.context.selector_context.default_namespace = - Some(rule.url.clone()); - } - } - - rules.push(rule); - } + Ok(rule) => rules.push(rule), Err(range) => { let pos = range.start; let message = format!("Invalid rule: '{}'", iter.input.slice(range)); @@ -427,7 +415,7 @@ impl<'a> AtRuleParser for TopLevelRuleParser<'a> { type Prelude = AtRulePrelude; type AtRule = CSSRule; - fn parse_prelude(&self, name: &str, input: &mut Parser) + fn parse_prelude(&mut self, name: &str, input: &mut Parser) -> Result<AtRuleType<AtRulePrelude, CSSRule>, ()> { match_ignore_ascii_case! { name, "import" => { @@ -443,10 +431,21 @@ impl<'a> AtRuleParser for TopLevelRuleParser<'a> { if self.state.get() <= State::Namespaces { self.state.set(State::Namespaces); - let prefix = input.try(|input| input.expect_ident()).ok().map(|p| p.into()); + let prefix_result = input.try(|input| input.expect_ident()); let url = Namespace(Atom::from(try!(input.expect_url_or_string()))); + + let opt_prefix = if let Ok(prefix) = prefix_result { + let prefix: Atom = prefix.into(); + self.context.selector_context.namespace_prefixes.insert( + prefix.clone(), url.clone()); + Some(prefix) + } else { + self.context.selector_context.default_namespace = Some(url.clone()); + None + }; + return Ok(AtRuleType::WithoutBlock(CSSRule::Namespace(Arc::new(NamespaceRule { - prefix: prefix, + prefix: opt_prefix, url: url, })))) } else { @@ -460,12 +459,12 @@ impl<'a> AtRuleParser for TopLevelRuleParser<'a> { } self.state.set(State::Body); - AtRuleParser::parse_prelude(&NestedRuleParser { context: &self.context }, name, input) + AtRuleParser::parse_prelude(&mut NestedRuleParser { context: &self.context }, name, input) } #[inline] - fn parse_block(&self, prelude: AtRulePrelude, input: &mut Parser) -> Result<CSSRule, ()> { - AtRuleParser::parse_block(&NestedRuleParser { context: &self.context }, prelude, input) + fn parse_block(&mut self, prelude: AtRulePrelude, input: &mut Parser) -> Result<CSSRule, ()> { + AtRuleParser::parse_block(&mut NestedRuleParser { context: &self.context }, prelude, input) } } @@ -475,14 +474,15 @@ impl<'a> QualifiedRuleParser for TopLevelRuleParser<'a> { type QualifiedRule = CSSRule; #[inline] - fn parse_prelude(&self, input: &mut Parser) -> Result<Vec<Selector<TheSelectorImpl>>, ()> { + fn parse_prelude(&mut self, input: &mut Parser) -> Result<Vec<Selector<TheSelectorImpl>>, ()> { self.state.set(State::Body); - QualifiedRuleParser::parse_prelude(&NestedRuleParser { context: &self.context }, input) + QualifiedRuleParser::parse_prelude(&mut NestedRuleParser { context: &self.context }, input) } #[inline] - fn parse_block(&self, prelude: Vec<Selector<TheSelectorImpl>>, input: &mut Parser) -> Result<CSSRule, ()> { - QualifiedRuleParser::parse_block(&NestedRuleParser { context: &self.context }, + fn parse_block(&mut self, prelude: Vec<Selector<TheSelectorImpl>>, input: &mut Parser) + -> Result<CSSRule, ()> { + QualifiedRuleParser::parse_block(&mut NestedRuleParser { context: &self.context }, prelude, input) } } @@ -497,7 +497,7 @@ impl<'a, 'b> AtRuleParser for NestedRuleParser<'a, 'b> { type Prelude = AtRulePrelude; type AtRule = CSSRule; - fn parse_prelude(&self, name: &str, input: &mut Parser) + fn parse_prelude(&mut self, name: &str, input: &mut Parser) -> Result<AtRuleType<AtRulePrelude, CSSRule>, ()> { match_ignore_ascii_case! { name, "media" => { @@ -527,7 +527,7 @@ impl<'a, 'b> AtRuleParser for NestedRuleParser<'a, 'b> { } } - fn parse_block(&self, prelude: AtRulePrelude, input: &mut Parser) -> Result<CSSRule, ()> { + fn parse_block(&mut self, prelude: AtRulePrelude, input: &mut Parser) -> Result<CSSRule, ()> { match prelude { AtRulePrelude::FontFace => { Ok(CSSRule::FontFace(Arc::new(try!(parse_font_face_block(self.context, input))))) @@ -555,11 +555,12 @@ impl<'a, 'b> QualifiedRuleParser for NestedRuleParser<'a, 'b> { type Prelude = Vec<Selector<TheSelectorImpl>>; type QualifiedRule = CSSRule; - fn parse_prelude(&self, input: &mut Parser) -> Result<Vec<Selector<TheSelectorImpl>>, ()> { + fn parse_prelude(&mut self, input: &mut Parser) -> Result<Vec<Selector<TheSelectorImpl>>, ()> { parse_selector_list(&self.context.selector_context, input) } - fn parse_block(&self, prelude: Vec<Selector<TheSelectorImpl>>, input: &mut Parser) -> Result<CSSRule, ()> { + fn parse_block(&mut self, prelude: Vec<Selector<TheSelectorImpl>>, input: &mut Parser) + -> Result<CSSRule, ()> { Ok(CSSRule::Style(Arc::new(StyleRule { selectors: prelude, declarations: Arc::new(parse_property_declaration_list(self.context, input)) diff --git a/components/style/viewport.rs b/components/style/viewport.rs index 253c5440a2a..0ab1819b6e5 100644 --- a/components/style/viewport.rs +++ b/components/style/viewport.rs @@ -225,7 +225,7 @@ impl<'a, 'b> AtRuleParser for ViewportRuleParser<'a, 'b> { impl<'a, 'b> DeclarationParser for ViewportRuleParser<'a, 'b> { type Declaration = Vec<ViewportDescriptorDeclaration>; - fn parse_value(&self, name: &str, input: &mut Parser) -> Result<Vec<ViewportDescriptorDeclaration>, ()> { + fn parse_value(&mut self, name: &str, input: &mut Parser) -> Result<Vec<ViewportDescriptorDeclaration>, ()> { macro_rules! declaration { ($declaration:ident($parse:path)) => { declaration!($declaration(value: try!($parse(input)), diff --git a/components/style_traits/Cargo.toml b/components/style_traits/Cargo.toml index 99ff18bd7ee..871cfc69d9b 100644 --- a/components/style_traits/Cargo.toml +++ b/components/style_traits/Cargo.toml @@ -15,7 +15,7 @@ servo = ["heapsize", "heapsize_plugin", "serde", "serde_macros", [dependencies] app_units = "0.3" -cssparser = "0.6" +cssparser = "0.7" euclid = "0.10.1" heapsize = {version = "0.3.0", optional = true} heapsize_plugin = {version = "0.1.2", optional = true} diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock index d02219412a3..5c605ece0e5 100644 --- a/ports/cef/Cargo.lock +++ b/ports/cef/Cargo.lock @@ -209,7 +209,7 @@ name = "canvas_traits" version = "0.0.1" dependencies = [ "azure 0.8.0 (git+https://github.com/servo/rust-azure)", - "cssparser 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -394,7 +394,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cssparser" -version = "0.6.0" +version = "0.7.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)", @@ -1059,7 +1059,7 @@ dependencies = [ "azure 0.8.0 (git+https://github.com/servo/rust-azure)", "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "canvas_traits 0.0.1", - "cssparser 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "gfx 0.0.1", @@ -1078,7 +1078,7 @@ dependencies = [ "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "script_layout_interface 0.0.1", "script_traits 0.0.1", - "selectors 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "selectors 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1285,7 +1285,7 @@ name = "msg" version = "0.0.1" dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1753,7 +1753,7 @@ dependencies = [ "caseless 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "cmake 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.7.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.10.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1787,7 +1787,7 @@ dependencies = [ "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "script_layout_interface 0.0.1", "script_traits 0.0.1", - "selectors 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "selectors 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1809,7 +1809,7 @@ dependencies = [ "app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "canvas_traits 0.0.1", - "cssparser 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1823,7 +1823,7 @@ dependencies = [ "profile_traits 0.0.1", "range 0.0.1", "script_traits 0.0.1", - "selectors 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "selectors 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)", "style 0.0.1", "url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1862,11 +1862,11 @@ dependencies = [ [[package]] name = "selectors" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2106,7 +2106,7 @@ version = "0.0.1" dependencies = [ "app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2125,7 +2125,7 @@ dependencies = [ "quickersort 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", - "selectors 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "selectors 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2142,7 +2142,7 @@ name = "style_traits" version = "0.0.1" dependencies = [ "app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2614,7 +2614,7 @@ dependencies = [ "checksum core-graphics 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f0c1e70c26fbf342d448e01510360eefeb20a4f26c9e47d687843212f14e5122" "checksum core-text 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2debbf22a8358e5e270e958b6d65694667be7a2ef9c3a2bf05a0872a3124dc98" "checksum crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0c5ea215664ca264da8a9d9c3be80d2eaf30923c259d03e870388eb927508f97" -"checksum cssparser 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e071724b9769173d83934933953dc57e77800ee18e9c3d2f61d2a10d8fe23547" +"checksum cssparser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8175947c6e986d7578e64c33c76f6dd47884265e9cad2f4d28f76f257f433282" "checksum dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850" "checksum dbus 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "94d266a872aaf68b50d02083c429a3686935ab6ab54824290509cdc422673eaf" "checksum debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9a032eac705ca39214d169f83e3d3da290af06d8d1d344d1baad2fd002dca4b3" @@ -2731,7 +2731,7 @@ dependencies = [ "checksum rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "6159e4e6e559c81bd706afe9c8fd68f547d3e851ce12e76b1de7914bab61691b" "checksum rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c5f5376ea5e30ce23c03eb77cbe4962b988deead10910c372b226388b594c084" "checksum scoped_threadpool 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "3ef399c8893e8cb7aa9696e895427fab3a6bf265977bb96e126f24ddd2cda85a" -"checksum selectors 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9eee17ca1807581fc4cf0bfddda311dc421f295a71314b9276ecc787cc63ed6f" +"checksum selectors 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1f844a32e73a0d8e59a76036751fcb5581ca1ded4f2f2f3dc21720a80ba908af" "checksum semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "d4f410fedcf71af0345d7607d246e7ad15faaadd49d240ee3b24e5dc21a820ac" "checksum serde 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9e1979331bc87240ef63a5cd79c69cced8261185d9ca5647ae357f17eaef16f4" "checksum serde_codegen 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)" = "aec103831a0b4143957c124e2a9a168e43158f8bf0964b21d5818789eb62d5ac" diff --git a/ports/geckolib/Cargo.lock b/ports/geckolib/Cargo.lock index 4dd12a89413..2de02a86474 100644 --- a/ports/geckolib/Cargo.lock +++ b/ports/geckolib/Cargo.lock @@ -11,7 +11,7 @@ dependencies = [ "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "selectors 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "selectors 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", "style 0.0.1", "style_traits 0.0.1", "url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -48,7 +48,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cssparser" -version = "0.6.0" +version = "0.7.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)", @@ -169,7 +169,7 @@ dependencies = [ "gecko_bindings 0.0.1", "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", - "selectors 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "selectors 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -318,11 +318,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "selectors" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)", @@ -356,7 +356,7 @@ version = "0.0.1" dependencies = [ "app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -374,7 +374,7 @@ dependencies = [ "quickersort 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", - "selectors 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "selectors 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "style_traits 0.0.1", "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", @@ -388,7 +388,7 @@ name = "style_traits" version = "0.0.1" dependencies = [ "app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cssparser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -506,7 +506,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "636ee56f12e31dbc11dc0a1ac6004f08b04e6e6595963716fc8130e90d4e04cf" "checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" "checksum cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de1e760d7b6535af4241fca8bd8adf68e2e7edacc6b29f5d399050c5e48cf88c" -"checksum cssparser 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e071724b9769173d83934933953dc57e77800ee18e9c3d2f61d2a10d8fe23547" +"checksum cssparser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8175947c6e986d7578e64c33c76f6dd47884265e9cad2f4d28f76f257f433282" "checksum debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9a032eac705ca39214d169f83e3d3da290af06d8d1d344d1baad2fd002dca4b3" "checksum deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1614659040e711785ed8ea24219140654da1729f3ec8a47a9719d041112fe7bf" "checksum encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)" = "1119ca1c88774efeed1a7926958e212e02af7437bdeab8520dbc7aa1abde3026" @@ -539,7 +539,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum regex 0.1.73 (registry+https://github.com/rust-lang/crates.io-index)" = "56b7ee9f764ecf412c6e2fff779bca4b22980517ae335a21aeaf4e32625a5df2" "checksum regex-syntax 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "31040aad7470ad9d8c46302dcffba337bb4289ca5da2e3cd6e37b64109a85199" "checksum rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "6159e4e6e559c81bd706afe9c8fd68f547d3e851ce12e76b1de7914bab61691b" -"checksum selectors 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9eee17ca1807581fc4cf0bfddda311dc421f295a71314b9276ecc787cc63ed6f" +"checksum selectors 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1f844a32e73a0d8e59a76036751fcb5581ca1ded4f2f2f3dc21720a80ba908af" "checksum serde 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9e1979331bc87240ef63a5cd79c69cced8261185d9ca5647ae357f17eaef16f4" "checksum smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "fcc8d19212aacecf95e4a7a2179b26f7aeb9732a915cf01f05b0d3e044865410" "checksum string_cache 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)" = "8124780714454740877246380f6c12f5b0ed40975f8749eb28767087662cdbd5" diff --git a/tests/unit/style/Cargo.toml b/tests/unit/style/Cargo.toml index 41a70dd9964..a7923a49a69 100644 --- a/tests/unit/style/Cargo.toml +++ b/tests/unit/style/Cargo.toml @@ -11,7 +11,7 @@ doctest = false [dependencies] app_units = "0.3" -cssparser = {version = "0.6", features = ["heap_size"]} +cssparser = {version = "0.7", features = ["heap_size"]} euclid = "0.10.1" rustc-serialize = "0.3" selectors = {version = "0.13", features = ["heap_size"]} |