diff options
author | Manish Goregaokar <manishearth@gmail.com> | 2017-06-08 14:09:41 -0700 |
---|---|---|
committer | Manish Goregaokar <manishsmail@gmail.com> | 2017-06-08 16:25:35 -0700 |
commit | 618efc635750de6d7ec7d587e232fd257e2a3add (patch) | |
tree | 71333240c52b74c06755b083030b243486afda79 | |
parent | 310408a82851d05db3b310ac5b9cdf49a33e1990 (diff) | |
download | servo-618efc635750de6d7ec7d587e232fd257e2a3add.tar.gz servo-618efc635750de6d7ec7d587e232fd257e2a3add.zip |
stylo: Remove TElement::attr_equals
-rw-r--r-- | components/script/layout_wrapper.rs | 5 | ||||
-rw-r--r-- | components/style/dom.rs | 3 | ||||
-rw-r--r-- | components/style/gecko/wrapper.rs | 11 |
3 files changed, 0 insertions, 19 deletions
diff --git a/components/script/layout_wrapper.rs b/components/script/layout_wrapper.rs index f7f5396dc8d..80f87eb8504 100644 --- a/components/script/layout_wrapper.rs +++ b/components/script/layout_wrapper.rs @@ -399,11 +399,6 @@ impl<'le> TElement for ServoLayoutElement<'le> { self.get_attr(namespace, attr).is_some() } - #[inline] - fn attr_equals(&self, namespace: &Namespace, attr: &LocalName, val: &Atom) -> bool { - self.get_attr(namespace, attr).map_or(false, |x| x == val) - } - #[inline(always)] fn each_class<F>(&self, mut callback: F) where F: FnMut(&Atom) { unsafe { diff --git a/components/style/dom.rs b/components/style/dom.rs index 870690c2027..1d9462a6335 100644 --- a/components/style/dom.rs +++ b/components/style/dom.rs @@ -368,9 +368,6 @@ pub trait TElement : Eq + PartialEq + Debug + Hash + Sized + Copy + Clone + /// Whether this element has an attribute with a given namespace. fn has_attr(&self, namespace: &Namespace, attr: &LocalName) -> bool; - /// Whether an attribute value equals `value`. - fn attr_equals(&self, namespace: &Namespace, attr: &LocalName, value: &Atom) -> bool; - /// Internal iterator for the classes of this element. fn each_class<F>(&self, callback: F) where F: FnMut(&Atom); diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index ba346d671c7..750cb8b5a53 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -726,17 +726,6 @@ impl<'le> TElement for GeckoElement<'le> { } } - #[inline] - fn attr_equals(&self, namespace: &Namespace, attr: &Atom, val: &Atom) -> bool { - unsafe { - bindings::Gecko_AttrEquals(self.0, - namespace.0.as_ptr(), - attr.as_ptr(), - val.as_ptr(), - /* ignoreCase = */ false) - } - } - fn each_class<F>(&self, callback: F) where F: FnMut(&Atom) { |