[webkit-changes] [WebKit/WebKit] 6079da: stretches a table and causes layout issues

Thu, 22 Jan 2026 21:29:12 -0800

  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6079da9e03f1a8defab2b7df4704dc04d3708291
      
https://github.com/WebKit/WebKit/commit/6079da9e03f1a8defab2b7df4704dc04d3708291
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-01-22 (Thu, 22 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:
  -----------
  <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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to