fune/testing/web-platform/tests/css/css-pseudo/selection-paint-image-notref.html
Rune Lillesveen 6e5af3186e Bug 1676658 [wpt PR 26487] - Only do blending for ::selection background for replaced elements, a=testonly
Automatic update from web-platform-tests
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/c/chromium/src/+/2532555
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#826867}

--

wpt-commits: a1b86038015d6f19b3d27c6388ded3409998740b
wpt-pr: 26487
2020-11-13 10:37:22 +00:00

4 lines
188 B
HTML

<!doctype html>
<title>CSS Test Reference</title>
<p>The red image to the right should shine through the green selection.</p>
<div style="background:green;width:200px;height:100px"></div>