style: Remove unused TElement::has_attr

Differential Revision: https://phabricator.services.mozilla.com/D180530
This commit is contained in:
Emilio Cobos Álvarez 2023-06-14 21:08:22 +00:00 committed by Martin Robinson
parent 29f6170564
commit e59c71d8ef
2 changed files with 1 additions and 9 deletions

View file

@ -19,7 +19,7 @@ use crate::shared_lock::{Locked, SharedRwLock};
use crate::stylist::CascadeData; use crate::stylist::CascadeData;
use crate::values::computed::Display; use crate::values::computed::Display;
use crate::values::AtomIdent; use crate::values::AtomIdent;
use crate::{LocalName, Namespace, WeakAtom}; use crate::WeakAtom;
use atomic_refcell::{AtomicRef, AtomicRefMut}; use atomic_refcell::{AtomicRef, AtomicRefMut};
use selectors::matching::{QuirksMode, VisitedHandlingMode}; use selectors::matching::{QuirksMode, VisitedHandlingMode};
use selectors::sink::Push; use selectors::sink::Push;
@ -512,9 +512,6 @@ pub trait TElement:
/// Get this element's state, for non-tree-structural pseudos. /// Get this element's state, for non-tree-structural pseudos.
fn state(&self) -> ElementState; fn state(&self) -> ElementState;
/// Whether this element has an attribute with a given namespace.
fn has_attr(&self, namespace: &Namespace, attr: &LocalName) -> bool;
/// Returns whether this element has a `part` attribute. /// Returns whether this element has a `part` attribute.
fn has_part_attr(&self) -> bool; fn has_part_attr(&self) -> bool;

View file

@ -1176,11 +1176,6 @@ impl<'le> TElement for GeckoElement<'le> {
ElementState::from_bits_truncate(self.state_internal()) ElementState::from_bits_truncate(self.state_internal())
} }
#[inline]
fn has_attr(&self, namespace: &Namespace, attr: &AtomIdent) -> bool {
unsafe { bindings::Gecko_HasAttr(self.0, namespace.0.as_ptr(), attr.as_ptr()) }
}
#[inline] #[inline]
fn has_part_attr(&self) -> bool { fn has_part_attr(&self) -> bool {
self.as_node() self.as_node()