Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0c899d275dde4768ffcb878f529b6864dee7a441
https://github.com/WebKit/WebKit/commit/0c899d275dde4768ffcb878f529b6864dee7a441
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 cross-axis length-resolution size from a
constraint instead of off the container
https://bugs.webkit.org/show_bug.cgi?id=318696
Reviewed by Antti Koivisto.
computeMainSizeFromAspectRatioUsing read the container's logical inline content
size live
(m_flexBox.contentBoxLogicalWidth()) to resolve a column flex item's
aspect-ratio percentage/calc cross size,
even though that value is fixed before the algorithm runs, like the other
container sizes already snapshotted
into FlexLayoutConstraints: recomputeLogicalWidth settles the container's
inline size before flex layout, which
never changes it afterwards, and the aspect-ratio path runs in the early
flex-base pass.
Snapshot it into FlexLayoutConstraints as crossAxisSizeForLengthResolution
(built in flexLayoutConstraints) and
read m_constraints.crossAxisSizeForLengthResolution instead, 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:
(WebCore::FlexLayout::computeMainSizeFromAspectRatioUsing):
* Source/WebCore/rendering/RenderFlexLayout.h:
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(RenderFlexibleBox::flexLayoutConstraints):
Canonical link: https://commits.webkit.org/317494@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications