[Sie-announce] SIEコード [1920] getComputedStyleメソッドの最適化など

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2010年 7月 2日 (金) 23:46:50 JST


Revision: 1920
          http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1920
Author:   dhrname
Date:     2010-07-02 23:46:50 +0900 (Fri, 02 Jul 2010)

Log Message:
-----------
getComputedStyleメソッドの最適化など

Modified Paths:
--------------
    branches/06x/061/org/w3c/dom/css.js
    branches/06x/061/org/w3c/dom/svg.js

Modified: branches/06x/061/org/w3c/dom/css.js
===================================================================
--- branches/06x/061/org/w3c/dom/css.js	2010-07-02 14:18:53 UTC (rev 1919)
+++ branches/06x/061/org/w3c/dom/css.js	2010-07-02 14:46:50 UTC (rev 1920)
@@ -743,18 +743,20 @@
 /*CSSStyleDeclaration*/ ViewCSS.prototype.getComputedStyle = function( /*Element*/ elt, /*string*/ pseudoElt) {
   var s = new CSSStyleDeclaration();
   //リストを連結することによって、カスケーディングを実現する
-  s._list = s._list.concat(elt.style._list);
-  s._list = s._list.concat(elt._attributeStyle._list);  //プレゼンテーション属性を結びつける
   var pelt = elt.parentNode;
   if (pelt) {
     if (this._cache_ele !== pelt) {                     //キャッシュを更新する
       this._cache = this.getComputedStyle(pelt, pseudoElt);
       this._cache_ele = pelt;
     }
-    s._list = s._list.concat(this._cache._list);
+    var p = this._cache._list;
   } else {
-    s._list = s._list.concat(CSS2Properties._list);     //デフォルト値の設定
+    var p = CSS2Properties._list;     //デフォルト値の設定
   }
+  s._list = s._list.concat(elt.style._list)
+                   .concat(elt._attributeStyle._list)  //プレゼンテーション属性を結びつける
+                   .concat(p);
+  p = null;
   s._document = elt.ownerDocument;
   return s;
 };

Modified: branches/06x/061/org/w3c/dom/svg.js
===================================================================
--- branches/06x/061/org/w3c/dom/svg.js	2010-07-02 14:18:53 UTC (rev 1919)
+++ branches/06x/061/org/w3c/dom/svg.js	2010-07-02 14:46:50 UTC (rev 1920)
@@ -4179,8 +4179,8 @@
 };
 function unsvgtovml() {
   try {
-    Event = NAIBU = stlog = STLog = document = null;
-    window = null;
+    NAIBU.xmlhttp = Node = Event = NAIBU = stlog = STLog = document = null;
+    ActiveXObject = window = null;
   } catch(e) {}
 }
 NAIBU.addEvent("load", (function() {




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