Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3cfdab9e390ed39d79d481b6174d58e8f71180c9
https://github.com/WebKit/WebKit/commit/3cfdab9e390ed39d79d481b6174d58e8f71180c9
Author: Alan Baradlay <[email protected]>
Date: 2026-07-17 (Fri, 17 Jul 2026)
Changed paths:
M Source/WebCore/rendering/RenderFlexLayout.cpp
Log Message:
-----------
[cleanup] Read FlexLayout's row main inner size from the
mainAxisAvailableSpace constraint
https://bugs.webkit.org/show_bug.cgi?id=318645
Reviewed by Antti Koivisto.
computeMainSizeForFlexItems and handleMainAxisAlignment took the row flex
container's inner main size by
consulting the container live (m_flexBox.contentBoxLogicalWidth()), even though
that value is already
snapshotted in FlexLayoutConstraints as mainAxisAvailableSpace:
RenderFlexibleBox::mainAxisAvailableSpace
returns contentBoxLogicalWidth for row flow, taken after recomputeLogicalWidth
and fixed for the rest of
layout.
Read m_constraints.mainAxisAvailableSpace in the row branch instead, so
FlexLayout gets the container's
main inner size from the constraint like its other container properties rather
than reaching back through
the container. The column branch still computes columnInnerMainSize per line.
No change in behavior: the same value, since the container's width does not
move during flex layout.
* Source/WebCore/rendering/RenderFlexLayout.cpp:
Canonical link: https://commits.webkit.org/317442@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications