aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-02-07 20:36:59 -0800
committerGitHub <noreply@github.com>2017-02-07 20:36:59 -0800
commitf7e75fd0012b9a063718f56e5aab093dde40d42f (patch)
tree28581d042f8451289de81a29562f306f07c1c4d0
parente9933f36b771e9aad24b7abcac0ae81b49539d35 (diff)
parent55b2c5c1bdab91f7ae9917d8df5641965971adb9 (diff)
downloadservo-f7e75fd0012b9a063718f56e5aab093dde40d42f.tar.gz
servo-f7e75fd0012b9a063718f56e5aab093dde40d42f.zip
Auto merge of #15440 - KiChjang:selectors, r=KiChjang
Update selectors to 0.17 Closes #15434.
-rw-r--r--Cargo.lock20
-rw-r--r--components/layout/Cargo.toml2
-rw-r--r--components/layout_thread/Cargo.toml2
-rw-r--r--components/script/Cargo.toml2
-rw-r--r--components/script/dom/element.rs4
-rw-r--r--components/script/layout_wrapper.rs6
-rw-r--r--components/script_layout_interface/Cargo.toml2
-rw-r--r--components/style/Cargo.toml2
-rw-r--r--components/style/gecko/wrapper.rs6
-rw-r--r--components/style/restyle_hints.rs4
-rw-r--r--components/style/servo/selector_parser.rs2
-rw-r--r--ports/geckolib/Cargo.toml2
-rw-r--r--tests/unit/style/Cargo.toml2
-rw-r--r--tests/unit/stylo/Cargo.toml2
-rw-r--r--tests/wpt/metadata/dom/nodes/ParentNode-querySelector-All-xht.xht.ini24
-rw-r--r--tests/wpt/metadata/dom/nodes/ParentNode-querySelector-All.html.ini24
16 files changed, 29 insertions, 77 deletions
diff --git a/Cargo.lock b/Cargo.lock
index e16629d24ef..c9b451b143d 100644
--- a/Cargo.lock
+++ b/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/components/layout/Cargo.toml b/components/layout/Cargo.toml
index 5642459c940..359d8619c7f 100644
--- a/components/layout/Cargo.toml
+++ b/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/components/layout_thread/Cargo.toml b/components/layout_thread/Cargo.toml
index 5cc708d3208..fd721e0c935 100644
--- a/components/layout_thread/Cargo.toml
+++ b/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/components/script/Cargo.toml b/components/script/Cargo.toml
index 16368dd1bb1..1d565715d25 100644
--- a/components/script/Cargo.toml
+++ b/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/components/script/dom/element.rs b/components/script/dom/element.rs
index e93becfffdd..9fae93d10cd 100644
--- a/components/script/dom/element.rs
+++ b/components/script/dom/element.rs
@@ -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(),
diff --git a/components/script/layout_wrapper.rs b/components/script/layout_wrapper.rs
index 15a110e7d51..fcaba5905a7 100644
--- a/components/script/layout_wrapper.rs
+++ b/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/components/script_layout_interface/Cargo.toml b/components/script_layout_interface/Cargo.toml
index c75279af06c..1440755e769 100644
--- a/components/script_layout_interface/Cargo.toml
+++ b/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/components/style/Cargo.toml b/components/style/Cargo.toml
index 8bcc1e596ef..fcbab890135 100644
--- a/components/style/Cargo.toml
+++ b/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/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs
index 872fc06486c..1468e31f487 100644
--- a/components/style/gecko/wrapper.rs
+++ b/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/components/style/restyle_hints.rs b/components/style/restyle_hints.rs
index cb0d889e7e9..785a18c1d1f 100644
--- a/components/style/restyle_hints.rs
+++ b/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/components/style/servo/selector_parser.rs b/components/style/servo/selector_parser.rs
index 9da80b05253..a2df2fa3795 100644
--- a/components/style/servo/selector_parser.rs
+++ b/components/style/servo/selector_parser.rs
@@ -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]
diff --git a/ports/geckolib/Cargo.toml b/ports/geckolib/Cargo.toml
index 71bf82f04b7..e8c4facafca 100644
--- a/ports/geckolib/Cargo.toml
+++ b/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/tests/unit/style/Cargo.toml b/tests/unit/style/Cargo.toml
index cfbac8127d1..9d932d2207d 100644
--- a/tests/unit/style/Cargo.toml
+++ b/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/tests/unit/stylo/Cargo.toml b/tests/unit/stylo/Cargo.toml
index b656443cff1..ec3960b520f 100644
--- a/tests/unit/stylo/Cargo.toml
+++ b/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"}
diff --git a/tests/wpt/metadata/dom/nodes/ParentNode-querySelector-All-xht.xht.ini b/tests/wpt/metadata/dom/nodes/ParentNode-querySelector-All-xht.xht.ini
index e7b0b183659..e172a456cde 100644
--- a/tests/wpt/metadata/dom/nodes/ParentNode-querySelector-All-xht.xht.ini
+++ b/tests/wpt/metadata/dom/nodes/ParentNode-querySelector-All-xht.xht.ini
@@ -1,11 +1,5 @@
[ParentNode-querySelector-All-xht.xht]
type: testharness
- [Document.querySelectorAll: Attribute whitespace-separated list selector, not matching class attribute with empty value: #attr-whitespace [class~=""\]]
- expected: FAIL
-
- [Document.querySelector: Attribute whitespace-separated list selector, not matching class attribute with empty value: #attr-whitespace [class~=""\]]
- expected: FAIL
-
[Document.querySelectorAll: :lang pseudo-class selector, matching inherited language: #pseudo-lang-div1:lang(en)]
expected: FAIL
@@ -54,12 +48,6 @@
[Document.querySelector: ::first-letter pseudo-element (two-colon syntax) selector, not matching any elements: #pseudo-element::first-letter]
expected: FAIL
- [Detached Element.querySelectorAll: Attribute whitespace-separated list selector, not matching class attribute with empty value: #attr-whitespace [class~=""\]]
- expected: FAIL
-
- [Detached Element.querySelector: Attribute whitespace-separated list selector, not matching class attribute with empty value: #attr-whitespace [class~=""\]]
- expected: FAIL
-
[Detached Element.querySelectorAll: :lang pseudo-class selector, not matching element with no inherited language: #pseudo-lang-div1:lang(en)]
expected: FAIL
@@ -108,12 +96,6 @@
[Detached Element.querySelector: ::first-letter pseudo-element (two-colon syntax) selector, not matching any elements: #pseudo-element::first-letter]
expected: FAIL
- [Fragment.querySelectorAll: Attribute whitespace-separated list selector, not matching class attribute with empty value: #attr-whitespace [class~=""\]]
- expected: FAIL
-
- [Fragment.querySelector: Attribute whitespace-separated list selector, not matching class attribute with empty value: #attr-whitespace [class~=""\]]
- expected: FAIL
-
[Fragment.querySelectorAll: :lang pseudo-class selector, not matching element with no inherited language: #pseudo-lang-div1:lang(en)]
expected: FAIL
@@ -162,12 +144,6 @@
[Fragment.querySelector: ::first-letter pseudo-element (two-colon syntax) selector, not matching any elements: #pseudo-element::first-letter]
expected: FAIL
- [In-document Element.querySelectorAll: Attribute whitespace-separated list selector, not matching class attribute with empty value: #attr-whitespace [class~=""\]]
- expected: FAIL
-
- [In-document Element.querySelector: Attribute whitespace-separated list selector, not matching class attribute with empty value: #attr-whitespace [class~=""\]]
- expected: FAIL
-
[In-document Element.querySelectorAll: :lang pseudo-class selector, matching inherited language: #pseudo-lang-div1:lang(en)]
expected: FAIL
diff --git a/tests/wpt/metadata/dom/nodes/ParentNode-querySelector-All.html.ini b/tests/wpt/metadata/dom/nodes/ParentNode-querySelector-All.html.ini
index 4da980298cb..e3a0b643387 100644
--- a/tests/wpt/metadata/dom/nodes/ParentNode-querySelector-All.html.ini
+++ b/tests/wpt/metadata/dom/nodes/ParentNode-querySelector-All.html.ini
@@ -1,11 +1,5 @@
[ParentNode-querySelector-All.html]
type: testharness
- [Document.querySelectorAll: Attribute whitespace-separated list selector, not matching class attribute with empty value: #attr-whitespace [class~=""\]]
- expected: FAIL
-
- [Document.querySelector: Attribute whitespace-separated list selector, not matching class attribute with empty value: #attr-whitespace [class~=""\]]
- expected: FAIL
-
[Document.querySelectorAll: :lang pseudo-class selector, matching inherited language: #pseudo-lang-div1:lang(en)]
expected: FAIL
@@ -54,12 +48,6 @@
[Document.querySelector: ::first-letter pseudo-element (two-colon syntax) selector, not matching any elements: #pseudo-element::first-letter]
expected: FAIL
- [Detached Element.querySelectorAll: Attribute whitespace-separated list selector, not matching class attribute with empty value: #attr-whitespace [class~=""\]]
- expected: FAIL
-
- [Detached Element.querySelector: Attribute whitespace-separated list selector, not matching class attribute with empty value: #attr-whitespace [class~=""\]]
- expected: FAIL
-
[Detached Element.querySelectorAll: :lang pseudo-class selector, not matching element with no inherited language: #pseudo-lang-div1:lang(en)]
expected: FAIL
@@ -108,12 +96,6 @@
[Detached Element.querySelector: ::first-letter pseudo-element (two-colon syntax) selector, not matching any elements: #pseudo-element::first-letter]
expected: FAIL
- [Fragment.querySelectorAll: Attribute whitespace-separated list selector, not matching class attribute with empty value: #attr-whitespace [class~=""\]]
- expected: FAIL
-
- [Fragment.querySelector: Attribute whitespace-separated list selector, not matching class attribute with empty value: #attr-whitespace [class~=""\]]
- expected: FAIL
-
[Fragment.querySelectorAll: :lang pseudo-class selector, not matching element with no inherited language: #pseudo-lang-div1:lang(en)]
expected: FAIL
@@ -162,12 +144,6 @@
[Fragment.querySelector: ::first-letter pseudo-element (two-colon syntax) selector, not matching any elements: #pseudo-element::first-letter]
expected: FAIL
- [In-document Element.querySelectorAll: Attribute whitespace-separated list selector, not matching class attribute with empty value: #attr-whitespace [class~=""\]]
- expected: FAIL
-
- [In-document Element.querySelector: Attribute whitespace-separated list selector, not matching class attribute with empty value: #attr-whitespace [class~=""\]]
- expected: FAIL
-
[In-document Element.querySelectorAll: :lang pseudo-class selector, matching inherited language: #pseudo-lang-div1:lang(en)]
expected: FAIL