diff options
Diffstat (limited to 'components/style')
-rw-r--r-- | components/style/Cargo.toml | 2 | ||||
-rw-r--r-- | components/style/gecko/wrapper.rs | 6 | ||||
-rw-r--r-- | components/style/restyle_hints.rs | 4 | ||||
-rw-r--r-- | components/style/servo/selector_parser.rs | 2 |
4 files changed, 7 insertions, 7 deletions
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] |