style: Add invalidation support for ::slotted().

Bug: 1424607
Reviewed-by: heycam
MozReview-Commit-ID: 8pIVUx27o7x
This commit is contained in:
Emilio Cobos Álvarez 2017-12-17 17:56:15 +01:00
parent 040379208e
commit b26f3280d2
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
7 changed files with 294 additions and 110 deletions

View file

@ -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> {