Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: efc8ff315639f043bf39e026cee189dce285886d
https://github.com/WebKit/WebKit/commit/efc8ff315639f043bf39e026cee189dce285886d
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
M Source/WebCore/rendering/RenderFlexibleBox.h
Log Message:
-----------
[cleanup] Have RenderFlexibleBox lay out a flex item for stretch alignment
instead of FlexLayout
https://bugs.webkit.org/show_bug.cgi?id=318613
Reviewed by Antti Koivisto.
FlexLayout laid flex items out directly during stretch alignment: in
applyStretchAlignmentToFlexItem
(both the block and inline axes) and in applyStretchMinMaxCrossSize it set an
overriding cross size
on the item, marked it for layout, and called layoutIfNeeded. Laying a flex
item out is render-tree
work that belongs to the container, not to the item-layout algorithm.
Move the relayouts into RenderFlexibleBox: stretchFlexItemLogicalHeight for the
block-axis case
(the conditional overriding-height plus the relayout that preserves the item's
content logical
height and dirties its percentage-height descendants), and
relayoutFlexItemForStretchedCrossSize
for the inline-axis case and the min/max clamp case (set the overriding cross
size and relay out).
dirtyPercentHeightDescendantsWithinFlexItem moves with them;
flexItemHasPercentHeightDescendants
stays in FlexLayout, since that is the query the relayout decision reads.
FlexLayout keeps computing the stretched cross size and deciding whether a
relayout is needed;
RenderFlexibleBox performs it.
No change in behavior: the moved bodies are unchanged, run under the same
conditions, and in the
same order.
* 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/317305@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications