From 8a760a32bf4ce98b75c6265e58ed16e6bf8095b9 Mon Sep 17 00:00:00 2001 From: dhrname Date: Fri, 28 Oct 2016 22:42:04 +0900 Subject: [PATCH] Modify the _setFrame method --- org/w3c/dom/smil.js | 2 +- tool/Spec/spec/SvgDomSpec.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/org/w3c/dom/smil.js b/org/w3c/dom/smil.js index 3918046..9d713f0 100644 --- a/org/w3c/dom/smil.js +++ b/org/w3c/dom/smil.js @@ -1356,7 +1356,7 @@ base("$calcMode").up("$attribute").mix( { /*単純継続時間が不定の場合、補間はせずに初期値が採用されるため、advanceは0となる * 仕様を参照 SMIL Animation 3.2.2. Animation function values のInterpolation and indefinite simple durations * http://www.w3.org/TR/2001/REC-smil-animation-20010904/#AnimFuncValues*/ - advance = duration ? ( (currentTime - line.begin) % duration ) / duration + advance = duration ? ( (currentTime - $list.begin) % duration ) / duration : 0; this.setAttribute(this.tocall(advance)); line = duration = advance = void 0; diff --git a/tool/Spec/spec/SvgDomSpec.js b/tool/Spec/spec/SvgDomSpec.js index 902c7a9..15e3d05 100644 --- a/tool/Spec/spec/SvgDomSpec.js +++ b/tool/Spec/spec/SvgDomSpec.js @@ -2192,8 +2192,10 @@ describe("SMIL Animation Spec", function() { frame.setFrame(0); expect(ele.parentNode.getAttributeNS(null, "fill")).toBe("red"); + var line = $set.timeline; + expect(line.$list.state).toBe(line.$list.PLAYING); frame.setFrame(24); - expect($set.timeline.state).toBe($set.timeline.POSTWAITNG); + expect(line.$list.state).toBe(line.$list.POSTWAITING); expect(ele.parentNode.hasAttributeNS(null, "fill")).toBeFalsy(); } ); /*同値分割をして、有効同値クラスを調べておく (Equivalence partitioning, the following is the valid partion)*/ -- 2.11.0