OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <div style="height:200px;width:600px;overflow:scroll"> | 2 <div style="height:200px;width:600px;overflow:scroll"> |
3 <div style="position:relative; top: 100px"> | 3 <div style="position:relative; top: 100px"> |
4 <div style="height:400px;margin-bottom:-400px;position:relative"> | 4 <div style="height:400px;margin-bottom:-400px;position:relative"> |
5 <div style="width:50px;height:50px;position:absolute;margin:0;left: 400px"
> | 5 <div style="width:50px;height:50px;position:absolute;margin:0;left: 400px"
> |
6 <div id="chip" style="height: 20px; width: 20px; background: lightgray">
</span> | 6 <div id="chip" style="height: 20px; width: 20px; background: lightgray">
</span> |
7 </div> | 7 </div> |
8 </div> | 8 </div> |
9 </div> | 9 </div> |
10 </div> | 10 </div> |
11 | 11 |
12 <pre id="output" style="display:none"></pre> | 12 <pre id="output" style="display:none"></pre> |
13 <script> | 13 <script> |
14 // Test that updating the position of a RenderObject that is squashed relative t
o its squashing container, | 14 // Test that updating the position of a LayoutObject that is squashed relative t
o its squashing container, |
15 // but does not have a Layer, issues the correct repaint rects. | 15 // but does not have a Layer, issues the correct repaint rects. |
16 if (window.testRunner) { | 16 if (window.testRunner) { |
17 testRunner.dumpAsText(); | 17 testRunner.dumpAsText(); |
18 testRunner.waitUntilDone(); | 18 testRunner.waitUntilDone(); |
19 } | 19 } |
20 var updateFunction = function() { | 20 var updateFunction = function() { |
21 if (window.internals) | 21 if (window.internals) |
22 window.internals.startTrackingRepaints(document); | 22 window.internals.startTrackingRepaints(document); |
23 | 23 |
24 document.getElementById('chip').style.backgroundColor = "blue"; | 24 document.getElementById('chip').style.backgroundColor = "blue"; |
(...skipping 10 matching lines...) Expand all Loading... |
35 | 35 |
36 if (window.testRunner) | 36 if (window.testRunner) |
37 testRunner.notifyDone(); | 37 testRunner.notifyDone(); |
38 }; | 38 }; |
39 | 39 |
40 // Wait two frames before updating the chip's style, so that the document is pai
nted and squashed first. | 40 // Wait two frames before updating the chip's style, so that the document is pai
nted and squashed first. |
41 window.requestAnimationFrame(function() { | 41 window.requestAnimationFrame(function() { |
42 window.requestAnimationFrame(updateFunction); | 42 window.requestAnimationFrame(updateFunction); |
43 }); | 43 }); |
44 </script> | 44 </script> |
OLD | NEW |