Branch: refs/heads/webkitglib/2.52
Home: https://github.com/WebKit/WebKit
Commit: 2149194e87a9d19c0d59d64763a373bc8f288237
https://github.com/WebKit/WebKit/commit/2149194e87a9d19c0d59d64763a373bc8f288237
Author: Ahmad Saleem <[email protected]>
Date: 2026-01-27 (Tue, 27 Jan 2026)
Changed paths:
A LayoutTests/fast/table/marquee-block-child-table-width-expected.txt
A LayoutTests/fast/table/marquee-block-child-table-width.html
M Source/WebCore/rendering/RenderBlockFlow.cpp
Log Message:
-----------
Cherry-pick 306059@main (6079da9e03f1).
https://bugs.webkit.org/show_bug.cgi?id=41562
<marquee> stretches a table and causes layout issues
https://bugs.webkit.org/show_bug.cgi?id=41562
rdar://problem/99826593
Reviewed by Alan Baradlay.
This patch aligns WebKit with Gecko / Firefox and Blink / Chromium.
The special case in RenderBlockFlow::computeIntrinsicLogicalWidths() that
sets minLogicalWidth to 0 for horizontal marquees was incorrectly gated
behind a childrenInline() check. This caused marquees containing block
children (e.g., a <div>) to use their content's preferred width instead
of being treated as having no minimum width.
Horizontal marquees scroll their content and should not constrain their
container's width, regardless of whether their children are inline or
block elements. The autoWrap() check already ensures this code only runs
for marquees (which set white-space: nowrap).
This fixes tables with fixed widths being incorrectly expanded when they
contain marquees with block children.
While here, we also wrapped the logic into
`resetMinimumWidthForMarqueeIfApplicable`
lambda (thanks to Alan).
Test: fast/table/marquee-block-child-table-width.html
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::computeIntrinsicLogicalWidths const):
Remove the childrenInline() check from the horizontal marquee special
case, and update the comment to reflect that this applies to all
horizontal marquees and wrap the logic in lambda.
Canonical link: https://commits.webkit.org/306059@main
Canonical link: https://commits.webkit.org/305877.24@webkitglib/2.52
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications