[Sie-announce] SIEコード [2932] SVGTextElementインターフェースの最適化

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 9月 10日 (土) 23:49:51 JST


Revision: 2932
          http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2932
Author:   dhrname
Date:     2011-09-10 23:49:51 +0900 (Sat, 10 Sep 2011)

Log Message:
-----------
SVGTextElementインターフェースの最適化

Modified Paths:
--------------
    branches/08x/085/org/w3c/dom/svg.js

Modified: branches/08x/085/org/w3c/dom/svg.js
===================================================================
--- branches/08x/085/org/w3c/dom/svg.js	2011-09-10 14:43:48 UTC (rev 2931)
+++ branches/08x/085/org/w3c/dom/svg.js	2011-09-10 14:49:51 UTC (rev 2932)
@@ -4202,16 +4202,18 @@
           tod = tar.ownerDocument.documentElement,
           ttpc = ttp, //ttpcはttpのキャッシュ
           tlen = tar.getComputedTextLength(),
-          anchor = style.getPropertyValue("text-anchor");
-      ttp.style.cssText = tar.style.cssText;
-      ttp.style.fontSize = n + "px";
-      ttp.style.fontFamily = style.getPropertyValue("font-family");
+          anchor = style.getPropertyValue("text-anchor"),
+          ttps = ttp.style;
+      ttps.cssText = tar.style.cssText;
+      ttps.fontSize = n + "px";
+      ttps.fontFamily = style.getPropertyValue("font-family");
       /*ここでの変数jは前回ノードまでの総文字数*/
       for (var i=0, j=0, tli=tar.getNumberOfChars();i<tli;++i) {
         if (ti) {
           if (!!ti._tars && (ti._tars.length !== 0)) {
             var ij = (i > j) ? i - j : j - i
-            var sty = ti._tars[ij].style, p = tar.getStartPositionOfChar(i);
+            var sty = ti._tars[ij].style,
+                p = tar.getStartPositionOfChar(i);
             sty.position = "absolute";
             if (tar._isYokogaki) {
               if (anchor === "middle") {
@@ -4300,17 +4302,14 @@
       if (!isRect) {
         var backr = _doc.createElement("v:rect");
         var backrs = backr.style; //ずれを修正するためのもの
-        backrs.width = "1px";
-        backrs.height = "1px";
-        backrs.left = "0px";
-        backrs.top = "0px";
-        backr.stroked = "false";
-        backr.filled = "false";
+        backrs.width = backrs.height = "1px";
+        backrs.left = backrs.top = "0px";
+        backr.stroked = backr.filled = "false";
         ttp.appendChild(backr);
       }
       delete tar._cacheMatrix;
       delete tar._currentStyle;
-      isRect = evt = tar = style = tpp = ttpc = style = color = cursor = disp = vis = null;
+      isRect = evt = tar = style = tpp = ttpc = style = color = cursor = disp = vis = ttps = null;
     }, false);
     evt = tar = null;
   },false);




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