Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ccdac12e77a9fb9a990d03335aadbe84efcc76c3
https://github.com/WebKit/WebKit/commit/ccdac12e77a9fb9a990d03335aadbe84efcc76c3
Author: Sammy Gill <[email protected]>
Date: 2026-08-26 (Wed, 26 Aug 2026)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/scrollable-overflow-from-grid-container-contents-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/scrollable-overflow-from-grid-container-contents.html
M Source/WebCore/layout/integration/grid/LayoutIntegrationGridLayout.cpp
Log Message:
-----------
[GFC][Integration] Grid content does not contribute to the scrollable
overflow area
https://bugs.webkit.org/show_bug.cgi?id=322620
rdar://problem/185923265
Reviewed by Alan Baradlay.
RenderGrid::layoutGrid() returns as soon as layoutUsingGridFormattingContext()
succeeds,
which skips the legacy computeInFlowOverflow() and
addOverflowFromOutOfFlowBoxes() calls.
GridLayout::updateOverflow() only added visual overflow, so nothing a grid
container
contains ever extended its scrollable overflow area. An ancestor scroller would
report a
scrollWidth/scrollHeight that ignored the grid's contents, leaving that content
unreachable.
Accumulate the scrollable overflow area alongside the visual overflow rect and
hand it to
addLayoutOverflow(). The grid items and the out-of-flow boxes which the grid
container is
the containing block for are collected separately, since they are two distinct
sources.
Both use layoutOverflowRectForPropagation(), which already starts from the
box's border
box and accounts for layout containment, the single-axis overflow: clip cases,
a grid
item's margin-end contribution, and the paint geometry of relatively positioned
and
transformed boxes. A grid item's own subtree is laid out outside of the grid
formatting
context, so the overflow it generates is only available from the renderer. Fixed
positioned boxes are skipped because they do not scroll with the content.
Test:
imported/w3c/web-platform-tests/css/css-overflow/scrollable-overflow-from-grid-container-contents.html
*
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/scrollable-overflow-from-grid-container-contents-expected.txt:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/scrollable-overflow-from-grid-container-contents.html:
Added.
* Source/WebCore/layout/integration/grid/LayoutIntegrationGridLayout.cpp:
(WebCore::LayoutIntegration::GridLayout::updateOverflow): Compute the
scrollable overflow
area from the grid items and from the out-of-flow boxes the grid container
contains, in
addition to the visual overflow rect.
Canonical link: https://commits.webkit.org/319929@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications