Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 243ff832411a980f24dbea140b614203c646bc60
https://github.com/WebKit/WebKit/commit/243ff832411a980f24dbea140b614203c646bc60
Author: Alan Baradlay <[email protected]>
Date: 2026-04-30 (Thu, 30 Apr 2026)
Changed paths:
A LayoutTests/fast/table/blocks-in-inline-table-cell-height-expected.html
A LayoutTests/fast/table/blocks-in-inline-table-cell-height.html
M Source/WebCore/rendering/RenderBlockFlow.cpp
Log Message:
-----------
REGRESSION (304513@main): Cars and Bids email formatted weird
https://bugs.webkit.org/show_bug.cgi?id=313661
<rdar://174832615>
Reviewed by Antti Koivisto.
The blocks-in-inline fast path (introduced in 304513@main) skips full inline
layout when
only block content inside inline elements changed.
The assumption here is that only the block content needs layout.
However table layout assumes that when it sets childNeedsLayout (see
RenderTableSection::layoutRows)
the cell runs full layout (as if selfNeedsLayout was set).
This is part of the intrinsic padding change logic:
The intrinsic padding change is just a position shift - the content does not
change, its layout is correct,
only its position within the cell moved. The right response would be: shift the
content positions by
the padding delta and update the cell's height. No child layout at all.
Instead we trigger setChildNeedsLayout -> full layoutBlock -> inline layout
re-runs.
That's wasteful even when it works. And when the fast path intercepts it, the
fast path sees "nothing needs layout"
(which is actually true - nothing does) but then it does not update the block's
position and height
(again correctly as there's no selfNeedsLayout on the block).
The fix bails out of the fast path for table cells. It preserves the old
behavior of always triggering full layout on
padding change.
* LayoutTests/fast/table/blocks-in-inline-table-cell-height-expected.html:
Added.
* LayoutTests/fast/table/blocks-in-inline-table-cell-height.html: Added.
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutSimpleBlockContentInInline):
Canonical link: https://commits.webkit.org/312358@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications