Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b08128c1727eb908c1fc248918bf17916e575d32
https://github.com/WebKit/WebKit/commit/b08128c1727eb908c1fc248918bf17916e575d32
Author: Alan Baradlay <[email protected]>
Date: 2026-07-17 (Fri, 17 Jul 2026)
Changed paths:
M Source/WebCore/rendering/RenderFlexLayout.cpp
M Source/WebCore/rendering/RenderFlexibleBox.cpp
M Source/WebCore/rendering/RenderFlexibleBox.h
Log Message:
-----------
[cleanup] Split the flex container logical-height update into a row content
set and a shared finalize
https://bugs.webkit.org/show_bug.cgi?id=318629
Reviewed by Antti Koivisto.
updateLogicalHeightForFlexContent bundled work that only row flow needs (set
the container height to the
accumulated line content extent, then add the inter-line gaps) with work both
flows need (reserve a
line's height if empty, then resolve the final height via updateLogicalHeight).
Column flow passed a
nullopt content height and a zero gap through it just to reach that shared tail.
Split it into setLogicalHeightForRowFlexContent, which the caller invokes only
for row flow, and
finalizeFlexContainerLogicalHeight, which both flows call. The row content
height now carries the
inter-line gaps folded in, so the shared finalize is a clean tail and column
flow no longer passes
through the row-shaped path.
This reorders one thing for row flow: the empty-line floor now sees the content
plus the inter-line gaps
rather than the content alone, so max(content, floor) + gaps becomes
max(content + gaps, floor). The two
differ only when the accumulated content is shorter than a single line, which
also requires the
empty-line floor to apply, i.e. an editable root or a form control (button,
select, input) flex
container that additionally wraps to multiple lines with a row-gap. That
combination does not occur in
practice, but it is not strictly a no-op, so it is called out here rather than
claimed as
behavior-preserving. Column flow is unchanged.
* Source/WebCore/rendering/RenderFlexLayout.cpp:
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
* Source/WebCore/rendering/RenderFlexibleBox.h:
Canonical link: https://commits.webkit.org/317385@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications