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:
Emilio Cobos Álvarez 2019-06-11 17:41:51 +00:00
parent a4690ce158
commit f0bf7d6481
No known key found for this signature in database
GPG key ID: E1152D0994E4BF8A
5 changed files with 72 additions and 4 deletions

View file

@ -66,6 +66,8 @@ pub enum DependencyInvalidationKind {
Siblings,
/// This dependency may affect slotted elements of the element that changed.
SlottedElements,
/// This dependency may affect parts of the element that changed.
Parts,
}
impl Dependency {
@ -98,7 +100,7 @@ impl Dependency {
// an eager pseudo, and return only Descendants here if not.
Some(Combinator::PseudoElement) => DependencyInvalidationKind::ElementAndDescendants,
Some(Combinator::SlotAssignment) => DependencyInvalidationKind::SlottedElements,
Some(Combinator::Part) => unimplemented!("Need to add invalidation for shadow parts"),
Some(Combinator::Part) => DependencyInvalidationKind::Parts,
}
}
}