Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a877fdfa601c4fadcc399c15784b4b68c81218bd
      
https://github.com/WebKit/WebKit/commit/a877fdfa601c4fadcc399c15784b4b68c81218bd
  Author: Sammy Gill <[email protected]>
  Date:   2026-01-28 (Wed, 28 Jan 2026)

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

  Log Message:
  -----------
  [GFC] Hook up GridItemFunctions to {min,max}ContentContributions.
https://bugs.webkit.org/show_bug.cgi?id=306434
rdar://problem/169105283

Reviewed by Brandon Stewart and Brent Fulgham.

In 306234@main we introduced GridItemSizingFunctions, that is a struct
that contains a set of functions to use to get various sizes of grid
items. Currently, it holds the functions that will allow the user to get
the min/max content contributions of grid items.

In 306091@main and 306239@main we introduced some stub functions in
TrackSizingAlgorithm which is supposed to take a list of grid items and
return a list of the min/max content contributions for those items.

Now, we can replace the implementation of these stubs with the logic to
compute the correct values by using the right callback in
GridItemSizingFunctions.

* Source/WebCore/layout/formattingContexts/grid/TrackSizingAlgorithm.cpp:
(WebCore::Layout::minContentContributions):
Uses GridItemSizingFunctions::minContentContribution to compute the
min-content contributions of the passed in items.

(WebCore::Layout::maxContentContributions):
Same as above but with the other function in the struct!

(WebCore::Layout::sizeTracksToFitNonSpanningItems):
(WebCore::Layout::resolveIntrinsicTrackSizes):
(WebCore::Layout::TrackSizingAlgorithm::sizeTracks):
Some plumbing to get everything to work.

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



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

Reply via email to