mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
Implement the `dense` keyword for `grid-auto-flow` so auto-placed items backfill earlier gaps in the grid. The sparse/dense cursor logic is now centralized in `place_grid_items()` step 4: dense resets the cursor to the grid start before each search, while sparse keeps advancing forward. Also fix a pre-existing bug where `find_unoccupied_place()` and several placement helpers only checked if a single cell was unoccupied, ignoring multi-cell spans. Add `OccupationGrid::is_area_occupied()` and use it throughout to correctly verify the entire rectangular area is available.