1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 22:48:11 +00:00

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
parent 47595b9ef0
commit 3b75b9ef1c
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>