| 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 gridElement = document.getElementsByClassName("grid")[0]; | 10 var gridElement = document.getElementsByClassName("grid")[0]; |
| 11 gridElement.style.gridDefinitionColumns = "minmax(50px, 180px) 100px 100px"; | 11 gridElement.style.gridTemplateColumns = "minmax(50px, 180px) 100px 100px"; |
| 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 width: -webkit-fit-content; | 22 width: -webkit-fit-content; |
| 23 grid-definition-rows: 50px; | 23 grid-template-rows: 50px; |
| 24 grid-definition-columns: minmax(100px, 180px) 100px minmax(50px, 100px); | 24 grid-template-columns: minmax(100px, 180px) 100px minmax(50px, 100px); |
| 25 } | 25 } |
| 26 .sizedToGridArea { | 26 .sizedToGridArea { |
| 27 background-color: purple; | 27 background-color: purple; |
| 28 } | 28 } |
| 29 </style> | 29 </style> |
| 30 <body> | 30 <body> |
| 31 <div> This test checks that changing the grid-definition-columns lead to a repai
nt. The final grid element should be 250px * 50px, the grid item should be 50px
* 50px. No trace of the elements before the grid-definition-columns change shoul
d be seen.</div> | 31 <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> |
| 32 <div class="constrainedContainer"> | 32 <div class="constrainedContainer"> |
| 33 <div class="grid"> | 33 <div class="grid"> |
| 34 <div class="sizedToGridArea"></div> | 34 <div class="sizedToGridArea"></div> |
| 35 </div> | 35 </div> |
| 36 </div> | 36 </div> |
| 37 </body> | 37 </body> |
| 38 </html> | 38 </html> |
| OLD | NEW |