diff --git a/components/script/layout_wrapper.rs b/components/script/layout_wrapper.rs index 7085fcae002..46f5f1f9e63 100644 --- a/components/script/layout_wrapper.rs +++ b/components/script/layout_wrapper.rs @@ -392,13 +392,6 @@ impl<'le> TElement for ServoLayoutElement<'le> { (*self.element.unsafe_get()).get_attr_val_for_layout(namespace, name) } } - - #[inline] - fn get_attrs(&self, name: &Atom) -> Vec<&str> { - unsafe { - (*self.element.unsafe_get()).get_attr_vals_for_layout(name) - } - } } @@ -561,7 +554,10 @@ impl<'le> ::selectors::Element for ServoLayoutElement<'le> { self.get_attr(ns, name).map_or(false, |attr| test(attr)) }, NamespaceConstraint::Any => { - self.get_attrs(name).iter().any(|attr| test(*attr)) + let attrs = unsafe { + (*self.element.unsafe_get()).get_attr_vals_for_layout(name) + }; + attrs.iter().any(|attr| test(*attr)) } } } diff --git a/components/style/dom.rs b/components/style/dom.rs index 11cc5f93a0e..76445e6f60b 100644 --- a/components/style/dom.rs +++ b/components/style/dom.rs @@ -208,7 +208,6 @@ pub trait TElement : Sized + Copy + Clone + ElementExt + PresentationalHintsSynt fn get_state(&self) -> ElementState; fn get_attr<'a>(&'a self, namespace: &Namespace, attr: &Atom) -> Option<&'a str>; - fn get_attrs<'a>(&'a self, attr: &Atom) -> Vec<&'a str>; /// Properly marks nodes as dirty in response to restyle hints. fn note_restyle_hint(&self, mut hint: RestyleHint) { diff --git a/ports/geckolib/wrapper.rs b/ports/geckolib/wrapper.rs index 2c32643c008..8ef5161cf97 100644 --- a/ports/geckolib/wrapper.rs +++ b/ports/geckolib/wrapper.rs @@ -369,11 +369,6 @@ impl<'le> TElement for GeckoElement<'le> { reinterpret_string(ptr, length) } } - - #[inline] - fn get_attrs<'a>(&'a self, _name: &Atom) -> Vec<&'a str> { - unimplemented!() - } } impl<'le> PresentationalHintsSynthetizer for GeckoElement<'le> { @@ -519,7 +514,9 @@ impl<'le> ::selectors::Element for GeckoElement<'le> { self.get_attr(ns, name).map_or(false, |attr| test(attr)) }, NamespaceConstraint::Any => { - self.get_attrs(name).iter().any(|attr| test(*attr)) + // We should probably pass the atom into gecko and let it match + // against attributes across namespaces. + unimplemented!() } } }