Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 90852035440508eda5553c97e9a043ebc3701a27
      
https://github.com/WebKit/WebKit/commit/90852035440508eda5553c97e9a043ebc3701a27
  Author: Sammy Gill <[email protected]>
  Date:   2026-02-09 (Mon, 09 Feb 2026)

  Changed paths:
    M Source/WebCore/layout/formattingContexts/grid/GridLayoutUtils.cpp
    M Source/WebCore/layout/formattingContexts/grid/GridLayoutUtils.h
    M Source/WebCore/layout/formattingContexts/grid/TrackSizingAlgorithm.cpp
    M Source/WebCore/layout/formattingContexts/grid/TrackSizingAlgorithm.h

  Log Message:
  -----------
  [GFC] Add usedMinimumSize to GridItemSizingFunctions
https://bugs.webkit.org/show_bug.cgi?id=307352
rdar://169977825

Reviewed by Brandon Stewart.

During the track sizing algorithm, we may need to ask a grid item for
its used minimum size:
https://drafts.csswg.org/css-grid-1/#algo-single-span-items

This is similar to how it may need to know its min/max contributions,
which we represent via an API in GridItemSizingFunctions. Let's add
this API to GridItemSizingFunctions also so that we can use it in
the future during the track sizing algorithm. We already have an
implementation for these functions in the form of
used{Inline,Block}MinimumSize, but we need to get some extra information
into the track sizing algorithm before we can actually use them.

* Source/WebCore/layout/formattingContexts/grid/GridLayoutUtils.cpp:
(WebCore::Layout::GridLayoutUtils::inlineAxisMinContentContribution):
(WebCore::Layout::GridLayoutUtils::inlineAxisMaxContentContribution):
(WebCore::Layout::GridLayoutUtils::blockAxisMinContentContribution):
(WebCore::Layout::GridLayoutUtils::blockAxisMaxContentContribution):
The used minimum size functions need access to the PlacedGridItem
because it will need access to data we have on it when determining the
minimum size. We change the min/max contribution functions to just take
a PlacedGridItem as well so the API matches. This is just a mechanical
change that changes the signature of these functions and passes in the
PassedGridItem instead of the layout box at the call sites.

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



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

Reply via email to