OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 | 3 |
4 <head> | 4 <head> |
| 5 <script src="../../resources/run-after-display.js"></script> |
5 <style> | 6 <style> |
6 | 7 |
7 .fixedContainer { | 8 .fixedContainer { |
8 position: fixed; | 9 position: fixed; |
9 overflow:hidden; | 10 overflow:hidden; |
10 background-color: #a0a0a0; | 11 background-color: #a0a0a0; |
11 bottom: 0px; | 12 bottom: 0px; |
12 left: 0px; | 13 left: 0px; |
13 width:400px; | 14 width:400px; |
14 height: 100px; | 15 height: 100px; |
15 } | 16 } |
16 | 17 |
17 #foo { | 18 #foo { |
18 width:200px; | 19 width:200px; |
19 height: 100px; | 20 height: 100px; |
20 background-color: #00a0a0; | 21 background-color: #00a0a0; |
21 -webkit-transform:translateZ(0); | 22 -webkit-transform:translateZ(0); |
22 } | 23 } |
23 </style> | 24 </style> |
24 | 25 |
25 <script> | 26 <script> |
26 if (window.testRunner) | 27 if (window.testRunner) { |
27 testRunner.dumpAsText(); | 28 testRunner.dumpAsText(); |
| 29 testRunner.waitUntilDone(); |
| 30 } |
28 | 31 |
29 if (window.internals) { | 32 if (window.internals) { |
30 /* Note carefully, compositing for fixed position is _disabled_ here */ | 33 /* Note carefully, compositing for fixed position is _disabled_ here */ |
31 internals.settings.setAcceleratedCompositingForFixedPositionEnabled(fals
e); | 34 internals.settings.setAcceleratedCompositingForFixedPositionEnabled(fals
e); |
32 internals.settings.setFixedPositionCreatesStackingContext(true); | 35 internals.settings.setFixedPositionCreatesStackingContext(true); |
33 } | 36 } |
34 | 37 |
35 function test() | 38 function test() |
36 { | 39 { |
37 testRunner.display(); | 40 runAfterDisplay(function() { |
| 41 if (window.internals) |
| 42 window.internals.startTrackingRepaints(document); |
38 | 43 |
39 if (window.internals) | 44 window.scrollTo(0, 100); |
40 window.internals.startTrackingRepaints(document); | |
41 | 45 |
42 window.scrollTo(0, 100); | 46 if (window.internals) |
| 47 document.getElementById('layers').textContent = window.internals
.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS); |
43 | 48 |
44 if (window.internals) | 49 if (window.testRunner) |
45 document.getElementById('layers').textContent = window.internals.lay
erTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS); | 50 testRunner.notifyDone(); |
| 51 }); |
46 } | 52 } |
47 </script> | 53 </script> |
48 </head> | 54 </head> |
49 | 55 |
50 <body style="height:4000px;" onload="test()"> | 56 <body style="height:4000px;" onload="test()"> |
51 <!-- | 57 <!-- |
52 Among other duplicate bugs: https://code.google.com/p/chromium/issues/det
ail?id=151734 | 58 Among other duplicate bugs: https://code.google.com/p/chromium/issues/det
ail?id=151734 |
53 | 59 |
54 In the current code, a layer may actually be composited, but not have its
own backing store. | 60 In the current code, a layer may actually be composited, but not have its
own backing store. |
55 In these cases, the layer paints into its composited ancestor with a back
ing store. | 61 In these cases, the layer paints into its composited ancestor with a back
ing store. |
(...skipping 10 matching lines...) Expand all Loading... |
66 | 72 |
67 <!-- Scrolling should not cause either div to move around on the viewport. --> | 73 <!-- Scrolling should not cause either div to move around on the viewport. --> |
68 <div class="fixedContainer"> | 74 <div class="fixedContainer"> |
69 <div id="foo"></div> | 75 <div id="foo"></div> |
70 </div> | 76 </div> |
71 | 77 |
72 <pre id="layers"></pre> | 78 <pre id="layers"></pre> |
73 </body> | 79 </body> |
74 | 80 |
75 </html> | 81 </html> |
OLD | NEW |