Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 278596afd8a4f7c56357053ea0bc7f6ddccb3203
      
https://github.com/WebKit/WebKit/commit/278596afd8a4f7c56357053ea0bc7f6ddccb3203
  Author: Alan Baradlay <[email protected]>
  Date:   2026-07-27 (Mon, 27 Jul 2026)

  Changed paths:
    M Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp
    M Source/WebCore/layout/integration/flex/FlexIntegrationUtils.cpp
    M Source/WebCore/layout/integration/flex/LayoutIntegrationFlexLayout.cpp
    M Source/WebCore/rendering/RenderFlexibleBox.cpp
    M Source/WebCore/rendering/RenderFlexibleBox.h

  Log Message:
  -----------
  [cleanup] Move updateFlexContainerLogicalHeight to FlexIntegrationUtils
https://bugs.webkit.org/show_bug.cgi?id=320300

Reviewed by Antti Koivisto.

updateFlexContainerLogicalHeight resolves the flex container's logical height 
from the extent the
flex algorithm produced, and hands back the used cross and block extents the 
formatting context then
works from. It is flex-algorithm work, but it lived on RenderFlexibleBox with 
FlexIntegrationUtils
forwarding to it. Its body is all container getters and setters, which is what 
the integration is
for, so move it there and drop the RenderFlexibleBox member.

The other caller was FlexLayout::layout, which special-cased an empty flex item 
list by resolving the
container height and returning before it built the formatting context. Since 
FlexIntegrationUtils is
now owned by the formatting context (320298), that call would have had to 
construct one just to reach
a single method. Let FlexFormattingContext::layout take the empty list instead 
and return an empty
result: an empty container still resolves its own height, so that is the flex 
algorithm's job, not
something the integration should reach around it to do. The result's members 
all default to what the
early return used to leave in place, so the caller's assignments are no-ops on 
that path.

No change in behaviour.

* Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp:
(WebCore::FlexFormattingContext::layout):
* Source/WebCore/layout/integration/flex/FlexIntegrationUtils.cpp:
(WebCore::LayoutIntegration::FlexIntegrationUtils::updateFlexContainerLogicalHeight):
* Source/WebCore/layout/integration/flex/LayoutIntegrationFlexLayout.cpp:
(WebCore::LayoutIntegration::FlexLayout::layout):
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::updateFlexContainerLogicalHeight): Deleted.
* Source/WebCore/rendering/RenderFlexibleBox.h:

Canonical link: https://commits.webkit.org/317973@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to