From e59c71d8ef47e2840a474a479f3e0d66807b387a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Wed, 14 Jun 2023 21:08:22 +0000 Subject: [PATCH] style: Remove unused TElement::has_attr Differential Revision: https://phabricator.services.mozilla.com/D180530 --- components/style/dom.rs | 5 +---- components/style/gecko/wrapper.rs | 5 ----- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/components/style/dom.rs b/components/style/dom.rs index 9ef067e76f2..f9e6c251485 100644 --- a/components/style/dom.rs +++ b/components/style/dom.rs @@ -19,7 +19,7 @@ use crate::shared_lock::{Locked, SharedRwLock}; use crate::stylist::CascadeData; use crate::values::computed::Display; use crate::values::AtomIdent; -use crate::{LocalName, Namespace, WeakAtom}; +use crate::WeakAtom; use atomic_refcell::{AtomicRef, AtomicRefMut}; use selectors::matching::{QuirksMode, VisitedHandlingMode}; use selectors::sink::Push; @@ -512,9 +512,6 @@ pub trait TElement: /// Get this element's state, for non-tree-structural pseudos. 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. fn has_part_attr(&self) -> bool; diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index 9616a5f2753..98b5de4f44c 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -1176,11 +1176,6 @@ impl<'le> TElement for GeckoElement<'le> { 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] fn has_part_attr(&self) -> bool { self.as_node()