Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f6303b938e85b46bd48834bea4f78396fdf12225
https://github.com/WebKit/WebKit/commit/f6303b938e85b46bd48834bea4f78396fdf12225
Author: Ahmad Saleem <[email protected]>
Date: 2026-05-25 (Mon, 25 May 2026)
Changed paths:
M LayoutTests/TestExpectations
M LayoutTests/platform/glib/fast/flexbox/017-expected.txt
M LayoutTests/platform/ios/fast/flexbox/017-expected.txt
M LayoutTests/platform/mac/fast/flexbox/017-expected.txt
M Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp
Log Message:
-----------
-webkit-box-pack should account for box-direction and handle overflow
repositioning
https://bugs.webkit.org/show_bug.cgi?id=312084
rdar://174588996
Reviewed by Alan Baradlay.
This patch aligns WebKit with Gecko / Firefox and Blink / Chromium.
The box-pack alignment logic in layoutHorizontalBox() used the writing
direction directly without considering box-direction: reverse, causing
start/end to resolve to the wrong side. It also gated all repositioning
on remainingSpace > 0, so overflowing content in RTL or reversed boxes
was never shifted to the correct edge or centered.
Compute an effective LTR flag that flips when box-direction is reverse,
and allow center/end offsets to apply with negative remainingSpace so
overflow content is positioned correctly.
* LayoutTests/TestExpectations: Progressions
* Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
> Rebaselines (now match other browsers):
* LayoutTests/platform/glib/fast/flexbox/017-expected.txt:
* LayoutTests/platform/ios/fast/flexbox/017-expected.txt:
* LayoutTests/platform/mac/fast/flexbox/017-expected.txt:
Canonical link: https://commits.webkit.org/313862@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications