svnno****@sourc*****
svnno****@sourc*****
2011年 4月 17日 (日) 22:30:16 JST
Revision: 2598
http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2598
Author: dhrname
Date: 2011-04-17 22:30:15 +0900 (Sun, 17 Apr 2011)
Log Message:
-----------
0.75統合
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/07x/071/org:2385-2433
/branches/07x/072/org:2435-2474
/branches/07x/073/org:2476-2509
/branches/07x/074/org:2511-2556
+ /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
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/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/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/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/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/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/ufltima/core.js:1621-1854
Modified: branches/07x/org/w3c/dom/css.js
===================================================================
--- branches/07x/org/w3c/dom/css.js 2011-04-16 14:24:56 UTC (rev 2597)
+++ branches/07x/org/w3c/dom/css.js 2011-04-17 13:30:15 UTC (rev 2598)
@@ -252,6 +252,20 @@
return "";
}
},
+ _isFillStroke : {
+ "fill" : 1,
+ "stroke" : 1
+ },
+ _isColor : {
+ "color" : 1
+ },
+ _isStop : {
+ "stop-color" : 1
+ },
+ _isRS : {
+ "r" : 1,
+ "#" : 1
+ },
/*setPropertyメソッド
*プロパティを宣言内で、明示的に設定。継承は無視する
*/
@@ -272,14 +286,14 @@
tg.cssText = cssText;
ti = tg;
} else {
- if ((propertyName === "fill") || (propertyName === "stroke")) {
+ if (this._isFillStroke[propertyName]) {
/*fill、strokeプロパティは別途、SVGPaintで処理(JavaScriptでは、型キャストを使えないため)
*CSSPrimitiveValueオブジェクトとSVGPaintオブジェクトを最後に置き換える
*/
ti = new SVGPaint();
paintType = /*SVGPaint.SVG_PAINTTYPE_UNKNOWN*/ 0;
v1 = value.charAt(0);
- if ((v1 === "#") || ti._keywords[value] || (v1 === "r")) {
+ if (this._isRS[v1] || ti._keywords[value]) {
paintType = /*SVGPaint.SVG_PAINTTYPE_RGBCOLOR*/ 1;
color = value;
} else if (value === "none") {
@@ -293,7 +307,11 @@
}
ti.setPaint(paintType, uri, color, null);
paintType = v1 = uri = color = null;
- } else if (propertyName === "color") {
+ } else if (this._isStop[propertyName]) {
+ ti = new SVGColor();
+ ti.colorType = /*SVGColor.SVG_COLORTYPE_RGBCOLOR*/ 1;
+ ti.setRGBColor(value);
+ } else if (this._isColor[propertyName]) {
ti = new CSSPrimitiveValue();
fill = this.getPropertyCSSValue("fill");
stroke = this.getPropertyCSSValue("stroke");
@@ -446,13 +464,13 @@
if (CSSPrimitiveValue.CSS_DIMENSION >= stringType && stringType >= CSSPrimitiveValue.CSS_COUNTER) { //文字列型をサポートしないCSS単位である場合
throw new DOMException(DOMException.INVALID_ACCESS_ERR);
}
- this.cssText = stringValue;
+ this._value = stringValue;
};
-/*string*/ CSSPrimitiveValue.prototype.getStringValue = function() {
+/*string*/ CSSPrimitiveValue.prototype.getStringValue = function(/*short*/ stringType) {
if (CSSPrimitiveValue.CSS_DIMENSION >= stringType && stringType >= CSSPrimitiveValue.CSS_COUNTER) { //文字列型をサポートしないCSS単位である場合
throw new DOMException(DOMException.INVALID_ACCESS_ERR);
}
- return (this.cssText);
+ return (this._value);
};
/*Counter*/ CSSPrimitiveValue.prototype.getCounterValue = function() {
if (this.primitiveType !== CSSPrimitiveValue.CSS_COUNTER) { //Counter型ではないとき
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/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/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/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-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/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/ufltima/dom/events.js:1621-1856
Modified: branches/07x/org/w3c/dom/svg.js
===================================================================
--- branches/07x/org/w3c/dom/svg.js 2011-04-16 14:24:56 UTC (rev 2597)
+++ branches/07x/org/w3c/dom/svg.js 2011-04-17 13:30:15 UTC (rev 2598)
@@ -137,7 +137,7 @@
/*readonly attribute SVGAnimatedTransformList*/ this.transform = new SVGAnimatedTransformList();
//描画の際、SVGStylabaleで指定しておいたプロパティの処理をする
this.addEventListener("DOMAttrModified", function(evt){
- if (evt.eventPhase === Event.BUBBLING_PHASE) {
+ if (evt.eventPhase === /*Event.BUBBLING_PHASE*/ 3) {
return;
}
var name = evt.attrName,
@@ -254,55 +254,53 @@
tar.addEventListener(v, document._s, false);
} else if (evt.relatedNode.nodeName === "xml:base") { //xml:base属性ならば
tar.xmlbase = evt.newValue;
- } else {
- if (!!tar[name]) {
- var tea = tar[name],
- tod = tar.ownerDocument.documentElement,
- tvw = tod.viewport.width,
- tvh = tod.viewport.height,
- n,
- type,
- _parseFloat,
- s;
- if (tea instanceof SVGAnimatedLength) {
- n = evt.newValue.match(tar._NaNReg);
- type = /*SVGLength.SVG_LENGTHTYPE_NUMBER*/ 1;
- _parseFloat = parseFloat;
- if (!!n) {
- n = n[0];
+ } else if (!!tar[name]) {
+ var tea = tar[name],
+ tod = tar.ownerDocument.documentElement,
+ tvw = tod.viewport.width,
+ tvh = tod.viewport.height,
+ n,
+ type,
+ _parseFloat,
+ s;
+ if (tea instanceof SVGAnimatedLength) {
+ n = evt.newValue.match(tar._NaNReg);
+ type = /*SVGLength.SVG_LENGTHTYPE_NUMBER*/ 1;
+ _parseFloat = parseFloat;
+ if (!!n) {
+ n = n[0];
+ }
+ if (n === "%") {
+ if (tar._x1width[name]) {
+ tea.baseVal._percent = tvw * 0.01;
+ } else if (tar._y1height[name]) {
+ tea.baseVal._percent = tvh * 0.01;
+ } else {
+ tea.baseVal._percent = Math.sqrt((tvw*tvw + tvh*tvh) / 2) * 0.01;
}
- if (n === "%") {
- if (tar._x1width[name]) {
- tea.baseVal._percent = tvw * 0.01;
- } else if (tar._y1height[name]) {
- tea.baseVal._percent = tvh * 0.01;
- } else {
- tea.baseVal._percent = Math.sqrt((tvw*tvw + tvh*tvh) / 2) * 0.01;
- }
- type = /*SVGLength.SVG_LENGTHTYPE_PERCENTAGE*/ 2;
- } else if (n === "em") {
- type = /*SVGLength.SVG_LENGTHTYPE_EMS*/ 3;
- } else if (n === "ex") {
- type = /*SVGLength.SVG_LENGTHTYPE_EXS*/ 4;
- } else if (n === "px") {
- type = /*SVGLength.SVG_LENGTHTYPE_PX*/ 5;
- } else if (n === "cm") {
- type = /*SVGLength.SVG_LENGTHTYPE_CM*/ 6;
- } else if (n === "mm") {
- type = /*SVGLength.SVG_LENGTHTYPE_MM*/ 7;
- } else if (n === "in") {
- type = /*SVGLength.SVG_LENGTHTYPE_IN*/ 8;
- } else if (n === "pt") {
- type = /*SVGLength.SVG_LENGTHTYPE_PT*/ 9;
- } else if (n === "pc") {
- type = /*SVGLength.SVG_LENGTHTYPE_PC*/ 10;
- }
- s = _parseFloat(evt.newValue);
- s = isNaN(s) ? 0 : s;
- tea.baseVal.newValueSpecifiedUnits(type, s);
+ type = /*SVGLength.SVG_LENGTHTYPE_PERCENTAGE*/ 2;
+ } else if (n === "em") {
+ type = /*SVGLength.SVG_LENGTHTYPE_EMS*/ 3;
+ } else if (n === "ex") {
+ type = /*SVGLength.SVG_LENGTHTYPE_EXS*/ 4;
+ } else if (n === "px") {
+ type = /*SVGLength.SVG_LENGTHTYPE_PX*/ 5;
+ } else if (n === "cm") {
+ type = /*SVGLength.SVG_LENGTHTYPE_CM*/ 6;
+ } else if (n === "mm") {
+ type = /*SVGLength.SVG_LENGTHTYPE_MM*/ 7;
+ } else if (n === "in") {
+ type = /*SVGLength.SVG_LENGTHTYPE_IN*/ 8;
+ } else if (n === "pt") {
+ type = /*SVGLength.SVG_LENGTHTYPE_PT*/ 9;
+ } else if (n === "pc") {
+ type = /*SVGLength.SVG_LENGTHTYPE_PC*/ 10;
}
- tea = tod = tvw = tvh = n = type = _parseFloat = s = null;
+ s = _parseFloat(evt.newValue);
+ s = isNaN(s) ? 0 : s;
+ tea.baseVal.newValueSpecifiedUnits(type, s);
}
+ tea = tod = tvw = tvh = n = type = _parseFloat = s = null;
}
evt = _parseFloat = name = tar = null;
}, false);
@@ -641,20 +639,21 @@
return this;
};
function SVGAngle() {
- /*readonly attribute unsigned short*/ this.unitType = 0;
- /*attribute float*/ this.value = 0;
- // raises DOMException on setting
- /*attribute float*/ this.valueInSpecifiedUnits;
- // raises DOMException on setting
- /*attribute DOMString*/ this.valueAsString;
- // raises DOMException on setting
return this;
};
SVGAngle.prototype = {
+ /*readonly attribute unsigned short*/ unitType : 0,
+ /*attribute float*/ value : 0,
+ // raises DOMException on setting
+ /*attribute float*/ valueInSpecifiedUnits : 0,
+ // raises DOMException on setting
+ /*attribute DOMString*/ valueAsString : "0",
+ // raises DOMException on setting
/*void*/ newValueSpecifiedUnits : function (/*in unsigned short*/ unitType, /*in float*/ valueInSpecifiedUnits ) {
var n = 1,
- _s = ""; //nは各単位から利用単位への変換数値。_sは単位の文字列を表す
- if (unitType === SVGAngle.SVG_ANGLETYPE_DEG) {
+ _s = ""; //nは各単位から度への変換数値。_sは単位の文字列を表す
+ if (unitType === SVGAngle.SVG_ANGLETYPE_UNSPECIFIED) {
+ } else if (unitType === SVGAngle.SVG_ANGLETYPE_DEG) {
_s = "deg"
} else if (unitType === SVGAngle.SVG_ANGLETYPE_RAD) {
n = Math.PI / 180;
@@ -662,11 +661,13 @@
} else if (unitType === SVGAngle.SVG_ANGLETYPE_GRAD) {
n = 9 / 10;
_s = "grad";
+ } else {
+ throw new DOMException(DOMException.NOT_SUPPORTED_ERR);
}
this.unitType = unitType;
this.value = valueInSpecifiedUnits * n;
this.valueInSpecifiedUnits = valueInSpecifiedUnits;
- this.valuAsString = valueInSpecifiedUnits + _s;
+ this.valueAsString = valueInSpecifiedUnits + _s;
n = _s = null;
//raises( DOMException );
},
@@ -694,10 +695,8 @@
return this;
};
function SVGColor() {
- CSSValue.call(this, arguments);
- /*readonly unsigned short*/ this.colorType = /*SVGColor.SVG_COLORTYPE_UNKNOWN*/ 0;
+ CSSValue.apply(this);
/*readonly css::RGBColor*/ this.rgbColor = new RGBColor();
- /*readonly SVGICCColor*/ this.iccColor;
return this;
};
@@ -709,6 +708,8 @@
SVGColor.prototype = new CSSValue(); //ノードのプロトタイプチェーンを作って、継承
SVGColor.constructor = CSSValue;
+/*readonly unsigned short*/ SVGColor.prototype.colorType = /*SVGColor.SVG_COLORTYPE_UNKNOWN*/ 0;
+/*readonly SVGICCColor*/ SVGColor.prototype.iccColor = null;
/*void*/ SVGColor.prototype.setRGBColor = function(/*DOMString*/ rgbColor ){
var tkr = this._keywords[rgbColor],
s,
@@ -971,7 +972,7 @@
}, false);
this.addEventListener("DOMNodeInserted", function(evt){
var tar = evt.target;
- if (evt.eventPhase === Event.BUBBLING_PHASE) {
+ if (evt.eventPhase === /*Event.BUBBLING_PHASE*/ 3) {
return; //強制終了させる
}
tar.addEventListener("DOMNodeInsertedIntoDocument", function(evt){
@@ -1172,7 +1173,7 @@
*随時、属性の値をDOMプロパティに変換しておくリスナー登録
*/
this.addEventListener("DOMAttrModified", function(evt){
- if (evt.eventPhase === Event.BUBBLING_PHASE) {
+ if (evt.eventPhase === /*Event.BUBBLING_PHASE*/ 3) {
return; //強制終了させる
}
var tar = evt.target,
@@ -1233,7 +1234,7 @@
}, false);
this.addEventListener("SVGLoad", function(evt){
evt.target.addEventListener("DOMAttrModified", function(evt){
- if (evt.eventPhase === Event.BUBBLING_PHASE) {
+ if (evt.eventPhase === /*Event.BUBBLING_PHASE*/ 3) {
var tar = evt.target,
evtt;
if (tar.parentNode) {
@@ -1261,7 +1262,6 @@
SVGSVGElement.prototype = new SVGElement();
/*void*/ SVGSVGElement.prototype.forceRedraw = function() {
};
-
/*float*/ SVGSVGElement.prototype.getCurrentTime = function(){
return (this._currentTime);
};
@@ -1273,6 +1273,12 @@
s.value = 0;
return s;
};
+/*SVGAngle*/ SVGSVGElement.prototype.createSVGAngle = function(){
+ var s = new SVGAngle();
+ s.value = 0;
+ s.unitType = 1;
+ return s;
+};
/*SVGLength*/ SVGSVGElement.prototype.createSVGLength = function(){
var s = new SVGLength();
s.unitType = /*SVG_LENGTHTYPE_NUMBER*/ 1;
@@ -1445,7 +1451,7 @@
}
tnext = tpar = isLast = null;
tar.addEventListener("DOMAttrModified", function(evt){
- if (evt.eventPhase === Event.BUBBLING_PHASE) {
+ if (evt.eventPhase === /*Event.BUBBLING_PHASE*/ 3) {
return; //強制終了させる
}
var tar = evt.target;
@@ -1513,7 +1519,7 @@
/*readonly SVGElementInstance*/ this.instanceRoot = new SVGElementInstance(); //参照先インスタンスのルート
/*readonly SVGElementInstance*/ this.animatedInstanceRoot = new SVGElementInstance();//アニメの最中のインスタンス。静止中は通常
this.addEventListener("DOMNodeInserted", function(evt){
- if (evt.eventPhase === Event.BUBBLING_PHASE) {
+ if (evt.eventPhase === /*Event.BUBBLING_PHASE*/ 3) {
return; //強制終了させる
}
evt.target.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:show", "embed");
@@ -1575,7 +1581,7 @@
/*readonly SVGAnimatedLength*/ this.height = new SVGAnimatedLength();
/*readonly SVGAnimatedPreserveAspectRatio*/ this.preserveAspectRatio = new SVGAnimatedPreserveAspectRatio();
this.addEventListener("DOMNodeInserted", function(evt){
- if (evt.eventPhase === Event.BUBBLING_PHASE) {
+ if (evt.eventPhase === /*Event.BUBBLING_PHASE*/ 3) {
return; //強制終了させる
}
var tar = evt.target;
@@ -2372,6 +2378,10 @@
/*documentは引数の変数として登録しておく*/
(function(_doc, _pInt, _math) {
+//freeArg関数はunloadで使う解放処理
+NAIBU.freeArg = function() {
+ SVGPathElement = _doc = _pInt = _math = null;
+};
//仮のfill属性とstroke属性の処理
NAIBU._setPaint = function(tar, matrix) {
/*以下では、スタイルシートを用いて、fill-とstroke-関連の
@@ -2972,8 +2982,12 @@
return s;
};
/*SVGPoint*/ SVGPathElement.prototype.getPointAtLength = function(/*float*/ distance ) {
- var segn = this.getPathSegAtLength(distance), x = 0, y = 0, nl = this.normalizedPathSegList, seg = nl.getItem(segn);
- var s = this.ownerDocument.documentElement.createSVGPoint();
+ var segn = this.getPathSegAtLength(distance),
+ x = 0,
+ y = 0,
+ nl = this.normalizedPathSegList,
+ seg = nl.getItem(segn),
+ s = this.ownerDocument.documentElement.createSVGPoint();
if ((segn-1) <= 0) {
s.x = seg.x;
s.y = seg.y;
@@ -3612,7 +3626,7 @@
evt = tar = list = tp = par = p = null;
}, false);
this.addEventListener("DOMNodeInserted", function(evt){
- if (evt.eventPhase === Event.BUBBLING_PHASE) {
+ if (evt.eventPhase === /*Event.BUBBLING_PHASE*/ 3) {
return; //強制終了させる
}
var tar = evt.target;
@@ -3988,7 +4002,7 @@
evt = tar = null;
}, false);
this.addEventListener("DOMNodeInserted", function(evt){
- if (evt.eventPhase === Event.BUBBLING_PHASE) {
+ if (evt.eventPhase === /*Event.BUBBLING_PHASE*/ 3) {
var tar = evt.target;
if (tar.nodeType !== Node.TEXT_NODE) {
tar._list = null;
@@ -4301,52 +4315,58 @@
SVGColorProfileRule.prototype = new SVGCSSRule();
function SVGGradientElement() {
- SVGElement.apply(this, arguments);
- SVGURIReference.apply(this, arguments);
+ SVGElement.apply(this);
+ SVGURIReference.apply(this);
/*readonly SVGAnimatedEnumeration*/ this.gradientUnits = new SVGAnimatedEnumeration();
/*readonly SVGAnimatedTransformList*/ this.gradientTransform = new SVGAnimatedTransformList();
/*readonly SVGAnimatedEnumeration*/ this.spreadMethod = new SVGAnimatedEnumeration();
this.addEventListener("DOMNodeInsertedIntoDocument", function(evt) {
- var grad = evt.target, ele = evt._tar, t = evt._style; //eleはv:fill要素やv:stroke要素のノード、tはラップした要素ノードのスタイルを収納
- if (!!!ele) { //まだ、path要素などが設定されていない場合
+ var grad = evt.target,
+ ele = evt._tar,
+ t = evt._style, //eleはv:fill要素やv:stroke要素のノード、tはラップした要素ノードのスタイルを収納
+ grad2 = grad,
+ href, stops, length,
+ color = [],
+ colors = [],
+ opacity = [],
+ stop, sstyle, ci;
+ if (!ele || !grad) { //まだ、path要素などが設定されていない場合
+ grad = ele = t = grad2 = href = stops = length = color = colors = opacity = null;
return;
}
- if (grad) {
- var grad2 = grad;
- while (grad2 && !grad2.hasChildNodes()) { //stopを子要素に持つgradient要素を探す
- var href = grad2.getAttributeNS("http://www.w3.org/1999/xlink", "href");
- if (href) {
- href.match(/#(.+)/);
- grad2 = evt.target.ownerDocument.getElementById(RegExp.$1);
- } else {
- break;
- }
+ while (grad2 && !grad2.hasChildNodes()) { //stopを子要素に持つgradient要素を探す
+ href = grad2.getAttributeNS("http://www.w3.org/1999/xlink", "href");
+ if (href) {
+ href.match(/#(.+)/);
+ grad2 = grad2.ownerDocument.getElementById(RegExp.$1);
+ } else {
+ break;
}
- var stops = grad2.getElementsByTagNameNS("http://www.w3.org/2000/svg", "stop");
- if (!stops) {
- grad = grad2 = stops = null;
- return;
- }
- var length = stops.length;
- var color = [], colors = [], opacity = [];
- for (var i = 0; i < length; ++i) {
- var stop = stops[i], sstyle = stop.ownerDocument.defaultView.getComputedStyle(stop, "");
- color[i] = sstyle.getPropertyValue("stop-color");
- colors[i] = stop.offset.baseVal + " " + color[i];
- opacity[i] = (sstyle.getPropertyValue("stop-opacity") || 1) * t.getPropertyValue("fill-opacity") * t.getPropertyValue("opacity");
- }
- ele.setAttribute("method", "none");
- ele.setAttribute("color", color[0]);
- ele.setAttribute("color2", color[length-1]);
- ele.setAttribute("colors", colors.join(","));
- // When colors attribute is used, the meanings of opacity and o:opacity2 are reversed.
- ele.setAttribute("opacity", opacity[length-1]+ "");
- ele.setAttribute("o:opacity2", opacity[0]+ "");
- /*SVGRadialGradientElementインターフェースで利用する*/
- grad._color = color;
- grad = ele = stops = lengh = color = colors = opacity = null;
}
- evt = t = null;
+ stops = grad2.getElementsByTagNameNS("http://www.w3.org/2000/svg", "stop");
+ if (!stops) {
+ ele = t = href = grad = grad2 = stops = color = colors = opacity = null;
+ return;
+ }
+ length = stops.length;
+ for (var i = 0; i < length; ++i) {
+ stop = stops[i];
+ sstyle = stop.ownerDocument.defaultView.getComputedStyle(stop, "");
+ ci = sstyle.getPropertyValue("stop-color");
+ color[i] = SVGColor.prototype._keywords[ci] || ci;
+ colors[i] = stop.offset.baseVal + " " + ci;
+ opacity[i] = (sstyle.getPropertyValue("stop-opacity") || 1) * t.getPropertyValue("fill-opacity") * t.getPropertyValue("opacity");
+ }
+ ele["method"] = "none";
+ ele["color"] = color[0];
+ ele["color2"] = color[length-1];
+ ele["colors"] = colors.join(",");
+ // When colors attribute is used, the meanings of opacity and o:opacity2 are reversed.
+ ele["opacity"] = opacity[length-1]+ "";
+ ele["o:opacity2"] = opacity[0]+ "";
+ /*SVGRadialGradientElementインターフェースで利用する*/
+ grad._color = color;
+ grad = grad2 = ele = stops = length = color = colors = opacity = evt = t = href = stop = sstyle = ci = null;
}, false);
return this;
};
@@ -4613,7 +4633,7 @@
/*readonly SVGAnimatedString*/ this.target = new SVGAnimatedString();
this.addEventListener("DOMAttrModified", function(evt){
var tar = evt.target;
- if (evt.eventPhase === Event.BUBBLING_PHASE) {
+ if (evt.eventPhase === /*Event.BUBBLING_PHASE*/ 3) {
return; //強制終了させる
}
if (evt.attrName === "target") {
@@ -4625,7 +4645,7 @@
}, false);
this.addEventListener("DOMNodeInserted", function(evt){
var tar = evt.target;
- if (evt.eventPhase === Event.BUBBLING_PHASE) {
+ if (evt.eventPhase === /*Event.BUBBLING_PHASE*/ 3) {
return; //強制終了させる
}
if (tar.nextSibling) {
@@ -4720,7 +4740,7 @@
}, false);
this.addEventListener("DOMNodeInserted", function(evt){
var tar = evt.target;
- if (evt.eventPhase === Event.BUBBLING_PHASE) {
+ if (evt.eventPhase === /*Event.BUBBLING_PHASE*/ 3) {
if (tar.nodeName === "#cdata-section") {
evt.currentTarget._text = tar.data;
}
@@ -4808,7 +4828,7 @@
}
}, false);
this.addEventListener("DOMAttrModified", function(evt){
- if (evt.eventPhase === Event.BUBBLING_PHASE) {
+ if (evt.eventPhase === /*Event.BUBBLING_PHASE*/ 3) {
return;
}
var tar = evt.target, name = evt.attrName;
@@ -4843,7 +4863,7 @@
evt = null;
}, false);
this.addEventListener("DOMNodeInserted", function(evt){
- if (evt.eventPhase === Event.BUBBLING_PHASE) {
+ if (evt.eventPhase === /*Event.BUBBLING_PHASE*/ 3) {
return; //強制終了させる
}
var tar = evt.target;
@@ -5076,7 +5096,7 @@
this._valueList = [];
this._isDiscrete = false;
this.addEventListener("DOMAttrModified", function(evt){
- if (evt.eventPhase === Event.BUBBLING_PHASE) {
+ if (evt.eventPhase === /*Event.BUBBLING_PHASE*/ 3) {
return; //強制終了させる
}
if ((evt.attrName === "calcMode") && (evt.newValue === "discrete")) {
@@ -5084,12 +5104,15 @@
}
}, false);
this.addEventListener("DOMNodeInserted", function(evt){
- if (evt.eventPhase === Event.BUBBLING_PHASE) {
+ if (evt.eventPhase === /*Event.BUBBLING_PHASE*/ 3) {
return; //強制終了させる
}
var tar = evt.target;
tar.addEventListener("DOMNodeInsertedIntoDocument", function(evt){
- var tar = evt.target, attrName = tar.getAttributeNS(null, "attributeName"),ttr = tar.targetElement, tta = ttr[attrName];
+ var tar = evt.target,
+ attrName = tar.getAttributeNS(null, "attributeName"),
+ ttr = tar.targetElement,
+ tta = ttr[attrName];
/*tar.valuesのリスト: ex. ["12px", "13px"]を、次のように機械に理解できるよう変換して、tar._valueListに格納
*[(new SVGPoint()), (new SVGPoint())]
*この_valueListプロパティはアニメの際に使うので、_valuesプロパティはアニメ中に使わない
@@ -5305,7 +5328,7 @@
SVGAnimationElement.apply(this);
NAIBU.Clip[NAIBU.Clip.length] = this;
this.addEventListener("DOMAttrModified", function(evt){
- if (evt.eventPhase === Event.BUBBLING_PHASE) {
+ if (evt.eventPhase === /*Event.BUBBLING_PHASE*/ 3) {
return;
}
var tar = evt.target, name = evt.attrName;
@@ -5381,7 +5404,7 @@
NAIBU.Clip[NAIBU.Clip.length] = this;
this._valueList = [];
this.addEventListener("DOMNodeInserted", function(evt){
- if (evt.eventPhase === Event.BUBBLING_PHASE) {
+ if (evt.eventPhase === /*Event.BUBBLING_PHASE*/ 3) {
return; //強制終了させる
}
var tar = evt.target;
@@ -5486,7 +5509,7 @@
/*boolean or number*/ this._isExternal = 0;
this.addEventListener("DOMNodeInserted", function(evt){
var tar = evt.target;
- if (evt.eventPhase === Event.BUBBLING_PHASE) {
+ if (evt.eventPhase === /*Event.BUBBLING_PHASE*/ 3) {
return;
}
tar.addEventListener("DOMNodeInsertedIntoDocument", function(evt){
@@ -5551,7 +5574,7 @@
SVGElement.apply(this);
/*boolean(or number)*/ this._isLinked = 0;
this.addEventListener("DOMNodeInserted", function(evt){
- if (evt.eventPhase === Event.BUBBLING_PHASE) {
+ if (evt.eventPhase === /*Event.BUBBLING_PHASE*/ 3) {
if (evt.target.localName === "font-face-uri") { //外部リンクがあれば
evt.currentTarget._isLinked = 1;
}
@@ -5573,7 +5596,7 @@
function SVGFontFaceUriElement() {
SVGElement.apply(this);
this.addEventListener("DOMNodeInserted", function(evt){
- if (evt.eventPhase === Event.BUBBLING_PHASE) {
+ if (evt.eventPhase === /*Event.BUBBLING_PHASE*/ 3) {
return; //強制終了させる
}
evt.target.ownerDocument.documentElement._svgload_limited--
@@ -5860,6 +5883,7 @@
*/
(function(){
var s = new CSSStyleDeclaration(),
+ slis = s._list,
n = 0,
regAZ = /([A-Z])/,
regm = /\-/,
@@ -5874,16 +5898,16 @@
}
t = t.replace(regm, u);
s.setProperty(t, CSS2Properties[i]);
- s._list[t] = s._list[n]; //この処理はCSSモジュールのgetComputedStyleメソッドのため
+ slis[t] = slis[n]; //この処理はCSSモジュールのgetComputedStyleメソッドのため
++n;
i = t = u = null;
}
}
- s._list._opacity = 1;
- s._list._fontSize = 12;
- CSS2Properties._list = s._list;
- Document.prototype.defaultView._defaultCSS = s._list;
- s = n = regAZ = regm =null;
+ slis._opacity = 1;
+ slis._fontSize = 12;
+ CSS2Properties._list = slis;
+ Document.prototype.defaultView._defaultCSS = slis;
+ s = n = regAZ = regm = slis =null;
})();
NAIBU.addEvent = function(evt,lis){
@@ -5907,6 +5931,7 @@
}
window.onscroll = NAIBU.emptyFunction;
window.detachEvent("onload", NAIBU._main);
+ NAIBU.freeArg();
Element = SVGElement = Attr = NamedNodeMap = CSS2Properties = CSSValue = CSSPrimitiveValue = NAIBU.xmlhttp = Node = Event = NAIBU = stlog = STLog = SVGColor = SVGPaint = null;
Array = ActiveXObject = null;
} catch(e) {}
@@ -5980,9 +6005,7 @@
NAIBU.doc = nd;
nd = ary = null;
if (xmlhttp && NAIBU.isMSIE) {
- if (!!document.createElementNS) { //IE9ならば
- if (!!document.createElementNS( "http://www.w3.org/2000/svg", "svg").createSVGRect) {
- }
+ if (!!document.createElementNS && !!document.createElementNS( "http://www.w3.org/2000/svg", "svg").createSVGRect) { //IE9ならば
} else { //IE6-8ならば
var oba = document.createElement("div");
oba.setAttribute("id","_NAIBU_outline");
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-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/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/ufltima/dom/svg.js:1621-1856