Bug
1754327 [wpt PR 32759] - Highlight API: Don't paint unstyled custom highlights, a=testonly
Automatic update from web-platform-tests
Highlight API: Don't paint unstyled custom highlights
The custom highlight API spec [1] currently states that an unstyled
custom highlight should inherit the styles of its originating element.
The Blink implementation follows this.
However, this behavior can lead to some unintuitive results where
unstyled highlights can affect the painting of the originating
element, or paint over other highlights. This issue was pointed out
in [2], and spec changes to fix this are pending editor review.
A goal of these changes are that unstyled custom highlights do not
affect rendering at all.
This change updates the custom highlights implementation to achieve
this by giving them a default 'transparent' foreground and background
color.
Some of our tests were validating the earlier unintuitive behavior
involving overlapping ranges. These are updated, along with the
addition of a new test to validate that a single unstyled highlight
doesn't affect rendering.
[1] https://drafts.csswg.org/css-highlight-api-1/#default-styles
[2] https://github.com/w3c/csswg-drafts/issues/6779
Bug:
1295271
Change-Id: Id7dc877c90c08240fbe79edeeeec551cdc5508c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/
3449336
Reviewed-by: Delan Azabani <dazabani@igalia.com>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Dan Clark <daniec@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#969007}
--
wpt-commits:
40d5e6da07fc061a6d81f081c3c16eafc10b54ce
wpt-pr: 32759