Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <style> | |
| 3 #track { | |
| 4 d: path('M20,100 H180'); | |
| 5 stroke: blue; | |
| 6 } | |
| 7 </style> | |
| 8 <svg width="200" height="200" xmlns="http://www.w3.org/2000/svg" | |
|
fs
2016/08/08 15:45:38
Nit: Don't need to declare NS's (the HTML parser o
Eric Willigers
2016/08/10 01:13:15
Done.
| |
| 9 xmlns:xlink="http://www.w3.org/1999/xlink"> | |
| 10 | |
| 11 <path id="track" d="M20,20 H180"/> | |
| 12 | |
| 13 <circle r="10" cx="0" cy="0" fill="green"> | |
| 14 <animateMotion dur="100ms" fill="freeze"> | |
| 15 <mpath xlink:href="#track"/> | |
| 16 </animateMotion> | |
| 17 </circle> | |
| 18 </svg> | |
| 19 <script> | |
| 20 'use strict'; | |
| 21 if (window.testRunner) | |
| 22 testRunner.waitUntilDone(); | |
| 23 | |
| 24 requestAnimationFrame(function() { | |
|
fs
2016/08/08 15:45:38
If we can do the thing below, then I think we coul
Eric Willigers
2016/08/10 01:13:15
Done.
| |
| 25 var track = document.getElementById('track'); | |
| 26 track.setAttribute('d', 'M100,20 V180'); | |
| 27 if (window.testRunner) | |
| 28 setTimeout(function(){testRunner.notifyDone();}, 100); | |
|
fs
2016/08/08 15:45:38
Could we avoid the 100ms delay by pausing the time
Eric Willigers
2016/08/10 01:13:15
The animation has fill="freeze", so now I simply u
| |
| 29 }); | |
| 30 </script> | |
| OLD | NEW |