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

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/visibility-collapse-col-004-dynamic-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/visibility-collapse-rowcol-001-expected.txt
    M 
LayoutTests/platform/glib/tables/mozilla_expected_failures/other/test4-expected.txt
    M 
LayoutTests/platform/ios/tables/mozilla_expected_failures/other/test4-expected.txt
    M 
LayoutTests/platform/mac/tables/mozilla_expected_failures/other/test4-expected.txt
    M Source/WebCore/rendering/RenderTable.cpp
    M Source/WebCore/rendering/RenderTable.h

  Log Message:
  -----------
  border-spacing should not include collapsed columns in auto table layout
https://bugs.webkit.org/show_bug.cgi?id=308927
rdar://171468102

Reviewed by Alan Baradlay.

borderSpacingInRowDirection() used (numEffCols + 1) * hBorderSpacing,
counting all columns including those with visibility:collapse. This
inflated the table's preferred width and available width calculations,
making the table 2px too wide per collapsed column (one extra
border-spacing slot).

Move borderSpacingInRowDirection() out of the header into RenderTable.cpp
so it can access RenderTableCol, and subtract collapsed columns from the
count before computing total spacing.

* Source/WebCore/rendering/RenderTable.cpp:
(WebCore::RenderTable::borderSpacingInRowDirection const):
* Source/WebCore/rendering/RenderTable.h:
(WebCore::RenderTable::borderSpacingInRowDirection const): Deleted.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/visibility-collapse-col-004-dynamic-expected.txt:
 Progression
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/visibility-collapse-rowcol-001-expected.txt:
 Ditto

> Rebaselines:
* 
LayoutTests/platform/mac/tables/mozilla_expected_failures/other/test4-expected.txt:
* 
LayoutTests/platform/glib/tables/mozilla_expected_failures/other/test4-expected.txt:
* 
LayoutTests/platform/ios/tables/mozilla_expected_failures/other/test4-expected.txt:

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



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

Reply via email to