style: Fix style attribute important and revert-layer behavior

By modeling it as a separate layer that behaves somewhat specially.

See https://github.com/w3c/csswg-drafts/issues/6872.

The remaining revert-layer tests that we fail are because either we
don't implement a feature (like @property) or because it's used in
keyframes (where revert is a bit unspecified and we have existing
issues with it).

Differential Revision: https://phabricator.services.mozilla.com/D133373
This commit is contained in:
Emilio Cobos Álvarez 2023-06-06 17:28:49 +02:00 committed by Oriol Brufau
parent 5c0f044d39
commit 50510715a2
5 changed files with 67 additions and 31 deletions

View file

@ -72,7 +72,9 @@ impl RuleTree {
if any_important {
found_important = true;
match level {
AuthorNormal { .. } => important_author.push((source.clone(), priority.important())),
AuthorNormal { .. } => {
important_author.push((source.clone(), priority.important()))
},
UANormal => important_ua.push((source.clone(), priority.important())),
UserNormal => important_user.push((source.clone(), priority.important())),
_ => {},