Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d8e49565ba7c6eabafc5b2759c249627f92bae98
https://github.com/WebKit/WebKit/commit/d8e49565ba7c6eabafc5b2759c249627f92bae98
Author: Ahmad Saleem <[email protected]>
Date: 2026-08-31 (Mon, 31 Aug 2026)
Changed paths:
M LayoutTests/TestExpectations
M Source/WebCore/rendering/BackgroundPainter.cpp
Log Message:
-----------
[CSS Writing Modes] Propagated root background painted in wrong position in
vertical-rl
https://bugs.webkit.org/show_bug.cgi?id=322920
Reviewed by Simon Fraser.
This patch aligns WebKit with Gecko / Firefox and Blink / Chromium.
When the root element's background is propagated to the canvas, the background
positioning area was anchored at the canvas origin plus the root's
border/padding
thickness. This assumes the root border box starts at the canvas top-left,
which is
only true for non-flipped writing modes. In a block-flipped writing mode
(vertical-rl,
horizontal-bt) the root box is physically offset within the canvas (e.g.
right-aligned
for vertical-rl), so the background was painted at the wrong location.
Shift the positioning-area anchor by the root box's flipped physical position
relative
to the canvas origin. This is a no-op for non-flipped writing modes, where
flipForWritingMode() leaves the rect unchanged.
* LayoutTests/TestExpectations: Unskip passing now
* Source/WebCore/rendering/BackgroundPainter.cpp:
(WebCore::BackgroundPainter::calculateFillLayerImageGeometryImpl):
Canonical link: https://commits.webkit.org/320167@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications