Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2bc9a21af50d21e1dee328455fe01863ce0fa4e0
https://github.com/WebKit/WebKit/commit/2bc9a21af50d21e1dee328455fe01863ce0fa4e0
Author: Sammy Gill <[email protected]>
Date: 2026-09-23 (Wed, 23 Sep 2026)
Changed paths:
A LayoutTests/fast/repaint/grid-container-track-size-change-expected.txt
A LayoutTests/fast/repaint/grid-container-track-size-change.html
A LayoutTests/fast/repaint/grid-end-aligned-item-height-change-expected.txt
A LayoutTests/fast/repaint/grid-end-aligned-item-height-change.html
M Source/WebCore/layout/integration/grid/LayoutIntegrationGridLayout.cpp
M Source/WebCore/layout/integration/grid/LayoutIntegrationGridLayout.h
M Source/WebCore/rendering/RenderGrid.cpp
Log Message:
-----------
[GFC] Improve repaints issued when using GFC.
https://bugs.webkit.org/show_bug.cgi?id=324923
rdar://problem/188142676
Reviewed by Alan Baradlay.
Currently we have a couple different issues with respect to how we issue
repaints in GFC. The two main issues are:
1.) We may end up missing a repaint that needs to be issued
2.) We may issue repaint too many times as we run GFC
This patch addresses the first one with a couple of targeted changes. The
second one needs better partial layout support in GFC and is left for
follow up work.
1.) Hoist the LayoutRepainter out of RenderGrid::layoutGrid and into
RenderGrid::layoutBlock. This is because inside of RenderGrid::layoutGrid
we will bail early if we end up running GFC which avoids the call to
repainter.repaintAfterLayout(). By moving it up one level we will run
this regardless of whether we run GFC or not.
2.) Before we actually run grid layout make sure to capture the old
rects for the grid items so we can compare their position afterwards.
This adds back in a repaintDuringLayoutIfMoved call on the grid item
that legacy implemented but GFC did not.
* LayoutTests/fast/repaint/grid-container-track-size-change.html: Added.
* LayoutTests/fast/repaint/grid-container-track-size-change-expected.txt: Added.
Coverage for the first change. The grid container needs layout, so the
container repaint is
the only thing under test here and it is the rect which goes missing without
the hoist.
* LayoutTests/fast/repaint/grid-end-aligned-item-height-change.html: Added.
* LayoutTests/fast/repaint/grid-end-aligned-item-height-change-expected.txt:
Added.
Coverage for the second change. The item is end aligned in a fixed size grid
area, so
changing its height both dirties it and moves its top edge.
Both tests drive the relayout through something which dirties the grid item
itself rather
than through an alignment change, so the legacy implementation lays the item
out too and
issues the same repaints.
Canonical link: https://commits.webkit.org/321737@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications