mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:47:34 +00:00
LibWeb: Skip non-spanning items sizing if there are no such items
Otherwise base_size and growth_limit for tracks that do not have any spanning items will be overriden with wrong values.
This commit is contained in:
parent
95d17ee875
commit
5f2264a2bd
3 changed files with 28 additions and 0 deletions
6
Tests/LibWeb/Layout/expected/grid/column-auto-auto.txt
Normal file
6
Tests/LibWeb/Layout/expected/grid/column-auto-auto.txt
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
||||||
|
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
|
||||||
|
BlockContainer <body> at (8,8) content-size 784x100 children: not-inline
|
||||||
|
Box <div.grid> at (8,8) content-size 100x100 [GFC] children: not-inline
|
||||||
|
BlockContainer <div.test> at (8,8) content-size 500x100 [BFC] children: not-inline
|
||||||
|
BlockContainer <div.big-child> at (8,8) content-size 500x100 children: not-inline
|
17
Tests/LibWeb/Layout/input/grid/column-auto-auto.html
Normal file
17
Tests/LibWeb/Layout/input/grid/column-auto-auto.html
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<style>
|
||||||
|
.grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: auto auto;
|
||||||
|
height: 100px;
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
.test {
|
||||||
|
grid-column: 1 / span 2;
|
||||||
|
grid-row: 1;
|
||||||
|
background: red;
|
||||||
|
}
|
||||||
|
.big-child {
|
||||||
|
width: 500px;
|
||||||
|
height: 100px;
|
||||||
|
}
|
||||||
|
</style><div class="grid"><div class="test"><div class="big-child"></div></div></div>
|
|
@ -728,6 +728,11 @@ void GridFormattingContext::resolve_intrinsic_track_sizes(AvailableSpace const&
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (grid_items_of_track.size() == 0) {
|
||||||
|
++index;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (!track.min_track_sizing_function.is_intrinsic_track_sizing() && !track.max_track_sizing_function.is_intrinsic_track_sizing()) {
|
if (!track.min_track_sizing_function.is_intrinsic_track_sizing() && !track.max_track_sizing_function.is_intrinsic_track_sizing()) {
|
||||||
++index;
|
++index;
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue