mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Add plumbing code to invalidate shadow parts.
Still does nothing, since we still do not collect part rules, but this is all the plumbing that should allow us to invalidate parts when attributes or state change on their ancestors. Differential Revision: https://phabricator.services.mozilla.com/D32642
This commit is contained in:
parent
a4690ce158
commit
f0bf7d6481
5 changed files with 72 additions and 4 deletions
|
@ -472,6 +472,9 @@ where
|
|||
DependencyInvalidationKind::Siblings => {
|
||||
self.sibling_invalidations.push(invalidation);
|
||||
},
|
||||
DependencyInvalidationKind::Parts => {
|
||||
self.descendant_invalidations.parts.push(invalidation);
|
||||
},
|
||||
DependencyInvalidationKind::SlottedElements => {
|
||||
self.descendant_invalidations
|
||||
.slotted_descendants
|
||||
|
@ -486,6 +489,7 @@ where
|
|||
match dependency.invalidation_kind() {
|
||||
DependencyInvalidationKind::Element => !self.invalidates_self,
|
||||
DependencyInvalidationKind::SlottedElements => self.element.is_html_slot_element(),
|
||||
DependencyInvalidationKind::Parts => self.element.shadow_root().is_some(),
|
||||
DependencyInvalidationKind::ElementAndDescendants |
|
||||
DependencyInvalidationKind::Siblings |
|
||||
DependencyInvalidationKind::Descendants => true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue