mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:17:44 +00:00
LibWeb: Fix division by zero in table columns width distribution
If total max columns width (grid_max) is zero then available width should be divided equally between columns. Previously there was division by zero: `column.max_width / grid_max`.
This commit is contained in:
parent
77a5f40736
commit
9fd51a59ff
3 changed files with 33 additions and 2 deletions
15
Tests/LibWeb/Layout/input/table/zero-columns-gridmax.html
Normal file
15
Tests/LibWeb/Layout/input/table/zero-columns-gridmax.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
<style>
|
||||
.table {
|
||||
display: table;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.row {
|
||||
display: table-row;
|
||||
}
|
||||
|
||||
.cell {
|
||||
display: table-cell;
|
||||
}
|
||||
</style>
|
||||
<div class="table"><div class="row"><div class="cell"></div></div></div>
|
Loading…
Add table
Add a link
Reference in a new issue