Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cc3ce1dc902096ff1c91b533d976c792d5db67fb
      
https://github.com/WebKit/WebKit/commit/cc3ce1dc902096ff1c91b533d976c792d5db67fb
  Author: Karl Dubost <[email protected]>
  Date:   2026-03-12 (Thu, 12 Mar 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/tables/table-rowspan-height-distribution-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/tables/table-rowspan-height-distribution.html
    M Source/WebCore/rendering/RenderTableSection.cpp

  Log Message:
  -----------
  The height of table cells with a cell next to them has rowspan are not 
computed as expected
https://bugs.webkit.org/show_bug.cgi?id=21397
rdar://3209126

Reviewed by Darin Adler.

When a table cell has a rowspan exceeding the actual number of <tr> rows,
RenderTableSection::addCell() creates phantom grid rows (no rowRenderer).
These phantom rows were incorrectly counted as auto rows in
distributeExtraLogicalHeightToRows() and received a share of extra table
height in distributeExtraLogicalHeightToAutoRows(), causing non-rowspan
cells to render shorter than the rowspan cell. Firefox and Chrome already
handle this correctly.

The fix adds a rowRenderer check when counting and distributing extra
height to auto rows, so phantom rows are skipped entirely.

Test: 
imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/tables/table-rowspan-height-distribution.html

* 
LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/tables/table-rowspan-height-distribution-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/tables/table-rowspan-height-distribution.html:
 Added.
* Source/WebCore/rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::distributeExtraLogicalHeightToAutoRows):
(WebCore::RenderTableSection::distributeExtraLogicalHeightToRows):

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



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

Reply via email to