Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 34394ef2a45b9ea5b1a721ae9f6e9defe7abb342
      
https://github.com/WebKit/WebKit/commit/34394ef2a45b9ea5b1a721ae9f6e9defe7abb342
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-03-09 (Mon, 09 Mar 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/width-distribution/td-max-width-auto-layout-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/width-distribution/td-max-width-auto-layout.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/width-distribution/td-min-width-auto-layout-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/width-distribution/td-min-width-auto-layout.html
    M Source/WebCore/rendering/AutoTableLayout.cpp

  Log Message:
  -----------
  auto table layout doesn't honor "max-width" on table cells, when distributing 
width between them
https://bugs.webkit.org/show_bug.cgi?id=144338
rdar://171459245

Reviewed by Alan Baradlay.

In AutoTableLayout::recalcColumn(), when a cell has an explicit CSS width,
the value is stored into columnLayout.logicalWidth without consulting the
cell's max-width. This causes max-width to be ignored during fixed-width
column distribution in layout().

Clamp the resolved logicalWidth by the cell's CSS max-width right after
it is computed, so the clamped value flows into columnLayout.logicalWidth
and is respected during width distribution.

Test: 
imported/w3c/web-platform-tests/css/css-tables/width-distribution/td-max-width-auto-layout.html
      
imported/w3c/web-platform-tests/css/css-tables/width-distribution/td-min-width-auto-layout.html

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/width-distribution/td-max-width-auto-layout-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/width-distribution/td-max-width-auto-layout.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/width-distribution/td-min-width-auto-layout-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/width-distribution/td-min-width-auto-layout.html:
 Added.
* Source/WebCore/rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::recalcColumn):

Canonical link: https://commits.webkit.org/308934@main



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

Reply via email to