style: Add some scaffolding for @layer rules

Not hooked anywhere yet, so this doesn't change behavior, but adds the
basic data model etc.

Adding parsing support requires some changes to cssparser to allow the
same at rule to be block and statement-like at the same time, so better
done separately.

Differential Revision: https://phabricator.services.mozilla.com/D124079
This commit is contained in:
Emilio Cobos Álvarez 2023-05-25 20:12:51 +02:00 committed by Oriol Brufau
parent 8eb5fa21fd
commit 5fad3b4cde
6 changed files with 208 additions and 5 deletions

View file

@ -555,7 +555,7 @@ impl StylesheetInvalidationSet {
self.collect_invalidations_for_rule(rule, guard, device, quirks_mode)
},
Document(..) | Import(..) | Media(..) | Supports(..) => {
Document(..) | Import(..) | Media(..) | Supports(..) | Layer(..) => {
if !is_generic_change &&
!EffectiveRules::is_effective(guard, device, quirks_mode, rule)
{
@ -596,7 +596,7 @@ impl StylesheetInvalidationSet {
}
}
},
Document(..) | Namespace(..) | Import(..) | Media(..) | Supports(..) => {
Document(..) | Namespace(..) | Import(..) | Media(..) | Supports(..) | Layer(..) => {
// Do nothing, relevant nested rules are visited as part of the
// iteration.
},