layout: Lay out collapsed table rows and columns, but don't paint them (#39027)

It's expected that script queries be able to interact with collapsed
table rows and columns, so this change starts laying them out. They
still do not affect table dimensions, nor are they painted.

This does not fix all interaction with collapsed rows and columns. For
instance, setting scroll offsets of contained scrolling nodes does not
work properly. It does fix the panic though, which is the most important
thing.


Testing: this change includes a new WPT crash test.
Fixes: #37421.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Martin Robinson 2025-09-01 05:58:36 -07:00 committed by GitHub
parent 236e28aeab
commit fc30a26005
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 59 additions and 8 deletions

View file

@ -5414,6 +5414,13 @@
{}
]
],
"table-collapsed-row-or-column-crash.html": [
"5a8bb7e5479e93b00d7d02731aa00a48a45269be",
[
null,
{}
]
],
"visibility-collapse-colspan-crash.html": [
"591fbd9a9941648f1456b41aeee1e23ed660a1ed",
[

View file

@ -0,0 +1,22 @@
<!DOCTYPE html>
<link rel="help" href="https://github.com/servo/servo/issues/37421">
<div style="display: table; visibility: collapse">
<div id="scroller" style="overflow: scroll"></div>
</div>
<table>
<colgroup>
<col style="background: green; visibility: collapse">
</colgroup>
<tr>
<td><div id="scroller2" style="overflow: scroll"></div></td>
</tr>
</table>
<script>
scroller.scrollTo();
scroller2.scrollTo();
</script>