OSDN Git Service

Lighten the updateState method
authordhrname <dhrname@users.sourceforge.jp>
Thu, 13 Oct 2016 12:46:01 +0000 (21:46 +0900)
committerdhrname <dhrname@users.sourceforge.jp>
Thu, 13 Oct 2016 12:46:01 +0000 (21:46 +0900)
org/w3c/dom/smil.js

index 7a68979..354cb3d 100644 (file)
@@ -162,8 +162,7 @@ base("$frame").mix ( {
           begin = /*this.BEGINNING*/ 1,\r
           play = /*this.PLAYING*/ 2,\r
           end = /*this.ENDING*/ 3,\r
-          post = /*this.POSTWAITING*/ 4,\r
-          isWait = (state === wait) || (state === post);\r
+          post = /*this.POSTWAITING*/ 4;\r
       /*beginListプロパティと、endListプロパティの中で、\r
        * 現在フレーム数 f より大きい数値は、更新できる条件と無関係なので、除外しておく\r
        * また、f以下の値の中から、最大値を探して、\r
@@ -171,7 +170,7 @@ base("$frame").mix ( {
       var startTime = this.getMaxList(f, this.beginList),\r
           endTime = this.getMaxList(f, this.endList),\r
           cacheBegin = this.begin;\r
-      if (isWait) {\r
+      if ( (state === wait) || (state === post) ) {\r
         if (startTime > cacheBegin) {\r
           this.state = begin;\r
           /*beginプロパティに開始時刻をキャッシュ用に保存*/\r