Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: aa519424b949fb1773144da25fbf191375afa136
      
https://github.com/WebKit/WebKit/commit/aa519424b949fb1773144da25fbf191375afa136
  Author: Ahmad Saleem <[email protected]>
  Date:   2025-11-29 (Sat, 29 Nov 2025)

  Changed paths:
    A LayoutTests/fast/table/table-width-exceeding-max-width-expected.txt
    A LayoutTests/fast/table/table-width-exceeding-max-width.html
    A 
LayoutTests/fast/table/table-with-content-width-exceeding-max-width-expected.txt
    A LayoutTests/fast/table/table-with-content-width-exceeding-max-width.html
    M Source/WebCore/rendering/AutoTableLayout.cpp

  Log Message:
  -----------
  max-width do not work on tables
https://bugs.webkit.org/show_bug.cgi?id=12396
rdar://96554687

Reviewed by Alan Baradlay.

This aligns WebKit with Gecko / Firefox and Blink / Chromium.

Merge: 
https://chromium.googlesource.com/chromium/src.git/+/364480a952dc2eb710b26f82543e08bd4bac825b

The issue was that we would set the minimum logical width to
the 'width' but wouldn't apply the 'max-width' in this case.
Note that we shouldn't apply 'max-width' in all cases or else
we could end up having the content overflow its containing
table (which is not allowed per the specification).

This fix also address FIXME added by Blink by to ensure the
computed minimum preferred logical width never falls below
the intrinsic content width. Previously, the fixed table width
could override the content size, potentially violating layout
expectations and differing from other browsers.

* Source/WebCore/rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::applyPreferredLogicalWidthQuirks const):
* LayoutTests/fast/table/table-with-content-width-exceeding-max-width.html:
* LayoutTests/fast/table/table-width-exceeding-max-width.html:
* 
LayoutTests/fast/table/table-with-content-width-exceeding-max-width-expected.txt:
* LayoutTests/fast/table/table-width-exceeding-max-width-expected.txt:

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



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

Reply via email to