Struct style::invalidation::element::element_wrapper::ElementWrapper
[−]
[src]
pub struct ElementWrapper<'a, E> where
E: TElement, { /* fields omitted */ }
A simple wrapper over an element and a snapshot, that allows us to selector-match against a past state of the element.
Methods
impl<'a, E> ElementWrapper<'a, E> where
E: TElement,
[src]
E: TElement,
pub fn new(el: E, snapshot_map: &'a SnapshotMap) -> Self
[src]
Trivially constructs an ElementWrapper
.
pub fn snapshot(&self) -> Option<&'a Snapshot>
[src]
Gets the snapshot associated with this element, if any.
pub fn state_changes(&self) -> ElementState
[src]
Returns the states that have changed since the element was snapshotted.
Trait Implementations
impl<'a, E: Clone> Clone for ElementWrapper<'a, E> where
E: TElement,
[src]
E: TElement,
fn clone(&self) -> ElementWrapper<'a, E>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a, E> Debug for ElementWrapper<'a, E> where
E: TElement,
[src]
E: TElement,
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<'a, E> Element for ElementWrapper<'a, E> where
E: TElement,
[src]
E: TElement,
type Impl = SelectorImpl
fn match_non_ts_pseudo_class<F>(
&self,
pseudo_class: &NonTSPseudoClass,
context: &mut MatchingContext<Self::Impl>,
visited_handling: VisitedHandlingMode,
_setter: &mut F
) -> bool where
F: FnMut(&Self, ElementSelectorFlags),
[src]
&self,
pseudo_class: &NonTSPseudoClass,
context: &mut MatchingContext<Self::Impl>,
visited_handling: VisitedHandlingMode,
_setter: &mut F
) -> bool where
F: FnMut(&Self, ElementSelectorFlags),
fn match_pseudo_element(
&self,
pseudo_element: &PseudoElement,
context: &mut MatchingContext<Self::Impl>
) -> bool
[src]
&self,
pseudo_element: &PseudoElement,
context: &mut MatchingContext<Self::Impl>
) -> bool
fn is_link(&self) -> bool
[src]
Whether this element is a link
.
fn opaque(&self) -> OpaqueElement
[src]
Converts self into an opaque representation.
fn parent_element(&self) -> Option<Self>
[src]
fn first_child_element(&self) -> Option<Self>
[src]
Skips non-element nodes
fn last_child_element(&self) -> Option<Self>
[src]
Skips non-element nodes
fn prev_sibling_element(&self) -> Option<Self>
[src]
Skips non-element nodes
fn next_sibling_element(&self) -> Option<Self>
[src]
Skips non-element nodes
fn is_html_element_in_html_document(&self) -> bool
[src]
fn get_local_name(&self) -> &<Self::Impl as SelectorImpl>::BorrowedLocalName
[src]
fn get_namespace(&self) -> &<Self::Impl as SelectorImpl>::BorrowedNamespaceUrl
[src]
Empty string for no namespace
fn attr_matches(
&self,
ns: &NamespaceConstraint<&Namespace>,
local_name: &LocalName,
operation: &AttrSelectorOperation<&AttrValue>
) -> bool
[src]
&self,
ns: &NamespaceConstraint<&Namespace>,
local_name: &LocalName,
operation: &AttrSelectorOperation<&AttrValue>
) -> bool
fn has_id(&self, id: &Atom, case_sensitivity: CaseSensitivity) -> bool
[src]
fn has_class(&self, name: &Atom, case_sensitivity: CaseSensitivity) -> bool
[src]
fn is_empty(&self) -> bool
[src]
Returns whether this element matches :empty
. Read more
fn is_root(&self) -> bool
[src]
Returns whether this element matches :root
, i.e. whether it is the root element of a document. Read more
fn pseudo_element_originating_element(&self) -> Option<Self>
[src]
The parent of a given pseudo-element, after matching a pseudo-element selector. Read more
fn blocks_ancestor_combinators(&self) -> bool
[src]
Return true if we want to stop lookup ancestor of the current element while matching complex selectors with descendant/child combinator. Read more
fn assigned_slot(&self) -> Option<Self>
[src]
Returns the assigned element this element is assigned to. Read more
fn ignores_nth_child_selectors(&self) -> bool
[src]
Returns whether this element should ignore matching nth child selector. Read more