svnno****@sourc*****
svnno****@sourc*****
2011年 3月 24日 (木) 20:43:06 JST
Revision: 2503
http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2503
Author: dhrname
Date: 2011-03-24 20:43:06 +0900 (Thu, 24 Mar 2011)
Log Message:
-----------
dispatchEventメソッドの構文を整理
Modified Paths:
--------------
branches/07x/073/org/w3c/dom/events.js
Modified: branches/07x/073/org/w3c/dom/events.js
===================================================================
--- branches/07x/073/org/w3c/dom/events.js 2011-03-23 14:30:35 UTC (rev 2502)
+++ branches/07x/073/org/w3c/dom/events.js 2011-03-24 11:43:06 UTC (rev 2503)
@@ -144,48 +144,43 @@
}
var te = this,
td = this.ownerDocument,
- time, tob,
+ etime = evt.timeStamp,
+ tob,
type = /*Event.CAPTURING_PHASE*/ 1,
tce;
- if (!this.ownerDocument._isLoaded) {
+ if (!td._isLoaded) {
/*以下では、画像の処理に時間がかかりそうな場合、処理落ちとして、遅延処理
*を行い、バッファリングにイベント送付処理をためていく作業となる
*/
if (evt.type === "SVGLoad") {
- this.ownerDocument._isLoaded = 1;
+ td._isLoaded = 1;
}
- if (!this.ownerDocument._limit_time_) {
- this.ownerDocument._limit_time_ = evt.timeStamp;
- } else {
- time = this.ownerDocument._limit_time_;
- if ((evt.timeStamp - time) > 1000) {
- if (this.ownerDocument.implementation._buffer_) {
- /*1秒を超えたらバッファにため込んで後で使う*/
- tob = this.ownerDocument.implementation._buffer_;
- tob[tob.length] = this;
- tob[tob.length] = evt;
- } else {
- this.ownerDocument.implementation._buffer_ = [];
- }
- return true;
- }
+ if (!td._limit_time_) {
+ td._limit_time_ = etime;
+ } else if ((etime - td._limit_time_) > 1000) {
+ /*1秒を超えたらバッファにため込んで後で使う*/
+ tob = td.implementation._buffer_ || [];
+ tob[tob.length] = this;
+ tob[tob.length] = evt;
+ td.implementation._buffer_ = tob;
+ return true;
}
}
evt.target = this;
evt.eventPhase = 1;//Event.CAPTURING_PHASE
//このノードからドキュメントノードにいたるまでの、DOMツリーのリストを作成しておく
- td[/*Event.BUBBLING_PHASE*/ 3] = null;
+ td[/*Event.BUBBLING_PHASE*/ "3"] = null;
/*以下の処理では、documentElementのparentNodeが
*Documentノードではなく、nullになっていることを前提としている。
*したがって、documentElementのparentNodeがもし、Documentノードのオブジェクトならば、以下を書き換えるべきである
*/
while (te.parentNode) {
- te.parentNode[/*Event.CAPTURING_PHASE*/ 1] = te;
- te[/*Event.BUBBLING_PHASE*/ 3] = te.parentNode;
+ te.parentNode[/*Event.CAPTURING_PHASE*/ "1"] = te;
+ te[/*Event.BUBBLING_PHASE*/ "3"] = te.parentNode;
te = te.parentNode;
}
- td[/*Event.CAPTURING_PHASE*/ 1] = te;
- te[/*Event.BUBBLING_PHASE*/ 3] = td;
+ td[/*Event.CAPTURING_PHASE*/ "1"] = te;
+ te[/*Event.BUBBLING_PHASE*/ "3"] = td;
/*最初に捕獲フェーズでDOMツリーを下っていき、イベントのターゲットについたら、
*そこで、浮上フェーズとして折り返すように、反復処理をおこなう。
*/
@@ -212,8 +207,8 @@
}
td = td[type];
}
- var ed = evt._default
- evt = te = tce = n = td = type = time = tob = j = tcli =null;
+ var ed = evt._default;
+ evt = te = tce = n = td = type = tob = j = tcli =null;
return ed;
};