Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 20dbff7f767d55dd0634cbc8b06b5a0eaa66fd89
https://github.com/WebKit/WebKit/commit/20dbff7f767d55dd0634cbc8b06b5a0eaa66fd89
Author: Alan Baradlay <[email protected]>
Date: 2026-05-13 (Wed, 13 May 2026)
Changed paths:
A LayoutTests/fast/repaint/table-row-move-after-content-change-expected.html
A LayoutTests/fast/repaint/table-row-move-after-content-change.html
M Source/WebCore/rendering/RenderTableSection.cpp
Log Message:
-----------
REGRESSION(310995@main): Table row does not repaint at old position when
preceding row changes size
https://bugs.webkit.org/show_bug.cgi?id=314693
Reviewed by Antti Koivisto.
<table>
<tr><td><div id="x">text</div></td></tr>
<tr><td>PASS if one line is visible</td></tr>
</table>
<script>x.style.display = "none"</script>
After hiding the first row's content, the second row moves up but its old
position is not repainted - the text appears at both the old and new locations.
Before 310995@main, cells were positioned relative to the section (and not
their parent the row).
When a row above shrank, the cells physically moved and the existing cell-level
repaint check (repaintDuringLayoutIfMoved) caught it.
After 310995@main, cells are positioned relative to their row.
When a row above shrinks and the next row moves up, the cells don't move
relative to their own row - so the cell-level check sees no movement.
But the row itself moved, and nobody was checking that.
The fix adds the same repaint-during-layout-if-moved pattern for rows that
already exists for cells: capture the old frame rect before repositioning, and
if it changed, repaint at the old rect.
* Source/WebCore/rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layoutRows):
* LayoutTests/fast/repaint/table-row-move-after-content-change-expected.html:
Added.
* LayoutTests/fast/repaint/table-row-move-after-content-change.html: Added.
Canonical link: https://commits.webkit.org/313168@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications