svnno****@sourc*****
svnno****@sourc*****
2010年 12月 16日 (木) 22:51:55 JST
Revision: 2224 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2224 Author: dhrname Date: 2010-12-16 22:51:55 +0900 (Thu, 16 Dec 2010) Log Message: ----------- SVGURIReferenceの#idに関する修正 Modified Paths: -------------- branches/06x/066/org/w3c/dom/svg.js Modified: branches/06x/066/org/w3c/dom/svg.js =================================================================== --- branches/06x/066/org/w3c/dom/svg.js 2010-12-16 13:20:29 UTC (rev 2223) +++ branches/06x/066/org/w3c/dom/svg.js 2010-12-16 13:51:55 UTC (rev 2224) @@ -972,7 +972,7 @@ str = xmlhttp.responseText.replace(/!DOCTYPE/,"!--").replace(/(dtd">|\]>)/,"-->"); doc.loadXML(str); var ele = doc.documentElement; - tar._instance = tar.ownerDocument.importNode(ele); + tar._instance = tar.ownerDocument.importNode(ele, true); if (id) { tar._instance = tar._instance.ownerDocument.getElementById(id); } @@ -982,7 +982,6 @@ } else { tar._tar.src = uri; } - console.log(""); var ev = tar.ownerDocument.createEvent("SVGEvents"); ev.initEvent("SVGLoad", false, false); tar.dispatchEvent(ev); @@ -5268,10 +5267,9 @@ evt.target.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:show", "embed"); }, false); this.addEventListener("SVGLoad", function(evt){ - console.log(""); var tar = evt.target, svgns = "http://www.w3.org/2000/svg"; - var familyName = evt.currentTarget.getElementsByTagNameNS(svgns, "font-face").item(0).getAttributeNS(null, "font-family"); - var textElements = tar.ownerDocument.getElementsByTagNameNS(svgns, "text"); + var familyName = tar.parentNode.parentNode.getAttributeNS(null, "font-family"); + var textElements = tar.ownerDocument.documentElement.getElementsByTagNameNS(svgns, "text"); for (var i=0,tli=textElements.length;i<tli;++i) { var ti = textElements[i], style = tar.ownerDocument.defaultView.getComputedStyle(ti, ''); if (style.getPropertyValue("font-family", null).indexOf(familyName) > -1) { @@ -5280,7 +5278,7 @@ } tar.ownerDocument.documentElement.__isExternalFont = 1; evt = tar = curt = textElments = svgns = null; - }, true); + }, false); SVGURIReference.apply(this); return this; };