Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <style> | |
| 3 div { | |
| 4 width: 100px; | |
| 5 height: 100px; | |
| 6 background: orange; | |
| 7 } | |
| 8 div:before { | |
|
jbroman
2016/07/11 21:04:38
Please use ::before, here and below. The single-co
Ian Vollick
2016/07/11 21:45:22
Done.
| |
| 9 content: ":)"; | |
| 10 transform: translateZ(0); | |
|
jbroman
2016/07/11 21:04:38
nit: Is this the right compositing hint here? Woul
Ian Vollick
2016/07/11 21:45:22
Not needed at all, actually.
| |
| 11 transition-property: transform; | |
| 12 transition-duration: 1ms; | |
| 13 position: absolute; | |
|
jbroman
2016/07/11 21:04:38
Is absolute positioning significant in this test?
Ian Vollick
2016/07/11 21:45:22
Turns out it just needs to be a "transformable" el
| |
| 14 } | |
| 15 </style> | |
| 16 <div></div> | |
| 17 <script> | |
| 18 if (testRunner) | |
| 19 testRunner.waitUntilDone(); | |
| 20 | |
| 21 onload = function() { | |
|
jbroman
2016/07/11 21:04:38
Is it necessary to block on the load event?
Ian Vollick
2016/07/11 21:45:22
Nope. Removed.
| |
| 22 requestAnimationFrame(function(ts) { | |
| 23 document.styleSheets[0].addRule('div:before', 'transform: translateX(20px)' ); | |
| 24 requestAnimationFrame(function(ts) { | |
| 25 requestAnimationFrame(function(ts) { | |
| 26 if (testRunner) | |
| 27 testRunner.notifyDone(); | |
| 28 }); | |
| 29 }); | |
| 30 }); | |
| 31 } | |
| 32 </script> | |
| OLD | NEW |