Skip to content

Border collapse problem with rowspan/colspan cells#57402

Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
karlcow:5515-border-collapse-cells
Jan 30, 2026
Merged

Border collapse problem with rowspan/colspan cells#57402
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
karlcow:5515-border-collapse-cells

Conversation

@karlcow
Copy link
Copy Markdown
Member

@karlcow karlcow commented Jan 28, 2026

c9af451

Border collapse problem with rowspan/colspan cells
https://bugs.webkit.org/show_bug.cgi?id=5515
rdar://94163960

Reviewed by Alan Baradlay.

Currently for a table of 2 columns and 4 rows.
* the first column has a rowspan = 3
  (so 2 cells with one covering the first 3 rows)
* the second column has 4 cells on 4 rows
When specifiying a different bottom border color for each first 3 rows,
WebKit is adopting the color of the first cell defined in the second
colum for the bottom color of the rowspanned cell instead of the color
of the third row like Gecko and Blink do.

This patch is fixing and only this. It doesn't fix the more general
issue for vertical border shared in between the rowspanned cell and the
second column cells.
This will need to be fixed in https://webkit.org/b/20260 as it requires
a larger architectural change on border segmenting.

This didn't have WPT tests before, this is adding one covering this
behavior.

Tests: imported/w3c/web-platform-tests/css/css-tables/rowspan-cell-border-after-color-ref.html
       imported/w3c/web-platform-tests/css/css-tables/rowspan-cell-border-after-color.html

* LayoutTests/imported/w3c/web-platform-tests/css/css-tables/rowspan-cell-border-after-color-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-tables/rowspan-cell-border-after-color-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-tables/rowspan-cell-border-after-color.html: Added.
* Source/WebCore/rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::computeCollapsedAfterBorder const):

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

ef1a9cd

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows Apple Internal
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe 🛠 win ✅ 🛠 ios-apple
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 🧪 win-tests ✅ 🛠 mac-apple
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe ✅ 🛠 vision-apple
🧪 ios-wk2-wpt ✅ 🧪 api-mac-debug ✅ 🛠 wpe-libwebrtc
✅ 🧪 api-ios ✅ 🧪 mac-wk1 ✅ 🛠 gtk
✅ 🛠 vision ✅ 🧪 mac-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 api-gtk
✅ 🧪 vision-wk2 ✅ 🧪 mac-wk2-stress 🛠 playstation
✅ 🛠 🧪 unsafe-merge ✅ 🛠 tv 🧪 mac-intel-wk2
✅ 🛠 tv-sim 🛠 mac-safer-cpp
✅ 🛠 watch
✅ 🛠 watch-sim

@karlcow karlcow self-assigned this Jan 28, 2026
@karlcow karlcow added the Tables For bugs specific to tables (both the DOM and rendering issues). label Jan 28, 2026
@karlcow karlcow requested a review from alanbaradlay January 28, 2026 12:59
@karlcow
Copy link
Copy Markdown
Member Author

karlcow commented Jan 28, 2026

If no WPT tests is being progressed by this, I will amend the patch to add one.

@karlcow karlcow force-pushed the 5515-border-collapse-cells branch from e4ede84 to c910942 Compare January 28, 2026 23:52
@karlcow
Copy link
Copy Markdown
Member Author

karlcow commented Jan 28, 2026

If no WPT tests is being progressed by this, I will amend the patch to add one.

  • I addressed comments by @annevk
  • I added a WPT test case to cover this.
  • And WebKit is matching Gecko and Blink.

Review time for @alanbaradlay 🙏

@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jan 29, 2026
@karlcow
Copy link
Copy Markdown
Member Author

karlcow commented Jan 29, 2026

Maybe I should have put the expected above. 🤦

@karlcow karlcow removed the merging-blocked Applied to prevent a change from being merged label Jan 29, 2026
@karlcow karlcow force-pushed the 5515-border-collapse-cells branch from c910942 to e089c10 Compare January 29, 2026 02:00
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jan 29, 2026
@karlcow karlcow removed the merging-blocked Applied to prevent a change from being merged label Jan 29, 2026
@karlcow karlcow force-pushed the 5515-border-collapse-cells branch from e089c10 to 375f819 Compare January 29, 2026 05:35
Copy link
Copy Markdown
Contributor

@alanbaradlay alanbaradlay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should really stop committing tree dumps and use ref tests instead.(I had to rebaseline close to 10K the other day and it was not fun)

@karlcow karlcow force-pushed the 5515-border-collapse-cells branch from 375f819 to ef1a9cd Compare January 30, 2026 03:26
@karlcow
Copy link
Copy Markdown
Member Author

karlcow commented Jan 30, 2026

we should really stop committing tree dumps and use ref tests instead.(I had to rebaseline close to 10K the other day and it was not fun)

I was missing an -expected.html I removed the tree dumps and added the expected. Thanks for spotting it.

@karlcow
Copy link
Copy Markdown
Member Author

karlcow commented Jan 30, 2026

TODO: export the test to WPT.

@karlcow karlcow added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jan 30, 2026
https://bugs.webkit.org/show_bug.cgi?id=5515
rdar://94163960

Reviewed by Alan Baradlay.

Currently for a table of 2 columns and 4 rows.
* the first column has a rowspan = 3
  (so 2 cells with one covering the first 3 rows)
* the second column has 4 cells on 4 rows
When specifiying a different bottom border color for each first 3 rows,
WebKit is adopting the color of the first cell defined in the second
colum for the bottom color of the rowspanned cell instead of the color
of the third row like Gecko and Blink do.

This patch is fixing and only this. It doesn't fix the more general
issue for vertical border shared in between the rowspanned cell and the
second column cells.
This will need to be fixed in https://webkit.org/b/20260 as it requires
a larger architectural change on border segmenting.

This didn't have WPT tests before, this is adding one covering this
behavior.

Tests: imported/w3c/web-platform-tests/css/css-tables/rowspan-cell-border-after-color-ref.html
       imported/w3c/web-platform-tests/css/css-tables/rowspan-cell-border-after-color.html

* LayoutTests/imported/w3c/web-platform-tests/css/css-tables/rowspan-cell-border-after-color-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-tables/rowspan-cell-border-after-color-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-tables/rowspan-cell-border-after-color.html: Added.
* Source/WebCore/rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::computeCollapsedAfterBorder const):

Canonical link: https://commits.webkit.org/306471@main
@webkit-commit-queue webkit-commit-queue force-pushed the 5515-border-collapse-cells branch from ef1a9cd to c9af451 Compare January 30, 2026 05:26
@webkit-commit-queue
Copy link
Copy Markdown
Collaborator

Committed 306471@main (c9af451): https://commits.webkit.org/306471@main

Reviewed commits have been landed. Closing PR #57402 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit c9af451 into WebKit:main Jan 30, 2026
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jan 30, 2026
@karlcow
Copy link
Copy Markdown
Member Author

karlcow commented Jan 30, 2026

I also opened w3c/csswg-drafts#13417
because it is not really specified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tables For bugs specific to tables (both the DOM and rendering issues).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants