Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0cef591f1e9a54b44a94fea95f123141c9a1f6e5
https://github.com/WebKit/WebKit/commit/0cef591f1e9a54b44a94fea95f123141c9a1f6e5
Author: Sammy Gill <[email protected]>
Date: 2026-02-11 (Wed, 11 Feb 2026)
Changed paths:
M Source/WebCore/layout/formattingContexts/grid/GridLayout.cpp
M Source/WebCore/layout/formattingContexts/grid/GridLayoutUtils.cpp
M Source/WebCore/layout/formattingContexts/grid/GridLayoutUtils.h
Log Message:
-----------
[GFC] Implement GridItemSizingFunctions for the block aixs
https://bugs.webkit.org/show_bug.cgi?id=307505
rdar://170104719
Reviewed by Alan Baradlay.
We have implementations for the inline axis when it comes to the
GridItemSizingFunctions API. These are used by the track sizing
algorithm to get the different types of size contributions for the grid
items in the column direction.
In order to support sizing of the rows based on the content (the grid
items), we need implementations for the block aixs. Notably, we need an
implementation for blockAxis{Min,Max}Contribution. The way render tree
accomplishes this is by performing layout on the grid item's and then
querying the renderer for the logical height (see
GridTrackSizingAlgorithmStrategy::{min,max}ContentContributionForGridItem ->
logicalHeightForGridItem). So to match behavior we do the same by
calling into the equivalent integration API with the inline axis
constraints.
One small quirk of this is the fact that the block axis API will need
access to the formatting context while the inline axis one only needs
IntegrationUtils. This is because in order to return the border box size
we need to be able to get the grid item's box geometry.
Canonical link: https://commits.webkit.org/307255@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications