Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 02cba0bd216fcd5faffa47521a95180d814374b6
      
https://github.com/WebKit/WebKit/commit/02cba0bd216fcd5faffa47521a95180d814374b6
  Author: Alan Baradlay <[email protected]>
  Date:   2026-07-12 (Sun, 12 Jul 2026)

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

  Log Message:
  -----------
  [cleanup] Return the used cross size from applyStretchAlignmentToFlexItem
https://bugs.webkit.org/show_bug.cgi?id=318550

Reviewed by Antti Koivisto.

computeCrossSizeForFlexItems stretched each item and then read the result back 
off
the renderer with crossAxisExtentForFlexItem to fill crossSizeList. For the
stretched items that read is redundant: applyStretchAlignmentToFlexItem already
knows the used cross size -- it is the value it sets via setOverridingBorderBox 
and
lays the child out to. Return it instead.

applyStretchAlignmentToFlexItem and applyStretchMinMaxCrossSize now return the 
used
cross size (desiredLogicalHeight / flexItemWidth / newSize, or the item's 
unchanged
laid-out extent on the no-stretch-min/max early return), and 
computeCrossSizeForFlexItems
stores that for stretched items while non-stretch items still read
crossAxisExtentForFlexItem. No change in behavior: the returned value is the
border-box size the override forces, which is exactly what 
crossAxisExtentForFlexItem
read back before.

* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::computeCrossSizeForFlexItems):
(WebCore::RenderFlexibleBox::applyStretchMinMaxCrossSize):
(WebCore::RenderFlexibleBox::applyStretchAlignmentToFlexItem):
* Source/WebCore/rendering/RenderFlexibleBox.h:

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



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

Reply via email to