[wpt-sync] Sync PR 35290 - HighlightOverlayPainting: fix buffer confusion and clamping bugs
Categories
(Core :: Layout: Generated Content, Lists, and Counters, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox105 | --- | fixed |
People
(Reporter: mozilla.org, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 35290 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/35290
Details from upstream follow.
Delan Azabani <dazabani@igalia.com> wrote:
HighlightOverlayPainting: fix buffer confusion and clamping bugs
Custom highlights and marker-based highlights are defined in terms of
DOM ranges in a Text node. Generated text either has no Text node or
does not derive its content from the text node, so the active ranges
of these highlights should be ignored, but we fail to do so for soft
hyphens (a kind of generated text).On its own, this can cause spurious paints of things like highlight
backgrounds near soft hyphens if [0,1) is highlighted.CL:3720688 also changes the logic of ComputeParts, requiring parts to
be added to the result outside the main loop if originating fragment
offsets extend past the first or last highlight edges. For example,
with an originating fragment [a,b) and first highlight edge [c,d)
where a\<c\<b\<d, we add originating part [a,c) before the main loop.But if a\<b\<c\<d, for example, the originating part should be [a,b), not
[a,c), and this can cause the failures in bug 1346809 and bug 1346810.This patch fixes both bugs by ignoring marker-based highlight ranges
for all generated text including soft hyphens (like we already do for
ellipsis) and clamping parts to the originating fragment even when
they are added outside the main loop.Fixed: 1346810, 1346809
Change-Id: If3369bfb1a44ebce190db8fa8477065eeba00d86
Reviewed-on: https://chromium-review.googlesource.com/3793072
WPT-Export-Revision: 1edc2b55687aca338c5d3608caa20b500486b12f
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=04a14010595cd4275516f99e0217ee972f4a6336
Assignee | ||
Comment 2•2 years ago
|
||
Test result changes from PR not available.
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7a9dc459e8b2 [wpt PR 35290] - HighlightOverlayPainting: fix buffer confusion and clamping bugs, a=testonly https://hg.mozilla.org/integration/autoland/rev/184f903fe2fc [wpt PR 35290] - Update wpt metadata, a=testonly
https://hg.mozilla.org/mozilla-central/rev/7a9dc459e8b2
https://hg.mozilla.org/mozilla-central/rev/184f903fe2fc
Description
•