mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
style: Implement the functional :host(..) selector.
We could invalidate in a slightly more fine-grained way, but I don't think it's worth the churn vs. keeping the special-cases minimal. Bug: 1452640 Reviewed-by: xidorn MozReview-Commit-ID: 5DkQrgwg9GW
This commit is contained in:
parent
bfb9fe6159
commit
eaefaa890e
8 changed files with 82 additions and 47 deletions
|
@ -794,6 +794,14 @@ pub trait TElement
|
|||
);
|
||||
}
|
||||
|
||||
if let Some(shadow) = self.shadow_root() {
|
||||
f(
|
||||
shadow.style_data(),
|
||||
self.as_node().owner_doc().quirks_mode(),
|
||||
Some(shadow.host()),
|
||||
);
|
||||
}
|
||||
|
||||
let mut current = self.assigned_slot();
|
||||
while let Some(slot) = current {
|
||||
// Slots can only have assigned nodes when in a shadow tree.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue