diff options
Diffstat (limited to 'components/selectors/tree.rs')
-rw-r--r-- | components/selectors/tree.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/components/selectors/tree.rs b/components/selectors/tree.rs index 7a47f2b4ab1..99c07c6bf3b 100644 --- a/components/selectors/tree.rs +++ b/components/selectors/tree.rs @@ -5,7 +5,7 @@ //! Traits that nodes must implement. Breaks the otherwise-cyclic dependency //! between layout and style. -use attr::{AttrSelectorOperation, NamespaceConstraint}; +use attr::{AttrSelectorOperation, NamespaceConstraint, CaseSensitivity}; use matching::{ElementSelectorFlags, LocalMatchingContext, MatchingContext, RelevantLinkStatus}; use parser::SelectorImpl; use std::fmt::Debug; @@ -63,9 +63,15 @@ pub trait Element: Sized + Debug { /// Whether this element is a `link`. fn is_link(&self) -> bool; - fn get_id(&self) -> Option<<Self::Impl as SelectorImpl>::Identifier>; + fn has_id(&self, + id: &<Self::Impl as SelectorImpl>::Identifier, + case_sensitivity: CaseSensitivity) + -> bool; - fn has_class(&self, name: &<Self::Impl as SelectorImpl>::ClassName) -> bool; + fn has_class(&self, + name: &<Self::Impl as SelectorImpl>::ClassName, + case_sensitivity: CaseSensitivity) + -> bool; /// Returns whether this element matches `:empty`. /// |