OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> | 2 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> |
3 <style> | 3 <style> |
4 #flexbox { | 4 #flexbox { |
5 display: -webkit-flex; | 5 display: flex; |
6 -webkit-flex-flow: column-reverse; | 6 flex-flow: column-reverse; |
7 width: 200px; | 7 width: 200px; |
8 } | 8 } |
9 .flex-item { | 9 .flex-item { |
10 height: 30px; | 10 height: 30px; |
11 } | 11 } |
12 </style> | 12 </style> |
13 <script> | 13 <script> |
14 function repaintTest() | 14 function repaintTest() |
15 { | 15 { |
16 document.getElementById("blue").style.margin = "1px"; | 16 document.getElementById("blue").style.margin = "1px"; |
17 } | 17 } |
18 | 18 |
19 window.onload = function() { | 19 window.onload = function() { |
20 if (!window.testRunner) { | 20 if (!window.testRunner) { |
21 document.body.appendChild(document.createTextNode( | 21 document.body.appendChild(document.createTextNode( |
22 "This test checks that for flex items that are moved multiple times
during the layout " | 22 "This test checks that for flex items that are moved multiple times
during the layout " |
23 + "only the initial and final positions are repainted. Only the blue
flex item should be repainted " | 23 + "only the initial and final positions are repainted. Only the blue
flex item should be repainted " |
24 + "after changing its position. If the other flex items are repainte
d, this test fails.")); | 24 + "after changing its position. If the other flex items are repainte
d, this test fails.")); |
25 } | 25 } |
26 window.enablePixelTesting = true; | 26 window.enablePixelTesting = true; |
27 runRepaintTest(); | 27 runRepaintTest(); |
28 }; | 28 }; |
29 </script> | 29 </script> |
30 <div id="flexbox"> | 30 <div id="flexbox"> |
31 <div id="blue" class="flex-item" style="background-color: blue;"></div> | 31 <div id="blue" class="flex-item" style="background-color: blue;"></div> |
32 <div id="green" class="flex-item" style="background-color: green;"></div> | 32 <div id="green" class="flex-item" style="background-color: green;"></div> |
33 <div id="yellow" class="flex-item" style="background-color: yellow;"></div> | 33 <div id="yellow" class="flex-item" style="background-color: yellow;"></div> |
34 </div> | 34 </div> |
OLD | NEW |