Closed Bug 2070192 Opened 2 months ago Closed 2 months ago

[wpt-sync] Sync PR 62452 - Do RuleSet invalidation before ResetStyle

Categories

(Core :: CSS Parsing and Computation, task, P4)

task

Tracking

()

RESOLVED FIXED
158 Branch
Tracking Status
firefox158 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 62452 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/62452
Details from upstream follow.

Rune Lillesveen <futhark@chromium.org> wrote:

Do RuleSet invalidation before ResetStyle

The RuleSet invalidation does selector matching which will reject
rules in implicit @scopes when an element has not seen an implicit
scope. When we do not simply append sheets, we call ResetStyle() in
order to rebuild metadata properly, including the information on
Elements whether it has seen an implicit @scope.

The problem is that we need that information when doing the selector
matching when invalidating for removed stylesheets. Otherwise, we will
not invalidate for selectors inside implicit scope rules for any removed
stylesheets.

Effectively, we need to have the implicit scopes for both the added and
removed stylesheets. Add the implicit scopes for the new active
stylesheets before doing RuleSet invalidation. Then, if the change is
not an append, we reset style and rebuild everything as necessary,
including implicit scopes.

Bug: 555286423
Change-Id: I08a32b546ca75d22ce47a383c1bb3508d35d11d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8352487
Reviewed-by: Anders Hartvoll Ruud \<andruud@chromium.org>
Commit-Queue: Rune Lillesveen \<futhark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1692379}

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core

CI Results

Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 155 tests and 24 subtests

Status Summary

Firefox

OK : 1[GitHub] 98[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 2[GitHub] 7[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 1562[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 1602[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 1609[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 17[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 20[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]

Chrome

OK : 1
PASS: 1
FAIL: 1

Safari

OK : 1
PASS: 2

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 158 Branch
You need to log in before you can comment on or make changes to this bug.