Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 819bb29cc5a817cc33f75eaa58dee26ef0f91d45
https://github.com/WebKit/WebKit/commit/819bb29cc5a817cc33f75eaa58dee26ef0f91d45
Author: Alan Baradlay <[email protected]>
Date: 2026-07-16 (Thu, 16 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] Pass the flex item main-axis length-resolution size into FlexLayout
as a constraint
https://bugs.webkit.org/show_bug.cgi?id=318617
Reviewed by Antti Koivisto.
computeMainAxisExtentForFlexItem reached into the container for the main-axis
size a flex item's
main-axis length resolves against: contentBoxLogicalWidth for row flow,
availableLogicalHeight for
column flow. That is a fixed container property, like the flow flags and
border/padding already in
FlexLayoutConstraints.
Snapshot it into FlexLayoutConstraints as mainAxisSizeForLengthResolution,
computed in
RenderFlexibleBox; FlexLayout reads it rather than reaching back through the
container. It is kept
separate from mainAxisAvailableSpace on purpose: that one carries the
indefinite LayoutUnit::max()
marker used for line-breaking, whereas a percentage main-size must resolve
against a real size, so
this one is always the concrete availableLogicalHeight rather than the
specified-height-or-max
computation.
No change in behavior: it is the same value. For a flex container
availableLogicalHeight reads only
stable inputs (the parent flex's override, the style height, or the containing
block) and does not
move across the flex-base pass, so computing it up front matches what the
per-item reads saw.
* Source/WebCore/rendering/RenderFlexLayout.cpp:
* Source/WebCore/rendering/RenderFlexLayout.h:
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
Canonical link: https://commits.webkit.org/317324@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications