mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 21:59:07 +00:00
LibWeb: Don't crash from clipping grid spans
This commit is contained in:
parent
b4e5afa8d5
commit
6862d33e7c
Notes:
github-actions[bot]
2024-11-10 23:58:03 +00:00
Author: https://github.com/Gingeh
Commit: 6862d33e7c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2262
5 changed files with 46 additions and 3 deletions
|
@ -1849,9 +1849,6 @@ CSSPixelRect GridFormattingContext::get_grid_area_rect(GridItem const& grid_item
|
|||
|
||||
auto resolved_span = grid_item.span(dimension) * 2;
|
||||
auto gap_adjusted_position = grid_item.gap_adjusted_position(dimension);
|
||||
if (gap_adjusted_position + resolved_span > tracks_and_gaps.size()) {
|
||||
resolved_span = tracks_and_gaps.size() - gap_adjusted_position;
|
||||
}
|
||||
|
||||
int start = gap_adjusted_position;
|
||||
int end = start + resolved_span;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue