Closed Bug 1711702 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 29025 - CSS highlight painting: split originating and ::selection decorations

Categories

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

task

Tracking

()

RESOLVED FIXED
93 Branch
Tracking Status
firefox93 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

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

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

b'Delan Azabani <dazabani@igalia.com>' wrote:

CSS highlight painting: split originating and ::selection decorations

This patch builds on /c/2902289 by splitting the paints for unselected
and selection text, which means that for the first time, all of these
properties should hold true regardless of whether text is selected:

P1. underlines and overlines are never painted over text
P2. lines-through are always painted over text
P3. decorations on any unselected parts are in originating style
P4. decorations on the selected part are in ::selection style
P5. selected part decorations paint over ::selection background

Here’s a comparison of how these properties have evolved:

• pre-M90 ensured P1 + P4 + P5, but violated P2 + P3
• /c/2647046 ensured P1 + P4, but violated P2 + P3 + P5
• /c/2902289 ensured P2 + P4 + P5, but violated P1 + P3
• this patch ensures P1 + P2 + P3 + P4 + P5

<https://wpt.live/css/css-pseudo/highlight-painting-003.html>:

https://bucket.daz.cat/791f25c9b0bbd7e4.png = pre-M90
https://bucket.daz.cat/5e546e5bb1dab511.png = /c/2647046
https://bucket.daz.cat/ac5cdae75969f321.png = /c/2902289
https://bucket.daz.cat/50ee74e282ba1b3d.png = this patch

To show that we now ensure property P1, this patch also introduces
<https://wpt.live/css/css-pseudo/highlight-painting-004.html>:

https://bucket.daz.cat/e08646cae505ded5.png = /c/2902289
https://bucket.daz.cat/f6def231d3b381c0.png = this patch

For reference, here are the refs:

https://bucket.daz.cat/996b2fc4fc092f99.png = /c/2902289
https://bucket.daz.cat/fe04e4a4d951ea87.png = this patch

This brings us closer to passing those tests, but not quite there.
Next up, we need to recolor the decorations lifted from originating
style to the ::selection overlay to ::selection’s color, not its
text-decoration-color as done in <https://crrev.com/c/2383212>.

Bug: 1147859
Change-Id: I011323db9b481175fb750ab810b6741239522087
Reviewed-on: https://chromium-review.googlesource.com/2903387
WPT-Export-Revision: 2076dd6fd0b4cd51b926580b3f35b978729ce311

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

CI Results

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

Total 24 tests

Status Summary

Firefox

PASS: 11
FAIL: 13

Chrome

PASS: 12
FAIL: 12

Safari

PASS: 4
FAIL: 20

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/css/css-pseudo/active-selection-014.html: FAIL (Chrome: FAIL, Safari: FAIL)
/css/css-pseudo/active-selection-021.html: FAIL (Chrome: PASS, Safari: FAIL)
/css/css-pseudo/active-selection-025.html: FAIL (Chrome: FAIL, Safari: FAIL)
/css/css-pseudo/active-selection-027.html: FAIL (Chrome: FAIL, Safari: FAIL)
/css/css-pseudo/active-selection-031.html: FAIL (Chrome: FAIL, Safari: FAIL)
/css/css-pseudo/cascade-highlight-004.html: FAIL (Chrome: FAIL, Safari: FAIL)
/css/css-pseudo/highlight-painting-001.html: FAIL (Chrome: FAIL, Safari: FAIL)
/css/css-pseudo/highlight-painting-002.html: FAIL (Chrome: FAIL, Safari: FAIL)
/css/css-pseudo/highlight-painting-003.html: FAIL (Chrome: FAIL, Safari: FAIL)
/css/css-pseudo/highlight-painting-004.html: FAIL (Chrome: FAIL, Safari: FAIL)
/css/css-pseudo/selection-decoration-p3.html: FAIL (Chrome: FAIL, Safari: PASS)
/css/css-pseudo/selection-overlay-and-grammar-001.html: FAIL (Chrome: FAIL, Safari: FAIL)
/css/css-pseudo/selection-overlay-and-spelling-001.html: FAIL (Chrome: FAIL, Safari: FAIL)

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/09a1715b0a1d
[wpt PR 29025] - CSS highlight painting: split originating and ::selection decorations, a=testonly
https://hg.mozilla.org/integration/autoland/rev/ef9208e9feca
[wpt PR 29025] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch
You need to log in before you can comment on or make changes to this bug.