Skip to content

Count the columns of a table by the colspans of its cells - #300

Merged
eXpl0it3r merged 1 commit into
masterfrom
fix/table-colspan-column-count
Nov 23, 2026
Merged

eXpl0it3r merged 1 commit into
masterfrom
fix/table-colspan-column-count

Conversation

@eXpl0it3r

@eXpl0it3r eXpl0it3r commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Description

The column count of a table without col elements was the highest number of cells in a row, so a row whose colspans add up to more columns indexed past the column widths and the whole table layout failed with an IndexOutOfRangeException. The count is the sum of the colspans now, as in HTML 4.9.12.1.

This also fixes gaps in two manifests:

  • Spec/html.yml: the tests Colspan_AddsColumns and CellSpanningPastTheOtherRows_IsLaidOut lose their [Ignore]
  • Spec/css-tables-3.yml: colspan adds columns in 3.3.1, and a colspan past the column count no longer breaks the layout in 3.3.2, only the track merging remains a gap there

The table from #47 with this PR, with "1 187" under the second "Test":

image

Note that "8 570" wrapping is a separate issue, already tracked in Spec/css-tables-3.yml: columns that only spanning cells cover don't get enough of the spanning cell's width.

Closes #47

How to test this PR?

CI should succeed, the image baselines are unchanged.

@eXpl0it3r
eXpl0it3r force-pushed the fix/table-colspan-column-count branch from 5aeb277 to 9814efd Compare November 23, 2026 15:58
@eXpl0it3r
eXpl0it3r merged commit 05d1969 into master Nov 23, 2026
16 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Corrupted colspan makes columns appear in top left corner of document.

1 participant