Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e5a6e7611a0804d051452d07ee67f2b60c19889b
https://github.com/WebKit/WebKit/commit/e5a6e7611a0804d051452d07ee67f2b60c19889b
Author: Sammy Gill <[email protected]>
Date: 2026-01-26 (Mon, 26 Jan 2026)
Changed paths:
M Source/WebCore/layout/formattingContexts/grid/TrackSizingAlgorithm.cpp
Log Message:
-----------
[GFC] Add some initial logic to support track sizing with max-content track
sizing functions
https://bugs.webkit.org/show_bug.cgi?id=306135
rdar://168773221
Reviewed by Alan Baradlay.
We build upon 306091@main which added a decent amount of track sizing
skeleton code by adding in some initial logic for max-content as the
track sizing function. Specifically, we build upon the case where we are
sizing tracks to fit non-spanning items (step 11.5.2).
https://drafts.csswg.org/css-grid-1/#algo-single-span-items
Most of this should just be the spec verbatim where we get the
max-content contributions of the items in the case where max-content is
the min track sizing functions and max track sizing functions. Right now
the function to get these size contributions is an empty stub but will
be filled in with some logic to return a Vector of all max-content
contributions of the items.
The one slightly tricky case is the scenario in which the max track
sizing function may have been max-content. In this case, we treat that
function as max-content for the purposes of this step, but after we get
the maximum max-content contribution we also need to clamp it by the
argument to the fit-content function. The problem is that GridLayout
would have transformed this fit-content function into max-content so
that we arrive at this "max-content maximums," but we lost the fact that
this was originally a fit-content sizing function. We will likely need
to store some extra information or do something else entirely to support
this properly, but I defer that for now and just leave some skeleton
code with a notImplemented() to figure out in a future patch.
Canonical link: https://commits.webkit.org/306239@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications