diff --git a/servo/Cargo.lock b/servo/Cargo.lock index e16629d24ef6..c9b451b143da 100644 --- a/servo/Cargo.lock +++ b/servo/Cargo.lock @@ -934,7 +934,7 @@ dependencies = [ "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "selectors 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)", + "selectors 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", "servo_url 0.0.1", "style 0.0.1", "style_traits 0.0.1", @@ -1355,7 +1355,7 @@ dependencies = [ "rayon 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "script_layout_interface 0.0.1", "script_traits 0.0.1", - "selectors 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)", + "selectors 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 0.8.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1401,7 +1401,7 @@ dependencies = [ "script 0.0.1", "script_layout_interface 0.0.1", "script_traits 0.0.1", - "selectors 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)", + "selectors 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 0.8.4 (registry+https://github.com/rust-lang/crates.io-index)", "servo_config 0.0.1", @@ -2292,7 +2292,7 @@ dependencies = [ "rustc-serialize 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", "script_layout_interface 0.0.1", "script_traits 0.0.1", - "selectors 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)", + "selectors 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 0.8.4 (registry+https://github.com/rust-lang/crates.io-index)", "servo_atoms 0.0.1", @@ -2336,7 +2336,7 @@ dependencies = [ "profile_traits 0.0.1", "range 0.0.1", "script_traits 0.0.1", - "selectors 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)", + "selectors 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", "servo_url 0.0.1", "style 0.0.1", ] @@ -2386,7 +2386,7 @@ dependencies = [ [[package]] name = "selectors" -version = "0.15.1" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2767,7 +2767,7 @@ dependencies = [ "rayon 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", - "selectors 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)", + "selectors 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)", "servo_atoms 0.0.1", @@ -2793,7 +2793,7 @@ dependencies = [ "parking_lot 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", - "selectors 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)", + "selectors 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", "servo_atoms 0.0.1", "servo_config 0.0.1", "servo_url 0.0.1", @@ -2830,7 +2830,7 @@ dependencies = [ "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "selectors 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)", + "selectors 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", "servo_url 0.0.1", "style 0.0.1", "style_traits 0.0.1", @@ -3517,7 +3517,7 @@ dependencies = [ "checksum rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c5f5376ea5e30ce23c03eb77cbe4962b988deead10910c372b226388b594c084" "checksum same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d931a44fdaa43b8637009e7632a02adc4f2b2e0733c08caa4cf00e8da4a117a7" "checksum scoped_threadpool 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "3ef399c8893e8cb7aa9696e895427fab3a6bf265977bb96e126f24ddd2cda85a" -"checksum selectors 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)" = "966334243238d1ef939c51576c55ffd3fd32245bd603a45f9dfdb3439a26e9a7" +"checksum selectors 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "48ed8bbe599ed52966241c818c92dc024702666f51b4e8ab538b2108c1d6d43a" "checksum semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "d4f410fedcf71af0345d7607d246e7ad15faaadd49d240ee3b24e5dc21a820ac" "checksum semver 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2d5b7638a1f03815d94e88cb3b3c08e87f0db4d683ef499d1836aaf70a45623f" "checksum serde 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)" = "793aa8d4a777e46a68bbf88998cd957e638427ba5bfb0de22c92ff277b65bd21" diff --git a/servo/components/layout/Cargo.toml b/servo/components/layout/Cargo.toml index 5642459c9405..359d8619c7f6 100644 --- a/servo/components/layout/Cargo.toml +++ b/servo/components/layout/Cargo.toml @@ -34,7 +34,7 @@ range = {path = "../range"} rayon = "0.6" script_layout_interface = {path = "../script_layout_interface"} script_traits = {path = "../script_traits"} -selectors = "0.15.1" +selectors = "0.17" serde = "0.8" serde_derive = "0.8" servo_geometry = {path = "../geometry"} diff --git a/servo/components/layout_thread/Cargo.toml b/servo/components/layout_thread/Cargo.toml index 5cc708d3208e..fd721e0c9357 100644 --- a/servo/components/layout_thread/Cargo.toml +++ b/servo/components/layout_thread/Cargo.toml @@ -30,7 +30,7 @@ rayon = "0.6" script = {path = "../script"} script_layout_interface = {path = "../script_layout_interface"} script_traits = {path = "../script_traits"} -selectors = "0.15.1" +selectors = "0.17" serde_derive = "0.8" serde_json = "0.8" servo_config = {path = "../config"} diff --git a/servo/components/script/Cargo.toml b/servo/components/script/Cargo.toml index 16368dd1bb14..1d565715d254 100644 --- a/servo/components/script/Cargo.toml +++ b/servo/components/script/Cargo.toml @@ -70,7 +70,7 @@ regex = "0.2" rustc-serialize = "0.3" script_layout_interface = {path = "../script_layout_interface"} script_traits = {path = "../script_traits"} -selectors = "0.15.1" +selectors = "0.17" serde = "0.8" servo_atoms = {path = "../atoms"} servo_config = {path = "../config", features = ["servo"] } diff --git a/servo/components/script/dom/element.rs b/servo/components/script/dom/element.rs index e93becfffdd5..9fae93d10cd8 100644 --- a/servo/components/script/dom/element.rs +++ b/servo/components/script/dom/element.rs @@ -2335,8 +2335,8 @@ impl<'a> ::selectors::Element for Root { self.namespace() } - fn match_non_ts_pseudo_class(&self, pseudo_class: NonTSPseudoClass) -> bool { - match pseudo_class { + fn match_non_ts_pseudo_class(&self, pseudo_class: &NonTSPseudoClass) -> bool { + match *pseudo_class { // https://github.com/servo/servo/issues/8718 NonTSPseudoClass::Link | NonTSPseudoClass::AnyLink => self.is_link(), diff --git a/servo/components/script/layout_wrapper.rs b/servo/components/script/layout_wrapper.rs index 15a110e7d511..fcaba5905a72 100644 --- a/servo/components/script/layout_wrapper.rs +++ b/servo/components/script/layout_wrapper.rs @@ -594,8 +594,8 @@ impl<'le> ::selectors::Element for ServoLayoutElement<'le> { self.element.namespace() } - fn match_non_ts_pseudo_class(&self, pseudo_class: NonTSPseudoClass) -> bool { - match pseudo_class { + fn match_non_ts_pseudo_class(&self, pseudo_class: &NonTSPseudoClass) -> bool { + match *pseudo_class { // https://github.com/servo/servo/issues/8718 NonTSPseudoClass::Link | NonTSPseudoClass::AnyLink => unsafe { @@ -1092,7 +1092,7 @@ impl<'le> ::selectors::Element for ServoThreadSafeLayoutElement<'le> { self.element.get_namespace() } - fn match_non_ts_pseudo_class(&self, _: NonTSPseudoClass) -> bool { + fn match_non_ts_pseudo_class(&self, _: &NonTSPseudoClass) -> bool { // NB: This could maybe be implemented warn!("ServoThreadSafeLayoutElement::match_non_ts_pseudo_class called"); false diff --git a/servo/components/script_layout_interface/Cargo.toml b/servo/components/script_layout_interface/Cargo.toml index c75279af06c8..1440755e769b 100644 --- a/servo/components/script_layout_interface/Cargo.toml +++ b/servo/components/script_layout_interface/Cargo.toml @@ -28,6 +28,6 @@ plugins = {path = "../plugins"} profile_traits = {path = "../profile_traits"} range = {path = "../range"} script_traits = {path = "../script_traits"} -selectors = "0.15.1" +selectors = "0.17" servo_url = {path = "../url"} style = {path = "../style"} diff --git a/servo/components/style/Cargo.toml b/servo/components/style/Cargo.toml index 8bcc1e596ef2..fcbab8901357 100644 --- a/servo/components/style/Cargo.toml +++ b/servo/components/style/Cargo.toml @@ -46,7 +46,7 @@ phf = "0.7.20" pdqsort = "0.1.0" rayon = "0.6" rustc-serialize = "0.3" -selectors = "0.15.1" +selectors = "0.17" serde = {version = "0.8", optional = true} serde_derive = {version = "0.8", optional = true} servo_atoms = {path = "../atoms", optional = true} diff --git a/servo/components/style/gecko/wrapper.rs b/servo/components/style/gecko/wrapper.rs index 872fc06486cf..1468e31f487f 100644 --- a/servo/components/style/gecko/wrapper.rs +++ b/servo/components/style/gecko/wrapper.rs @@ -571,8 +571,8 @@ impl<'le> ::selectors::Element for GeckoElement<'le> { } } - fn match_non_ts_pseudo_class(&self, pseudo_class: NonTSPseudoClass) -> bool { - match pseudo_class { + fn match_non_ts_pseudo_class(&self, pseudo_class: &NonTSPseudoClass) -> bool { + match *pseudo_class { // https://github.com/servo/servo/issues/8718 NonTSPseudoClass::AnyLink => unsafe { Gecko_IsLink(self.0) }, NonTSPseudoClass::Link => unsafe { Gecko_IsUnvisitedLink(self.0) }, @@ -732,7 +732,7 @@ impl<'le> ::selectors::MatchAttr for GeckoElement<'le> { impl<'le> ElementExt for GeckoElement<'le> { #[inline] fn is_link(&self) -> bool { - self.match_non_ts_pseudo_class(NonTSPseudoClass::AnyLink) + self.match_non_ts_pseudo_class(&NonTSPseudoClass::AnyLink) } #[inline] diff --git a/servo/components/style/restyle_hints.rs b/servo/components/style/restyle_hints.rs index cb0d889e7e99..785a18c1d1f1 100644 --- a/servo/components/style/restyle_hints.rs +++ b/servo/components/style/restyle_hints.rs @@ -227,8 +227,8 @@ impl<'a, E> MatchAttr for ElementWrapper<'a, E> impl<'a, E> Element for ElementWrapper<'a, E> where E: TElement, { - fn match_non_ts_pseudo_class(&self, pseudo_class: NonTSPseudoClass) -> bool { - let flag = SelectorImpl::pseudo_class_state_flag(&pseudo_class); + fn match_non_ts_pseudo_class(&self, pseudo_class: &NonTSPseudoClass) -> bool { + let flag = SelectorImpl::pseudo_class_state_flag(pseudo_class); if flag == ElementState::empty() { self.element.match_non_ts_pseudo_class(pseudo_class) } else { diff --git a/servo/components/style/servo/selector_parser.rs b/servo/components/style/servo/selector_parser.rs index 9da80b05253d..a2df2fa3795f 100644 --- a/servo/components/style/servo/selector_parser.rs +++ b/servo/components/style/servo/selector_parser.rs @@ -428,7 +428,7 @@ impl MatchAttrGeneric for ServoElementSnapshot { impl + Debug> ElementExt for E { fn is_link(&self) -> bool { - self.match_non_ts_pseudo_class(NonTSPseudoClass::AnyLink) + self.match_non_ts_pseudo_class(&NonTSPseudoClass::AnyLink) } #[inline] diff --git a/servo/ports/geckolib/Cargo.toml b/servo/ports/geckolib/Cargo.toml index 71bf82f04b71..e8c4facafcae 100644 --- a/servo/ports/geckolib/Cargo.toml +++ b/servo/ports/geckolib/Cargo.toml @@ -23,7 +23,7 @@ libc = "0.2" log = {version = "0.3.5", features = ["release_max_level_info"]} num_cpus = "1.1.0" parking_lot = "0.3" -selectors = "0.15.1" +selectors = "0.17" servo_url = {path = "../../components/url"} style = {path = "../../components/style", features = ["gecko"]} style_traits = {path = "../../components/style_traits"} diff --git a/servo/tests/unit/style/Cargo.toml b/servo/tests/unit/style/Cargo.toml index cfbac8127d1b..9d932d2207d2 100644 --- a/servo/tests/unit/style/Cargo.toml +++ b/servo/tests/unit/style/Cargo.toml @@ -22,7 +22,7 @@ owning_ref = "0.2.2" parking_lot = "0.3" rayon = "0.6" rustc-serialize = "0.3" -selectors = "0.15.1" +selectors = "0.17" servo_atoms = {path = "../../../components/atoms"} servo_config = {path = "../../../components/config"} style = {path = "../../../components/style"} diff --git a/servo/tests/unit/stylo/Cargo.toml b/servo/tests/unit/stylo/Cargo.toml index b656443cff19..ec3960b520f5 100644 --- a/servo/tests/unit/stylo/Cargo.toml +++ b/servo/tests/unit/stylo/Cargo.toml @@ -22,7 +22,7 @@ libc = "0.2" log = {version = "0.3.5", features = ["release_max_level_info"]} num_cpus = "1.1.0" parking_lot = "0.3" -selectors = "0.15.1" +selectors = "0.17" servo_url = {path = "../../../components/url"} style_traits = {path = "../../../components/style_traits"} geckoservo = {path = "../../../ports/geckolib"}