OLD | NEW |
---|---|
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <style> | 2 <style> |
3 #target { | 3 #target { |
4 position: absolute; | 4 position: absolute; |
5 top: 0; | 5 top: 0; |
6 width: 100px; | 6 width: 100px; |
7 height: 100px; | 7 height: 100px; |
8 background: red; | 8 background: red; |
9 -webkit-transition-property: top, background; | 9 -webkit-transition-property: top, background; |
10 -webkit-transition-duration: 200ms; | 10 -webkit-transition-duration: 200ms; |
11 -webkit-transform: translateZ(0); | 11 -webkit-transform: translateZ(0); |
12 } | 12 } |
13 </style> | 13 </style> |
14 <script> | 14 <script> |
15 if (window.testRunner) { | 15 if (window.testRunner) { |
16 testRunner.waitUntilDone(); | 16 testRunner.waitUntilDone(); |
17 } | 17 } |
18 onload = function() { | 18 onload = function() { |
19 var target = document.getElementById('target'); | 19 var target = document.getElementById('target'); |
20 target.style.top = '100px'; | 20 target.style.top = '100px'; |
21 target.style.background = 'green'; | 21 target.style.background = 'green'; |
22 if (window.testRunner) | 22 webkit.requestAnimationFrame(); |
jamesr
2014/02/27 21:41:05
webkit. ?
enne (OOO)
2014/02/27 22:50:16
OOPS. Deleted.
| |
23 testRunner.display(); | |
24 } | 23 } |
25 if (window.testRunner) { | 24 if (window.testRunner) { |
26 document.addEventListener('transitionend', function() { | 25 document.addEventListener('transitionend', function() { |
27 testRunner.notifyDone(); | 26 testRunner.notifyDone(); |
28 }); | 27 }); |
29 } | 28 } |
30 </script> | 29 </script> |
31 <div id="target">This box should transition from red to green.</div> | 30 <div id="target">This box should transition from red to green.</div> |
OLD | NEW |