[Sie-announce] SIEコード [1989]

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2010年 9月 7日 (火) 23:09:05 JST


Revision: 1989
          http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1989
Author:   dhrname
Date:     2010-09-07 23:09:05 +0900 (Tue, 07 Sep 2010)

Log Message:
-----------


Modified Paths:
--------------
    branches/06x/061/org/w3c/dom/svg.js

Modified: branches/06x/061/org/w3c/dom/svg.js
===================================================================
--- branches/06x/061/org/w3c/dom/svg.js	2010-09-07 14:08:03 UTC (rev 1988)
+++ branches/06x/061/org/w3c/dom/svg.js	2010-09-07 14:09:05 UTC (rev 1989)
@@ -4165,14 +4165,18 @@
     "ms" : 0.8
 };
 /*どれだけズレの時間があるかを計測するメソッド
- *tに数値が使われていないときはnullを返す
+ *tに数値が使われていないときは0を返す
+ *これはSMILアニメーションモジュールの以下の記述にあるように、値のデフォルトが0であることに起因する
+ *http://www.w3.org/TR/2001/REC-smil20-20010807/smil-timing.html#Timing-Ex:0DurDiscreteMedia
+ *http://www.w3.org/TR/2001/REC-smil20-20010807/smil-timing.html#Timing-DurValueSemantics
+ ** Note that when the simple duration is "indefinite", some simple use cases can yield surprising results. See the related example #4 in Appendix B.
  */
 SVGAnimationElement.prototype._getOffset = function(/*string*/ t) {
   var n = parseFloat(t.match(this._timeRegExp));
   if (!isNaN(n)) {
     var offset = n * this._unit[RegExp.$1]
   } else {
-    var offset = null;
+    var offset = 0;
   }
   n = t = null;
   return offset;
@@ -4208,7 +4212,7 @@
   return (this._currentFrame * 125 / 0.8);
 };
 /*float*/ SVGAnimationElement.prototype.getSimpleDuration = function(){
-  if (!!!this._simpleDuration && !!!this._end) {
+  if (!!!this._simpleDuration && !!!this._end && this._simpleDuration !== 0) {
     throw new DOMException(DOMException.NOT_SUPPORTED_ERR);
   } else if (!!this._simpleDuration && !!this._end) {
     var s = (this._simpleDuration > this._end - this._begin) ? this._end - this._begin : this._simpleDuration;
@@ -4315,7 +4319,7 @@
     evt = tar = attrName = null;
   }, false);
   this.addEventListener("endEvent", function(evt) {
-    var tar = evt.target, attrName = tar.getAttributeNS(null, "attributeName"), style = tar.ownerDocument.defaultView.geComputedStyle(tar.targetElment, "");
+    var tar = evt.target, attrName = tar.getAttributeNS(null, "attributeName"), style = tar.ownerDocument.defaultView.getComputedStyle(tar.targetElement, "");
     tar.style.setProperty(attrName, style.getPropertyValue(attrName), null);
     var evtt = tar.ownerDocument.createEvent("MutationEvents");
     evtt.initMutationEvent("DOMNodeInsertedIntoDocument", false, false, null, null, null, null, null);
@@ -4323,7 +4327,7 @@
     evtt = null;
   }, false);
   this.addEventListener("repeatEvent", function(evt) {
-    var tar = evt.target, attrName = tar.getAttributeNS(null, "attributeName"), style = tar.ownerDocument.defaultView.geComputedStyle(tar.targetElment, "");
+    var tar = evt.target, attrName = tar.getAttributeNS(null, "attributeName"), style = tar.ownerDocument.defaultView.getComputedStyle(tar.targetElement, "");
   }, false);
   return this;
 };




Sie-announce メーリングリストの案内
Back to archive index