mirror of
https://github.com/servo/servo.git
synced 2025-08-28 08:38:20 +01:00
Update selectors to 0.10, with ToCss serialization.
This commit is contained in:
parent
4e7c689a81
commit
d690bd2382
20 changed files with 186 additions and 62 deletions
28
ports/cef/Cargo.lock
generated
28
ports/cef/Cargo.lock
generated
|
@ -707,7 +707,7 @@ dependencies = [
|
|||
"servo-fontconfig 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"simd 0.1.0 (git+https://github.com/huonw/simd)",
|
||||
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"string_cache 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"string_cache 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"style 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -864,7 +864,7 @@ dependencies = [
|
|||
"phf 0.7.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"phf_codegen 0.7.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"string_cache 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"string_cache 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tendril 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -1070,10 +1070,10 @@ 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.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"selectors 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_macros 0.8.1 (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.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"string_cache 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"style 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
"unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1783,10 +1783,10 @@ 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.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"selectors 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 0.8.1 (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.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"string_cache 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"style 0.0.1",
|
||||
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tinyfiledialogs 0.1.0 (git+https://github.com/jdm/tinyfiledialogs)",
|
||||
|
@ -1820,8 +1820,8 @@ dependencies = [
|
|||
"profile_traits 0.0.1",
|
||||
"range 0.0.1",
|
||||
"script_traits 0.0.1",
|
||||
"selectors 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"string_cache 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"selectors 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"string_cache 0.2.24 (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)",
|
||||
"util 0.0.1",
|
||||
|
@ -1859,7 +1859,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "selectors"
|
||||
version = "0.9.0"
|
||||
version = "0.10.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)",
|
||||
|
@ -1870,7 +1870,7 @@ dependencies = [
|
|||
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quickersort 2.0.1 (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.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"string_cache 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2088,7 +2088,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "string_cache"
|
||||
version = "0.2.23"
|
||||
version = "0.2.24"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2122,11 +2122,11 @@ dependencies = [
|
|||
"plugins 0.0.1",
|
||||
"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.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"selectors 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_macros 0.8.1 (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.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"string_cache 0.2.24 (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)",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2570,7 +2570,7 @@ dependencies = [
|
|||
"phf 0.7.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"phf_codegen 0.7.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"string_cache 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"string_cache 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tendril 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
|
12
ports/geckolib/Cargo.lock
generated
12
ports/geckolib/Cargo.lock
generated
|
@ -11,7 +11,7 @@ dependencies = [
|
|||
"libc 0.2.13 (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.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"selectors 0.10.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)",
|
||||
|
@ -170,7 +170,7 @@ dependencies = [
|
|||
"gecko_bindings 0.0.1",
|
||||
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"selectors 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"selectors 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -311,7 +311,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "selectors"
|
||||
version = "0.9.0"
|
||||
version = "0.10.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)",
|
||||
|
@ -320,7 +320,7 @@ dependencies = [
|
|||
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quickersort 2.0.1 (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.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"string_cache 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -335,7 +335,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "string_cache"
|
||||
version = "0.2.23"
|
||||
version = "0.2.24"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -367,7 +367,7 @@ dependencies = [
|
|||
"ordered-float 0.2.3 (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.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"selectors 0.10.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)",
|
||||
|
|
|
@ -19,7 +19,7 @@ lazy_static = "0.2"
|
|||
libc = "0.2"
|
||||
log = {version = "0.3.5", features = ["release_max_level_info"]}
|
||||
num_cpus = "0.2.2"
|
||||
selectors = "0.9"
|
||||
selectors = "0.10"
|
||||
style = {path = "../../components/style", features = ["gecko"]}
|
||||
style_traits = {path = "../../components/style_traits"}
|
||||
url = "1.2"
|
||||
|
|
|
@ -14,5 +14,5 @@ cfg-if = "0.1.0"
|
|||
gecko_bindings = {version = "0.0.1", path = "../gecko_bindings"}
|
||||
heapsize = "0.3.5"
|
||||
libc = "0.2"
|
||||
selectors = "0.9"
|
||||
selectors = "0.10"
|
||||
serde = "0.8"
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
use gecko_bindings::structs::nsIAtom;
|
||||
use selectors::bloom::BloomHash;
|
||||
use std::borrow::Borrow;
|
||||
use std::fmt;
|
||||
use std::ops::Deref;
|
||||
use {Atom, WeakAtom};
|
||||
|
||||
|
@ -29,6 +30,12 @@ impl Deref for Namespace {
|
|||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for Namespace {
|
||||
fn fmt(&self, w: &mut fmt::Formatter) -> fmt::Result {
|
||||
self.0.fmt(w)
|
||||
}
|
||||
}
|
||||
|
||||
impl Borrow<WeakNamespace> for Namespace {
|
||||
#[inline]
|
||||
fn borrow(&self) -> &WeakNamespace {
|
||||
|
|
|
@ -592,7 +592,7 @@ impl AttrSelectorHelpers for AttrSelector<GeckoSelectorImpl> {
|
|||
fn ns_or_null(&self) -> *mut nsIAtom {
|
||||
match self.namespace {
|
||||
NamespaceConstraint::Any => ptr::null_mut(),
|
||||
NamespaceConstraint::Specific(ref ns) => ns.0.as_ptr(),
|
||||
NamespaceConstraint::Specific(ref ns) => ns.url.0.as_ptr(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue