[@layer] Change layer order from preorder to postorder #31169
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch follows from a recent CSSWG resolution [1] that puts the
default layer at the highest priority, and a subsequent spec edit [2]
that changed the layer ordering from the preorder of the layer tree to
the postorder.
Most test changes just reflect this spec change. In some WPT tests,
rule ordering is swapping so that the winning rule will appear first,
so that we can verify layer is working.
external/wpt/css/css-cascade/presentational-hints-cascade.html is moved
from the stable test suite to a new disable-custom-element-default-style
virtual test suite because this is the flag that actually makes the test
result different on test and stable builds. We need to disable this flag
while keeping cascade layers enabled to test the new test case in the
file.
[1] w3c/csswg-drafts#6284 (comment)
[2] w3c/csswg-drafts@a6fc16e
Fixed: 1257936
Change-Id: I899de8c8a921b0535296957ee1b0cca1f60a8c61
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3214603
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#930689}