Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4291549ea228120beabdd904cacb95428665d20f
https://github.com/WebKit/WebKit/commit/4291549ea228120beabdd904cacb95428665d20f
Author: Yulun Wu <[email protected]>
Date: 2025-11-19 (Wed, 19 Nov 2025)
Changed paths:
M Source/WebCore/layout/formattingContexts/grid/GridLayout.cpp
M Source/WebCore/layout/formattingContexts/grid/GridLayout.h
M Source/WebCore/layout/formattingContexts/grid/ImplicitGrid.cpp
M Source/WebCore/layout/formattingContexts/grid/ImplicitGrid.h
M Source/WebCore/layout/formattingContexts/grid/UnplacedGridItem.cpp
M Source/WebCore/layout/formattingContexts/grid/UnplacedGridItem.h
Log Message:
-----------
[GFC] Add support for implicit grid tracks in the negative direction
https://bugs.webkit.org/show_bug.cgi?id=300045
<rdar://161843900>
Reviewed by Sammy Gill.
This PR updates GFC to handle grid items with negative positions by creating
implicit grid tracks in the negative direction. The implementation normalizes
the row and column numbers of explicitly placed grid items to their
coordinates implicit grid before performing layout.
This means all downstream code will work exclusively with non-negative
matrix indecies and eliminates the need for translation.
Combined changes:
* Source/WebCore/layout/formattingContexts/grid/GridLayout.cpp:
(WebCore::Layout::GridLayout::placeGridItems):
* Source/WebCore/layout/formattingContexts/grid/ImplicitGrid.cpp:
(WebCore::Layout::ImplicitGrid::ImplicitGrid):
(WebCore::Layout::ImplicitGrid::insertUnplacedGridItem):
(WebCore::Layout::ImplicitGrid::gridAreas const):
(WebCore::Layout::ImplicitGrid::insertDefiniteRowItem):
* Source/WebCore/layout/formattingContexts/grid/ImplicitGrid.h:
(WebCore::Layout::ImplicitGrid::explicitGridRowStart const):
(WebCore::Layout::ImplicitGrid::explicitGridColumnStart const):
* Source/WebCore/layout/formattingContexts/grid/UnplacedGridItem.cpp:
(WebCore::Layout::UnplacedGridItem::explicitColumnStart const):
(WebCore::Layout::UnplacedGridItem::explicitColumnEnd const):
(WebCore::Layout::UnplacedGridItem::explicitRowStart const):
(WebCore::Layout::UnplacedGridItem::explicitRowEnd const):
Canonical link: https://commits.webkit.org/303275@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications