Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f8fa87978e1eff9b2c91588f52fca20b0d6bf740
https://github.com/WebKit/WebKit/commit/f8fa87978e1eff9b2c91588f52fca20b0d6bf740
Author: Alan Baradlay <[email protected]>
Date: 2026-07-18 (Sat, 18 Jul 2026)
Changed paths:
M Source/WebCore/rendering/RenderFlexLayout.cpp
M Source/WebCore/rendering/RenderFlexLayout.h
M Source/WebCore/rendering/RenderFlexibleBox.cpp
Log Message:
-----------
[cleanup] Return the column flex container's main content extent from
placeFlexItems instead of setting it on the container
https://bugs.webkit.org/show_bug.cgi?id=318693
Reviewed by Antti Koivisto.
While placing a column line's items, placeFlexItems grew the container's
logical height in place
(setLogicalHeight(max(logicalHeight(), ...))), producing the container's main
size as a side effect and
reading it back for the next line. That is the last place FlexLayout set or
read the container's logical
height; the algorithm should produce that size as a value, not accumulate it on
the container.
Have placeFlexItems return the line's main-axis content extent (its main
content size plus the cross-axis
scrollbar) for column flow, 0 for row flow. handleMainAxisAlignment takes the
largest line's extent and
returns it alongside the item positions, and layout() feeds it to
updateFlexContainerLogicalHeight (column
flow) the same way the row block extent is fed. FlexLayout no longer calls
setLogicalHeight or logicalHeight.
No change in behavior: the value handed to updateFlexContainerLogicalHeight
reconstructs the old border-box
height (borderAndPaddingLogicalHeight() + returned extent equals the previous
mainAxisOffset + trailing
border/padding + scrollbar), and the height is finalized from the largest line
before distribute runs, which
only re-resolves short lines up to the container main and so never grew it past
that maximum.
* Source/WebCore/rendering/RenderFlexLayout.cpp:
* Source/WebCore/rendering/RenderFlexLayout.h:
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(RenderFlexibleBox::updateFlexContainerLogicalHeight):
Canonical link: https://commits.webkit.org/317493@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications