[Sie-announce] SIEコード [2434] 0. 71beta統合

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 2月 25日 (金) 22:30:57 JST


Revision: 2434
          http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2434
Author:   dhrname
Date:     2011-02-25 22:30:57 +0900 (Fri, 25 Feb 2011)

Log Message:
-----------
0.71beta統合

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

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


Property changes on: branches/07x/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/065/org:2179-2209
/branches/06x/066/org:2211-2236
/branches/06x/067/org:2257-2282
/branches/06x/068/org:2284-2314
/branches/06x/069/org:2317-2352
/branches/06x/org:1861-2353
/branches/07x/070/org:2363-2383
   + /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
/branches/06x/066/org:2211-2236
/branches/06x/067/org:2257-2282
/branches/06x/068/org:2284-2314
/branches/06x/069/org:2317-2352
/branches/06x/org:1861-2353
/branches/07x/070/org:2363-2383
/branches/07x/071/org:2385-2433


Property changes on: branches/07x/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/06x/065/org/w3c:2179-2209
/branches/06x/066/org/w3c:2211-2236
/branches/06x/067/org/w3c:2257-2282
/branches/06x/068/org/w3c:2284-2314
/branches/06x/069/org/w3c:2317-2352
/branches/06x/org/w3c:1861-2353
/branches/07x/070/org/w3c:2363-2383
/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/06x/066/org/w3c:2211-2236
/branches/06x/067/org/w3c:2257-2282
/branches/06x/068/org/w3c:2284-2314
/branches/06x/069/org/w3c:2317-2352
/branches/06x/org/w3c:1861-2353
/branches/07x/070/org/w3c:2363-2383
/branches/07x/071/org/w3c:2385-2433
/branches/ufltima:1621-1788


Property changes on: branches/07x/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/06x/065/org/w3c/core.js:2179-2209
/branches/06x/066/org/w3c/core.js:2211-2244
/branches/06x/067/org/w3c/core.js:2257-2282
/branches/06x/068/org/w3c/core.js:2284-2314
/branches/06x/069/org/w3c/core.js:2317-2352
/branches/06x/org/w3c/core.js:1861-2353
/branches/07x/070/org/w3c/core.js:2363-2383
/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/06x/066/org/w3c/core.js:2211-2244
/branches/06x/067/org/w3c/core.js:2257-2282
/branches/06x/068/org/w3c/core.js:2284-2314
/branches/06x/069/org/w3c/core.js:2317-2352
/branches/06x/org/w3c/core.js:1861-2353
/branches/07x/070/org/w3c/core.js:2363-2383
/branches/07x/071/org/w3c/core.js:2385-2433
/branches/ufltima/core.js:1621-1854

Modified: branches/07x/org/w3c/dom/css.js
===================================================================
--- branches/07x/org/w3c/dom/css.js	2011-02-25 13:28:32 UTC (rev 2433)
+++ branches/07x/org/w3c/dom/css.js	2011-02-25 13:30:57 UTC (rev 2434)
@@ -682,6 +682,9 @@
   for (var i=0,pli=p.length;i<pli;++i) {
     q[q.length] = p[i];
   }
+  if (elt._runtimeStyle) {
+    q = elt._runtimeStyle._list.concat(q);
+  }
   s._def = this._defaultCSS;    //デフォルト値の設定
   s._list =  q;
   if (!!elt.style) {
@@ -708,14 +711,16 @@
     var s = new CSSStyleDeclaration(), setProp = s.setProperty; //このsetPropは関数オブジェクトではなくて、単なる関数のラベル
     tar._runtimeStyle = s;
   }
-  var style = this.defaultView.getComputedStyle(tar, "")
   s.setProperty = function(propertyName, value, priority) {
+    setProp.call(s, propertyName, value, priority);
     var tar = elt, el = tar._tar, isFill = isStroke = false;
+    delete tar._currentStyle;
     if ((tar.localName === "g") || (tar.localName === "a")) {
       var sl = tar.getElementsByTagNameNS("http://www.w3.org/2000/svg", "*");
       if (sl) {
         for (var i=0,sli=sl.length;i<sli;++i) {
           var di = sl[i];
+          delete di._currentStyle;
           NAIBU._setPaint(di, di.getScreenCTM());
           di = null;
         }
@@ -724,146 +729,10 @@
       el = null;
     }
     if (!el) {
-      setProp.call(s, propertyName, value, priority);
       return;
     }
-    if (!!!tar._fillElement) {
-      tar._fillElement = document.createElement("v:fill"); //キャッシュを作る
-    } else {
-      var tgebtfill = el.getElementsByTagName("fill");
-      if (tgebtfill.length > 0) {
-        /*あらかじめ消しおかないと、効果が出ない*/
-        el.removeChild(tgebtfill[0]);
-      }
-      tgebtfill = null;
-      isFill = true;
-    }
-    if (!!!tar._strokeElement) {
-      tar._strokeElement = document.createElement("v:stroke");
-    } else {
-      var tgebtstroke = el.getElementsByTagName("stroke")
-      if (tgebtstroke.length > 0) {
-        el.removeChild(tgebtstroke[0]);
-      }
-      tgebtstroke = null;
-      isStroke = true;
-    }
-    var fillElement = tar._fillElement, strokeElement = tar._strokeElement;
-    setProp.call(s, propertyName, value, priority);
-    if (propertyName === "fill-opacity") {
-      var fillOpacity = parseFloat(value) * style._list._opacity; //opacityを掛け合わせる
-      if (fillOpacity < 1) {
-        fillElement.setAttribute("opacity", fillOpacity+"");
-        isFill = true;
-      }
-    } else if (propertyName === "opacity") {
-      var fillOpacity = parseFloat(style.getPropertyValue("fill-opacity")) * parseFloat(value); //opacityを掛け合わせる
-      if (fillOpacity < 1) {
-        fillElement.setAttribute("opacity", fillOpacity+"");
-        isFill = true;
-      }
-      var strokeOpacity = parseFloat(style.getPropertyValue("stroke-opacity")) * parseFloat(value);
-      if (strokeOpacity < 1) {
-        strokeElement.setAttribute("opacity", strokeOpacity+"");
-        isStroke = true;
-      }
-      fillOpacity = strokeOpacity = null;
-    } else if (propertyName === "fill") {
-      var fill = s.getPropertyCSSValue("fill");
-      if (value.indexOf("#") > -1) {
-        /*以下では、Gradation関連の要素に、イベントを渡すことで、
-         *この要素の、グラデーション描画を行う
-         */
-        var tod = tar.ownerDocument, t = tod.getElementById(fill.uri);
-        if (t) {
-          var evtt = tod.createEvent("MutationEvents");
-          evtt.initMutationEvent("DOMNodeInsertedIntoDocument", false, false, null, null, null, null, null);
-          evtt._tar = tar._fillElement;
-          evtt._style = style, evtt._ttar = tar;
-          t.dispatchEvent(evtt);
-          if (t.localName !== "radialGradient" && !!!tar._fillElement) {
-            el.appendChild(evtt._tar);
-            tar._fillElement = evtt._tar; //キャッシュを作る
-          }
-          isFill = true;
-          t = evtt = null;
-        }
-        tod = null;
-      } else if (value === "none") {
-        tar.removeChild(tar._fillElment);
-        el.filled = "false";
-      } else {        
-        var fc = fill.rgbColor, num = CSSPrimitiveValue.CSS_NUMBER;
-        fillElement.setAttribute("color", "rgb(" +fc.red.getFloatValue(num)+ "," +fc.green.getFloatValue(num)+ "," +fc.blue.getFloatValue(num)+ ")"); 
-        isFill = true;
-      }
-    } else if (propertyName === "stroke") {
-      var stroke = style.getPropertyCSSValue("stroke");
-      if (value === "none") {
-        tar.removeChild(tar._strokeElment);
-        el.stroked = "false";
-      } else if (!stroke.uri) {
-        var fc = stroke.rgbColor, num = CSSPrimitiveValue.CSS_NUMBER;
-        strokeElement.setAttribute("color", "rgb(" +fc.red.getFloatValue(num)+ "," +fc.green.getFloatValue(num)+ "," +fc.blue.getFloatValue(num)+ ")");
-        isStroke = true;
-      }
-    } else if (propertyName === "stroke-opacity") {
-      var strokeOpacity = parseFloat(value) * parseFloat(style.getPropertyValue("opacity")); //opacityを掛け合わせる
-      if (strokeOpacity < 1) {
-        strokeElement.setAttribute("opacity", strokeOpacity);
-        isStroke = true;
-      }
-      fc = num = strokeOpacity = null;
-    } else if (propertyName === "stroke-width") {
-      var sgsw = s.getPropertyCSSValue("stroke-width"), tod = tar.ownerDocument, w = tod.documentElement.viewport.width, h = tod.documentElement.viewport.height;
-      sgsw._percent = Math.sqrt((w*w + h*h) / 2);
-      var swx = sgsw.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) * Math.sqrt(Math.abs(tar.getScreenCTM()._determinant()));
-      strokeElement.setAttribute("weight", swx + "px");
-      isStroke = true;
-      sgsw = w = h = null;
-    } else if (propertyName === "stroke-miterlimit") {
-      strokeElement.setAttribute("miterlimit", value);
-      isStroke = true;
-    } else if (propertyName === "stroke-linejoin") {
-      strokeElement.setAttribute("joinstyle", value);
-      isStroke = true;
-    } else if (propertyName === "stroke-linecap") {
-      if (value === "butt") {
-        strokeElement.setAttribute("endcap", "flat");
-      } else {
-        strokeElement.setAttribute("endcap", value);
-      }
-      isStroke = true;
-    } else if (propertyName === "stroke-dasharray") {
-      var tsd = value;
-      if (tsd !== "none") {
-        if (tsd.indexOf(",") > 0) { //コンマ区切りの文字列の場合
-          var strs = tsd.split(",");
-          for (var i = 0, sli = strs.length; i < sli; ++i) {
-            strs[i] = Math.ceil(parseFloat(strs[i]) / parseFloat(style.getPropertyValue("stroke-width"))); //精密ではないので注意
-          }
-          var strokedasharray = strs.join(" ");
-          if (strs.length % 2 === 1) {
-            strokedasharray += " " + strokedasharray;
-          }
-        }
-        strokeElement.setAttribute("dashstyle", strokedasharray);
-        isStroke = true;
-        tsd = strs = null;
-      }
-    } else if ((propertyName === "cursor") && (value !== "auto") && (value !== "")) {
-      el.style.cursor = value;
-    } else if (propertyName === "visibility") {
-      el.style.visibility = value;
-    } else if (propertyName === "display") {
-      el.style.display = value;
-    }
-    if (isFill) {
-      el.appendChild(tar._fillElement);
-    } else if (isStroke) {
-      el.appendChild(tar._strokeElement);
-    }
-    el = fill = stroke = tar = value = propertyName = null;
+    NAIBU._setPaint(tar, tar.getScreenCTM());
+    el = tar = value = null;
   }
   return s;
 };


Property changes on: branches/07x/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/06x/065/org/w3c/dom/css.js:2179-2209
/branches/06x/066/org/w3c/dom/css.js:2211-2236
/branches/06x/067/org/w3c/dom/css.js:2257-2282
/branches/06x/068/org/w3c/dom/css.js:2284-2314
/branches/06x/069/org/w3c/dom/css.js:2317-2352
/branches/06x/org/w3c/dom/css.js:1861-2353
/branches/07x/070/org/w3c/dom/css.js:2363-2383
/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/06x/066/org/w3c/dom/css.js:2211-2236
/branches/06x/067/org/w3c/dom/css.js:2257-2282
/branches/06x/068/org/w3c/dom/css.js:2284-2314
/branches/06x/069/org/w3c/dom/css.js:2317-2352
/branches/06x/org/w3c/dom/css.js:1861-2353
/branches/07x/070/org/w3c/dom/css.js:2363-2383
/branches/07x/071/org/w3c/dom/css.js:2385-2433
/branches/ufltima/dom/css.js:1621-1855


Property changes on: branches/07x/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/06x/065/org/w3c/dom/events.js:2179-2209
/branches/06x/066/org/w3c/dom/events.js:2211-2244
/branches/06x/067/org/w3c/dom/events.js:2257-2282
/branches/06x/068/org/w3c/dom/events.js:2284-2314
/branches/06x/069/org/w3c/dom/events.js:2317-2352
/branches/06x/org/w3c/dom/events.js:1861-2353
/branches/07x/070/org/w3c/dom/events.js:2363-2383
/branches/07x/071/org/w3c/dom/events.js:2385-2403
/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/06x/066/org/w3c/dom/events.js:2211-2244
/branches/06x/067/org/w3c/dom/events.js:2257-2282
/branches/06x/068/org/w3c/dom/events.js:2284-2314
/branches/06x/069/org/w3c/dom/events.js:2317-2352
/branches/06x/org/w3c/dom/events.js:1861-2353
/branches/07x/070/org/w3c/dom/events.js:2363-2383
/branches/07x/071/org/w3c/dom/events.js:2385-2433
/branches/ufltima/dom/events.js:1621-1856

Modified: branches/07x/org/w3c/dom/svg.js
===================================================================
--- branches/07x/org/w3c/dom/svg.js	2011-02-25 13:28:32 UTC (rev 2433)
+++ branches/07x/org/w3c/dom/svg.js	2011-02-25 13:30:57 UTC (rev 2434)
@@ -554,6 +554,7 @@
 function SVGAnimatedLength() {
   /*readonly SVGLength*/ this.animVal;
   this.baseVal = new SVGLength();
+  this.baseVal.unitType = 1;
   return this;
 };
 function SVGLengthList() {
@@ -2245,7 +2246,7 @@
     }
     var fc = fill.rgbColor, num = /*CSSPrimitiveValue.CSS_NUMBER*/ 1;
     fillElement.setAttribute("color", "rgb(" +fc.red.getFloatValue(num)+ "," +fc.green.getFloatValue(num)+ "," +fc.blue.getFloatValue(num)+ ")");
-    var fillOpacity = parseFloat(style.getPropertyValue("fill-opacity")) * style._list._opacity; //opacityを掛け合わせる
+    var fillOpacity = +(style.getPropertyValue("fill-opacity")) * style._list._opacity; //opacityを掛け合わせる
     if (fillOpacity < 1) {
       fillElement.setAttribute("opacity", fillOpacity+"");
     }
