layout/reftests/svg/smil/anim-remove-8xml.svg

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 <svg xmlns="http://www.w3.org/2000/svg"
     2      xmlns:xlink="http://www.w3.org/1999/xlink"
     3      onload="go()"
     4      class="reftest-wait">
     5   <!-- In this test, we temporarily remove the animation target, detach
     6        its <animate> node, and then reinsert the (now former) animation target.
     7        We verify that animation effects are removed from the former target. -->
     8   <script>
     9     var parent;
    10     var rect;
    11     function go() {
    12       // Seek animation before we start tweaking things, to make sure we've
    13       // already started sampling it.
    14       document.documentElement.setCurrentTime(0.5);
    16       var anim = document.getElementById("anim");
    17       rect = anim.parentNode;
    18       parent = rect.parentNode;
    19       parent.removeChild(rect);
    20       rect.removeChild(anim);
    22       setTimeout(reinsert, 50); // Allow time for a sample
    23     }
    24     function reinsert() {
    25       parent.appendChild(rect);
    26       document.documentElement.removeAttribute("class");
    27     }
    28   </script>
    29   <script xlink:href="smil-util.js" type="text/javascript"/>
    30   <rect x="15" y="15" width="200" height="200" fill="blue">
    31     <animate id="anim" attributeName="height"
    32              begin="0s" dur="2s" from="25" to="50" fill="freeze"/>
    33   </rect>
    34 </svg>

mercurial