OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <script src="../repaint/resources/text-based-repaint.js"></script> | 3 <script src="../repaint/resources/text-based-repaint.js"></script> |
4 <script> | 4 <script> |
5 if (window.testRunner) | 5 if (window.testRunner) |
6 testRunner.overridePreference("WebKitCSSGridLayoutEnabled", 1); | 6 testRunner.overridePreference("WebKitCSSGridLayoutEnabled", 1); |
7 | 7 |
8 function repaintTest() | 8 function repaintTest() |
9 { | 9 { |
10 var gridItem = document.getElementsByClassName("sizedToGridArea")[0]; | 10 var gridItem = document.getElementsByClassName("sizedToGridArea")[0]; |
11 gridItem.style.gridRow = "2"; | 11 gridItem.style.gridRow = "2"; |
12 } | 12 } |
13 window.addEventListener("load", runRepaintTest, false); | 13 window.addEventListener("load", runRepaintTest, false); |
14 </script> | 14 </script> |
15 <link href="resources/grid.css" rel="stylesheet"> | 15 <link href="resources/grid.css" rel="stylesheet"> |
16 <style> | 16 <style> |
17 body { | 17 body { |
18 font: 10px/1 Ahem; | 18 font: 10px/1 Ahem; |
19 } | 19 } |
20 | 20 |
21 .grid { | 21 .grid { |
22 grid-definition-rows: 50px 100px; | 22 grid-template-rows: 50px 100px; |
23 grid-definition-columns: 100px 50px; | 23 grid-template-columns: 100px 50px; |
24 /* Make the grid shrink to fit. */ | 24 /* Make the grid shrink to fit. */ |
25 position: absolute; | 25 position: absolute; |
26 } | 26 } |
27 .sizedToGridArea { | 27 .sizedToGridArea { |
28 background-color: purple; | 28 background-color: purple; |
29 } | 29 } |
30 </style> | 30 </style> |
31 <body> | 31 <body> |
32 <div>This test checks that changing the grid-row on a grid item properly repaint
. The final grid item should be 100px * 100px. There should be no trace of the g
rid item at the old position.</div> | 32 <div>This test checks that changing the grid-row on a grid item properly repaint
. The final grid item should be 100px * 100px. There should be no trace of the g
rid item at the old position.</div> |
33 <div class="grid"> | 33 <div class="grid"> |
34 <div class="sizedToGridArea"></div> | 34 <div class="sizedToGridArea"></div> |
35 </div> | 35 </div> |
36 </body> | 36 </body> |
37 </html> | 37 </html> |
OLD | NEW |