Closed Bug 1670886 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 26087 - [:is/:where] Support :is/:where inside :not

Categories

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

task

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

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

[:is/:where] Support :is/:where inside :not

This adds support for using :is inside :not, without expanding the
capabilities of :not itself. (In other words, we still only accept
a single simple selector when using non-nesting selectors directly
within :not).

For invalidation, we do need to traverse into the complex selectors
nested (deep) inside :not(), for example to mark .b as invalidates-
self for ".a :not(:is(.b))", but at the :not-boundary during feature
extraction, we avoid propagating the features, such that .a is marked
with whole-subtree recalc. We already have similar logic in
ExtractInvalidationSetFeaturesFromCompound which prevents feature
extraction for selectors held by :not directly.

Note that CSSParserSelector::IsSimple() only has one call-site, and
that's during parsing of :not().

Bug: 568705
Change-Id: Ic7cb421c4d8f6a6e85cfea30c987db2e0fed64fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2463830
Commit-Queue: Anders Hartvoll Ruud \<andruud@chromium.org>
Reviewed-by: Rune Lillesveen \<futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#816328}

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

CI Results

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

Total 2 tests and 14 subtests

Status Summary

Firefox

OK : 2
PASS: 30
FAIL: 2

Chrome

OK : 2
PASS: 10
FAIL: 22

Safari

OK : 2
PASS: 30
FAIL: 2

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/css/selectors/is-where-not.html
:not(:is(div > :not(#e))) matches expected elements: FAIL (Chrome: FAIL, Safari: PASS)
:not(:is(div > :not(:where(#e, #f)))) matches expected elements: FAIL (Chrome: FAIL, Safari: PASS)

CI Results

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

Total 2 tests and 14 subtests

Status Summary

Firefox

OK : 2
PASS: 30
FAIL: 2

Chrome

OK : 2
PASS: 10
FAIL: 22

Safari

OK : 2
PASS: 30
FAIL: 2

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/css/selectors/is-where-not.html
:not(:is(div > :not(#e))) matches expected elements: FAIL (Chrome: FAIL, Safari: PASS)
:not(:is(div > :not(:where(#e, #f)))) matches expected elements: FAIL (Chrome: FAIL, Safari: PASS)

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8b456cf4cbe1 [wpt PR 26087] - [:is/:where] Support :is/:where inside :not, a=testonly https://hg.mozilla.org/integration/autoland/rev/38abc3338cf8 [wpt PR 26087] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
You need to log in before you can comment on or make changes to this bug.