Closed Bug 1875003 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 44031 - Do not allow `::part()` with `:has()` or `:is()`

Categories

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

task

Tracking

()

RESOLVED FIXED
123 Branch
Tracking Status
firefox123 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

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

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

Nathan Knowler <nathan@knowler.dev> wrote:

Do not allow ::part() with :has() or :is()

This adds failing tests for the following ::part() selectors when combined with :is() and :has():

  • ::part(foo):is(ul)
  • ::part(foo):is(nav ul)
  • ::part(foo):has(li)

All of these leak information about the shadow tree that was not exposed and can cause consumer changes to break if the shadow tree changes.

Some related bugs:

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 30 subtests

Status Summary

Firefox

OK : 1
PASS: 24
FAIL: 6

Chrome

OK : 1
PASS: 24
FAIL: 6

Safari

OK : 1
PASS: 25
FAIL: 5

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /css/selectors/parsing/parse-part.html [wpt.fyi]
    • "::part(foo):lang(en)" should be a valid selector: FAIL (Chrome: FAIL, Safari: PASS)
    • "::part(foo):dir(ltr)" should be a valid selector: FAIL (Chrome: FAIL, Safari: PASS)
    • "::part(foo):is(ul)" should be an invalid selector: FAIL (Chrome: FAIL, Safari: FAIL)
    • "::part(foo):is(nav ul)" should be an invalid selector: FAIL (Chrome: FAIL, Safari: FAIL)
    • "::part(foo):where(ul)" should be an invalid selector: FAIL (Chrome: FAIL, Safari: FAIL)
    • "::part(foo):where(nav ul)" should be an invalid selector: FAIL (Chrome: FAIL, Safari: FAIL)
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c99ede6a1cd5 [wpt PR 44031] - Do not allow `::part()` with `:has()`, `:is()`, or `:where()`, a=testonly https://hg.mozilla.org/integration/autoland/rev/f8779a3423e5 [wpt PR 44031] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 123 Branch
You need to log in before you can comment on or make changes to this bug.