mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
servo: Merge #15440 - Update selectors to 0.17 (from KiChjang:selectors); r=KiChjang
Closes #15434. Source-Repo: https://github.com/servo/servo Source-Revision: f7e75fd0012b9a063718f56e5aab093dde40d42f --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : cff895ff34f92aaae2935c59f76fbb05ad3ee41e
This commit is contained in:
parent
7a83e02c27
commit
adff1c356b
20
servo/Cargo.lock
generated
20
servo/Cargo.lock
generated
@ -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"
|
||||
|
@ -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"}
|
||||
|
@ -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"}
|
||||
|
@ -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"] }
|
||||
|
@ -2335,8 +2335,8 @@ impl<'a> ::selectors::Element for Root<Element> {
|
||||
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(),
|
||||
|
@ -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
|
||||
|
@ -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"}
|
||||
|
@ -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}
|
||||
|
@ -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]
|
||||
|
@ -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 {
|
||||
|
@ -428,7 +428,7 @@ impl MatchAttrGeneric for ServoElementSnapshot {
|
||||
|
||||
impl<E: Element<Impl=SelectorImpl> + 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]
|
||||
|
@ -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"}
|
||||
|
@ -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"}
|
||||
|
@ -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"}
|
||||
|
Loading…
Reference in New Issue
Block a user