OSDN Git Service

endElementメソッドとbeginElementメソッドのリスト更新バグを修正
authordhrname <dhrname@users.sourceforge.jp>
Mon, 16 Jan 2012 10:57:08 +0000 (19:57 +0900)
committerdhrname <dhrname@users.sourceforge.jp>
Mon, 16 Jan 2012 10:57:08 +0000 (19:57 +0900)
org/w3c/dom/svg.js

index 0c1603d..07da7dd 100644 (file)
@@ -5115,8 +5115,8 @@ function SVGAnimationElement(es) {
           /*endの配列(ソース済み)からbeginに最も近い数値を選ぶ*/
           if (end[i] >= begin) {
             end = end[i];
+            break;
           }
-          break;
         }
       } else {
         /*イベント待ちの場合は、endの値を、indefiniteとみなす。参照: http://www.w3.org/TR/smil-animation/#ComputingActiveDur
@@ -5366,14 +5366,14 @@ SVGAnimationElement.prototype = new SVGElement();
   evt.initTimeEvent("beginEvent", ttd.defaultView, 0);
   this.dispatchEvent(evt);
   /*新しくリストの頭を更新して、別の値も実行させるようにする*/
-  this._start.shift();
+  this._start && this._start.shift();
 };
 /*void*/ SVGAnimationElement.prototype.endElement = function() {
   var ttd = this.ownerDocument,
       evt = ttd.createEvent("TimeEvents");
   evt.initTimeEvent("endEvent", ttd.defaultView, 0);
   this.dispatchEvent(evt);
-  this._finish.shift();
+  this._finish && this._finish.shift();
 };
 /*void*/ SVGAnimationElement.prototype.beginElementAt = function(/*float*/ offset) {
   var ntc = this.ownerDocument.documentElement.getCurrentTime(),