Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a582ca2b893203d78a0f5927d8e43244175ce06b
https://github.com/WebKit/WebKit/commit/a582ca2b893203d78a0f5927d8e43244175ce06b
Author: Megan Gardner <[email protected]>
Date: 2026-07-29 (Wed, 29 Jul 2026)
Changed paths:
M LayoutTests/TestExpectations
M LayoutTests/platform/ios/TestExpectations
M Source/WebCore/rendering/TextBoxPainter.cpp
Log Message:
-----------
[Custom Highlight]::highlight() background fill has an anti-aliased fringe in
vertical writing modes.
https://bugs.webkit.org/show_bug.cgi?id=320538
rdar://183496114
Reviewed by Alan Baradlay.
For vertical writing modes, TextBoxPainter paints the highlight background
fill inside a rotated graphics context whose translation is derived from an
inline-axis coordinate that is intentionally not device-pixel aligned (to
preserve glyph advances). A fill snapped to integers in the box's local space
therefore lands on fractional device pixels and gets anti-aliased, leaving a
one-pixel fringe that an ordinary unrotated element background does not have.
Fix this by snapping the fill rect in device space for vertical writing modes.
imported/w3c/web-platform-tests/css/css-highlight-api/painting/custom-highlight-painting-vertical-writing-mode-001.html
* LayoutTests/TestExpectations:
* LayoutTests/platform/ios/TestExpectations:
* Source/WebCore/rendering/TextBoxPainter.cpp:
(WebCore::TextBoxPainter::paintBackgroundFillForRange):
Canonical link: https://commits.webkit.org/318177@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications