1 <!-- Based on fast/css-grid-layout/grid-item-z-index-change-repaint.html -->
5 <link href=
"../../../fast/css-grid-layout/resources/grid.css" rel=
"stylesheet">
8 grid-template-rows:
100px;
9 grid-template-columns:
200px
200px;
10 width: -webkit-fit-content;
14 background-color: red;
17 background-color: green;
23 <script src=
"resources/paint-invalidation-test.js"></script>
25 window
.expectedPaintInvalidationObjects
= [
26 "LayoutBlockFlow DIV id='item1' class='sizedToGridArea green negativeZIndex'",
27 "LayoutBlockFlow DIV id='item2' class='sizedToGridArea green'",
29 function paintInvalidationTest()
31 document
.getElementById('item1').style
.zIndex
= 1;
32 document
.getElementById('item2').style
.zIndex
= 1;
35 window
.onload
= runPaintInvalidationTest
;
39 <div style=
"height: 100px">
40 <p>This test checks that grid items correctly repaint when 'z-index' changes.
</p>
41 <p>For this test to pass, there should be no red below.
</p>
45 <div id=
"item1" class=
"sizedToGridArea green negativeZIndex"></div>
46 <div class=
"sizedToGridArea red"></div>
50 <div id=
"item2" class=
"sizedToGridArea green"></div>
51 <div class=
"sizedToGridArea red"></div>