OLD | NEW |
| 1 <!-- Based on fast/css-grid-layout/grid-element-change-columns-repaint.html --> |
1 <!DOCTYPE html> | 2 <!DOCTYPE html> |
2 <html> | 3 <html> |
3 <script src="../repaint/resources/text-based-repaint.js"></script> | 4 <script src="resources/paint-invalidation-test.js"></script> |
4 <script> | 5 <script> |
5 function repaintTest() | 6 window.expectedPaintInvalidationObjects = [ |
| 7 "LayoutGrid DIV class='grid'", |
| 8 "LayoutBlockFlow DIV class='sizedToGridArea'", |
| 9 ]; |
| 10 function paintInvalidationTest() |
6 { | 11 { |
7 var gridElement = document.getElementsByClassName("grid")[0]; | 12 var gridElement = document.getElementsByClassName("grid")[0]; |
8 gridElement.style.gridTemplateColumns = "minmax(50px, 180px) 100px 100px"; | 13 gridElement.style.gridTemplateColumns = "minmax(50px, 180px) 100px 100px"; |
9 } | 14 } |
10 window.addEventListener("load", runRepaintTest, false); | 15 window.addEventListener("load", runPaintInvalidationTest, false); |
11 </script> | 16 </script> |
12 <link href="resources/grid.css" rel="stylesheet"> | 17 <link href="../../../fast/css-grid-layout/resources/grid.css" rel="stylesheet"> |
13 <style> | 18 <style> |
14 body { | 19 body { |
15 font: 10px/1 Ahem; | 20 font: 10px/1 Ahem; |
16 } | 21 } |
17 | 22 |
18 .grid { | 23 .grid { |
19 width: -webkit-fit-content; | 24 width: -webkit-fit-content; |
20 grid-template-rows: 50px; | 25 grid-template-rows: 50px; |
21 grid-template-columns: minmax(100px, 180px) 100px minmax(50px, 100px); | 26 grid-template-columns: minmax(100px, 180px) 100px minmax(50px, 100px); |
22 } | 27 } |
23 .sizedToGridArea { | 28 .sizedToGridArea { |
24 background-color: purple; | 29 background-color: purple; |
25 } | 30 } |
26 </style> | 31 </style> |
27 <body> | 32 <body> |
28 <div> This test checks that changing the grid-template-columns lead to a repaint
. The final grid element should be 250px * 50px, the grid item should be 50px *
50px. No trace of the elements before the grid-template-columns change should be
seen.</div> | 33 <div> This test checks that changing the grid-template-columns lead to a repaint
. The final grid element should be 250px * 50px, the grid item should be 50px *
50px. No trace of the elements before the grid-template-columns change should be
seen.</div> |
29 <div class="constrainedContainer"> | 34 <div class="constrainedContainer"> |
30 <div class="grid"> | 35 <div class="grid"> |
31 <div class="sizedToGridArea"></div> | 36 <div class="sizedToGridArea"></div> |
32 </div> | 37 </div> |
33 </div> | 38 </div> |
34 </body> | 39 </body> |
35 </html> | 40 </html> |
OLD | NEW |