style: Fix style invalidation on layer rule insertion

Layer insertion may change the order of styles, so we may need to fully
invalidate.

Without this change, bug 1838045 makes
layer-statement-before-import.html fail.

Differential Revision: https://phabricator.services.mozilla.com/D180929
This commit is contained in:
Emilio Cobos Álvarez 2023-06-14 20:50:16 +00:00 committed by Martin Robinson
parent 50d7f882dd
commit 5b184f448b

View file

@ -548,12 +548,16 @@ impl StylesheetInvalidationSet {
// It's not clear what handling changes for this correctly would
// look like.
},
LayerStatement(..) => {
// Layer statement insertions might alter styling order, so we need to always
// invalidate fully.
return self.invalidate_fully();
},
CounterStyle(..) |
Page(..) |
Property(..) |
FontFeatureValues(..) |
FontPaletteValues(..) |
LayerStatement(..) |
FontFace(..) |
Keyframes(..) |
Container(..) |