[wpt-sync] Sync PR 62235 - Implement ::highlight(*)
Categories
(Core :: CSS Parsing and Computation, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox158 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 62235 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/62235
Details from upstream follow.
Seokho Song <seokho@chromium.org> wrote:
Implement ::highlight(*)
CSSWG decided to allow '*' as the argument of the ::highlight(); that
can style every registered custom highlight [1].Parse the '*' delimiter token as the ::highlight() argument, store it as
CSSSelector::UniversalSelectorAtom(), which contributes 0 specificity.
Therefore, named custom highlights win conflicting declarations
regardless of source order.Make ::highlight(*) match every named custom highlight under the normal
cascade algorithm. A new HasCustomHighlightUniversalSelector field in
computed_style_extra_fields records whether an element has a universal
selector, and StyleHighlightData stores the resolved related style.Handle some extra cases explicitly:
- When the parent has no style for the named highlight but does have
::highlight(*), inherit from that.[1] https://github.com/w3c/csswg-drafts/issues/9091
Spec PR: https://github.com/w3c/csswg-drafts/pull/14301
Intent to Prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/hEy4cr4iowU/m/ZW5l_bikAwAJ
Feature Entry: https://chromestatus.com/feature/5174965228929024Bug: 408003366
Change-Id: I9c77fef6710a2450084d2cfcb70caceaeda8b988
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8235619
Commit-Queue: Seokho Song \<seokho@chromium.org>
Reviewed-by: Rune Lillesveen \<futhark@chromium.org>
Reviewed-by: Stephen Chenney \<schenney@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1689587}
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Comment 1•2 months ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=a79340b62553748ee37ac0fd4974d579074046f4
| Assignee | ||
Comment 2•2 months ago
|
||
CI Results
Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 131 tests and 33 subtests
Status Summary
Firefox
OK : 2[GitHub] 19[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: 4[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 22[GitHub] 174[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 267[Gecko-linux2404-64-debug] 269[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-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 6[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 13[GitHub] 19[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-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 21[Gecko-linux2404-64-debug]
Chrome
OK : 2
PASS: 22
FAIL: 13
Safari
OK : 2
PASS: 19
FAIL: 16
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /css/css-highlight-api/custom-highlight-universal-deep-chain-001.tentative.html [wpt.fyi]:
FAIL(Chrome:FAIL, Safari:FAIL) - /css/css-highlight-api/custom-highlight-universal-inheritance-001.tentative.html [wpt.fyi]:
FAIL(Chrome:FAIL, Safari:FAIL) - /css/css-highlight-api/custom-highlight-universal-no-named-rule-001.tentative.html [wpt.fyi]:
FAIL(Chrome:FAIL, Safari:FAIL) - /css/css-highlight-api/custom-highlight-universal-no-named-rule-002.tentative.html [wpt.fyi]:
FAIL(Chrome:FAIL, Safari:FAIL) - /css/css-highlight-api/custom-highlight-universal-painting-001.tentative.html [wpt.fyi]:
FAIL(Chrome:FAIL, Safari:FAIL) - /css/css-highlight-api/custom-highlight-universal-painting-002.tentative.html [wpt.fyi]:
FAIL(Chrome:FAIL, Safari:FAIL) - /css/css-highlight-api/custom-highlight-universal-painting-003.tentative.html [wpt.fyi]:
FAIL(Chrome:FAIL, Safari:FAIL) - /css/css-highlight-api/highlight-image-currentcolor.html [wpt.fyi]:
FAIL - /css/css-highlight-api/highlight-image-stacked.html [wpt.fyi]:
FAIL - /css/css-highlight-api/highlight-text-cascade.html [wpt.fyi]:
FAIL - /css/css-highlight-api/painting/custom-highlight-painting-below-grammar.html [wpt.fyi]:
FAIL - /css/css-highlight-api/painting/custom-highlight-painting-inheritance-001.html [wpt.fyi]:
FAIL - /css/css-highlight-api/painting/custom-highlight-painting-inheritance-002.html [wpt.fyi]:
FAIL - /css/css-highlight-api/painting/custom-highlight-painting-text-shadow-invalidation.html [wpt.fyi]:
FAIL[Gecko-linux2404-64-debug],PASS[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-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt] - /css/css-highlight-api/painting/custom-highlight-painting-text-shadow.html [wpt.fyi]:
FAIL[Gecko-linux2404-64-debug],PASS[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-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt] - /css/css-highlight-api/custom-highlight-universal-parsing-and-computed-style.tentative.html [wpt.fyi]
- "::highlight(*)" should be a valid selector:
FAIL(Chrome:FAIL, Safari:FAIL) - "div::highlight(*)" should be a valid selector:
FAIL(Chrome:FAIL, Safari:FAIL) - ":root::highlight(*)" should be a valid selector:
FAIL(Chrome:FAIL, Safari:FAIL) - named highlight merges with the universal base on the same element:
FAIL(Chrome:FAIL, Safari:FAIL) - named highlight without its own rule falls back to the universal style:
FAIL(Chrome:FAIL, Safari:FAIL) - ::highlight(*) computed style is exposed:
FAIL(Chrome:FAIL, Safari:FAIL)
- "::highlight(*)" should be a valid selector:
Comment 4•2 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/e0bf24912548
https://hg.mozilla.org/mozilla-central/rev/9d05058b579c
Description
•