OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 | 2 |
3 <!-- crbug.com/336676 - layer creation should not accidentally skip requesting | 3 <!-- crbug.com/336676 - layer creation should not accidentally skip requesting |
4 the compositor for a frame to be produced. When there were no other | 4 the compositor for a frame to be produced. When there were no other |
5 repaints or layout/style changes, the simple act of adding a layer was not | 5 repaints or layout/style changes, the simple act of adding a layer was not |
6 triggering compositing updates by itself. To recreate this scenario, an | 6 triggering compositing updates by itself. To recreate this scenario, an |
7 out-of-flow canvas element is added to an empty composited layer. The | 7 out-of-flow canvas element is added to an empty composited layer. The |
8 actual container layer does not get added to the tree until it realizes | 8 actual container layer does not get added to the tree until it realizes |
9 that it receives the canvas content. --> | 9 that it receives the canvas content. --> |
10 | 10 |
11 | 11 |
12 <html> | 12 <html> |
13 <head> | 13 <head> |
14 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> | 14 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> |
15 <style> | 15 <style> |
16 | 16 |
17 .composited { | 17 .composited { |
18 -webkit-transform: translatez(0); | 18 transform: translatez(0); |
19 } | 19 } |
20 | 20 |
21 .box { | 21 .box { |
22 position: absolute; | 22 position: absolute; |
23 z-index: 1; | 23 z-index: 1; |
24 width: 300px; | 24 width: 300px; |
25 height: 300px; | 25 height: 300px; |
26 top: 0px; | 26 top: 0px; |
27 left: 0px; | 27 left: 0px; |
28 } | 28 } |
(...skipping 18 matching lines...) Expand all Loading... |
47 document.getElementById("container").appendChild(canvasElement); | 47 document.getElementById("container").appendChild(canvasElement); |
48 } | 48 } |
49 </script> | 49 </script> |
50 </head> | 50 </head> |
51 | 51 |
52 <body onload="runRepaintAndPixelTest()"> | 52 <body onload="runRepaintAndPixelTest()"> |
53 <div id="container" class="composited box"></div> | 53 <div id="container" class="composited box"></div> |
54 </body> | 54 </body> |
55 | 55 |
56 </html> | 56 </html> |
OLD | NEW |