LibWeb: Avoid division by zero when computing table measures

For malformed tables which only have cells with span greater than 1, the
content sizes for row and column aren't initialized to non-zero values.
Avoid undefined behavior in such cases, which sometimes show up on
Wikipedia.
This commit is contained in:
Andi Gallo 2023-07-27 00:43:26 +00:00 committed by Andreas Kling
commit 3b75b9ef1c
Notes: sideshowbarker 2024-07-18 03:20:18 +09:00
3 changed files with 39 additions and 4 deletions

View file

@ -0,0 +1,7 @@
<table>
<tbody>
<tr>
<td colspan="2">A</td>
</tr>
</tbody>
</table>