Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0855cc434da95b09363212b8ce5f9d9b5857afae
https://github.com/WebKit/WebKit/commit/0855cc434da95b09363212b8ce5f9d9b5857afae
Author: Alan Baradlay <[email protected]>
Date: 2026-07-25 (Sat, 25 Jul 2026)
Changed paths:
M Source/WebCore/layout/formattingContexts/flex/FlexFormattingUtils.cpp
M Source/WebCore/layout/formattingContexts/flex/FlexFormattingUtils.h
M Source/WebCore/rendering/RenderBlock.cpp
M Source/WebCore/rendering/RenderBox.cpp
M Source/WebCore/rendering/RenderFlexibleBox.cpp
M Source/WebCore/rendering/RenderFlexibleBox.h
Log Message:
-----------
[cleanup] Call FlexFormattingUtils statics directly instead of
RenderFlexibleBox's flex-item query wrappers
https://bugs.webkit.org/show_bug.cgi?id=320254
Reviewed by Antti Koivisto.
RenderFlexibleBox carried thin flex-item query wrappers --
mainAxisIsFlexItemInlineAxis,
flexBasisForFlexItem, alignmentForFlexItem, hasDefiniteCrossSizeForFlexItem --
that only forwarded
to the corresponding FlexFormattingUtils statics, plus
useContentBasedMinimumBlockSize which
composed two of them. Their only callers are render-side (RenderBox /
RenderBlock), which already
pull in FlexFormattingUtils.h transitively through RenderFlexibleBox.h, so the
wrappers were
redundant indirection.
Drop the four proxies from RenderFlexibleBox and move the
useContentBasedMinimumBlockSize
composition to a FlexFormattingUtils static. The statics take the flex item and
derive the flex
container from its parent, so the call sites pass the item directly;
isFlexItem() already implies a
RenderFlexibleBox parent, so RenderBox loses two now-redundant downcast guards.
RenderBox.cpp and
RenderBlock.cpp gain a direct FlexFormattingUtils.h include.
No change in behavior.
* Source/WebCore/rendering/RenderFlexibleBox.h:
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::mainAxisIsFlexItemInlineAxis): Deleted.
(WebCore::RenderFlexibleBox::flexBasisForFlexItem): Deleted.
(WebCore::RenderFlexibleBox::alignmentForFlexItem): Deleted.
(WebCore::RenderFlexibleBox::hasDefiniteCrossSizeForFlexItem): Deleted.
(WebCore::RenderFlexibleBox::useContentBasedMinimumBlockSize): Deleted.
* Source/WebCore/layout/formattingContexts/flex/FlexFormattingUtils.h:
* Source/WebCore/layout/formattingContexts/flex/FlexFormattingUtils.cpp:
(WebCore::FlexFormattingUtils::useContentBasedMinimumBlockSize):
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::isBlockSizeResolvableForStretch):
(WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
* Source/WebCore/rendering/RenderBlock.cpp:
(WebCore::RenderBlock::hasDefiniteLogicalHeightForPercentageResolutionFromStyle):
Canonical link: https://commits.webkit.org/317927@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications