[Sie-announce] SIEコード [2210] 0. 65統合

Zurück zum Archiv-Index

svnno****@sourc***** svnno****@sourc*****
2010年 12月 7日 (火) 23:11:58 JST


Revision: 2210
          http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2210
Author:   dhrname
Date:     2010-12-07 23:11:58 +0900 (Tue, 07 Dec 2010)

Log Message:
-----------
0.65統合

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

Property Changed:
----------------
    branches/06x/org/
    branches/06x/org/w3c/
    branches/06x/org/w3c/core.js
    branches/06x/org/w3c/dom/css.js
    branches/06x/org/w3c/dom/events.js
    branches/06x/org/w3c/dom/svg.js


Property changes on: branches/06x/org
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/06x/061/org:1864-2067
/branches/06x/062/org:2071-2106
/branches/06x/063/org:2110-2146
/branches/06x/064/org:2149-2177
   + /branches/06x/061/org:1864-2067
/branches/06x/062/org:2071-2106
/branches/06x/063/org:2110-2146
/branches/06x/064/org:2149-2177
/branches/06x/065/org:2179-2209


Property changes on: branches/06x/org/w3c
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/06x/061/org/w3c:1864-2067
/branches/06x/062/org/w3c:2071-2106
/branches/06x/063/org/w3c:2110-2146
/branches/06x/064/org/w3c:2149-2177
/branches/ufltima:1621-1788
   + /branches/06x/061/org/w3c:1864-2067
/branches/06x/062/org/w3c:2071-2106
/branches/06x/063/org/w3c:2110-2146
/branches/06x/064/org/w3c:2149-2177
/branches/06x/065/org/w3c:2179-2209
/branches/ufltima:1621-1788

Modified: branches/06x/org/w3c/core.js
===================================================================
--- branches/06x/org/w3c/core.js	2010-12-07 13:57:18 UTC (rev 2209)
+++ branches/06x/org/w3c/core.js	2010-12-07 14:11:58 UTC (rev 2210)
@@ -131,7 +131,7 @@
 WRONG_DOCUMENT_ERR
 ノードを生成した文書以外の(そのノードをサポートしない)異なる文書で,ノードが使用されている。4
 */
-}
+};
 DOMException.INDEX_SIZE_ERR                 = 1;
 DOMException.DOMSTRING_SIZE_ERR             = 2;
 DOMException.HIERARCHY_REQUEST_ERR          = 3;


Property changes on: branches/06x/org/w3c/core.js
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/06x/061/org/w3c/core.js:1864-2067
/branches/06x/062/org/w3c/core.js:2071-2106
/branches/06x/063/org/w3c/core.js:2110-2146
/branches/06x/064/org/w3c/core.js:2149-2177
/branches/ufltima/core.js:1621-1854
   + /branches/06x/061/org/w3c/core.js:1864-2067
/branches/06x/062/org/w3c/core.js:2071-2106
/branches/06x/063/org/w3c/core.js:2110-2146
/branches/06x/064/org/w3c/core.js:2149-2177
/branches/06x/065/org/w3c/core.js:2179-2209
/branches/ufltima/core.js:1621-1854

Modified: branches/06x/org/w3c/dom/css.js
===================================================================
--- branches/06x/org/w3c/dom/css.js	2010-12-07 13:57:18 UTC (rev 2209)
+++ branches/06x/org/w3c/dom/css.js	2010-12-07 14:11:58 UTC (rev 2210)
@@ -216,9 +216,11 @@
       var ti = this._list[i], tc = ti.cssText;
       if (tc.indexOf(propertyName) > -1) {  //プロパティ名に合致するCSSValueオブジェクトが見つかった場合 
         ti._empercents = this._list._fontSize;
+        propertyName = null;
         return ti;
       }
     }
