Auto merge of #15440 - KiChjang:selectors, r=KiChjang

Update selectors to 0.17

Closes #15434.
This commit is contained in:
bors-servo 2017-02-07 20:36:59 -08:00 committed by GitHub
commit f7e75fd001
16 changed files with 29 additions and 77 deletions

View file

@ -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"}

View file

@ -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"}

View file

@ -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"] }

View file

@ -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(),

View file

@ -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

View file

@ -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"}

View file

@ -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}

View file

@ -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]

View file

@ -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 {

View file

@ -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]