OSDN Git Service

Modify the updateList method
authordhrname <dhrname@users.sourceforge.jp>
Sat, 29 Oct 2016 10:43:36 +0000 (19:43 +0900)
committerdhrname <dhrname@users.sourceforge.jp>
Sat, 29 Oct 2016 10:43:36 +0000 (19:43 +0900)
org/w3c/dom/smil.js
tool/Spec/spec/SvgDomSpec.js

index e9bd1a9..e8a8c5e 100644 (file)
@@ -460,10 +460,10 @@ base("$frame").mix ( {
     /*$listと$activateオブジェクトを更新して、活動継続時間を求めるメソッド*/\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
+      /*$endオブジェクトに付属している$listプロパティを更新したものと一致させておく*/\r
+      s.end && (s.end.$list = this.$list);\r
       this.activeTime = s.call() || Number.MAX_VALUE;\r
       this.simpleDuration = s.simpleDur;\r
       return this;\r
@@ -577,9 +577,10 @@ base("$frame").mix ( {
       if (!this.string) {\r
         return null;\r
       }\r
-      /*addListメソッドには、addBeginList関数が入っているはずなので、それを変更する*/\r
+      /*addListメソッドには、addBeginList関数が入っているはずなので、それを一時的に変更する*/\r
       this.$list.addList = this.$list.addEndList;\r
       this.parse(this.string);\r
+      this.$list.addList = this.$list.addBeginList;\r
       return this.isResolved ? this.begin\r
                              : "indefinite";\r
     }\r
index 15e3d05..f139bca 100644 (file)
@@ -2194,6 +2194,7 @@ describe("SMIL Animation Spec", function() {
         \r
         var line = $set.timeline;\r
         expect(line.$list.state).toBe(line.$list.PLAYING);\r
+        console.log(frame);\r
         frame.setFrame(24);\r
         expect(line.$list.state).toBe(line.$list.POSTWAITING);\r
         expect(ele.parentNode.hasAttributeNS(null, "fill")).toBeFalsy();\r