diff options
Diffstat (limited to 'components/selectors/tree.rs')
-rw-r--r-- | components/selectors/tree.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/components/selectors/tree.rs b/components/selectors/tree.rs index 611e40d6027..f892abd4e94 100644 --- a/components/selectors/tree.rs +++ b/components/selectors/tree.rs @@ -62,10 +62,13 @@ pub trait Element: Sized + Clone + Debug { fn is_html_element_in_html_document(&self) -> bool; - fn local_name(&self) -> &<Self::Impl as SelectorImpl>::BorrowedLocalName; + fn has_local_name(&self, local_name: &<Self::Impl as SelectorImpl>::BorrowedLocalName) -> bool; /// Empty string for no namespace - fn namespace(&self) -> &<Self::Impl as SelectorImpl>::BorrowedNamespaceUrl; + fn has_namespace(&self, ns: &<Self::Impl as SelectorImpl>::BorrowedNamespaceUrl) -> bool; + + /// Whether this element and the `other` element have the same local name and namespace. + fn is_same_type(&self, other: &Self) -> bool; fn attr_matches( &self, |