| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <style> | |
| 5 #container { | |
| 6 will-change: contents; | |
| 7 z-index: 0; | |
| 8 position: absolute; | |
| 9 top: 0px; | |
| 10 left: 0px; | |
| 11 } | |
| 12 | |
| 13 .shouldNotComposite { | |
| 14 position: absolute; | |
| 15 width: 50px; | |
| 16 height: 50px; | |
| 17 background-color: blue; | |
| 18 } | |
| 19 | |
| 20 #willChangeOpacity { | |
| 21 will-change: opacity; | |
| 22 top: 0px; | |
| 23 left: 0px; | |
| 24 } | |
| 25 | |
| 26 #willChangeContents { | |
| 27 will-change: contents; | |
| 28 top: 0px; | |
| 29 left: 60px; | |
| 30 } | |
| 31 | |
| 32 #willChangeTop { | |
| 33 will-change: top; | |
| 34 top: 0px; | |
| 35 left: 120px; | |
| 36 } | |
| 37 | |
| 38 #willChangeTransform { | |
| 39 will-change: -webkit-transform; | |
| 40 top: 60px; | |
| 41 left: 0px; | |
| 42 } | |
| 43 | |
| 44 #animateOpacity { | |
| 45 | |
| 46 top: 60px; | |
| 47 left: 60px; | |
| 48 -webkit-animation: fade-in-out 0.1s linear infinite alternate; | |
| 49 } | |
| 50 | |
| 51 @-webkit-keyframes fade-in-out { from { opacity: 0.3; } to { opacity: 0.9; }
} | |
| 52 | |
| 53 </style> | |
| 54 | |
| 55 <script> | |
| 56 if (window.internals) { | |
| 57 window.internals.settings.setAcceleratedCompositingForGpuRasterizationHint
Enabled(true); | |
| 58 // Force an update of the compositing triggers. | |
| 59 window.internals.forceCompositingUpdate(document); | |
| 60 } | |
| 61 | |
| 62 if (window.testRunner) { | |
| 63 testRunner.dumpAsText(); | |
| 64 testRunner.waitUntilDone(); | |
| 65 } | |
| 66 | |
| 67 function animationEventListener() { | |
| 68 if (window.testRunner) { | |
| 69 document.getElementById("layertree").innerText = window.internals.layerT
reeAsText(document); | |
| 70 testRunner.notifyDone(); | |
| 71 } | |
| 72 } | |
| 73 | |
| 74 window.addEventListener('load', function() { | |
| 75 document.getElementById("animateOpacity").addEventListener('webkitAnimatio
nIteration', animationEventListener); | |
| 76 }, false); | |
| 77 </script> | |
| 78 </head> | |
| 79 <body> | |
| 80 <div id="container"> | |
| 81 <div id="willChangeOpacity" class="shouldNotComposite"> | |
| 82 <div id="willChangeTransform" class="shouldNotComposite"></div> | |
| 83 </div> | |
| 84 <div id="willChangeContents" class="shouldNotComposite"></div> | |
| 85 <div id="willChangeTop" class="shouldNotComposite"></div> | |
| 86 <div id="animateOpacity" class="shouldNotComposite"></div> | |
| 87 </div> | |
| 88 | |
| 89 <pre id="layertree"></pre> | |
| 90 </body> | |
| 91 </html> | |
| OLD | NEW |