aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/dom.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2017-12-17 17:56:15 +0100
committerEmilio Cobos Álvarez <emilio@crisal.io>2018-01-09 14:26:02 +0100
commitb26f3280d2f470e25c63d2acb10a80c97d08b3ab (patch)
tree6c0c1e9b051fa4f499d0f3169debd25f103f9a1c /components/style/dom.rs
parent040379208e5cc648cf7ebde30b2a42e70c15e602 (diff)
downloadservo-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.rs14
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> {