Closed Bug 1676658 Opened 4 years ago Closed 4 years ago

[wpt-sync] Sync PR 26487 - Only do blending for ::selection background for replaced elements

Categories

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

task

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

b'Rune Lillesveen <futhark@chromium.org>' wrote:

Only do blending for ::selection background for replaced elements

We did a BlendWithWhite() to not have custom selection backgrounds fully
obscure replaced content like images. But, we also did that blending for
text which means the author could not fully control the ::selection
background. Instead, only do this blending for replaced content. This is
in line with what Firefox does and what the spec says[1].

The blending is still done on the UA default background color for both
text and replaced content in LayoutTheme.

[1] https://drafts.csswg.org/css-pseudo-4/#highlight-replaced

Bug: 1018450
Change-Id: Ibb2c63d549a21706a511bbb47ff4c686b246314b
Reviewed-on: https://chromium-review.googlesource.com/2532555
WPT-Export-Revision: 0d2c47f383f690d7f2734f7e7e58d15f6160fa53

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

CI Results

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

Total 1 tests

Status Summary

Firefox

PASS: 1

Chrome

PASS: 1

Safari

PASS: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/984d1dfaba90
[wpt PR 26487] - Only do blending for ::selection background for replaced elements, a=testonly
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
You need to log in before you can comment on or make changes to this bug.