Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: fb29cd14f44a9d242bbbc2414d52164955d539d9
https://github.com/WebKit/WebKit/commit/fb29cd14f44a9d242bbbc2414d52164955d539d9
Author: Alan Baradlay <[email protected]>
Date: 2026-07-11 (Sat, 11 Jul 2026)
Changed paths:
M Source/WebCore/rendering/RenderFlexibleBox.cpp
M Source/WebCore/rendering/RenderFlexibleBox.h
Log Message:
-----------
[cleanup] Return per-item main sizes from computeMainSizeForFlexItems, not
free space
https://bugs.webkit.org/show_bug.cgi?id=318497
Reviewed by Antti Koivisto.
computeMainSizeForFlexItems resolved the flexible lengths and then returned the
per-line remaining main-axis free space. FlexLayout::layout instead returns the
used main size of each item and computes the free space later, in
handleMainAxisAlignment (#12). Match that: computeMainSizeForFlexItems now
returns a per-item Vector<LayoutUnit>, and handleMainAxisAlignment derives each
line's remaining free space from it.
Behavior is unchanged. handleMainAxisAlignment rebuilds an item's used outer
main
size as mainSize + mainAxisBorderAndPadding + mainAxisMargin, which is exactly
flexedMarginBoxSize(); the container inner main size and gap handling are the
same, and the item margins are stable between sizing and this point (auto-margin
distribution happens inside placeFlexItems, after the per-line read). The item
still carries flexedContentSize for layout and placement, so the returned list
duplicates it for now -- dropping it is follow-on work.
* Source/WebCore/rendering/RenderFlexibleBox.h:
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::performFlexLayout):
(WebCore::RenderFlexibleBox::computeMainSizeForFlexItems):
(WebCore::RenderFlexibleBox::handleMainAxisAlignment):
Canonical link: https://commits.webkit.org/316959@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications