Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8409bd173ebdb530e5cb4b6ac16812e79b1560e9
https://github.com/WebKit/WebKit/commit/8409bd173ebdb530e5cb4b6ac16812e79b1560e9
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] Read the flex container's outer main-axis extent from a constraint
instead of off the container
https://bugs.webkit.org/show_bug.cgi?id=318689
Reviewed by Antti Koivisto.
placeFlexItems read the container's outer (border-box) main-axis extent live
off the container
(flexLayoutUtils().mainAxisExtent()) for the right-to-left row flip, even
though that value is fixed before the
algorithm runs: it is only used under shouldFlipMainAxis, which is row flow,
and recomputeLogicalWidth settles
the container's inline size before flex layout, which never changes it
afterwards.
Snapshot it into FlexLayoutConstraints as mainAxisBorderBoxExtent (built in
flexLayoutConstraints) and read
m_constraints.mainAxisBorderBoxExtent in placeFlexItems, so FlexLayout gets it
from the constraints like its
other fixed container properties rather than reaching back through the
container.
No change in behavior: the same value, since the container's inline size does
not move during flex layout.
* Source/WebCore/rendering/RenderFlexLayout.cpp:
* Source/WebCore/rendering/RenderFlexLayout.h:
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(RenderFlexibleBox::flexLayoutConstraints):
Canonical link: https://commits.webkit.org/317489@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications