anim-x-seek-cross-container-1a.xhtml (1246B)
1 <?xml version="1.0" encoding="UTF-8" ?> 2 <html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait"> 3 <!-- 4 Test backwards seeking with cross-time container dependencies. 5 --> 6 <head> 7 <script> 8 function snapshot() 9 { 10 var a = document.getElementById("svg-a"); 11 var b = document.getElementById("svg-b"); 12 a.pauseAnimations(); 13 b.pauseAnimations(); 14 a.setCurrentTime(0); 15 b.setCurrentTime(2); // 'b' has now begun and 'a' has a begin time of '-1s' in 16 // a's container time 17 b.setCurrentTime(1); // Perform a backwards seek--'a' should now have a begin 18 // time of '0s' in container time 19 a.setCurrentTime(1); // So seeking forward 1s should get us to the middle of 20 // the interval 21 document.documentElement.removeAttribute("class"); 22 } 23 </script> 24 </head> 25 <body onload="snapshot()"> 26 <svg xmlns="http://www.w3.org/2000/svg" width="230px" height="230px" id="svg-a"> 27 <rect x="100" y="15" width="200" height="200" fill="blue"> 28 <animate attributeName="x" from="0" to="30" begin="b.begin" dur="2s"/> 29 </rect> 30 </svg> 31 <svg xmlns="http://www.w3.org/2000/svg" width="230px" height="230px" id="svg-b"> 32 <set attributeName="y" to="0" begin="1s" id="b"/> 33 </svg> 34 </body> 35 </html>