[Sie-announce] SIEコード [1967] use要素において、スクリプトが無限に循環するバグを修正

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2010年 7月 26日 (月) 22:17:54 JST


Revision: 1967
          http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1967
Author:   dhrname
Date:     2010-07-26 22:17:54 +0900 (Mon, 26 Jul 2010)

Log Message:
-----------
use要素において、スクリプトが無限に循環するバグを修正

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-07-25 14:06:48 UTC (rev 1966)
+++ branches/06x/061/org/w3c/dom/svg.js	2010-07-26 13:17:54 UTC (rev 1967)
@@ -1288,14 +1288,11 @@
     }
     evt.target.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:show", "embed");
   }, false);
-  this.addEventListener("DOMNodeInsertedIntoDocument", function(evt){
+  this.addEventListener("SVGLoad", function(evt){
     var tar = evt.target;
-    if (!!!tar._gtar) {
-      tar._gtar = tar.ownerDocument.createElementNS("http://www.w3.org/2000/svg", "g");
-    }
-    if (!!this.instanceRoot) {
-      tar._gtar.appendChild(this.instanceRoot);
-    }
+    tar.instanceRoot = tar.animatedInstanceRoot = tar.ownerDocument.importNode(tar._instance, true);
+    tar._gtar = tar.ownerDocument.createElementNS("http://www.w3.org/2000/svg", "g");
+    tar._gtar.appendChild(tar.instanceRoot);
     if (tar.getAttributeNS(null, "transform")) {
       tar._gtar.setAttributeNS(null, "transform", tar.getAttributeNS(null, "transform"));
     }
@@ -1304,16 +1301,8 @@
     trans.setTranslate(tar.x.baseVal.value, tar.y.baseVal.value);
     tgtb.appendItem(trans);
     tar.parentNode.insertBefore(tar._gtar, tar)
-    tar = tgtb = null;
+    tar = evtt = tgtb = null;
   }, false);
-  this.addEventListener("SVGLoad", function(evt){
-    var tar = evt.target;
-    tar.instanceRoot = tar.animatedInstanceRoot = tar.ownerDocument.importNode(tar._instance, true);
-    var evtt = tar.ownerDocument.createEvent("MutationEvents");
-    evtt.initMutationEvent("DOMNodeInsertedIntoDocument", false, false, null, null, null, null, null);
-    tar.dispatchEvent(evtt)
-    tar = evtt = null;
-  }, false);
   SVGURIReference.apply(this);
   return this;
 };




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