Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f56d651ec6c310e1ad15cb5d2e28e9e1fbb38fa3
      
https://github.com/WebKit/WebKit/commit/f56d651ec6c310e1ad15cb5d2e28e9e1fbb38fa3
  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] Represent flex lines as ranges over a stable flex item list
https://bugs.webkit.org/show_bug.cgi?id=318441

Reviewed by Antti Koivisto.

Each flex line used to be collected into its own FlexLayoutItems vector and
then moved into the LineState, so a line's items were copies that relocate on
the move -- which is why anything referencing them had to hold the renderer.

Collect the flex items once into a stable allItems list that is never copied
or moved, and have computeFlexLines produce every line's range
(WTF::Range<size_t>) up front. A line is now a std::span into allItems; the
per-line hypothetical main size that columnInnerMainSize needs rides alongside
the ranges.

No change in behavior.

* Source/WebCore/rendering/RenderFlexibleBox.h:
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::LineState::LineState):
(WebCore::RenderFlexibleBox::resolveFlexibleLengthsForLineItems):
(WebCore::RenderFlexibleBox::computeFlexLines):
(WebCore::RenderFlexibleBox::layoutFlexLines):
(WebCore::RenderFlexibleBox::computeNextFlexLine):
(WebCore::RenderFlexibleBox::autoMarginOffsetInMainAxis):
(WebCore::RenderFlexibleBox::freezeInflexibleItems):
(WebCore::RenderFlexibleBox::resolveFlexibleLengths):
(WebCore::RenderFlexibleBox::layoutAndPlaceFlexItems):
(WebCore::RenderFlexibleBox::layoutColumnReverse):

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



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

Reply via email to