diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-12-17 17:56:15 +0100 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2018-01-09 14:26:02 +0100 |
commit | b26f3280d2f470e25c63d2acb10a80c97d08b3ab (patch) | |
tree | 6c0c1e9b051fa4f499d0f3169debd25f103f9a1c /components/style/dom.rs | |
parent | 040379208e5cc648cf7ebde30b2a42e70c15e602 (diff) | |
download | servo-b26f3280d2f470e25c63d2acb10a80c97d08b3ab.tar.gz servo-b26f3280d2f470e25c63d2acb10a80c97d08b3ab.zip |
style: Add invalidation support for ::slotted().
Bug: 1424607
Reviewed-by: heycam
MozReview-Commit-ID: 8pIVUx27o7x
Diffstat (limited to 'components/style/dom.rs')
-rw-r--r-- | components/style/dom.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/components/style/dom.rs b/components/style/dom.rs index ea438b66dd9..85f4f49c4b7 100644 --- a/components/style/dom.rs +++ b/components/style/dom.rs @@ -416,6 +416,20 @@ pub trait TElement F: FnMut(Self), {} + /// Return whether this element is an element in the HTML namespace. + fn is_html_element(&self) -> bool; + + /// Returns whether this element is a <html:slot> element. + fn is_html_slot_element(&self) -> bool { + self.get_local_name() == &*local_name!("slot") && + self.is_html_element() + } + + /// Return the list of slotted nodes of this node. + fn slotted_nodes(&self) -> &[Self::ConcreteNode] { + &[] + } + /// For a given NAC element, return the closest non-NAC ancestor, which is /// guaranteed to exist. fn closest_non_native_anonymous_ancestor(&self) -> Option<Self> { |