Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 477b66cb9bab2506570c1856bfe360d2c8d14fcc
https://github.com/WebKit/WebKit/commit/477b66cb9bab2506570c1856bfe360d2c8d14fcc
Author: Alan Baradlay <[email protected]>
Date: 2026-06-13 (Sat, 13 Jun 2026)
Changed paths:
A
LayoutTests/fast/repaint/align-content-center-in-composited-layer-expected.html
A LayoutTests/fast/repaint/align-content-center-in-composited-layer.html
A LayoutTests/fast/repaint/layer-repaint-with-layout-delta-1-expected.html
A LayoutTests/fast/repaint/layer-repaint-with-layout-delta-1.html
A LayoutTests/fast/repaint/layer-repaint-with-layout-delta-2-expected.html
A LayoutTests/fast/repaint/layer-repaint-with-layout-delta-2.html
M LayoutTests/platform/mac-wk1/TestExpectations
M Source/WebCore/rendering/RenderLayoutState.cpp
M Source/WebCore/rendering/RenderLayoutState.h
Log Message:
-----------
Text changes that don't modify the text element size in flex layout on new
compositing layer don't trigger re-render.
https://bugs.webkit.org/show_bug.cgi?id=316820
<rdar://problem/179292409>
Reviewed by Simon Fraser.
A text change inside a composited box that align-content has centered is not
repainted:
the render tree is up to date, but the old text stays on screen. See the test
reduction
in the bug.
align-content on a block container is applied as a post-layout pass: children
are placed
in flow first, then shifted by the centering amount.
estimateLogicalTopPosition() does not
model that shift, so on the next relayout the container re-seats the composited
box from its
leftover centered top back to the flow estimate, recording that shift as the
layout delta.
The descendant then relayouts and, to recover its old (last paint) position,
adjusts its
repaint rect by the layout delta. But that delta is measured in the ancestor
(layout-root)
coordinate space, while the descendant's repaint resolves against its repaint
container — so
the adjustment pushes the invalidation outside the container's layer and the
new text is
never painted.
Reset the layout delta to 0 at every repaint container in computeOffsets(), so
a descendant
only ever accumulates movement that happened within that container.
*
LayoutTests/fast/repaint/align-content-center-in-composited-layer-expected.html:
Added.
* LayoutTests/fast/repaint/align-content-center-in-composited-layer.html: Added.
* LayoutTests/fast/repaint/layer-repaint-with-layout-delta-1-expected.html:
Added.
* LayoutTests/fast/repaint/layer-repaint-with-layout-delta-1.html: Added.
* LayoutTests/fast/repaint/layer-repaint-with-layout-delta-2-expected.html:
Added.
* LayoutTests/fast/repaint/layer-repaint-with-layout-delta-2.html: Added.
* LayoutTests/platform/mac-wk1/TestExpectations:
* Source/WebCore/rendering/RenderLayoutState.cpp:
(WebCore::RenderLayoutState::computeOffsets): Reset to 0 at repaint containers.
(WebCore::RenderLayoutState::addLayoutDelta):
(WebCore::RenderLayoutState::layoutDeltaMatches const):
* Source/WebCore/rendering/RenderLayoutState.h: Rename the member and document
what it is.
(WebCore::RenderLayoutState::layoutDelta const):
Canonical link: https://commits.webkit.org/315173@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications