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

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

  Log Message:
  -----------
  [cleanup] Return positionList and crossSizeList from their producing phases 
in RenderFlexibleBox
https://bugs.webkit.org/show_bug.cgi?id=318588

Reviewed by Antti Koivisto.

performFlexLayout declared positionList and crossSizeList up front, sized to the
item count, and passed them by reference into handleMainAxisAlignment and
computeCrossSizeForFlexItems to be filled. Each phase is the sole producer of 
its
list -- handleMainAxisAlignment places every item, computeCrossSizeForFlexItems 
sets
every item's used cross size -- so have them build and return the list instead,
matching the other sizing phases (computeMainSizeForFlexItems, 
crossSizeForFlexLines)
and FlexLayout's handleMainAxisAlignment. The two locals are now declared empty 
next
to their first use; the later cross-axis phases still take positionList by 
reference
because they accumulate into it.

No change in behavior.

* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::performFlexLayout):
(WebCore::RenderFlexibleBox::handleMainAxisAlignment):
(WebCore::RenderFlexibleBox::computeCrossSizeForFlexItems):
* Source/WebCore/rendering/RenderFlexibleBox.h:

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



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

Reply via email to