summaryrefslogtreecommitdiffstats
path: root/servo/components/style/dom.rs
diff options
context:
space:
mode:
Diffstat (limited to 'servo/components/style/dom.rs')
-rw-r--r--servo/components/style/dom.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/servo/components/style/dom.rs b/servo/components/style/dom.rs
index 358d788845..ec99a796c1 100644
--- a/servo/components/style/dom.rs
+++ b/servo/components/style/dom.rs
@@ -14,12 +14,12 @@ use crate::context::{PostAnimationTasks, UpdateAnimationsTasks};
use crate::data::ElementData;
use crate::media_queries::Device;
use crate::properties::{AnimationDeclarations, ComputedValues, PropertyDeclarationBlock};
-use crate::selector_parser::{AttrValue, CustomState, Lang, PseudoElement, SelectorImpl};
+use crate::selector_parser::{AttrValue, Lang, PseudoElement, SelectorImpl};
use crate::shared_lock::{Locked, SharedRwLock};
use crate::stylist::CascadeData;
use crate::values::computed::Display;
use crate::values::AtomIdent;
-use crate::WeakAtom;
+use crate::{LocalName, WeakAtom};
use atomic_refcell::{AtomicRef, AtomicRefMut};
use dom::ElementState;
use selectors::matching::{ElementSelectorFlags, QuirksMode, VisitedHandlingMode};
@@ -511,11 +511,6 @@ pub trait TElement:
/// Get this element's state, for non-tree-structural pseudos.
fn state(&self) -> ElementState;
- /// Returns whether this element's CustomStateSet contains a given state.
- fn has_custom_state(&self, _state: &CustomState) -> bool {
- false
- }
-
/// Returns whether this element has a `part` attribute.
fn has_part_attr(&self) -> bool;
@@ -530,6 +525,11 @@ pub trait TElement:
where
F: FnMut(&AtomIdent);
+ /// Internal iterator for the classes of this element.
+ fn each_custom_state<F>(&self, callback: F)
+ where
+ F: FnMut(&AtomIdent);
+
/// Internal iterator for the part names of this element.
fn each_part<F>(&self, _callback: F)
where
@@ -540,7 +540,7 @@ pub trait TElement:
/// Internal iterator for the attribute names of this element.
fn each_attr_name<F>(&self, callback: F)
where
- F: FnMut(&AtomIdent);
+ F: FnMut(&LocalName);
/// Internal iterator for the part names that this element exports for a
/// given part name.
@@ -906,7 +906,7 @@ pub trait TElement:
fn has_selector_flags(&self, flags: ElementSelectorFlags) -> bool;
/// Returns the search direction for relative selector invalidation, if it is on the search path.
- fn relative_selector_search_direction(&self) -> Option<ElementSelectorFlags>;
+ fn relative_selector_search_direction(&self) -> ElementSelectorFlags;
}
/// TNode and TElement aren't Send because we want to be careful and explicit