Closed Bug 1926916 Opened 1 year ago Closed 1 year ago

[wpt-sync] Sync PR 48804 - [@scope] Match using most proximate activation first

Categories

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

task

Tracking

()

RESOLVED FIXED
133 Branch
Tracking Status
firefox133 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Anders Hartvoll Ruud <andruud@chromium.org> wrote:

[@scope] Match using most proximate activation first

A single @scope rule may produce more than one activation if a @scope
rule matches more than one element in the ancestor chain. In this case,
we store the parent activations before any activation produced by
"this" element, meaning the most proximate activation is at the end
of the activation vector. The order in which we tried the activations
were believed to not matter, because the selector checker anyway tries
closer ancestors first. For common cases involving :scope, this is
correct, since we're looking for a specific element. However, for cases
involving '&', it's wrong: we'll match the least proximate activation
in this case.

Therefore, simply reverse the order of the activations in
MatchForScopeActivation.

Fixed: 351244339
Change-Id: I913076f1bdedacab1030f137007b17ec7f7785a7
Reviewed-on: https://chromium-review.googlesource.com/5961463
WPT-Export-Revision: c379dec358e77cb184dfbdb5311f997b1fd345a6

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

CI Results

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

Total 1 tests and 5 subtests

Status Summary

Firefox

OK : 1
PASS: 5
FAIL: 5

Chrome

OK : 1
PASS: 4
FAIL: 1

Safari

OK : 1
PASS: 5

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /css/css-cascade/scope-proximity.html [wpt.fyi]
    • Alternating light/dark: FAIL [GitHub], PASS [Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-2009-qr-debug, Gecko-windows11-32-2009-qr-opt, Gecko-windows11-64-2009-qr-debug, Gecko-windows11-64-2009-qr-opt] (Chrome: PASS, Safari: PASS)
    • Proximity wins over order of appearance: FAIL [GitHub], PASS [Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-2009-qr-debug, Gecko-windows11-32-2009-qr-opt, Gecko-windows11-64-2009-qr-debug, Gecko-windows11-64-2009-qr-opt] (Chrome: PASS, Safari: PASS)
    • Specificity wins over proximity: FAIL [GitHub], PASS [Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-2009-qr-debug, Gecko-windows11-32-2009-qr-opt, Gecko-windows11-64-2009-qr-debug, Gecko-windows11-64-2009-qr-opt] (Chrome: PASS, Safari: PASS)
    • Identical root with further proximity is not ignored: FAIL [GitHub], PASS [Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-2009-qr-debug, Gecko-windows11-32-2009-qr-opt, Gecko-windows11-64-2009-qr-debug, Gecko-windows11-64-2009-qr-opt] (Chrome: PASS, Safari: PASS)
    • Most proximate match wins under multiple scoping roots: FAIL [GitHub], PASS [Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-2009-qr-debug, Gecko-windows11-32-2009-qr-opt, Gecko-windows11-64-2009-qr-debug, Gecko-windows11-64-2009-qr-opt] (Chrome: FAIL, Safari: PASS)
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e496bd62ccda [wpt PR 48804] - [@scope] Match using most proximate activation first, a=testonly
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch
You need to log in before you can comment on or make changes to this bug.