Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3de673d8e110e83cf157369d08dbf8d385ff47fb
https://github.com/WebKit/WebKit/commit/3de673d8e110e83cf157369d08dbf8d385ff47fb
Author: Megan Gardner <[email protected]>
Date: 2026-08-13 (Thu, 13 Aug 2026)
Changed paths:
M LayoutTests/fast/css/highlight-text-repaint-expected.txt
M LayoutTests/fast/repaint/highlight-paint-after-range-change-expected.txt
M LayoutTests/fast/repaint/highlight-removed-when-cleared-expected.txt
M LayoutTests/fast/repaint/highlight-removed-when-deleted-expected.txt
M
LayoutTests/fast/repaint/highlight-repainted-when-deleted-and-readded-expected.txt
M
LayoutTests/platform/glib/fast/repaint/highlight-paint-after-range-change-expected.txt
M
LayoutTests/platform/glib/fast/repaint/highlight-removed-when-cleared-expected.txt
M
LayoutTests/platform/glib/fast/repaint/highlight-removed-when-deleted-expected.txt
M
LayoutTests/platform/glib/fast/repaint/highlight-repainted-when-deleted-and-readded-expected.txt
M Source/WebCore/Modules/highlight/Highlight.cpp
M Source/WebCore/Modules/highlight/HighlightRegistry.cpp
Log Message:
-----------
[Custom Highlight] ::highlight() is not repainted when a highlight's range is
changed via CSS.highlights.set().
https://bugs.webkit.org/show_bug.cgi?id=321567
rdar://184672580
Reviewed by Wenson Hsieh.
Replacing an existing highlight via CSS.highlights.set() with a key that is
already registered did not
repaint: HighlightRegistry::setFromMapLike only scheduled a repaint when the
key was new, so neither the
ranges of the highlight being replaced nor the ranges of the new highlight were
invalidated. Additionally,
Highlight::repaintRange only repainted the renderers of the nodes intersecting
the range, whose ink overflow
is computed from the element's own style and does not include highlight
decorations that paint outside it
(e.g. a large text-underline-offset).
imported/w3c/web-platform-tests/css/css-highlight-api/painting/invalidation/css-highlight-invalidation-001.html
* LayoutTests/fast/css/highlight-text-repaint-expected.txt:
* LayoutTests/fast/repaint/highlight-paint-after-range-change-expected.txt:
* LayoutTests/fast/repaint/highlight-removed-when-cleared-expected.txt:
* LayoutTests/fast/repaint/highlight-removed-when-deleted-expected.txt:
*
LayoutTests/fast/repaint/highlight-repainted-when-deleted-and-readded-expected.txt:
*
LayoutTests/platform/glib/fast/repaint/highlight-paint-after-range-change-expected.txt:
*
LayoutTests/platform/glib/fast/repaint/highlight-removed-when-cleared-expected.txt:
*
LayoutTests/platform/glib/fast/repaint/highlight-removed-when-deleted-expected.txt:
*
LayoutTests/platform/glib/fast/repaint/highlight-repainted-when-deleted-and-readded-expected.txt:
* Source/WebCore/Modules/highlight/Highlight.cpp:
(WebCore::Highlight::repaintRange):
* Source/WebCore/Modules/highlight/HighlightRegistry.cpp:
(WebCore::HighlightRegistry::setFromMapLike):
Canonical link: https://commits.webkit.org/319154@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications