Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 27d03aaa7eec5fd91669fa3edaef8bdc4d3eba63
https://github.com/WebKit/WebKit/commit/27d03aaa7eec5fd91669fa3edaef8bdc4d3eba63
Author: Sammy Gill <[email protected]>
Date: 2026-10-07 (Wed, 07 Oct 2026)
Changed paths:
M Source/WebCore/layout/formattingContexts/grid/GridLayoutUtils.cpp
M Source/WebCore/layout/formattingContexts/grid/GridSizer.cpp
M Source/WebCore/layout/integration/LayoutIntegrationUtils.cpp
M Source/WebCore/layout/integration/LayoutIntegrationUtils.h
Log Message:
-----------
[GFC] Pass an unknown grid area inline size through to the integration layer.
https://bugs.webkit.org/show_bug.cgi?id=326690
rdar://problem/189423996
Reviewed by Alan Baradlay.
We use the automaticMinimumInlineSize to compute this size in two
different scenarios:
1.) During the sizing of the grid's columns
2.) For the final layout of the grid item once its grid area size is
known.
One of the arguments to this function is the grid area inline size for
the item, however that size is only known during 2 and not at all during
1. We represent this as a std::optional<LayoutUnit> and when we reach
this code during the sizing of columns we end up doing value_or(0_lu).
Interestingly RenderGrid does this exact same thing inside
placeItemsOnGrid by setting gridItem->setGridAreaContentLogicalWidth(0_lu).
So we currently have this logic to match behavior but to have this in
the core grid layout code is a little bit weird. Since we are only doing
this to match what RenderGrid is doing we can keep plumbing this
optional until we get to the integration code in which we can then
fall back to using 0_lu. This makes the core layout code much less
confusing to read.
Similarly, borderAndPaddingForGridItem also takes a gridAreaInlineSize
and during track sizing we end up passing 0_lu to it. This is so that
percentage padding can resolve against 0 to follow the rules for cylic
dependencies.
Canonical link: https://commits.webkit.org/323058@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications