stylo: Remove TElement::attr_equals

This commit is contained in:
Manish Goregaokar 2017-06-08 14:09:41 -07:00 committed by Manish Goregaokar
parent 310408a828
commit 618efc6357
3 changed files with 0 additions and 19 deletions

View file

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

View file

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

View file

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