Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9c1fa85f1d7dbb734e3a801cb34a8c99cd4f2962
https://github.com/WebKit/WebKit/commit/9c1fa85f1d7dbb734e3a801cb34a8c99cd4f2962
Author: Alan Baradlay <[email protected]>
Date: 2026-07-09 (Thu, 09 Jul 2026)
Changed paths:
M Source/WebCore/rendering/RenderFlexibleBox.cpp
M Source/WebCore/rendering/RenderFlexibleBox.h
Log Message:
-----------
[cleanup] Separate main-axis alignment from flex line sizing
https://bugs.webkit.org/show_bug.cgi?id=318453
Reviewed by Antti Koivisto.
layoutFlexLines both sized the flex lines and, in a trailing loop, placed each
line's items along the main axis, so main-axis alignment was fused into the
sizing helper. That placement loop was the last thing it did, so running it
right after layoutFlexLines returns is the same order.
Return the sizing result (the line states plus each line's remaining main-axis
free space) from layoutFlexLines and move the placement loop into its own
handleMainAxisAlignment phase called from performFlexLayout. The top level now
reads sizing -> main-axis alignment -> cross-axis alignment, matching the
FlexLayout::layout shape where main-axis alignment is a phase of its own.
No change in behavior.
* Source/WebCore/rendering/RenderFlexibleBox.h:
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::performFlexLayout):
(WebCore::RenderFlexibleBox::layoutFlexLines):
(WebCore::RenderFlexibleBox::handleMainAxisAlignment):
Canonical link: https://commits.webkit.org/316839@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications