Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7c91251713104a08c0fd1a18be4cb0d2c33d3179
      
https://github.com/WebKit/WebKit/commit/7c91251713104a08c0fd1a18be4cb0d2c33d3179
  Author: Alan Baradlay <[email protected]>
  Date:   2026-07-10 (Fri, 10 Jul 2026)

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

  Log Message:
  -----------
  [cleanup] Separate flex item stretch from cross-axis alignment
https://bugs.webkit.org/show_bug.cgi?id=318457

Reviewed by Antti Koivisto.

alignFlexItems stretched each align-self:stretch item to its line's cross size
and then positioned it in the same loop, fusing the item's cross sizing with 
its cross-axis alignment.

Pull the stretch out into computeCrossSizeForFlexItems. It stretches every 
align-self:stretch
item that has non-auto cross margins -- the exact gate alignFlexItems used, 
since
updateAutoMarginsInCrossAxis returns true only when a cross margin is auto, the
same set hasAutoMarginsInCrossAxis checks. The pass runs right before
alignFlexItems, so each item is still stretched before it is positioned.

No change in behavior.

* Source/WebCore/rendering/RenderFlexibleBox.h:
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems):
(WebCore::RenderFlexibleBox::computeCrossSizeForFlexItems):
(WebCore::RenderFlexibleBox::alignFlexItems):

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



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

Reply via email to