[Sie-announce] SIEコード [2639] SVGStyleElementの修正

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 5月 1日 (日) 23:10:07 JST


Revision: 2639
          http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2639
Author:   dhrname
Date:     2011-05-01 23:10:07 +0900 (Sun, 01 May 2011)

Log Message:
-----------
SVGStyleElementの修正

Modified Paths:
--------------
    branches/07x/077/org/w3c/dom/svg.js

Modified: branches/07x/077/org/w3c/dom/svg.js
===================================================================
--- branches/07x/077/org/w3c/dom/svg.js	2011-04-29 11:59:16 UTC (rev 2638)
+++ branches/07x/077/org/w3c/dom/svg.js	2011-05-01 14:10:07 UTC (rev 2639)
@@ -1905,6 +1905,46 @@
   /*DOMString*/ this.type = "text/css";
   /*DOMString*/ this.media;
   /*DOMString*/ this.title;
+  SVGURIReference.apply(this, arguments);
+  this.addEventListener("DOMAttrModified", function(evt){
+    if (evt.attrName === "type") {
+      evt.target.type = evt.newValue;
+    } else if (evt.attrName === "title") {
+      evt.target.title = evt.newValue;
+    }
+    evt = null;
+  }, false);
+  this.addEventListener("SVGLoad", function(evt){
+    var tar = evt.target,
+        style = tar._text,
+        tod = tar.ownerDocument;
+    NAIBU._temp_doc = tod;
+    tod.documentElement._svgload_limited--;
+    if (tod.documentElement._svgload_limited < 0) {
+      evt = tod.createEvent("SVGEvents");
+      evt.initEvent("SVGLoad", false, false);
+      tod.documentElement.dispatchEvent(evt);
+    }
+    tar = evt = style = null;
+  }, false);
+  this.addEventListener("DOMNodeInserted", function(evt){
+    var tar = evt.target;
+    if (evt.eventPhase === /*Event.BUBBLING_PHASE*/ 3) {
+      if (tar.nodeName === "#cdata-section") {
+        evt.currentTarget._text = tar.data;
+      }
+      return;
+    }
+    tar.addEventListener("DOMNodeInsertedIntoDocument", function(evt){
+      var tar = evt.target;
+      if (evt.eventPhase === Event.AT_TARGET && !tar.getAttributeNodeNS("http://www.w3.org/1999/xlink", "xlink:href")) {
+        var evtt = tar.ownerDocument.createEvent("SVGEvents");
+        evtt.initEvent("SVGLoad", false, false);
+        evt.currentTarget.dispatchEvent(evtt);
+      }
+      tar = evt = null;
+    }, false);
+  }, false);
   return this;
 };
 SVGStyleElement.constructor = SVGElement;




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