1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:37:34 +00:00

LibWeb: Remove hardcoded span = 2 while sizing spanning items in GFC

This commit is contained in:
Aliaksandr Kalenik 2023-08-04 12:24:12 +02:00 committed by Andreas Kling
parent a6e08e85d2
commit 0019b901a0
3 changed files with 39 additions and 3 deletions

View file

@ -754,9 +754,8 @@ void GridFormattingContext::resolve_intrinsic_track_sizes(AvailableSpace const&
size_t max_item_span = 1;
for (auto& item : m_grid_items)
max_item_span = max(item.span(dimension), max_item_span);
for (size_t span = 2; span <= max_item_span; span++) {
increase_sizes_to_accommodate_spanning_items_crossing_content_sized_tracks(available_space, dimension, 2);
}
for (size_t span = 2; span <= max_item_span; span++)
increase_sizes_to_accommodate_spanning_items_crossing_content_sized_tracks(available_space, dimension, span);
// 4. Increase sizes to accommodate spanning items crossing flexible tracks: Next, repeat the previous
// step instead considering (together, rather than grouped by span size) all items that do span a