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

LibWeb: Fix bug in placing row-constrained grid items

For row-constrained items (with a row position defined in the CSS),
should be checking for an available position in that row and not in
another..
This commit is contained in:
martinfalisse 2022-09-24 17:22:51 +02:00 committed by Andreas Kling
parent a528ea71d1
commit f3bf01f265

View file

@ -303,7 +303,7 @@ void GridFormattingContext::run(Box const& box, LayoutMode, AvailableSpace const
auto column_span = child_box.computed_values().grid_column_start().is_span() ? child_box.computed_values().grid_column_start().raw_value() : 1;
bool found_available_column = false;
for (int column_index = column_start; column_index < (int)occupation_grid[0].size(); column_index++) {
if (!occupation_grid[0][column_index]) {
if (!occupation_grid[row_start][column_index]) {
found_available_column = true;
column_start = column_index;
break;