From 0eb0af65791e6743fea8ef52872f8ae42f9e744b Mon Sep 17 00:00:00 2001 From: dhrname Date: Sat, 31 Oct 2015 22:31:35 +0900 Subject: [PATCH] Support the value 'indefinite' on the object --- org/w3c/dom/smil.js | 4 +++- tool/Spec/spec/SvgDomSpec.js | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/org/w3c/dom/smil.js b/org/w3c/dom/smil.js index 23b69a7..6ca2fb9 100644 --- a/org/w3c/dom/smil.js +++ b/org/w3c/dom/smil.js @@ -295,7 +295,9 @@ base("$frame").mix ( { plusminus = str.search(/[\+\-]/), event = null, ele; - if (plusminus > 0) { + if (str === "indefinite") { + this.begin = Number.MAX_VALUE; + } else if (plusminus > 0) { /*Event-Value +/- Clock-Value の場合*/ this.begin = this.offset( str.slice(plusminus) ); event = this.event(str); diff --git a/tool/Spec/spec/SvgDomSpec.js b/tool/Spec/spec/SvgDomSpec.js index 29a131e..50bdae9 100644 --- a/tool/Spec/spec/SvgDomSpec.js +++ b/tool/Spec/spec/SvgDomSpec.js @@ -2158,7 +2158,7 @@ describe("SMIL Animation Spec", function() { } ); describe("$begin object", function() { - var begin = base("$frame").$begin; + var begin = base("$frame").$begin.up(); /*境界条件を調べておく (limit value analysis)*/ it("should be this for the value (limit value analysis)", function() { expect(begin.string).toBe(""); @@ -2465,6 +2465,10 @@ describe("SMIL Animation Spec", function() { begin.isResolved = false; expect(begin.parse().begin).toBe(0); expect(begin.isResolved).toBeFalsy(); + + begin.string = "indefinite"; + expect(begin.parse().begin).toBe(Math.floor( Number.MAX_VALUE * begin.fpms)); + expect(begin.isResolved).toBeFalsy(); } ); } ); -- 2.11.0