Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9fe4d62ecd55ac33b837178e9536e21d3eff2b20
https://github.com/WebKit/WebKit/commit/9fe4d62ecd55ac33b837178e9536e21d3eff2b20
Author: Alan Baradlay <[email protected]>
Date: 2026-07-24 (Fri, 24 Jul 2026)
Changed paths:
M Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp
M Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.h
M Source/WebCore/layout/integration/flex/FlexIntegrationUtils.cpp
M Source/WebCore/layout/integration/flex/FlexIntegrationUtils.h
Log Message:
-----------
[cleanup] Move FlexFormattingContext's flex-item render-tree mutations onto
FlexIntegrationUtils
https://bugs.webkit.org/show_bug.cgi?id=320193
Reviewed by Antti Koivisto.
Following 320188, FlexFormattingContext still wrote to the render tree directly
for a
handful of flex-item operations. Move those mutations onto FlexIntegrationUtils
so the
formatting context no longer mutates renderers itself:
- setFlexItemGeometry / setFlowAwareLocationForFlexItem (the flow-aware
setLocation) ->
FlexIntegrationUtils::setFlexItemGeometry, which takes isHorizontalFlow and
does the
transpose + setLocation internally.
- The stretch-alignment else-branch's setOverridingBorderBoxLogicalHeight ->
setFlexItemOverridingBorderBoxLogicalHeight.
- The conditional invalidateContentLogicalWidths (two sites) ->
invalidateFlexItemContentLogicalWidthsIfNeeded, which folds in the
shouldInvalidateContentWidths guard.
- The ScopedFlexBasisAsFlexItemMainSize RAII (a temporary main-axis override
during a
flex-base-size measurement) moves to
LayoutIntegration::ScopedFlexBasisAsFlexItemMainSize,
deriving mainAxisIsInlineAxis from the FlexLayoutItem.
* Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp:
(WebCore::FlexFormattingContext::flexBaseSizeForFlexItem):
(WebCore::FlexFormattingContext::applyStretchAlignmentToFlexItem):
(WebCore::FlexFormattingContext::applyStretchMinMaxCrossSize):
(WebCore::FlexFormattingContext::setFlowAwareLocationForFlexItem): Deleted.
(WebCore::FlexFormattingContext::setFlexItemGeometry): Deleted.
(WebCore::FlexFormattingContext::computeFlexItemRects):
(WebCore::FlexFormattingContext::placeFlexItems):
(WebCore::FlexFormattingContext::layoutColumnReverse):
(WebCore::FlexFormattingContext::computeMainAxisExtentForFlexItem):
(WebCore::ScopedFlexBasisAsFlexItemMainSize::ScopedFlexBasisAsFlexItemMainSize):
Deleted.
(WebCore::ScopedFlexBasisAsFlexItemMainSize::~ScopedFlexBasisAsFlexItemMainSize):
Deleted.
(): Deleted.
* Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.h:
* Source/WebCore/layout/integration/flex/FlexIntegrationUtils.h:
* Source/WebCore/layout/integration/flex/FlexIntegrationUtils.cpp:
(WebCore::LayoutIntegration::FlexIntegrationUtils::setFlexItemGeometry):
(WebCore::LayoutIntegration::FlexIntegrationUtils::setFlexItemOverridingBorderBoxLogicalHeight):
(WebCore::LayoutIntegration::FlexIntegrationUtils::invalidateFlexItemContentLogicalWidthsIfNeeded):
(WebCore::LayoutIntegration::ScopedFlexBasisAsFlexItemMainSize::ScopedFlexBasisAsFlexItemMainSize):
(WebCore::LayoutIntegration::ScopedFlexBasisAsFlexItemMainSize::~ScopedFlexBasisAsFlexItemMainSize):
Canonical link: https://commits.webkit.org/317896@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications