-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GridFragmentation] Store placement data on NGGridLayoutData
During fragmentation, we query the `NGGridLayoutData` from the `NGGridBreakTokenData`, which includes track data. However, grid layout has a strong dependency on item placement in addition to track data. This was causing a crash in fragmentation, when we query the track data from `NGGridLayoutData` (off of `NGGridBreakTokenData`), but not the `GridItemData` placement or range indices. When these don't match up, a crash was happening in `GridItemData::ComputeSetIndices` during printing. This change adds several more placement-related vectors on `NGGridLayoutData` off of `NGGridBreakTokenData` so that layout can proceed without crashing during fragmentation. (cherry picked from commit 1c88f35) Bug: 1399336 Change-Id: I4a19afd4718089e27456285b2955ebd7094212b8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4109928 Commit-Queue: Kurt Catti-Schmidt <kschmi@microsoft.com> Reviewed-by: Alison Maher <almaher@microsoft.com> Cr-Original-Commit-Position: refs/heads/main@{#1084104} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4126321 Commit-Queue: Ethan Jimenez <ethavar@microsoft.com> Cr-Commit-Position: refs/branch-heads/5481@{#102} Cr-Branched-From: 130f3e4-refs/heads/main@{#1084008}
- Loading branch information
1 parent
52d399a
commit c5f7920
Showing
3 changed files
with
70 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
third_party/blink/web_tests/external/wpt/css/css-break/grid/grid-item-placement-crash.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1399336"> | ||
<body> | ||
<div style="width: 2000px; height: 2000px;"> | ||
<div style="columns: 2; border: 1px solid black;"> | ||
<div style="height: 50px; width: 550px; float: right;">Text</div> | ||
<div style="display: grid; grid-template-columns: repeat(auto-fill,250px);"> | ||
<div style="width: 250px;"> | ||
<div style="height: 550px;"></div> | ||
</div> | ||
<div style="width: 250px;"> | ||
<div style="height: 550px;"></div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</body> |