Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: eccab8d8ecaad1d9cb85c46e68069456a53b447b
https://github.com/WebKit/WebKit/commit/eccab8d8ecaad1d9cb85c46e68069456a53b447b
Author: Alan Baradlay <[email protected]>
Date: 2026-07-08 (Wed, 08 Jul 2026)
Changed paths:
M Source/WebCore/rendering/RenderFlexibleBox.cpp
M Source/WebCore/rendering/RenderFlexibleBox.h
Log Message:
-----------
[Flexbox] Split RenderFlexibleBox::performFlexLayout into named layout phases
https://bugs.webkit.org/show_bug.cgi?id=318338
Reviewed by Antti Koivisto.
performFlexLayout was one long function that interleaved collecting the flex
items, laying out each flex line, recording the first/last line item counts, and
finalizing the container height. That made the top-level flow hard to follow
next to the modern FlexLayout::layout, which reads as a sequence of named steps.
Move the item collection, the per-line layout loop, the first/last line item
count bookkeeping, and the empty-line minimum height into named helpers so
performFlexLayout reads as a short sequence of phases. numLines is replaced by
lineStates.size(), and the two identical hasLineIfEmpty minimum-height blocks
are
unified. No behavior change.
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::performFlexLayout):
(WebCore::RenderFlexibleBox::collectFlexItems):
(WebCore::RenderFlexibleBox::layoutFlexLines):
(WebCore::RenderFlexibleBox::setFlexItemCountsForFirstAndLastLine):
(WebCore::RenderFlexibleBox::adjustLogicalHeightForLineIfEmpty):
* Source/WebCore/rendering/RenderFlexibleBox.h:
Canonical link: https://commits.webkit.org/316711@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications