Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 09a7b7874ba2ee8d29d59dbaed0df9fd398aa614
      
https://github.com/WebKit/WebKit/commit/09a7b7874ba2ee8d29d59dbaed0df9fd398aa614
  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] Fold RenderFlexibleBox's cross-axis alignment offsets into the 
position list
https://bugs.webkit.org/show_bug.cgi?id=318587

Reviewed by Antti Koivisto.

performFlexLayout built each flex item's final cross-axis coordinate from three
places: the position list (seeded during main-axis placement), a per-line
lineAlignContentOffsetList, and a per-item crossItemOffsetList, summing the two
offset arrays into the position in the final placement loop.

Those arrays only existed because the position list was seeded before 
align-content
and align-self were known. Have the two cross-axis alignment phases add their 
offsets
straight into the position list instead, so it becomes the single carrier of 
each
item's final in-container position (like FlexLayout's 
PositionAndMargins.position) and
the final loop just reads it.

No change in behavior: the same three addends are accumulated in the same 
order, and
lineCrossOffsetList still receives its align-content fold so the wrap-reverse 
and
rtl-column flips are unchanged.

* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::performFlexLayout):
(WebCore::RenderFlexibleBox::handleCrossAxisAlignmentForFlexLines):
(WebCore::RenderFlexibleBox::handleCrossAxisAlignmentForFlexItems):
* Source/WebCore/rendering/RenderFlexibleBox.h:

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



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

Reply via email to