mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 05:25:32 +03:00
LibWeb: Use auto minimimum size while resolving flexible tracks in GFC
This commit is contained in:
parent
5f2264a2bd
commit
c61bb1706f
Notes:
sideshowbarker
2024-07-17 02:56:25 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/c61bb1706f Pull-request: https://github.com/SerenityOS/serenity/pull/18872
6
Tests/LibWeb/Layout/expected/grid/column-1fr-1fr.txt
Normal file
6
Tests/LibWeb/Layout/expected/grid/column-1fr-1fr.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 100x100 [BFC] children: not-inline
|
||||
BlockContainer <div.big-child> at (8,8) content-size 500x100 children: not-inline
|
17
Tests/LibWeb/Layout/input/grid/column-1fr-1fr.html
Normal file
17
Tests/LibWeb/Layout/input/grid/column-1fr-1fr.html
Normal file
@ -0,0 +1,17 @@
|
||||
<style>
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
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>
|
@ -996,7 +996,7 @@ void GridFormattingContext::increase_sizes_to_accommodate_spanning_items_crossin
|
||||
if (track.min_track_sizing_function.is_flexible_length())
|
||||
spanned_flexible_tracks.append(track);
|
||||
}
|
||||
auto item_minimum_contribution = calculate_limited_min_content_contribution(item, dimension);
|
||||
auto item_minimum_contribution = automatic_minimum_size(item, dimension);
|
||||
distribute_extra_space_across_spanned_tracks(item_minimum_contribution, spanned_flexible_tracks);
|
||||
|
||||
for (auto& track : spanned_tracks) {
|
||||
|
Loading…
Reference in New Issue
Block a user