@@ -2299,7 +2300,7 @@
     if (!stroke.uri) {
       var fc = stroke.rgbColor, num = /*CSSPrimitiveValue.CSS_NUMBER*/ 1;
       strokeElement.setAttribute("color", "rgb(" +fc.red.getFloatValue(num)+ "," +fc.green.getFloatValue(num)+ "," +fc.blue.getFloatValue(num)+ ")");
-      var strokeOpacity = parseFloat(style.getPropertyValue("stroke-opacity")) * parseFloat(style.getPropertyValue("opacity")); //opacityを掛け合わせる
+      var strokeOpacity = +(style.getPropertyValue("stroke-opacity")) * (+(style.getPropertyValue("opacity"))); //opacityを掛け合わせる
       if (swx < 1) {
         strokeOpacity *= swx; //太さが1px未満なら色を薄くする
       }
@@ -2320,7 +2321,7 @@
       if (tsd.indexOf(",") > 0) { //コンマ区切りの文字列の場合
         var strs = tsd.split(",");
         for (var i = 0, sli = strs.length; i < sli; ++i) {
-          strs[i] = Math.ceil(parseFloat(strs[i]) / parseFloat(style.getPropertyValue("stroke-width"))); //精密ではないので注意
+          strs[i] = Math.ceil(+(strs[i]) / parseFloat(style.getPropertyValue("stroke-width"))); //精密ではないので注意
         }
         var strokedasharray = strs.join(" ");
         if (strs.length % 2 === 1) {
@@ -3528,7 +3529,8 @@
 };
 /*float*/    SVGTextContentElement.prototype.getComputedTextLength = function() {
   var l = this.textLength.baseVal;
-  if (l.unitType === SVGLength.SVG_LENGTHTYPE_UNKNOWN) {
+  if ((l.value === 0) && (this.getNumberOfChars() > 0)) {
+    /*何も設定されていない場合のみ、初期化を行う*/
     l.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_NUMBER, this.getSubStringLength(0, this.getNumberOfChars()));
   }
   l = null;
@@ -4658,7 +4660,7 @@
       } else if (tar._to) {
         tar._values = [null, tar._to];
       } else if (tar._by) {
-        tar._values = ["0", tar._by];
+        tar._values = [null, null, tar._by];
       } else if (!tar.hasChildNodes() && !tar.hasAttributeNS(null, "path")) { //SVGAnimateMotionElementに留意
         /*アニメーションの効果が出ないように調整する
          *SMILアニメーションの仕様を参照
@@ -4831,15 +4833,15 @@
               }
               nci._currentFrame++;
             }
-            if (nci._end) {
-              if (nci._end <= s && nci.getCurrentTime() !== 0) {
-                nci.endElement();
-                nci._currentFrame = 0;
-                delete nci._begin;
-                nci._end = null;
+            if (nci._end && (nci._end <= s) && (nci.getCurrentTime() !== 0)) {
+              nci.endElement();
+              if (!!nci._frame) {
+                nci._frame();
               }
-            }
-            if (!!nci._frame) {
+              nci._currentFrame = 0;
+              delete nci._begin;
+              nci._end = null;
+            } else if (!!nci._frame) {
               nci._frame();
             }
           }
@@ -4894,6 +4896,12 @@
       var vi = ttr.cloneNode(false);
       if (!tar._values[0]) {
         tar._values[0] = ttr.getAttributeNS(null, attrName) || ttr.style.getPropertyValue(attrName);
+        if (!tar._values[1]) { //by属性のみが設定されている場合
+          var v2 = parseFloat(tar._values[0]) + parseFloat(tar._values[2]), tanni = tar._values[0].match(/\D+/) || [""];
+          tar._values[1] = v2 + tanni[0];
+          tar._values.pop();
+          v2 = tanni = null;
+        }
       }
       if (!!tta) {
         tta.animVal = vi[attrName].baseVal;
@@ -4937,6 +4945,9 @@
     tar._frame = function() {
       var d = tar.getSimpleDuration() * 0.8, n = tar._valueList.length-1, tg = tar.getCurrentTime();
       if ((n !== -1) && (d !== 0) && (tg <= d)) {
+        if (tar._isDiscrete) {
+          ++n; //discreteモードは他のモードに比べて、分割数が多いことに注意
+        }
         var ii = Math.floor((tg*n) / d);
         if (ii === n) { //iiが境い目のときは、n-2を適用
           ii -= 1;
@@ -4971,7 +4982,7 @@
         } else {
           var v = v1;
         }
-        tanim.newValueSpecifiedUnits(tanim.unitType, v);
+        tanim.newValueSpecifiedUnits(base.unitType, v);
         tta.baseVal = tanim;
         tanim = null;
         ttr.dispatchEvent(evt);


Property changes on: branches/07x/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-2209
/branches/06x/066/org/w3c/dom/svg.js:2211-2239
/branches/06x/067/org/w3c/dom/svg.js:2257-2282
/branches/06x/068/org/w3c/dom/svg.js:2284-2314
/branches/06x/069/org/w3c/dom/svg.js:2317-2352
/branches/06x/org/w3c/dom/svg.js:1861-2353
/branches/07x/070/org/w3c/dom/svg.js:2363-2383
/branches/07x/071/org/w3c/dom/svg.js:2385-2407
/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/06x/066/org/w3c/dom/svg.js:2211-2239
/branches/06x/067/org/w3c/dom/svg.js:2257-2282
/branches/06x/068/org/w3c/dom/svg.js:2284-2314
/branches/06x/069/org/w3c/dom/svg.js:2317-2352
/branches/06x/org/w3c/dom/svg.js:1861-2353
/branches/07x/070/org/w3c/dom/svg.js:2363-2383
/branches/07x/071/org/w3c/dom/svg.js:2385-2433
/branches/ufltima/dom/svg.js:1621-1856




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