+    propertyName = null;
     return null;
   },
   /*removePropertyメソッド
@@ -644,17 +646,18 @@
   return this;
 };
 /*CSSStyleDeclaration*/ ViewCSS.prototype.getComputedStyle = function( /*Element*/ elt, /*string*/ pseudoElt) {
+  if (!!elt._currentStyle) {
+    /*キャッシュがあれば、それを返す*/
+    return (elt._currentStyle);
+  }
   var s = new CSSStyleDeclaration();
+  elt._currentStyle = s;
   //リストを連結することによって、カスケーディングを実現する
   var pelt = elt.parentNode;
   if (pelt) {
-    if (this._cache_ele !== pelt) {                     //キャッシュを更新する
-      this._cache = this.getComputedStyle(pelt, pseudoElt);
-      this._cache_ele = pelt;
-    }
-    var p = this._cache._list;
+    var p = this.getComputedStyle(pelt, pseudoElt)._list;
   } else {
-    var p = CSS2Properties._list;     //デフォルト値の設定
+    var p = this._defaultCSS;     //デフォルト値の設定
   }
   var q = s._list;
   if (!!elt.style) {
@@ -682,7 +685,7 @@
   }
   s._list._opacity = p._opacity * (eso || 1);
   s._list._fontSize = p._fontSize;
-  eso = p = q = null;
+  pelt = eso = p = q = null;
   s._document = elt.ownerDocument;
   return s;
 };


Property changes on: branches/06x/org/w3c/dom/css.js
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/06x/061/org/w3c/dom/css.js:1864-2067
/branches/06x/062/org/w3c/dom/css.js:2071-2106
/branches/06x/063/org/w3c/dom/css.js:2110-2146
/branches/06x/064/org/w3c/dom/css.js:2149-2177
/branches/ufltima/dom/css.js:1621-1855
   + /branches/06x/061/org/w3c/dom/css.js:1864-2067
/branches/06x/062/org/w3c/dom/css.js:2071-2106
/branches/06x/063/org/w3c/dom/css.js:2110-2146
/branches/06x/064/org/w3c/dom/css.js:2149-2177
/branches/06x/065/org/w3c/dom/css.js:2179-2209
/branches/ufltima/dom/css.js:1621-1855

