Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick 252432.1044@safari-7614-branch (22cbd76). rdar://104559684
Invalidate grid placement when style changes to subgrid rdar://104559684 Reviewed by Jonathan Bedard and Matt Woodrow. Before this change, we didn't invalidate parent and child placement info, leading to a OOB read into the parent tracks information when copying that to the child. This change fixes that. * LayoutTests/fast/css-grid-layout/grid-stylechange-crash-expected.txt: Added. * LayoutTests/fast/css-grid-layout/grid-stylechange-crash.html: Added. * Source/WebCore/rendering/RenderGrid.cpp: (WebCore::RenderGrid::styleDidChange): (WebCore::RenderGrid::subgridDidChange const): (WebCore::RenderGrid::dirtyGrid): * Source/WebCore/rendering/RenderGrid.h: * Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp: (WebCore::GridTrackSizingAlgorithm::copyUsedTrackSizesForSubgrid): Canonical link: https://commits.webkit.org/252432.1044@safari-7614-branch
- Loading branch information
Showing
5 changed files
with
40 additions
and
4 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
LayoutTests/fast/css-grid-layout/grid-stylechange-crash-expected.txt
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,2 @@ | ||
PASS if no crash. | ||
|
17 changes: 17 additions & 0 deletions
17
LayoutTests/fast/css-grid-layout/grid-stylechange-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 @@ | ||
<script> | ||
function test() { | ||
if(window.testRunner) | ||
testRunner.dumpAsText() | ||
document.body.offsetTop; | ||
x.style.gridTemplateRows = 'subgrid'; | ||
}; | ||
</script> | ||
<body onload="test()"> | ||
<div style="display:grid"> | ||
<div id="x" style="display:grid"> | ||
PASS if no crash. | ||
<div> | ||
</div> | ||
</div> | ||
</div> | ||
</body> |
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
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