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

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/margin-padding-clear/margin-right-applies-to-015-expected.xht
    A 
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/margin-padding-clear/margin-right-applies-to-015.xht
    A 
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/margin-padding-clear/w3c-import.log
    M 
LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/table-client-props-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/table-offset-props-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/table-scroll-props-expected.txt
    M 
LayoutTests/platform/glib/tables/mozilla_expected_failures/core/captions1-expected.txt
    M 
LayoutTests/platform/glib/tables/mozilla_expected_failures/core/captions2-expected.txt
    M 
LayoutTests/platform/ios/tables/mozilla_expected_failures/core/captions1-expected.txt
    M 
LayoutTests/platform/ios/tables/mozilla_expected_failures/core/captions2-expected.txt
    M 
LayoutTests/platform/mac/tables/mozilla_expected_failures/core/captions1-expected.txt
    M 
LayoutTests/platform/mac/tables/mozilla_expected_failures/core/captions2-expected.txt
    M Source/WebCore/rendering/RenderTable.cpp

  Log Message:
  -----------
  Ensure margins in table captions contributes to minimum table width
https://bugs.webkit.org/show_bug.cgi?id=110063
rdar://120990942

Reviewed by Alan Baradlay.

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

Captions with fixed horizontal margins (margin-left/margin-right) were not
being considered when computing the table's preferred logical width. This
caused tables to be narrower than needed to accommodate captions with margins,
resulting in incorrect layout.

The fix adds fixed caption margins to the minimum preferred logical width
calculation. Only fixed margins are included during intrinsic sizing, as
percentage margins depend on the containing block width which hasn't been
determined yet at this stage.

* Source/WebCore/rendering/RenderTable.cpp:
(WebCore::RenderTable::computePreferredLogicalWidths):

> Progression:
* 
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/margin-padding-clear/margin-right-applies-to-015-expected.xht:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/margin-padding-clear/margin-right-applies-to-015.xht:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/margin-padding-clear/w3c-import.log:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/table-client-props-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/table-offset-props-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/table-scroll-props-expected.txt:

> Rebaseline:
* 
LayoutTests/platform/mac/tables/mozilla_expected_failures/core/captions1-expected.txt:
* 
LayoutTests/platform/mac/tables/mozilla_expected_failures/core/captions2-expected.txt:
* 
LayoutTests/platform/glib/tables/mozilla_expected_failures/core/captions1-expected.txt:
* 
LayoutTests/platform/glib/tables/mozilla_expected_failures/core/captions2-expected.txt:
* 
LayoutTests/platform/ios/tables/mozilla_expected_failures/core/captions1-expected.txt:
* 
LayoutTests/platform/ios/tables/mozilla_expected_failures/core/captions2-expected.txt:

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



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

Reply via email to