Modified: branches/06x/org/w3c/dom/events.js
===================================================================
--- branches/06x/org/w3c/dom/events.js	2010-12-07 13:57:18 UTC (rev 2209)
+++ branches/06x/org/w3c/dom/events.js	2010-12-07 14:11:58 UTC (rev 2210)
@@ -237,6 +237,8 @@
   },
   /*void*/ preventDefault : function(){
     this._default = false;
+    /*IEのみで使えるreturnValueプロパティ*/
+    window.event.returnValue = false;
   },
   /*void*/ initEvent : function( /*string*/ eventTypeArg, /*boolean*/ canBubbleArg, /*boolean*/ cancelableArg) {
     this.type = eventTypeArg;


Property changes on: branches/06x/org/w3c/dom/events.js
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/06x/061/org/w3c/dom/events.js:1864-2067
/branches/06x/062/org/w3c/dom/events.js:2071-2106
/branches/06x/063/org/w3c/dom/events.js:2110-2146
/branches/06x/064/org/w3c/dom/events.js:2149-2177
/branches/ufltima/dom/events.js:1621-1856
   + /branches/06x/061/org/w3c/dom/events.js:1864-2067
/branches/06x/062/org/w3c/dom/events.js:2071-2106
/branches/06x/063/org/w3c/dom/events.js:2110-2146
/branches/06x/064/org/w3c/dom/events.js:2149-2177
/branches/06x/065/org/w3c/dom/events.js:2179-2209
/branches/ufltima/dom/events.js:1621-1856

Modified: branches/06x/org/w3c/dom/svg.js
===================================================================
--- branches/06x/org/w3c/dom/svg.js	2010-12-07 13:57:18 UTC (rev 2209)
+++ branches/06x/org/w3c/dom/svg.js	2010-12-07 14:11:58 UTC (rev 2210)
@@ -149,16 +149,17 @@
     if (evt.eventPhase === Event.BUBBLING_PHASE) {
       return;
     }
-    var name = evt.attrName, tar = evt.target, _parseFloat = parseFloat;
+    var name = evt.attrName, tar = evt.target;
     if (!!CSS2Properties[name] || name.indexOf("-") > -1) { //スタイルシートのプロパティならば
       tar._attributeStyle.setProperty(name, evt.newValue, "");
+      tar._currentStyle = null;  //キャッシュは消しておく
     }
     if (evt.relatedNode.localName === "id") { //xml:idあるいはid属性ならば
       tar.id = evt.newValue;
     } else if (name === "transform" && !!tar.transform) {
-      var tft = evt.newValue, degR = /[\-\d\.e]+/g;
-      var coma = tft.match(/[A-Za-z]+(?=\s*\()/g);   //コマンド文字にマッチ translate
-      var list = tft.match(/\([^\)]+\)/g);           //カッコ内のリストにマッチ (10 20 30...)
+      var tft = evt.newValue, degR = tar._degReg;
+      var coma = tft.match(tar._comaReg);   //コマンド文字にマッチ translate
+      var list = tft.match(tar._strReg);           //カッコ内のリストにマッチ (10 20 30...)
       var a,b,c,d,e,f,lis,deg,rad,degli;
       //transform属性の値を、SVGTransformListであるtransformプロパティに結びつける
       for (var j=0,cli=coma.length;j<cli;j++) {
@@ -168,22 +169,22 @@
         degli = deg.length;
         if (degli === 6) {
           var cm = s.matrix;
-          cm.a = _parseFloat(deg[0]);
-          cm.b = _parseFloat(deg[1]);
-          cm.c = _parseFloat(deg[2]);
-          cm.d = _parseFloat(deg[3]);
-          cm.e = _parseFloat(deg[4]);
-          cm.f = _parseFloat(deg[5]);
+          cm.a = +(deg[0]);
+          cm.b = +(deg[1]);
+          cm.c = +(deg[2]);
+          cm.d = +(deg[3]);
+          cm.e = +(deg[4]);
+          cm.f = +(deg[5]);
         } else {
           if (degli === 3) {
             var degz = _parseFloat(deg[0]);
-            s.setRotate(degz, _parseFloat(deg[1]), _parseFloat(deg[2]))
+            s.setRotate(degz, +(deg[1]), +(deg[2]))
           } else if (degli <= 2) {
-            var degz = _parseFloat(deg[0]);
+            var degz = +(deg[0]);
             if (com === "translate") {
-              s.setTranslate(degz, _parseFloat(deg[1] || 0));
+              s.setTranslate(degz, +(deg[1] || 0));
             } else if (com === "scale") {
-              s.setScale(degz, _parseFloat(deg[1] || deg[0]));
+              s.setScale(degz, +(deg[1] || deg[0]));
             } else if (com === "rotate") {
               s.setRotate(degz, 0, 0);
             } else if (com === "skewX") {
@@ -202,9 +203,9 @@
       style.cssText = sc;
       if (sc !== "") {
         //style属性値の解析
-        sc = sc.replace(/^[^a-z\-]+/, "")
-               .replace(/\:\s+/g, ":")
-               .replace(/\s*;[^a-z\-]*/g, ";");
+        sc = sc.replace(tar._shouReg, "")
+               .replace(tar._conReg, ":")
+               .replace(tar._bouReg, ";");
         var a = sc.split(";");
         for (var i=0, ali=a.length;i<ali;++i) {
           var ai = a[i], m = ai.split(":");
@@ -215,6 +216,7 @@
         }
         a = sc = null;
       }
+      tar._currentStyle = null;
     } else if (name === "class") {
       tar.className = evt.newValue;
     } else if (name.indexOf("on") === 0) {           //event属性ならば
@@ -252,7 +254,7 @@
       if (!!tar[name]) {
         var tea = tar[name], tod = tar.ownerDocument.documentElement;
         if (tea instanceof SVGAnimatedLength) {
-          var n = evt.newValue.match(/\D+$/), type = SVGLength.SVG_LENGTHTYPE_NUMBER;
+          var n = evt.newValue.match(tar._NaNReg), type = SVGLength.SVG_LENGTHTYPE_NUMBER, _parseFloat = parseFloat;
           if (!!n) {
             n = n[0];
           }
@@ -306,6 +308,14 @@
 SVGElement.constructor = Element;
 SVGElement.prototype = new Element();
 
+SVGElement.prototype._degReg = /[\-\d\.e]+/g;
+SVGElement.prototype._comaReg = /[A-Za-z]+(?=\s*\()/g;
+SVGElement.prototype._strReg =  /\([^\)]+\)/g;
+SVGElement.prototype._syouReg = /^[^a-z\-]+/;
+SVGElement.prototype._conReg = /\:\s+/g;
+SVGElement.prototype._bouReg = /\s*;[^a-z\-]*/g;
+SVGElement.prototype._NaNReg = /\D+$/;
+
 /*interface SVGLocatable*/
 /*SVGRect*/   SVGElement.prototype.getBBox = function(){
   var s = new SVGRect();
@@ -317,7 +327,7 @@
    */
   var degis = data.match(/[0-9\-]+/g);
   for (var i=0,degisli=degis.length;i<degisli;i+=2) {
-    var nx = parseInt(degis[i]), ny = parseInt(degis[i+1]);
+    var nx = +(degis[i]), ny = +(degis[i+1]);
     el = el > nx ? nx : el;
     et = et > ny ? ny : et;
     er = er > nx ? er : nx;
@@ -1519,6 +1529,7 @@
       /*responseXMLを使うと、時々、空のデータを返すことがあるため(原因は不明)、
        *ここでは、responseTextを用いる
        */
+      var dsd = new Date();
       str = this.xmlhttp.responseText;
       NAIBU.doc.async = false;
       /*下記のプロパティについては、Microsoftのサイトを参照
@@ -1555,11 +1566,14 @@
         tmp = null;
       }
       var s = DOMImplementation.createDocument("http://www.w3.org/2000/svg", "svg");
-      var tar = s.documentElement;
-      tar.viewport.top = 0;
-      tar.viewport.left = 0;
-      tar.viewport.width = objei.clientWidth;
-      tar.viewport.height = objei.clientHeight;
+      var tar = s.documentElement, tview = tar.viewport;
+      tview.top = 0;
+      tview.left = 0;
+      tview.width = objei.clientWidth;
+      tview.height = objei.clientHeight;
+      if (tview.height < 24) { //IEの標準モードではclientHeightプロパティの値が小さくなることがある
+        tview.height = screen.availHeight;
+      }
       if (tar.viewport.height < 24) { //IEの標準モードではclientHeightプロパティの値が小さくなることがある
         tar.viewport.height = screen.width;
       }
@@ -1579,10 +1593,9 @@
       }
       str = attr = null;
       var sdt = tar._tar, sp = document.createElement("div"), dcp = document.createElement("v:group");
-      var view = tar.viewport;
-      dcp.style.width = view.width+ "px";
-      dcp.style.height = view.height+ "px";
-      dcp.coordsize = view.width+ " " +view.height;
+      dcp.style.width = tview.width+ "px";
+      dcp.style.height = tview.height+ "px";
+      dcp.coordsize = tview.width+ " " +tview.height;
       sp.appendChild(dcp);
       objei.parentNode.insertBefore(sp, objei);
       dcp.appendChild(sdt)
@@ -1596,7 +1609,7 @@
        *作り出す作業を行う。これは必須
        */
       var backr = document.createElement("v:rect");
-      var w = tar.viewport.width, h = tar.viewport.height, sw = tar.width.baseVal.value, sh = tar.height.baseVal.value;
+      var w = tview.width, h = tview.height, sw = tar.width.baseVal.value, sh = tar.height.baseVal.value;
       backr.style.position = "absolute";
       backr.style.width = w+ "px";
       backr.style.height = h+ "px";
@@ -1657,6 +1670,7 @@
       s = evt = null;
       /*IEのメモリリーク対策として、空関数を入力*/
       this.xmlhttp.onreadystatechange = NAIBU.emptyFunction;
+      alert(+(new Date()) - dsd.getTime())
       if (this._next) {
         this._next._init();
       } else {
@@ -1692,10 +1706,9 @@
  *2次元座標の点(x,y)を表すオブジェクト
  */
 function SVGPoint() { 
-  /*float*/ this.x = 0;
-  /*float*/ this.y = 0;
   return this;
 };
+/*float*/SVGPoint.prototype.x = SVGPoint.prototype.y = 0;
 SVGPoint.prototype.matrixTransform = function(/*SVGMatrix*/ matrix ) {
   /*整数にしているのは、VMLの設計上、小数点を扱えないときがあるため*/
   var x = parseInt(matrix.a * this.x + matrix.c * this.y + matrix.e);
@@ -1724,15 +1737,15 @@
  *[0 0 1]
  */
 function SVGMatrix() { 
-  /*float*/ this.a = 1;
-   /*float*/ this.b = 0;
-  /*float*/ this.c = 0;
-  /*float*/ this.d = 1;
-  /*float*/ this.e = 0;
-  /*float*/ this.f = 0;
   return this;
 };
 SVGMatrix.prototype = {
+  /*float*/ a : 1,
+  /*float*/ b : 0,
+  /*float*/ c : 0,
+  /*float*/ d : 1,
+  /*float*/ e : 0,
+  /*float*/ f : 0,
   /*multiplyメソッド
    *行列の積を求めて返す
    */
@@ -2659,10 +2672,9 @@
       var w = vi.width.baseVal.value, h = vi.height.baseVal.value;
       dat[dat.length] = " e";
       tar._tar.path = dat.join(" ");
-      dat = null;
       tar._tar.coordsize = w + " " + h;
       NAIBU._setPaint(tar, matrix);
-      evt = tar = w = h = matrix  = x = y = _parseInt = null;
+      evt = tar = dat = w = h = matrix = tlist = x = y = _parseInt = ma = mb = mc = md = me = mf = vi = isZ = isM = isL = isC = null;
     }, false);
     evt = tar = null;
   }, false);
@@ -4138,7 +4150,7 @@
       rx = ry = r;
       var tarrect = tar.getBBox();
       var vi = tar.ownerDocument.documentElement.viewport;
-      var el = vi.width, et = vi.height, er = 0, eb = 0;
+      var el = vi.width | 0, et = vi.height | 0, er = 0, eb = 0;
       var units = grad.getAttributeNS(null, "gradientUnits");
       if (!units || units === "objectBoundingBox") {
         //%の場合は小数点に変換(10% -> 0.1)
@@ -4736,7 +4748,7 @@
 /*      try{*/
         var ntc = NAIBU.Time.currentFrame++;
         var nc = NAIBU.Clip;
-        var s = ntc * 125 * 0.8; //フレーム数ntcをミリ秒数sに変換
+        var s = ntc * 100; //フレーム数ntcをミリ秒数sに変換
         if (ntc > NAIBU.Time.Max) {
           clearInterval(NAIBU.stop);
         }
@@ -5166,6 +5178,11 @@
                 SVGExternalResourcesRequired,
                 SVGStylable*/ {
   SVGElement.apply(this);
+  this.addEventListener("SVGLoad", function(evt){
+    var tar = evt.target, ctar = evt.currentTarget;
+    ctar._instance = tar._instance;
+    evt = tar = ctar = null;
+  }, true);
   return this;
 };
 SVGFontElement.constructor = SVGElement;
@@ -5225,11 +5242,6 @@
     }
     evt.target.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:show", "embed");
   }, false);
-  this.addEventListener("SVGLoad", function(evt){
-    var tar = evt.target;
-    var doc = tar.ownerDocument.importNode(tar._instance, true);
-    evt = trans = tar = evtt = tgtb = null;
-  }, false);
   SVGURIReference.apply(this);
   return this;
 };
@@ -5370,6 +5382,8 @@
   s._list._opacity = 1;
   s._list._fontSize = 12;
   CSS2Properties._list = s._list;
+  Document.prototype.defaultView._defaultCSS = CSS2Properties._list;
+  s = null;
 })();
 
 NAIBU.addEvent = function(evt,lis){


Property changes on: branches/06x/org/w3c/dom/svg.js
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/06x/061/org/w3c/dom/svg.js:1864-2067
/branches/06x/062/org/w3c/dom/svg.js:2071-2106
/branches/06x/063/org/w3c/dom/svg.js:2110-2146
/branches/06x/064/org/w3c/dom/svg.js:2149-2177
/branches/06x/065/org/w3c/dom/svg.js:2179-2181
/branches/ufltima/dom/svg.js:1621-1856
   + /branches/06x/061/org/w3c/dom/svg.js:1864-2067
/branches/06x/062/org/w3c/dom/svg.js:2071-2106
/branches/06x/063/org/w3c/dom/svg.js:2110-2146
/branches/06x/064/org/w3c/dom/svg.js:2149-2177
/branches/06x/065/org/w3c/dom/svg.js:2179-2209
/branches/ufltima/dom/svg.js:1621-1856




Sie-announce メーリングリストの案内
Zurück zum Archiv-Index