Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b744c179aab45dc545771adfc4a10c5f44611830
https://github.com/WebKit/WebKit/commit/b744c179aab45dc545771adfc4a10c5f44611830
Author: Sammy Gill <[email protected]>
Date: 2026-07-14 (Tue, 14 Jul 2026)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-item-stale-block-size-001-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-item-stale-block-size-001.html
M
Source/WebCore/layout/integration/LayoutIntegrationFormattingContextLayout.cpp
Log Message:
-----------
[GFC] Stale grid item block sizes on subsequent layout
https://bugs.webkit.org/show_bug.cgi?id=319322
rdar://182144347
Reviewed by Alan Baradlay.
When computing the block min/max content contributions for a grid item,
GFC will call into the respective integration function to to get this
value. What these two end up doing is calling into
layoutWithFormattingContextForBox
in order to get that size. This function optionally takes in a width and
height constraint for the renderer that is sets as the overriding size
on it. Unfortunately, it does not clear the overriding height like it does
with the width so this can result in that size staying on the renderer
after the function returns. With respect to the described bug what ends
up happening is:
Layout frame 1:
- Compute the block min/max contributions
- Perform a final layout on the grid item which uses the same
integration API *and does pass an overriding width/height*
** Some mutation occurs that causes us to do layout again **
Layout frame 2:
- Compute the block min/max contributions
Now we have the wrong values because the overriding sizes were not
cleared so we use those values again
So the fix is to clear the overriding block size because we do not want
these things living around longer than they need to.
Canonical link: https://commits.webkit.org/317166@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications