From: dhrname Date: Sat, 12 Jan 2013 11:42:36 +0000 (+0900) Subject: _caメソッドのテキスト処理を改善して高速化 X-Git-Tag: v16beta~376 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=d4bca43440780e57b32544e6060d4c1498110653;p=sie%2Fsie.git _caメソッドのテキスト処理を改善して高速化 --- diff --git a/org/w3c/dom/svg.js b/org/w3c/dom/svg.js index 185f496..3c3e7f4 100644 --- a/org/w3c/dom/svg.js +++ b/org/w3c/dom/svg.js @@ -1753,7 +1753,7 @@ function _ca_() { s = DOMImplementation.createDocument("http://www.w3.org/2000/svg", "svg"), tar = s.documentElement, tview = tar.viewport, - objw, objh, fi, n, attr, att, w, h, + objw, objh, fi, attr, w, h, sdt = tar._tar, sp = _doc.createElement("div"), dcp = _doc.createElement("v:group"), @@ -1803,8 +1803,7 @@ function _ca_() { ndoc.loadXML(tmp); tmp = enti = map = void 0; } - tview.top = 0; - tview.left = 0; + tview.top = tview.left = 0; tview.width = objei.clientWidth; tview.height = objei.clientHeight; if (tview.height < 24) { //IEの標準モードではclientHeightプロパティの値が小さくなることがある @@ -1815,18 +1814,13 @@ function _ca_() { } objw = objei.getAttribute("width"); objh = objei.getAttribute("height"); - if (objw) { - tar.setAttributeNS(null, "width", objw); - } - if (objh) { - tar.setAttributeNS(null, "height", objh); - } + objw && tar.setAttributeNS(null, "width", objw); + objh && tar.setAttributeNS(null, "height", objh); fi = ndoc.documentElement.firstChild; attr = ndoc.documentElement.attributes; /*ルート要素のNamedNodeMapを検索する*/ for (var i=0,atli=attr.length;i