Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 453693ef5539c7c4ec3358690a8960c412277924
https://github.com/WebKit/WebKit/commit/453693ef5539c7c4ec3358690a8960c412277924
Author: Megan Gardner <[email protected]>
Date: 2026-07-21 (Tue, 21 Jul 2026)
Changed paths:
M LayoutTests/TestExpectations
M LayoutTests/platform/ios/TestExpectations
M Source/WebCore/rendering/StyledMarkedText.cpp
Log Message:
-----------
[Custom Highlight] ::selection text-decoration is not painted.
https://bugs.webkit.org/show_bug.cgi?id=319858
rdar://182757292
Reviewed by Jessica Cheung, Abrar Rahman Protyasha, and Wenson Hsieh.
::selection text-decoration was never painted — the Selection marked-text path
set fill/stroke/background but never
applied the ::selection pseudo's decoration, and even once applied the coalesce
step dropped it because its
decoration-combine was gated to custom highlights only. Factor the pseudo
decoration resolution into a helper,
apply it for ::selection using selectionPseudoStyle(), and extend
coalesceAdjacentWithSameRanges to combine decorations
for the selection overlay too (it's the topmost highlight), so ::selection
underline/overline/line-through paint.
Recoloring an originating currentColor decoration to the selection color is a
separate follow-up.
imported/w3c/web-platform-tests/css/css-highlight-api/painting/custom-highlight-font-metrics-003.html
* LayoutTests/TestExpectations:
* LayoutTests/platform/ios/TestExpectations:
* Source/WebCore/rendering/StyledMarkedText.cpp:
(WebCore::computeDecorationStylesForPseudoElementStyle):
(WebCore::computeStyleForPseudoElementStyle):
(WebCore::resolveStyleForMarkedText):
(WebCore::coalesceAdjacentWithSameRanges):
Canonical link: https://commits.webkit.org/317673@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications