svnno****@sourc*****
svnno****@sourc*****
2010年 9月 26日 (日) 19:34:46 JST
Revision: 2019 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2019 Author: dhrname Date: 2010-09-26 19:34:46 +0900 (Sun, 26 Sep 2010) Log Message: ----------- 親要素にSVG言語とは無関係の要素が現れた場合の処理を記述した 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-09-25 14:19:19 UTC (rev 2018) +++ branches/06x/061/org/w3c/dom/css.js 2010-09-26 10:34:46 UTC (rev 2019) @@ -656,23 +656,29 @@ var p = CSS2Properties._list; //デフォルト値の設定 } var q = s._list; - for (var i=0,eli=elt.style._list.length;i<eli;++i) { - q[q.length] = elt.style._list[i]; - } - for (var i=0,eli=elt._attributeStyle._list.length;i<eli;++i) { - q[q.length] = elt._attributeStyle._list[i]; //プレゼンテーション属性を結びつける - } - for (var i=0,qli=q.length;i<qli;++i) { - if (q[i].cssValueType === CSSValue.CSS_INHERIT) { - q.splice(i, 1); - --qli; + if (!!elt.style) { + for (var i=0,eli=elt.style._list.length;i<eli;++i) { + q[q.length] = elt.style._list[i]; } + for (var i=0,eli=elt._attributeStyle._list.length;i<eli;++i) { + q[q.length] = elt._attributeStyle._list[i]; //プレゼンテーション属性を結びつける + } + for (var i=0,qli=q.length;i<qli;++i) { + if (q[i].cssValueType === CSSValue.CSS_INHERIT) { + q.splice(i, 1); + --qli; + } + } } for (var i=0,pli=p.length;i<pli;++i) { q[q.length] = p[i]; } s._list = q; - var eso = elt.style._list._opacity || elt._attributeStyle._list._opacity; + if (!!elt.style) { + var eso = elt.style._list._opacity || elt._attributeStyle._list._opacity; + } else { + var eso = 1; + } s._list._opacity = p._opacity * (eso || 1); s._list._fontSize = p._fontSize; eso = p = q = null; Modified: branches/06x/061/org/w3c/dom/svg.js =================================================================== --- branches/06x/061/org/w3c/dom/svg.js 2010-09-25 14:19:19 UTC (rev 2018) +++ branches/06x/061/org/w3c/dom/svg.js 2010-09-26 10:34:46 UTC (rev 2019) @@ -135,7 +135,7 @@ /*String*/ this.xmlbase = null; //xml:base属性の値 /*SVGSVGElement*/ this.ownerSVGElement; //ルート要素であるsvg要素 /*readonly SVGElement*/ this.viewportElement; //ビューポートを形成する要素(多くはsvg要素) - SVGStylable.call(this, arguments); //ElementCSSInlineStyleのインタフェースを継承 + SVGStylable.call(this); //ElementCSSInlineStyleのインタフェースを継承 /*readonly attribute SVGElement*/ this.nearestViewportElement = null; /*readonly attribute SVGElement*/ this.farthestViewportElement = null; /*interface SVGTransformable : SVGLocatable @@ -349,7 +349,7 @@ } else { m = this.ownerDocument.documentElement.createSVGMatrix(); } - if (this.parentNode) { + if (this.parentNode && !!this.parentNode.getCTM) { s = this.parentNode.getCTM().multiply(m); } else { s = m;