OSDN Git Service

Modify the Spec for the object
authordhrname <dhrname@users.sourceforge.jp>
Tue, 7 Apr 2015 14:25:36 +0000 (23:25 +0900)
committerdhrname <dhrname@users.sourceforge.jp>
Tue, 7 Apr 2015 14:25:36 +0000 (23:25 +0900)
org/w3c/dom/smil.js
tool/Spec/spec/SvgDomSpec.js

index f138872..079dcc3 100644 (file)
@@ -310,7 +310,7 @@ base("$frame").mix ( {
    * $begin オブジェクトからの継承*/\r
   } ).up("$activate").of( {\r
     \r
-    /*単純持続時間のパースれる前の文字列*/\r
+    /*単純持続時間のパースれる前の文字列*/\r
     dur: "indefinite",\r
     \r
     /*活動をストップさせるためのオブジェクト*/\r
@@ -707,7 +707,7 @@ base("$calcMode").up("$attribute").mix( {
     /*eleの属性の値を、それぞれオブジェクトに割り当て*/\r
     var begin = this.frame.$begin,\r
         frame = begin.up().mix( {\r
-                  string: getAttr("begin"),\r
+                  string: (getAttr("begin") || "0"),\r
                   $activate: begin.$activate.up().mix( {\r
                     dur: getAttr("dur"),\r
                     end: begin.$end.up().mix( {\r
@@ -726,7 +726,7 @@ base("$calcMode").up("$attribute").mix( {
     }\r
     /*属性を取得するためのインライン関数*/\r
     function getAttr(name) {\r
-      return ele.getAttributeNS(null, name);\r
+      return (ele.getAttributeNS(null, name) || null);\r
     };\r
     getAttr = begin = ele = void 0;\r
   }\r
index 95f155c..c938a9b 100644 (file)
@@ -3315,6 +3315,7 @@ describe("SMIL Animation Spec", function() {
       beforeEach( function() {\r
         attr = base("$calcMode").$attribute.up("width");\r
         base("$frame").timelines.length = 0;\r
+        base("$frame").startTime = Date.now();\r
       } );\r
       /*境界条件を調べておく (limit value analysis)*/\r
       it("should be this for the value  (limit value analysis)", function() {\r
@@ -3345,6 +3346,15 @@ describe("SMIL Animation Spec", function() {
           attr.push(s);\r
           expect(attr.element).toBe(p);\r
           expect(attr.frame.timelines.length).toEqual(num);\r
+          var line = attr.frame.timelines[num-1];\r
+          expect(line.string).toBe("0");\r
+          var act = line.$activate;\r
+          expect(act.dur).toBeNull();\r
+          expect(act.end).toBeNull();\r
+          expect(act.repeatCount).toBeNull();\r
+          expect(act.repeatDur).toBeNull();\r
+          expect(act.min).toBe("0");\r
+          expect(act.max).toBe("indefinite");\r
           \r
           s.removeAttribute(attrName);\r
           expect(s.hasAttributeNS(null, attrName)).toBeFalsy();\r