Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <style> | |
| 5 .squashed { | |
| 6 height: 40px; | |
| 7 width: 40px; | |
| 8 background-color: lightgreen; | |
| 9 position: absolute; | |
| 10 top: 90px; | |
| 11 } | |
| 12 .composited { | |
| 13 position: absolute; | |
| 14 margin-top: 5px; | |
| 15 height: 100px; | |
| 16 width: 100px; | |
| 17 background-color: lightblue; | |
| 18 -webkit-transform: translateZ(1px); | |
| 19 } | |
| 20 </style> | |
| 21 <script> | |
| 22 onload = function() { | |
| 23 if (window.testRunner) { | |
| 24 testRunner.waitUntilDone(); | |
| 25 internals.settings.setLayerSquashingEnabled(true); | |
| 26 } | |
| 27 | |
| 28 var target = document.getElementById('target3'); | |
| 29 setTimeout(function() { | |
|
abarth-chromium
2014/03/17 17:17:03
Why set timeout? If you're trying to synchronize
chrishtr
2014/03/17 18:10:55
Done.
| |
| 30 target.style.backgroundColor = 'green'; | |
| 31 getComputedStyle(target).backgroundColor; | |
| 32 setTimeout(function() { | |
| 33 if (window.testRunner) | |
| 34 testRunner.notifyDone(); | |
| 35 }); | |
| 36 }, 100); | |
| 37 | |
| 38 } | |
| 39 </script> | |
| 40 </head> | |
| 41 <body> | |
| 42 <div id="target2" class="second composited"> | |
| 43 </div> | |
| 44 <div id="target3" class="squashed"></div> | |
| 45 </body> | |
| 46 </html> | |
| OLD | NEW |