svnno****@sourc*****
svnno****@sourc*****
2011年 5月 5日 (木) 19:42:56 JST
Revision: 2657 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2657 Author: dhrname Date: 2011-05-05 19:42:56 +0900 (Thu, 05 May 2011) Log Message: ----------- 1, SVGStyleElementの修正 2, SVGDocumentに対して、DocumentStyleを継承させた 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-05-05 10:36:02 UTC (rev 2656) +++ branches/07x/077/org/w3c/dom/svg.js 2011-05-05 10:42:56 UTC (rev 2657) @@ -1107,7 +1107,8 @@ *SVGの文書オブジェクト */ function SVGDocument(){ - Document.apply(this, arguments); + Document.apply(this); + DocumentStyle.apply(this); /*readonly DOMString*/ this.title = ""; /*readonly DOMString*/ this.referrer = document.referrer; /*readonly DOMString*/ this.domain = document.domain; @@ -1918,8 +1919,11 @@ var tar = evt.target, style = tar._text, tod = tar.ownerDocument; + console.log(style); NAIBU._temp_doc = tod; + console.log(tod.styleSheets); tod.styleSheets[tod.styleSheets.length] = DOMImplementation.createCSSStyleSheet(tar.title, tar.media); + alert(style); tod.documentElement._svgload_limited--; if (tod.documentElement._svgload_limited < 0) { evt = tod.createEvent("SVGEvents"); @@ -1938,7 +1942,7 @@ } 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")) { + 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);