[Sie-announce] SIEコード [2686] _ca_関数で、lengthプロパティをやめることで最適化

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 5月 16日 (月) 21:34:22 JST


Revision: 2686
          http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2686
Author:   dhrname
Date:     2011-05-16 21:34:22 +0900 (Mon, 16 May 2011)

Log Message:
-----------
_ca_関数で、lengthプロパティをやめることで最適化

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

Modified: branches/07x/078/org/w3c/dom/svg.js
===================================================================
--- branches/07x/078/org/w3c/dom/svg.js	2011-05-16 11:40:49 UTC (rev 2685)
+++ branches/07x/078/org/w3c/dom/svg.js	2011-05-16 12:34:22 UTC (rev 2686)
@@ -1830,18 +1830,19 @@
     }
     //以下、テキストの位置を修正
     text = s.documentElement._tar.getElementsByTagName("div");
-    for (var i=0,textli=text.length;i<textli;++i) {
-      var texti = text[i];
+    for (var i=0, texti;text[i];++i) {
+      texti = text[i];
       if (texti.firstChild.nodeName !== "shape") { //radialGradient用のdiv要素でないならば
         var tis = texti.style;
         tis.left = _parseFloat(tis.left) + bl + "px";
         tis.top = _parseFloat(tis.top) + bt + "px";
         tis = null;
       }
+
     }
     s.defaultView._cache = s.defaultView._cache_ele = null;
     evt = objei = tar = tview = objw = objh = n = att = sdt = sp = dcp = backr = w = h = sw = sh = style = fontSize = null;
-    trstyle = tpstyle = backrs = viewWidth = viewHeight = text = bfl = bft = bl = bt = backdown = backright = null;
+    trstyle = tpstyle = backrs = viewWidth = viewHeight = text = texti = i = bfl = bft = bl = bt = backdown = backright = null;
     text = _parseFloat = null;
     /*IEのメモリリーク対策として、空関数を入力*/
     this.xmlhttp.onreadystatechange = NAIBU.emptyFunction;




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