LibWeb: Reset auto_placement_cursor_x after adding new column in GFC

We need to start looking from the beginning of current row if adding
new implicit column track made enough space to accomodate spanning item

This fixes placement for spanning grid items when `grid-auto-flow` is
specified to `column`.
This commit is contained in:
Aliaksandr Kalenik 2023-08-29 11:49:08 +02:00 committed by Andreas Kling
commit 2495302991
Notes: sideshowbarker 2024-07-16 20:39:14 +09:00
3 changed files with 26 additions and 0 deletions

View file

@ -606,6 +606,7 @@ void GridFormattingContext::place_item_with_no_declared_position(Box const& chil
auto_placement_cursor_y++;
} else {
m_occupation_grid.set_max_column_index(auto_placement_cursor_x);
auto_placement_cursor_x = 0;
auto_placement_cursor_y = m_occupation_grid.min_row_index();
}
}