From 0b36412d5d5198b12b652225cebd7df0f20f6fbf Mon Sep 17 00:00:00 2001 From: dhrname Date: Sun, 8 Feb 2015 22:09:18 +0900 Subject: [PATCH] Modify a call method in the object --- org/w3c/dom/smil.js | 9 ++++----- tool/Spec/spec/SvgDomSpec.js | 5 ++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/org/w3c/dom/smil.js b/org/w3c/dom/smil.js index 84b0344..7fa3f6f 100644 --- a/org/w3c/dom/smil.js +++ b/org/w3c/dom/smil.js @@ -174,7 +174,7 @@ base("$frame").mix ( { /*removeLine メソッド * 指定されたタイムラインのオブジェクトを、リストから削除する*/ - removeLine: function( /*Object*/ timeline ) { + removeLine: function( /*$frame*/ timeline ) { var list = this.timelines, j = 0, t; @@ -289,7 +289,8 @@ base("$frame").mix ( { var s = this.$activate.up(); s.begin = this.begin; s.timeStamp= evt.timeStamp; - this.addLine(s.call()); + this.activeTime = s.call(); + this.addLine(this); return s; } @@ -322,9 +323,7 @@ base("$frame").mix ( { if (!isIndefiniteDur) { actTime = Math.floor( this.offset(this.dur) * this.fpms); } - return { - activeTime: actTime - }; + return actTime; } } ); } ); diff --git a/tool/Spec/spec/SvgDomSpec.js b/tool/Spec/spec/SvgDomSpec.js index 9ed0f3e..54f4cf4 100644 --- a/tool/Spec/spec/SvgDomSpec.js +++ b/tool/Spec/spec/SvgDomSpec.js @@ -2421,8 +2421,7 @@ describe("SMIL Animation Spec", function() { expect(act.end).toBe(act.$begin.$end); act.up("$a"); - expect(act.$a.call()).not.toBe(act.$a); - expect(act.$a.call().activeTime).toBeNull(); + expect(act.$a.call()).toBeNull(); } ); /*同値分割をして、有効同値クラスを調べておく (Equivalence partitioning, the following is the valid partion)*/ it("should be this for the value (the valid partion)", function() { @@ -2431,7 +2430,7 @@ describe("SMIL Animation Spec", function() { act.up("$b"); act.$b.dur = "132ms"; var abc = act.$b.call(); - expect(abc.activeTime).toEqual(Math.floor(132*act.fpms)) + expect(abc).toEqual(Math.floor(132*act.fpms)) } ); /*無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/ it("should be this for the value (the invalid partion)", function() { -- 2.11.0