Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: eac0d0aee29aa0af87cc3bfa2a9b0e2c65eb7018
https://github.com/WebKit/WebKit/commit/eac0d0aee29aa0af87cc3bfa2a9b0e2c65eb7018
Author: Alan Baradlay <[email protected]>
Date: 2026-04-21 (Tue, 21 Apr 2026)
Changed paths:
M Source/WebCore/rendering/RenderFlexibleBox.cpp
M Source/WebCore/rendering/RenderFlexibleBox.h
Log Message:
-----------
[Flex] Split mainAxisContentExtent into clearer helpers
https://bugs.webkit.org/show_bug.cgi?id=312800
Reviewed by Antti Koivisto.
mainAxisContentExtent served two purposes with a single function:
distribution (container main inner size) and positioned item placement.
For row flex it ignored its input and returned contentBoxLogicalWidth().
For column flex it constrained the input through computeLogicalHeight.
The overloaded semantics made it unclear what callers actually needed.
Split into:
- columnInnerMainSize(hypotheticalMainSize): resolves the column flex
container's inner main size by constraining the hypothetical main
size sum through computeLogicalHeight. Column-only, asserted. Used
for flex distribution (spec: "flex container's inner main size").
- Inline: positioned item placement now uses
isColumnFlow() ? contentBoxLogicalHeight() : contentBoxLogicalWidth()
directly, since the round-trip through computeLogicalHeight was a
no-op for an already-laid-out container.
No behavior change.
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::columnInnerMainSize):
(WebCore::RenderFlexibleBox::performFlexLayout):
(WebCore::RenderFlexibleBox::staticMainAxisPositionForPositionedFlexItem):
(WebCore::RenderFlexibleBox::mainAxisContentExtent): Deleted.
* Source/WebCore/rendering/RenderFlexibleBox.h:
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Canonical link: https://commits.webkit.org/311669@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications