Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2ab24cabab0f4416a63e8f47065cfa0f76ceebee
https://github.com/WebKit/WebKit/commit/2ab24cabab0f4416a63e8f47065cfa0f76ceebee
Author: Sammy Gill <[email protected]>
Date: 2025-10-02 (Thu, 02 Oct 2025)
Changed paths:
M Source/WebCore/layout/formattingContexts/grid/GridLayout.cpp
M Source/WebCore/layout/formattingContexts/grid/GridLayout.h
Log Message:
-----------
[GFC] Add some initial logic for computing used margins
https://bugs.webkit.org/show_bug.cgi?id=299983
rdar://161769719
Reviewed by Alan Baradlay.
We will need to know the used margins of each grid item for
alignment/positioning after they have been sized so we should have some
logic that goes through and computes the margins for them. In the
simplest case we will just be grabbing fixed values off style and in the
slightly more complicated case we will have to do some match to compute
the used value with respect to the grid area. Here we add the overall
logic that will be used and implement the simplest case of fixed values.
* Source/WebCore/layout/formattingContexts/grid/GridLayout.cpp:
(WebCore::Layout::GridLayout::computeInlineMargins):
(WebCore::Layout::GridLayout::computeBlockMargins):
Introduce the two dedicated functions for computing the inline and block
direction margins. Currently the function signature just requires the
PlacedGridItems since we are grabbing the fixed values from style. In
the future we may need to pass in the column/row sizes to handle
percentages and auto but we will do that when we get there.
Canonical link: https://commits.webkit.org/300904@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes