OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <script src="resources/text-based-repaint.js"></script> | 2 <script src="resources/text-based-repaint.js"></script> |
3 <script> | 3 <script> |
4 function repaintTest() { | 4 function repaintTest() { |
5 document.getElementsByClassName('item1')[0].style.justifySelf = 'left'; | 5 document.getElementsByClassName('item1')[0].style.justifySelf = 'stretch'; |
6 document.getElementsByClassName('item2')[0].style.justifySelf = 'right'; | 6 document.getElementsByClassName('item2')[0].style.justifySelf = 'stretch'; |
7 } | 7 } |
8 onload = runRepaintAndPixelTest; | 8 onload = runRepaintAndPixelTest; |
9 </script> | 9 </script> |
10 <style> | 10 <style> |
11 body { | 11 body { |
12 margin: 0; | 12 margin: 0; |
13 } | 13 } |
14 #container { | 14 #container { |
15 display: grid; | 15 display: grid; |
16 grid: 150px 150px / 100px 100px; | 16 grid: 300px / 100px 100px; |
17 width: 200px; | 17 width: 200px; |
18 height: 300px; | 18 height: 300px; |
19 background-color: red; | 19 background-color: red; |
20 } | 20 } |
21 .item1 { | 21 .item1 { |
22 grid-row: 1; | 22 grid-row: 1; |
23 grid-column: 1; | 23 grid-column: 1; |
24 justify-self: start; | 24 justify-self: start; |
25 background-color: green; | 25 background-color: green; |
26 width: 50px; | 26 width: 100px; |
27 } | 27 } |
28 .item2 { | 28 .item2 { |
29 grid-row: 1; | 29 grid-row: 1; |
30 grid-column: 2; | 30 grid-column: 2; |
31 justify-self: end; | 31 justify-self: start; |
32 background-color: green; | 32 background-color: green; |
33 width: 50px; | 33 width: 100px; |
34 </style> | 34 </style> |
35 <p style="height: 20px">Tests invalidation on justify-self style change. Passes
if there is no red.</p> | 35 <p style="height: 20px">There should be no invalidations because justify-self st
yle change causes no visual change.</p> |
36 <div id="container"> | 36 <div id="container"> |
37 <div class="item1"> | 37 <div class="item1"></div> |
38 <div style="height: 150px"></div> | 38 <div class="item2"></div> |
39 </div> | |
40 <div class="item2"> | |
41 <div style="height: 100px"></div> | |
42 </div> | |
43 </div> | 39 </div> |
OLD | NEW |