Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4bac687a7d6904fa60e899d2fc0dd7ef2a1c6206
https://github.com/WebKit/WebKit/commit/4bac687a7d6904fa60e899d2fc0dd7ef2a1c6206
Author: Alan Baradlay <[email protected]>
Date: 2026-07-17 (Fri, 17 Jul 2026)
Changed paths:
M Source/WebCore/rendering/RenderFlexLayout.cpp
M Source/WebCore/rendering/RenderFlexLayout.h
M Source/WebCore/rendering/RenderFlexibleBox.cpp
M Source/WebCore/rendering/RenderFlexibleBox.h
Log Message:
-----------
[cleanup] Commit the row flex container height before alignment and factor
flex line positioning into a lambda
https://bugs.webkit.org/show_bug.cgi?id=318631
Reviewed by Antti Koivisto.
performFlexLayout recorded each flex line's cross-axis position and grew the
row container's logical
height in a bare block between the performContentSizing and
performContentAlignment lambdas, and then
committed that height partway through performContentAlignment even though, for
row flow, it is fully
known beforehand (main-axis alignment, which does not touch the row height, sat
in between only because
column flow's height is produced there while placing the items).
Factor that block into a positionFlexLines lambda that grows the row
container's logical height to fit
the lines plus the inter-line gaps as it records the line positions, so the row
height is set before
alignment, next to where it is computed. Column flow's height is still its main
size, set while placing
the items; both flows resolve their final height through
updateFlexContainerLogicalHeight, called once
in performContentAlignment.
updateFlexContainerLogicalHeight no longer takes the empty-line minimum as an
argument; it reserves it
via the existing adjustLogicalHeightForLineIfEmpty before updateLogicalHeight,
so
minimumHeightForLineIfEmpty stays on RenderFlexibleBox and leaves
FlexLayoutConstraints. The value is
unchanged: the empty-items path already recomputes it at the same layout point,
and this call runs
before the container's scrollbar and overflow are finalized. The empty-items
path now calls
updateFlexContainerLogicalHeight too, since it is exactly those two lines.
No change in behavior.
* Source/WebCore/rendering/RenderFlexLayout.cpp:
* Source/WebCore/rendering/RenderFlexLayout.h:
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
* Source/WebCore/rendering/RenderFlexibleBox.h:
Canonical link: https://commits.webkit.org/317421@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications