Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6155262fc8d70a8c6a7baa74ebc091ab96b8c7b9
      
https://github.com/WebKit/WebKit/commit/6155262fc8d70a8c6a7baa74ebc091ab96b8c7b9
  Author: Alan Baradlay <[email protected]>
  Date:   2026-07-18 (Sat, 18 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] Build the row flex content height in FlexLayout and resolve it in 
updateFlexContainerLogicalHeight
https://bugs.webkit.org/show_bug.cgi?id=318650

Reviewed by Antti Koivisto.

While stacking the flex lines, computeFlexLineCrossPositions grew m_flexBox's 
logical height in place: it read
logicalHeight() back per line, compared, and called setLogicalHeight() to fit 
each line and then the inter-line
gaps. FlexLayout should reach the container to hand it results, not to 
accumulate geometry on it.

Have computeFlexLineCrossPositions build the flex content's block-axis extent 
(line cross sizes, inter-line
gaps, and the cross-axis scrollbar) and return it, without touching the 
container. layout() passes it to
updateFlexContainerLogicalHeight, which sets the height from it just as the 
flex formatting context integration
does in layoutUsingFlexFormattingContext: max(logicalHeight(), 
borderAndPaddingLogicalHeight() + extent). Column
flow's block axis is its main size, still set while placing the items, so 
nothing is built here for it.

Also fold the single-caller adjustLogicalHeightForLineIfEmpty into 
updateFlexContainerLogicalHeight.

No change in behavior.

* Source/WebCore/rendering/RenderFlexLayout.cpp:
(WebCore::FlexLayout::layout):
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock):
(WebCore::RenderFlexibleBox::updateFlexContainerLogicalHeight):
(WebCore::RenderFlexibleBox::adjustLogicalHeightForLineIfEmpty): Deleted.
* Source/WebCore/rendering/RenderFlexibleBox.h:

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



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

Reply via email to