OSDN Git Service

SVGAnimationElementのbeginEventの振る舞いを改良
authordhrname <dhrname@users.sourceforge.jp>
Mon, 9 Jan 2012 14:01:57 +0000 (23:01 +0900)
committerdhrname <dhrname@users.sourceforge.jp>
Mon, 9 Jan 2012 14:01:57 +0000 (23:01 +0900)
org/w3c/dom/svg.js

index 25927f5..bdd4879 100644 (file)
@@ -5122,10 +5122,12 @@ function SVGAnimationElement(es) {
           ac = end - begin;
         } else {
           /*活性持続時間が不定(indefinte)なので、強制的にアニメを終了させる*/
+          ac = null;
         }
       } else if (durv === "indefinte") {
         if (!tc && !endv) {
-          /*活性持続時間が不定(indefinte)なので、強制的にアニメを終了させる*/   
+          /*活性持続時間が不定(indefinte)なので、強制的にアニメを終了させる*/
+          ac = null;
         } else if (tc && !endv) {
           ac = tar._getOffset(td);
         } else if (!tc && endv) {
@@ -5153,7 +5155,8 @@ function SVGAnimationElement(es) {
     } catch (e) {
       throw new DOMException(DOMException.INVALID_STATE_ERR);
     }
-    tar.endElementAt(ac);
+    isFinite(ac) && tar.endElementAt(ac);
+    tar = be = dur = durv = end = endv= td = tc = ac = void 0;
   }, false);
   this.addEventListener("DOMAttrModified", function(evt){
     if (evt.eventPhase === /*Event.BUBBLING_PHASE*/ 3) {