Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 50a0471ae5579b0a0f63cf34a294e0381bf2775b
https://github.com/WebKit/WebKit/commit/50a0471ae5579b0a0f63cf34a294e0381bf2775b
Author: Ahmad Saleem <[email protected]>
Date: 2026-01-29 (Thu, 29 Jan 2026)
Changed paths:
M LayoutTests/TestExpectations
M
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/height-distribution/extra-height-given-to-all-row-groups-003-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/tentative/table-height-redistribution-expected.txt
M Source/WebCore/rendering/RenderTable.cpp
M Source/WebCore/rendering/RenderTableSection.cpp
Log Message:
-----------
Distribute table height to tbody sections instead of first section only
https://bugs.webkit.org/show_bug.cgi?id=306498
rdar://169154677
Reviewed by Alan Baradlay.
When a table has a specified height greater than its content, the extra
height should be distributed among tbody sections, not thead or tfoot.
Previously, all extra height went to the first body section only, which
caused incorrect rendering when tables had multiple tbody elements or
when thead/tfoot were present.
This change implements proper height distribution:
1. Extra height is distributed only to tbody sections, allowing thead
and tfoot to maintain their intrinsic content-based heights
2. When multiple tbody sections exist, height is distributed either
proportionally based on their intrinsic heights, or equally if all
are empty
3. Empty sections can now receive height distribution (removed early
return that prevented this)
* Source/WebCore/rendering/RenderTable.cpp:
(WebCore::RenderTable::distributeExtraLogicalHeight):
* Source/WebCore/rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::distributeExtraLogicalHeightToRows):
> Progressions:
* LayoutTests/TestExpectations:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/height-distribution/extra-height-given-to-all-row-groups-003-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/tentative/table-height-redistribution-expected.txt:
Canonical link: https://commits.webkit.org/306457@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications