Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9d23badef003394e6ec78e18ac1272f45a609cb2
      
https://github.com/WebKit/WebKit/commit/9d23badef003394e6ec78e18ac1272f45a609cb2
  Author: Alan Baradlay <[email protected]>
  Date:   2026-07-08 (Wed, 08 Jul 2026)

  Changed paths:
    M Source/WebCore/rendering/RenderFlexibleBox.cpp
    M Source/WebCore/rendering/RenderFlexibleBox.h

  Log Message:
  -----------
  [cleanup] Resolve every flex line's main sizes before laying out the lines
https://bugs.webkit.org/show_bug.cgi?id=318445

Reviewed by Antti Koivisto.

Each flex line used to have its flexible lengths (spec 9.7) resolved inside
the per-line layout loop, right before that line was laid out and placed.
Resolving a line's main sizes depends only on that line's items and its own
container inner main size -- never on another line's layout -- so it can just
as well happen for every line up front.

Add computeMainSizeForFlexItems, which resolves each line's flexed main sizes
and returns the resulting main-axis free space per line; the layout loop now
consumes that per-line free space instead of computing it.

This mirrors the LFC FlexLayout::layout shape, where main sizing is its own 
pass over all lines.

No change in behavior.

* Source/WebCore/rendering/RenderFlexibleBox.h:
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::computeMainSizeForFlexItems):
(WebCore::RenderFlexibleBox::layoutFlexLines):

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



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

Reply via email to