Closed Bug 1905961 Opened 1 year ago Closed 1 year ago

[wpt-sync] Sync PR 46968 - CSS highlight pseudos: fix ‘currentColor’ resolution and painting

Categories

(Core :: Layout: Generated Content, Lists, and Counters, task, P4)

task

Tracking

()

RESOLVED FIXED
130 Branch
Tracking Status
firefox130 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

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

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

Delan Azabani <dazabani@igalia.com> wrote:

CSS highlight pseudos: fix ‘currentColor’ resolution and painting

When ‘color’ is set to ‘currentColor’ in highlight pseudos, the color
(and any other properties that use ‘currentColor’) needs to be taken
from the ‘currentColor’ of the next active highlight overlay below.

Our impl was reworked significantly in CL:5332250 and CL:5368297, and
this patch improves on that by:

• updating HighlightPaintingStyle and ResolveColorsFromPreviousLayer
to let ‘background-color’ participate in ‘currentColor’ resolution

• fixing ResolveColorsFromPreviousLayer to always read ‘currentColor’,
not the property being resolved, from the previous layer

• making PaintHighlightOverlays pass the correct ‘currentColor’ for
the purposes of painting ‘text-shadow’

• extending PaintHighlightOverlays to paint ‘background-color’ and
‘text-shadow’ by as little as one part at a time, if affected by
‘currentColor’, while keeping parts merged where possible

• removing a stray LineRelativeRect::Unite call that made ::selection
parts fail to clip their decorations to the part

This patch adds eleven new tests with overlapping highlights and a
variety of properties set to ‘currentColor’:

• 001.html tests ‘color’ only (full ::selection)
• 001a.html tests ‘color’ only (partial ::selection)
• 002.html tests ‘color’ and ‘background-color’ (full ::selection)
• 002a.html tests ‘color’ and ‘background-color’ (partial ::selection)
• 002b.html tests ‘background-color’ only (full ::selection)
• 003.html tests ‘color’ and ‘text-decoration’ (full ::selection)
• 003a.html tests ‘color’ and ‘text-decoration’ (partial ::selection)
• 003b.html tests ‘text-decoration’ only (full ::selection)
• 004.html tests ‘color’ and ‘text-shadow’ (full ::selection)
• 004a.html tests ‘color’ and ‘text-shadow’ (partial ::selection)
• 004b.html tests ‘text-shadow’ only (full ::selection)

Bug: 339298411
Change-Id: I2e42a0d655683e76daf507aee3e34085f5eb080b
Reviewed-on: https://chromium-review.googlesource.com/5644614
WPT-Export-Revision: 4dd5dc864625b42c152cc12a245fd6c4b13bab55

Component: web-platform-tests → Layout: Generated Content, Lists, and Counters
Product: Testing → Core

CI Results

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

Total 37 tests and 4 subtests

Status Summary

Firefox

OK : 2
PASS : 12
FAIL : 37[GitHub] 39[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]
TIMEOUT: 2

Chrome

OK : 2
PASS : 41
FAIL : 10

Safari

OK : 2
PASS : 11
FAIL : 40

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

New Tests That Don't Pass

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a57f3476d94c [wpt PR 46968] - CSS highlight pseudos: fix ‘currentColor’ resolution and painting, a=testonly https://hg.mozilla.org/integration/autoland/rev/5cf26b697369 [wpt PR 46968] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 130 Branch
You need to log in before you can comment on or make changes to this bug.