OLD | NEW |
| (Empty) |
1 <!-- Based on fast/css-grid-layout/grid-item-z-index-change-repaint.html --> | |
2 <!DOCTYPE html> | |
3 <html> | |
4 <head> | |
5 <link href="../../../fast/css-grid-layout/resources/grid.css" rel="stylesheet"> | |
6 <style> | |
7 .grid { | |
8 grid-template-rows: 100px; | |
9 grid-template-columns: 200px 200px; | |
10 width: -webkit-fit-content; | |
11 margin-top: 10px; | |
12 } | |
13 .red { | |
14 background-color: red; | |
15 } | |
16 .green { | |
17 background-color: green; | |
18 } | |
19 .negativeZIndex { | |
20 z-index: -1; | |
21 } | |
22 </style> | |
23 <script src="resources/paint-invalidation-test.js"></script> | |
24 <script> | |
25 function paintInvalidationTest() | |
26 { | |
27 document.getElementById('item1').style.zIndex = 1; | |
28 document.getElementById('item2').style.zIndex = 1; | |
29 } | |
30 | |
31 window.onload = runPaintInvalidationTest; | |
32 </script> | |
33 </head> | |
34 <body> | |
35 <div style="height: 100px"> | |
36 <p>This test checks that grid items correctly repaint when 'z-index' changes
.</p> | |
37 <p>For this test to pass, there should be no red below.</p> | |
38 </div> | |
39 | |
40 <div class="grid"> | |
41 <div id="item1" class="sizedToGridArea green negativeZIndex"></div> | |
42 <div class="sizedToGridArea red"></div> | |
43 </div> | |
44 | |
45 <div class="grid"> | |
46 <div id="item2" class="sizedToGridArea green"></div> | |
47 <div class="sizedToGridArea red"></div> | |
48 </div> | |
49 | |
50 </body> | |
51 </html> | |
OLD | NEW |