OSDN Git Service

Modify the updateState method
[sie/sie.git] / org / w3c / dom / smil.js
index 4c17f3e..c880a0b 100644 (file)
@@ -194,7 +194,12 @@ base("$frame").mix ( {
           this.state = begin;\r
         }\r
       } else if (state === begin) {\r
-        this.state = play;\r
+        if (startTime === endTime) {\r
+          /*開始時刻と終了時刻が一致したときは、直接BEGINNING状態からENDING状態へ移行*/\r
+          this.state = end;\r
+        } else {\r
+          this.state = play;\r
+        }\r
       } else if (state === play) {\r
         if ( (endTime >= cacheBegin) || (startTime > cacheBegin) ) {\r
           /*終了時刻に到達したか、再び開始イベントが発火されたとき*/\r
@@ -262,12 +267,6 @@ base("$frame").mix ( {
     /*後述の$beginや$endで使うメソッド*/\r
     this.addList = this.addBeginList;\r
   } );\r
-  \r
-  /*$endFrame オブジェクト\r
-   * 終了時の処理をするためのフレームを集める*/\r
-  $frame.up("$endFrame").mix( {\r
-    timelines: []\r
-  } );\r
    \r
   /*$begin オブジェクト\r
    * 開始のタイミングを計算する*/\r
@@ -437,10 +436,6 @@ base("$frame").mix ( {
       /*初期値を設定*/\r
       this.begin = 0;\r
       this.isResolved = false;\r
-      /*beginとend属性を考慮に入れないで、活動継続時間を求める*/\r
-      var s = ( this.$activate = this.$activate.up() );\r
-      this.activeTime = s.call() || Number.MAX_VALUE;\r
-      this.simpleDuration = s.simpleDur;\r
       var str = this.trim(this.string);\r
       if (str.indexOf(";") > -1){\r
         /*;で区切られたリストを一つずつ解析*/\r
@@ -455,11 +450,15 @@ base("$frame").mix ( {
       return this;\r
     },\r
     \r
-    /*$listã\82ªã\83\96ã\82¸ã\82§ã\82¯ã\83\88ã\82\92æ\9b´æ\96°ã\81\99るメソッド*/\r
+    /*$listã\81¨$activateã\82ªã\83\96ã\82¸ã\82§ã\82¯ã\83\88ã\82\92æ\9b´æ\96°ã\81\97ã\81¦ã\80\81æ´»å\8b\95ç¶\99ç¶\9aæ\99\82é\96\93ã\82\92æ±\82ã\82\81るメソッド*/\r
     updateList: function() {\r
       this.$list = this.$list.up();\r
       /*$endオブジェクトに付属している$listプロパティを更新したものと一致させておく*/\r
       this.$activate.end && (this.$activate.end.$list = this.$list);\r
+      /*beginとend属性を考慮に入れないで、活動継続時間を求める*/\r
+      var s = ( this.$activate = this.$activate.up() );\r
+      this.activeTime = s.call() || Number.MAX_VALUE;\r
+      this.simpleDuration = s.simpleDur;\r
       return this;\r
     }\r
     \r
@@ -2103,7 +2102,6 @@ if (!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Anim
           frame++;\r
           try {\r
             $f.setFrame(frame);\r
-            $f.$endFrame.setFrame(frame);\r
           } catch(e) {\r
           }\r
           _cancel.handle = requestAnimationFrame(step);\r