Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 11b13711b10ba6ae2342bdd3dfe133831618d7f4
      
https://github.com/WebKit/WebKit/commit/11b13711b10ba6ae2342bdd3dfe133831618d7f4
  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] Have RenderFlexibleBox's core sizing take FlexLayoutItem rather 
than the flex item renderer
https://bugs.webkit.org/show_bug.cgi?id=318597

Reviewed by Antti Koivisto.

RenderFlexibleBox's flex sizing reached into the live flex item renderer even 
though it
already wraps each item in a FlexLayoutItem. Route the core sizing through that 
wrapper
so it becomes the single point of access to the renderer -- a prerequisite for
eventually sizing from an up-front snapshot, and for fragmentation, where the 
item list
becomes a partial subset.

Rename the item list from allItems to flexItems, since "all" will no longer be 
true once
the list is a fragment's subset.

FlexLayoutItem no longer takes the FlexBaseAndHypotheticalMainSize at 
construction: its
minMaxSizes field duplicated the sizing list and was read in a single place, so 
it is
dropped and the clamp becomes a file-static helper fed from the sizing list.
collectFlexItems now builds the item first and computes the flex base through 
it.

The flex-base subgraph (flexBaseAndHypotheticalMainSize, 
flexBaseSizeForFlexItem,
computeFlexItemMinMaxMainSizes, computeUsedMaxMainSize, 
computeUsedNonAutoMinMainSize,
computeContentBasedMinMainSize, ensureBlockAxisContentSizeForFlexItemIfNeeded,
flexBaseSizeNeedsBlockAxisContentSize) and the cross-axis and stretch helpers
(crossAxisIntrinsicExtentForFlexItem, applyStretchAlignmentToFlexItem,
applyStretchMinMaxCrossSize) now take a const FlexLayoutItem&. The shared 
aspect-ratio
and definiteness leaf helpers, FlexLayoutUtils, and the renderer writes are left
renderer-based: the leaves are also called from paths that have no 
FlexLayoutItem, and
the writes mutate the live tree so they cannot come from a snapshot.

No change in behavior.

* Source/WebCore/rendering/RenderFlexibleBox.cpp:
* Source/WebCore/rendering/RenderFlexibleBox.h:

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



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

Reply via email to