Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3ea149a5173afeffcbc8a96e7f28b977fe6868a5
https://github.com/WebKit/WebKit/commit/3ea149a5173afeffcbc8a96e7f28b977fe6868a5
Author: Ahmad Saleem <[email protected]>
Date: 2026-01-21 (Wed, 21 Jan 2026)
Changed paths:
M LayoutTests/TestExpectations
M
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/visibility-collapse-col-001-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/visibility-collapse-col-002-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/visibility-collapse-col-003-expected.txt
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-col-005-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/visibility-collapse-colspan-002-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/visibility-collapse-rowcol-001-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/visibility-collapse-rowcol-002-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/AutoTableLayout.cpp
Log Message:
-----------
Fix table layout to properly handle visibility:collapse on columns
https://bugs.webkit.org/show_bug.cgi?id=305905
rdar://168556786
Reviewed by Alan Baradlay.
This patch aligns WebKit with Gecko / Firefox and Blink / Chromium.
Columns with visibility:collapse should not contribute to table width
calculations. This patch modifies AutoTableLayout to:
1. Skip collapsed columns in recalcColumn() by setting their min/max
widths to 0 early.
2. Skip collapsed columns throughout layout() when distributing
available width to columns.
3. Skip adding border-spacing after collapsed columns when calculating
column positions.
Previously, collapsed columns were treated as normal columns and
received width allocation, causing tables to be wider than expected.
* LayoutTests/TestExpectations:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/visibility-collapse-col-001-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/visibility-collapse-col-002-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/visibility-collapse-col-003-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/visibility-collapse-col-004-dynamic-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/visibility-collapse-col-005-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/visibility-collapse-colspan-002-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/visibility-collapse-rowcol-001-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/visibility-collapse-rowcol-002-expected.txt:
*
LayoutTests/platform/glib/tables/mozilla_expected_failures/other/test4-expected.txt:
*
LayoutTests/platform/ios/tables/mozilla_expected_failures/other/test4-expected.txt:
*
LayoutTests/platform/mac/tables/mozilla_expected_failures/other/test4-expected.txt:
* Source/WebCore/rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::recalcColumn):
(WebCore::AutoTableLayout::layout):
Canonical link: https://commits.webkit.org/305997@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications