svnno****@sourc*****
svnno****@sourc*****
2011年 11月 16日 (水) 20:07:27 JST
Revision: 3094 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=3094 Author: dhrname Date: 2011-11-16 20:07:26 +0900 (Wed, 16 Nov 2011) Log Message: ----------- 0.89 モジュール統合 Modified Paths: -------------- branches/08x/org/w3c/core.js branches/08x/org/w3c/dom/css.js branches/08x/org/w3c/dom/svg.js Property Changed: ---------------- branches/08x/org/ branches/08x/org/w3c/ branches/08x/org/w3c/core.js branches/08x/org/w3c/dom/css.js branches/08x/org/w3c/dom/events.js branches/08x/org/w3c/dom/svg.js Property changes on: branches/08x/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/07x/071/org:2385-2433 /branches/07x/072/org:2435-2474 /branches/07x/073/org:2476-2509 /branches/07x/074/org:2511-2556 /branches/07x/075/org:2558-2597 /branches/07x/076/org:2600-2631,2642 /branches/07x/077/org:2635-2677 /branches/07x/078/org:2679-2726 /branches/07x/079/org:2728-2745 /branches/07x/org:2356-2753 /branches/07x/org/org:2643 /branches/08x/080/org:2758-2785 /branches/08x/081/org:2787-2814 /branches/08x/082/org:2817-2843 /branches/08x/083/org:2845-2872 /branches/08x/084/org:2874-2908 /branches/08x/085/org:2910-2939 /branches/08x/086/org:2955-2974 /branches/08x/087/org:2979-3014 /branches/08x/088/org:3016-3057 + /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 /branches/07x/072/org:2435-2474 /branches/07x/073/org:2476-2509 /branches/07x/074/org:2511-2556 /branches/07x/075/org:2558-2597 /branches/07x/076/org:2600-2631,2642 /branches/07x/077/org:2635-2677 /branches/07x/078/org:2679-2726 /branches/07x/079/org:2728-2745 /branches/07x/org:2356-2753 /branches/07x/org/org:2643 /branches/08x/080/org:2758-2785 /branches/08x/081/org:2787-2814 /branches/08x/082/org:2817-2843 /branches/08x/083/org:2845-2872 /branches/08x/084/org:2874-2908 /branches/08x/085/org:2910-2939 /branches/08x/086/org:2955-2974 /branches/08x/087/org:2979-3014 /branches/08x/088/org:3016-3057 /branches/08x/089/org:3059-3093 Property changes on: branches/08x/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/07x/071/org/w3c:2385-2433 /branches/07x/072/org/w3c:2435-2474 /branches/07x/073/org/w3c:2476-2509 /branches/07x/074/org/w3c:2511-2556 /branches/07x/075/org/w3c:2558-2597 /branches/07x/076/org/w3c:2600-2631,2642 /branches/07x/077/org/w3c:2635-2677 /branches/07x/078/org/w3c:2679-2726 /branches/07x/079/org/w3c:2728-2745 /branches/07x/org/org/w3c:2643 /branches/07x/org/w3c:2356-2753 /branches/08x/080/org/w3c:2758-2785 /branches/08x/081/org/w3c:2787-2814 /branches/08x/082/org/w3c:2817-2843 /branches/08x/083/org/w3c:2845-2872 /branches/08x/084/org/w3c:2874-2908 /branches/08x/085/org/w3c:2910-2939 /branches/08x/086/org/w3c:2955-2974 /branches/08x/087/org/w3c:2979-3014 /branches/08x/088/org/w3c:3016-3057 /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/07x/072/org/w3c:2435-2474 /branches/07x/073/org/w3c:2476-2509 /branches/07x/074/org/w3c:2511-2556 /branches/07x/075/org/w3c:2558-2597 /branches/07x/076/org/w3c:2600-2631,2642 /branches/07x/077/org/w3c:2635-2677 /branches/07x/078/org/w3c:2679-2726 /branches/07x/079/org/w3c:2728-2745 /branches/07x/org/org/w3c:2643 /branches/07x/org/w3c:2356-2753 /branches/08x/080/org/w3c:2758-2785 /branches/08x/081/org/w3c:2787-2814 /branches/08x/082/org/w3c:2817-2843 /branches/08x/083/org/w3c:2845-2872 /branches/08x/084/org/w3c:2874-2908 /branches/08x/085/org/w3c:2910-2939 /branches/08x/086/org/w3c:2955-2974 /branches/08x/087/org/w3c:2979-3014 /branches/08x/088/org/w3c:3016-3057 /branches/08x/089/org/w3c:3059-3093 /branches/ufltima:1621-1788 Modified: branches/08x/org/w3c/core.js =================================================================== --- branches/08x/org/w3c/core.js 2011-11-15 11:28:28 UTC (rev 3093) +++ branches/08x/org/w3c/core.js 2011-11-16 11:07:26 UTC (rev 3094) @@ -529,8 +529,6 @@ *属性ノード。削除不可。 */ function Attr() { - Node.apply(this); - delete this._capter; return this; }; Attr.prototype = new Node(); //ノードのプロトタイプチェーンを作って、継承 Property changes on: branches/08x/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/07x/071/org/w3c/core.js:2385-2433 /branches/07x/072/org/w3c/core.js:2435-2474 /branches/07x/073/org/w3c/core.js:2476-2509 /branches/07x/074/org/w3c/core.js:2511-2556 /branches/07x/075/org/w3c/core.js:2558-2597 /branches/07x/076/org/w3c/core.js:2600-2631,2642 /branches/07x/077/org/w3c/core.js:2635-2677 /branches/07x/078/org/w3c/core.js:2679-2726 /branches/07x/079/org/w3c/core.js:2728-2745 /branches/07x/org/org/w3c/core.js:2643 /branches/07x/org/w3c/core.js:2356-2753 /branches/08x/080/org/w3c/core.js:2758-2785 /branches/08x/081/org/w3c/core.js:2787-2814 /branches/08x/082/org/w3c/core.js:2817-2843 /branches/08x/083/org/w3c/core.js:2845-2872 /branches/08x/084/org/w3c/core.js:2874-2908 /branches/08x/085/org/w3c/core.js:2910-2939 /branches/08x/086/org/w3c/core.js:2955-2974 /branches/08x/087/org/w3c/core.js:2979-3014 /branches/08x/088/org/w3c/core.js:3016-3057 /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/07x/072/org/w3c/core.js:2435-2474 /branches/07x/073/org/w3c/core.js:2476-2509 /branches/07x/074/org/w3c/core.js:2511-2556 /branches/07x/075/org/w3c/core.js:2558-2597 /branches/07x/076/org/w3c/core.js:2600-2631,2642 /branches/07x/077/org/w3c/core.js:2635-2677 /branches/07x/078/org/w3c/core.js:2679-2726 /branches/07x/079/org/w3c/core.js:2728-2745 /branches/07x/org/org/w3c/core.js:2643 /branches/07x/org/w3c/core.js:2356-2753 /branches/08x/080/org/w3c/core.js:2758-2785 /branches/08x/081/org/w3c/core.js:2787-2814 /branches/08x/082/org/w3c/core.js:2817-2843 /branches/08x/083/org/w3c/core.js:2845-2872 /branches/08x/084/org/w3c/core.js:2874-2908 /branches/08x/085/org/w3c/core.js:2910-2939 /branches/08x/086/org/w3c/core.js:2955-2974 /branches/08x/087/org/w3c/core.js:2979-3014 /branches/08x/088/org/w3c/core.js:3016-3057 /branches/08x/089/org/w3c/core.js:3059-3093 /branches/ufltima/core.js:1621-1854 Modified: branches/08x/org/w3c/dom/css.js =================================================================== --- branches/08x/org/w3c/dom/css.js 2011-11-15 11:28:28 UTC (rev 3093) +++ branches/08x/org/w3c/dom/css.js 2011-11-16 11:07:26 UTC (rev 3094) @@ -334,8 +334,12 @@ } else if (propertyName === "opacity") { this._list._opacity = +value; } else if (propertyName === "font-size") { - if (/(%|em)/.test(value)) { - this._list.fontSize = parseFloat(value); + if (/(%|em|ex)/.test(value)) { + tg = "_" +RegExP.$1 + ti[tg] = parseFloat(value); + } else { + this._em = this._ex = this["_%"] = null; + this._list._fontSize = parseFloat(value); } } cssText = void 0; @@ -409,6 +413,7 @@ this._value = null; this._percent = 0; //単位に%が使われていた場合、このプロパティの数値を1%として使う this._empercent = 0; + this._em = this._ex = this["_%"] = null; //emが単位の場合、getComputedStyleメソッドなどで使う /*void*/ this.setFloatValue = function(/*short*/ unitType, /*float*/ floatValue) { if ((/*CSSPrimitiveValue.CSS_UNKNOWN*/ 0 >= unitType) && (unitType >= /*CSSPrimitiveValue.CSS_STRING*/ 19)) { //浮動小数点数単位型をサポートしないCSS単位である場合 throw new DOMException(DOMException.INVALID_ACCESS_ERR); @@ -703,14 +708,14 @@ }; /*CSSStyleDeclaration*/ ViewCSS.prototype.getComputedStyle = function( /*Element*/ elt, /*string*/ pseudoElt) { var s = new CSSStyleDeclaration(), - ct, p; - ct = null - p = {length:0, _opacity:1, _fontSize:12}; + el, es, + eso = 1; //クロージャを利用して、カスケーディングを実現する s.getPropertyCSSValue = (function(elt, td, s){ return function( /*string*/ propertyName) { var el = elt, - css = null; + css = null, + n; while (el && (!css || (css.cssValueType === /*CSSValue.CSS_INHERIT*/ 0))) { if (el._runtimeStyle && el._runtimeStyle[propertyName]) { css = el._runtimeStyle.getPropertyCSSValue(propertyName); @@ -731,21 +736,41 @@ //デフォルト値を探す td && (css = td[propertyName]); } - if (css && ((css.paintType === /*SVGPaint.SVG_PAINTTYPE_CURRENTCOLOR*/ 102) || (css.colorType === /*SVGColor.SVG_COLORTYPE_CURRENTCOLOR*/ 3))) { - css.setRGBColor && css.setRGBColor(s.getPropertyValue("color")); + if (css && css.setRGBColor && ((css.paintType === /*SVGPaint.SVG_PAINTTYPE_CURRENTCOLOR*/ 102) || (css.colorType === /*SVGColor.SVG_COLORTYPE_CURRENTCOLOR*/ 3))) { + css.setRGBColor(s.getPropertyValue("color")); + } else if (css && (css._em || css._ex || css["_%"])) { + el = elt; + n = 1; + while (el) { + if (el.style._list._fontSize) { + n = el.style._list._fontSize; + break; + } + el = el.parentNode; + } + if (css._em) { + n *= css._em; + } else if (css._ex) { + n *= css._ex * 0.5; + } else if (css["_%"]) { + n *= css["_%"] / 100; + } + css.cssText = "font-size:" +n+ "px"; } el = void 0; return css; }; })(elt, this._defaultCSS, s); //_defaultCSSはデフォルト値の設定 - if (!!elt.style) { - var eso = elt.style._list._opacity || elt._attributeStyle._list._opacity; - } else { - var eso = 1; + el = elt; + while (el) { + if (el.style) { + es = el.style._list._opacity || el._attributeStyle._list._opacity; + eso *= es || 1; + } + el = el.parentNode; } - s._list._opacity = p._opacity * (eso || 1); - s._list._fontSize = p._fontSize; - pelt = eso = p = void 0; + s._list._opacity = eso; + el = pelt = eso = es = void 0; s._document = elt.ownerDocument; return s; }; Property changes on: branches/08x/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/07x/071/org/w3c/dom/css.js:2385-2433 /branches/07x/072/org/w3c/dom/css.js:2435-2474 /branches/07x/073/org/w3c/dom/css.js:2476-2509 /branches/07x/074/org/w3c/dom/css.js:2511-2556 /branches/07x/075/org/w3c/dom/css.js:2558-2597 /branches/07x/076/org/w3c/dom/css.js:2600-2631,2642 /branches/07x/077/org/w3c/dom/css.js:2635-2677 /branches/07x/078/org/w3c/dom/css.js:2679-2726 /branches/07x/079/org/w3c/dom/css.js:2728-2745 /branches/07x/org/org/w3c/dom/css.js:2643 /branches/07x/org/w3c/dom/css.js:2356-2753 /branches/08x/080/org/w3c/dom/css.js:2758-2785 /branches/08x/081/org/w3c/dom/css.js:2787-2814 /branches/08x/082/org/w3c/dom/css.js:2817-2843 /branches/08x/083/org/w3c/dom/css.js:2845-2872 /branches/08x/084/org/w3c/dom/css.js:2874-2908 /branches/08x/085/org/w3c/dom/css.js:2910-2939 /branches/08x/086/org/w3c/dom/css.js:2955-2974 /branches/08x/087/org/w3c/dom/css.js:2979-3014 /branches/08x/088/org/w3c/dom/css.js:3016-3057 /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/07x/072/org/w3c/dom/css.js:2435-2474 /branches/07x/073/org/w3c/dom/css.js:2476-2509 /branches/07x/074/org/w3c/dom/css.js:2511-2556 /branches/07x/075/org/w3c/dom/css.js:2558-2597 /branches/07x/076/org/w3c/dom/css.js:2600-2631,2642 /branches/07x/077/org/w3c/dom/css.js:2635-2677 /branches/07x/078/org/w3c/dom/css.js:2679-2726 /branches/07x/079/org/w3c/dom/css.js:2728-2745 /branches/07x/org/org/w3c/dom/css.js:2643 /branches/07x/org/w3c/dom/css.js:2356-2753 /branches/08x/080/org/w3c/dom/css.js:2758-2785 /branches/08x/081/org/w3c/dom/css.js:2787-2814 /branches/08x/082/org/w3c/dom/css.js:2817-2843 /branches/08x/083/org/w3c/dom/css.js:2845-2872 /branches/08x/084/org/w3c/dom/css.js:2874-2908 /branches/08x/085/org/w3c/dom/css.js:2910-2939 /branches/08x/086/org/w3c/dom/css.js:2955-2974 /branches/08x/087/org/w3c/dom/css.js:2979-3014 /branches/08x/088/org/w3c/dom/css.js:3016-3057 /branches/08x/089/org/w3c/dom/css.js:3059-3093 /branches/ufltima/dom/css.js:1621-1855 Property changes on: branches/08x/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-2433 /branches/07x/072/org/w3c/dom/events.js:2435-2474 /branches/07x/073/org/w3c/dom/events.js:2476-2509 /branches/07x/074/org/w3c/dom/events.js:2511-2556 /branches/07x/075/org/w3c/dom/events.js:2558-2597 /branches/07x/076/org/w3c/dom/events.js:2600-2631,2642 /branches/07x/077/org/w3c/dom/events.js:2635-2677 /branches/07x/078/org/w3c/dom/events.js:2679-2726 /branches/07x/079/org/w3c/dom/events.js:2728-2745 /branches/07x/org/org/w3c/dom/events.js:2643 /branches/07x/org/w3c/dom/events.js:2356-2753 /branches/08x/080/org/w3c/dom/events.js:2758-2785 /branches/08x/081/org/w3c/dom/events.js:2787-2814 /branches/08x/082/org/w3c/dom/events.js:2817-2843 /branches/08x/083/org/w3c/dom/events.js:2845-2872 /branches/08x/084/org/w3c/dom/events.js:2874-2908 /branches/08x/085/org/w3c/dom/events.js:2910-2939,2949 /branches/08x/086/org/w3c/dom/events.js:2955-2974 /branches/08x/087/org/w3c/dom/events.js:2979-3014 /branches/08x/088/org/w3c/dom/events.js:3016-3057 /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/07x/072/org/w3c/dom/events.js:2435-2474 /branches/07x/073/org/w3c/dom/events.js:2476-2509 /branches/07x/074/org/w3c/dom/events.js:2511-2556 /branches/07x/075/org/w3c/dom/events.js:2558-2597 /branches/07x/076/org/w3c/dom/events.js:2600-2631,2642 /branches/07x/077/org/w3c/dom/events.js:2635-2677 /branches/07x/078/org/w3c/dom/events.js:2679-2726 /branches/07x/079/org/w3c/dom/events.js:2728-2745 /branches/07x/org/org/w3c/dom/events.js:2643 /branches/07x/org/w3c/dom/events.js:2356-2753 /branches/08x/080/org/w3c/dom/events.js:2758-2785 /branches/08x/081/org/w3c/dom/events.js:2787-2814 /branches/08x/082/org/w3c/dom/events.js:2817-2843 /branches/08x/083/org/w3c/dom/events.js:2845-2872 /branches/08x/084/org/w3c/dom/events.js:2874-2908 /branches/08x/085/org/w3c/dom/events.js:2910-2939,2949 /branches/08x/086/org/w3c/dom/events.js:2955-2974 /branches/08x/087/org/w3c/dom/events.js:2979-3014 /branches/08x/088/org/w3c/dom/events.js:3016-3057 /branches/08x/089/org/w3c/dom/events.js:3059-3093 /branches/ufltima/dom/events.js:1621-1856 Modified: branches/08x/org/w3c/dom/svg.js =================================================================== --- branches/08x/org/w3c/dom/svg.js 2011-11-15 11:28:28 UTC (rev 3093) +++ branches/08x/org/w3c/dom/svg.js 2011-11-16 11:07:26 UTC (rev 3094) @@ -268,7 +268,8 @@ if (!!n) { n = n[0]; } - if (n === "%") { + if (!n) { //軽量化のためにチェックを設ける + } else if (n === "%") { if (tar._x1width[name]) { tea.baseVal._percent = tvw * 0.01; } else if (tar._y1height[name]) { @@ -757,8 +758,16 @@ // raises( SVGException ); /*void*/ this.setColor =function(/*unsigned short*/ colorType, /*DOMString*/ rgbColor, /*DOMString*/ iccColor ){ this.colorType = colorType; - if (rgbColor && ((colorType === /*SVGColor.SVG_COLORTYPE_RGBCOLOR*/ 1) || (colorType === /*SVGColor.SVG_COLORTYPE_CURRENTCOLOR*/ 3))) { + if ((colorType === /*SVGColor.SVG_COLORTYPE_RGBCOLOR*/ 1) && iccColor) { + throw new SVGException(SVGException.SVG_INVALID_VALUE_ERR); + } else if (colorType === /*SVGColor.SVG_COLORTYPE_RGBCOLOR*/ 1) { this.setRGBColor(rgbColor); + } else if (rgbColor && (colorType === /*SVGColor.SVG_COLORTYPE_CURRENTCOLOR*/ 3)) { + this.setRGBColor(rgbColor); + } else if ((colorType === /*SVGColor.SVG_COLORTYPE_UNKNOWN*/ 0) && (rgbColor || iccColor)) { + throw new SVGException(SVGException.SVG_INVALID_VALUE_ERR); + } else if ((colorType === /*SVGColor.SVG_COLORTYPE_RGBCOLOR_ICCCOLOR*/ 2) && (rgbColor || !iccColor)) { + throw new SVGException(SVGException.SVG_INVALID_VALUE_ERR); } colorType = rgbColor = void 0; } @@ -1277,12 +1286,12 @@ } } if (((tar.localName === "g") || (tar.localName === "a")) && (tar.namespaceURI === "http://www.w3.org/2000/svg")) { - tar._currentStyle = tar._cacheMatrix = null; //キャッシュを消去 + tar._cacheMatrix = void 0; //キャッシュを消去 if (tar.firstChild) { slist = tar.getElementsByTagNameNS("http://www.w3.org/2000/svg", "*"); for (var i=0,sli=slist.length;i<sli;++i) { tar = slist[i]; - tar._currentStyle = tar._cacheMatrix = null; + tar._cacheMatrix = void 0; evtt = tar.ownerDocument.createEvent("MutationEvents"); evtt.initMutationEvent("DOMNodeInsertedIntoDocument", false, false, null, null, null, null, null); evtt.target = tar; @@ -1872,7 +1881,8 @@ } backright = bl + viewWidth + 1; backdown = bt + viewHeight + 1; - trstyle.clip = "rect(" +bt+ "px " +backright+ "px " +backdown+ "px " +bl+ "px)"; this._document = s; + trstyle.clip = "rect(" +bt+ "px " +backright+ "px " +backdown+ "px " +bl+ "px)"; + this._document = s; if ("_svgload_limited" in s.documentElement) { /*_svgload_limitedプロパティはXlink言語が使われていない限り、0である。 *xlink:href属性が指定されるたびに+1となる。 @@ -4167,7 +4177,6 @@ } tnext = tpart = isLast = void 0; tar.addEventListener("DOMNodeInsertedIntoDocument", function(evt) { - evt.target._currentStyle = void 0; //キャッシュが生成されることがあるので削除 var tar = evt.target, ti = tar.firstChild, ttp = tar._tar, @@ -4178,7 +4187,8 @@ tlen = tar.getComputedTextLength(), anchor = style.getPropertyValue("text-anchor"), tedeco = style.getPropertyValue("text-decoration"), //text-decorationは継承しないので、個々に設定する - ttps = ttp.style; + ttps = ttp.style, + ae = []; ttps.fontSize = n + "px"; ttps.fontFamily = style.getPropertyValue("font-family"); ttps.fontStyle = style.getPropertyValue("font-style"); @@ -4211,7 +4221,7 @@ sty.marginTop = tar._isYokogaki ? -n-5+ "px" : "-5px"; sty.lineHeight = n+10+ "px"; sty.textDecoration = tedeco; - sty.display = "block"; + sty.display = "none" ttp.appendChild(ti._tars[ij]); sty = p = void 0; } @@ -4232,6 +4242,7 @@ } else if ((ti.localName === "a") && (ti.namespaceURI === "http://www.w3.org/2000/svg") && ti.firstChild) { ttp = ti._tar; ti = ti.firstChild; + ae[ae.length] = ti; i-=2; } } @@ -4240,7 +4251,10 @@ cursor = style.getPropertyCSSValue("cursor"), vis = style.getPropertyCSSValue("visibility"), disp = style.getPropertyCSSValue("display"), - tts = tar._tar.style; + tts = tar._tar.style, + tft = tar.firstChild._tars, + ttt = tft[0].innerText.charAt(0), //あらかじめ初期化しておく + tfti; if (color === "none"){ tts.color = "transparent"; } else if (color.indexOf("url") === -1) { @@ -4253,29 +4267,22 @@ tts.cursor = tc.substring(tc.indexOf(":")+1, tc.length); tc = void 0; } - if (vis && !vis._isDefault) { - tts.visibility = vis.cssText.substring(vis.cssText.indexOf(":")+1, vis.cssText.length); - } - if (disp && !disp._isDefault && (disp.cssText.indexOf("none") > -1)) { - tts.display = "none"; - } else if (disp && !disp._isDefault) { - tts.display = "block"; - } if ((tar.x.baseVal.numberOfItems === 1) && (tar.y.baseVal.numberOfItems === 1) && tar._isYokogaki && (tar.firstChild.nodeName === "#text")) { /*xとy属性が一つの値しか取らないとき、字詰めの処理をすべてブラウザに任せておく。 *以下では、他のdiv要素のテキストをすべて、最初のdiv要素にまとめている */ - var tft = tar.firstChild._tars, - ttt = tft[0].innerText.charAt(0); //あらかじめ初期化しておく for (var i=1, tli=tft.length;i<tli;++i) { - ttt += tft[i].innerText; - tft[i].style.display = "none"; + tfti = tft[i]; + ttt += tfti.innerText; + tfti.parentNode.removeChild(tfti); } - tft[0].innerText = ttt; - ttt = tft = void 0; + //以下でinnerTextやinnerHTMLを使うのは、IE6でエラーとなる可能性がある + tft[0].replaceChild(_doc.createTextNode(ttt), tft[0].firstChild); + ttt = void 0; } - var isRect = true; + var isRect = true, + di = "block"; if (ttp.lastChild) { if (ttp.lastChild.nodeName !== "rect") { isRect = false; @@ -4291,8 +4298,26 @@ backr.stroked = backr.filled = "false"; ttp.appendChild(backr); } + if (vis && !vis._isDefault) { + tts.visibility = vis.cssText.substring(vis.cssText.indexOf(":")+1, vis.cssText.length); + } + /*dipslayプロパティだけは個々に設定しておく必要がある*/ + if (disp && !disp._isDefault && (disp.cssText.indexOf("none") > -1)) { + di = "none"; + } else if (disp && !disp._isDefault) { + di = "block"; + } + for (var i=0, j=0, tli=tft.length;i<tli;++i) { + tft[i].style.display = di; + while (ae[j]) { //a要素を処理 + for (var l=0, tli=ae[j]._tars.length;l<tli;++l) { + ae[j]._tars[l].style.display = di; + } + ++j; + } + } delete tar._cacheMatrix; - isRect = evt = tar = style = tedeco = tpp = ttpc = style = color = cursor = disp = vis = ttps = backr = backrs = void 0; + ae = isRect = evt = tar = style = tedeco = tpp = ttpc = style = color = cursor = disp = vis = ttps = backr = backrs = di = tft = void 0; }, false); evt = tar = void 0; },false); Property changes on: branches/08x/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-2433 /branches/07x/072/org/w3c/dom/svg.js:2435-2474 /branches/07x/073/org/w3c/dom/svg.js:2476-2509 /branches/07x/074/org/w3c/dom/svg.js:2511-2556 /branches/07x/075/org/w3c/dom/svg.js:2558-2597 /branches/07x/076/org/w3c/dom/svg.js:2600-2631,2642 /branches/07x/077/org/w3c/dom/svg.js:2635-2677 /branches/07x/078/org/w3c/dom/svg.js:2679-2726 /branches/07x/079/org/w3c/dom/svg.js:2728-2746 /branches/07x/org/org/w3c/dom/svg.js:2643 /branches/07x/org/w3c/dom/svg.js:2356-2753 /branches/08x/080/org/w3c/dom/svg.js:2758-2785 /branches/08x/081/org/w3c/dom/svg.js:2787-2814 /branches/08x/082/org/w3c/dom/svg.js:2817-2843 /branches/08x/083/org/w3c/dom/svg.js:2845-2872 /branches/08x/084/org/w3c/dom/svg.js:2874-2908 /branches/08x/085/org/w3c/dom/svg.js:2910-2939 /branches/08x/086/org/w3c/dom/svg.js:2955-2974 /branches/08x/087/org/w3c/dom/svg.js:2979-3014 /branches/08x/088/org/w3c/dom/svg.js:3016-3057 /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/07x/072/org/w3c/dom/svg.js:2435-2474 /branches/07x/073/org/w3c/dom/svg.js:2476-2509 /branches/07x/074/org/w3c/dom/svg.js:2511-2556 /branches/07x/075/org/w3c/dom/svg.js:2558-2597 /branches/07x/076/org/w3c/dom/svg.js:2600-2631,2642 /branches/07x/077/org/w3c/dom/svg.js:2635-2677 /branches/07x/078/org/w3c/dom/svg.js:2679-2726 /branches/07x/079/org/w3c/dom/svg.js:2728-2746 /branches/07x/org/org/w3c/dom/svg.js:2643 /branches/07x/org/w3c/dom/svg.js:2356-2753 /branches/08x/080/org/w3c/dom/svg.js:2758-2785 /branches/08x/081/org/w3c/dom/svg.js:2787-2814 /branches/08x/082/org/w3c/dom/svg.js:2817-2843 /branches/08x/083/org/w3c/dom/svg.js:2845-2872 /branches/08x/084/org/w3c/dom/svg.js:2874-2908 /branches/08x/085/org/w3c/dom/svg.js:2910-2939 /branches/08x/086/org/w3c/dom/svg.js:2955-2974 /branches/08x/087/org/w3c/dom/svg.js:2979-3014 /branches/08x/088/org/w3c/dom/svg.js:3016-3057 /branches/08x/089/org/w3c/dom/svg.js:3059-3093 /branches/ufltima/dom/svg.js:1621-1856