svnno****@sourc*****
svnno****@sourc*****
2009年 9月 16日 (水) 18:36:07 JST
Revision: 1254
http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1254
Author: dhrname
Date: 2009-09-16 18:36:07 +0900 (Wed, 16 Sep 2009)
Log Message:
-----------
Modified Paths:
--------------
branches/DOM/org/w3c/core.js
Modified: branches/DOM/org/w3c/core.js
===================================================================
--- branches/DOM/org/w3c/core.js 2009-09-16 09:04:37 UTC (rev 1253)
+++ branches/DOM/org/w3c/core.js 2009-09-16 09:36:07 UTC (rev 1254)
@@ -611,43 +611,45 @@
this.ownerDocument._arr[this.ownerDocument._arr.length] = this;
}
localName = null;
- try{ //以下でfill,storke要素のリセットが必要
- if (this instanceof STGroupElement) { //g要素ならば
- this.paint = NAIBU.PaintColor.prototype.cache[this.tar.uniqueID];
- name = name.replace(/fill-/, "fill").replace(/stroke-/, "stroke");
- if (this.paint.defaults[name] !== void 0) { //スタイルで定義されていれば
- this.paint[name] = value;
+ if(this.namespaceURI === "http://www.w3.org/svg/2000") {
+ try{ //以下でfill,storke要素のリセットが必要
+ if (this instanceof STGroupElement) { //g要素ならば
+ this.paint = NAIBU.PaintColor.prototype.cache[this.tar.uniqueID];
+ localName = localName.replace(/fill-/, "fill").replace(/stroke-/, "stroke");
+ if (this.paint.defaults[localName] !== void 0) { //スタイルで定義されていれば
+ this.paint[localName] = value;
+ }
+ } else {
+ var tgebtfill = this.tar.getElementsByTagName("fill"), tgebtstroke = this.tar.getElementsByTagName("stroke");
+ if (tgebtfill.length > 0) {
+ this.tar.removeChild(tgebtfill[0]);
+ }
+ if (tgebtstroke.length > 0) {
+ this.tar.removeChild(tgebtstroke[0]);
+ }
+ localName = localName.replace(/fill-/, "fill").replace(/stroke-/, "stroke");
+ if (this.paint.defaults[localName] !== void 0) {
+ this.paint[localName] = value;
+ this.paint.set(this.w, this.h, this.transformable);
+ }
}
- } else {
- var tgebtfill = this.tar.getElementsByTagName("fill"), tgebtstroke = this.tar.getElementsByTagName("stroke");
- if (tgebtfill.length > 0) {
- this.tar.removeChild(tgebtfill[0]);
+ if (localName === "transform") {
+ var tar = {getAttribute : (function(n){return value})};
+ this.transformable = NAIBU.transformToCTM(tar, this.partransformable);
+ tar = null;
+ this.set(this.w, this.h);
}
- if (tgebtstroke.length > 0) {
- this.tar.removeChild(tgebtstroke[0]);
+ var tn = this[localName];
+ if (tn !== void 0) { //属性が定義されていれば
+ if (typeof tn === "string"){//文字列の場合
+ this[tn] = value;
+ } else if (tn instanceof STLength) { //長さの場合
+ this[tn].newValueSpecifiedUnits(this[tn].uniType, parseFloat(value));
+ }
+ this.set(this.w, this.h);
}
- name = name.replace(/fill-/, "fill").replace(/stroke-/, "stroke");
- if (this.paint.defaults[name] !== void 0) {
- this.paint[name] = value;
- this.paint.set(this.w, this.h, this.transformable);
- }
+ }catch(e){}
}
- if (name === "transform") {
- var tar = {getAttribute : (function(n){return value})};
- this.transformable = NAIBU.transformToCTM(tar, this.partransformable);
- tar = null;
- this.set(this.w, this.h);
- }
- var tn = this[name];
- if (tn !== void 0) { //属性が定義されていれば
- if (typeof tn === "string"){//文字列の場合
- this[tn] = value;
- } else if (tn instanceof STLength) { //長さの場合
- this[tn].newValueSpecifiedUnits(this[tn].uniType, parseFloat(value));
- }
- this.set(this.w, this.h);
- }
- }catch(e){}
};
/*void*/ Element.prototype.removeAttributeNS = function( /*string*/ namespaceURI, /*string*/ localName) {
};