svnno****@sourc*****
svnno****@sourc*****
2011年 3月 10日 (木) 22:47:23 JST
Revision: 2470 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2470 Author: dhrname Date: 2011-03-10 22:47:23 +0900 (Thu, 10 Mar 2011) Log Message: ----------- バッファリング処理において、shiftの使用をやめて、カウントをするように変更 Modified Paths: -------------- branches/07x/072/org/w3c/dom/svg.js Modified: branches/07x/072/org/w3c/dom/svg.js =================================================================== --- branches/07x/072/org/w3c/dom/svg.js 2011-03-10 11:49:06 UTC (rev 2469) +++ branches/07x/072/org/w3c/dom/svg.js 2011-03-10 13:47:23 UTC (rev 2470) @@ -1737,21 +1737,26 @@ if (s.implementation._buffer_) { screen.updateInterval = 0; /*以下はバッファリングにためておいた要素とイベントを、後から実行する*/ + NAIBU._buff_num = 0; NAIBU._buff = setInterval(function(){ if (DOMImplementation._buffer_.length === 0) { clearInterval(Event._buff); } else { + var n = NAIBU._buff_num; for (var i=0;i<50;++i) { - var s = DOMImplementation._buffer_.shift(), evt = DOMImplementation._buffer_.shift(); + var s = DOMImplementation._buffer_[n], evt = DOMImplementation._buffer_[n+1]; s.dispatchEvent(evt); + n += 2; s = evt = null; - if (!DOMImplementation._buffer_[1]) { + if (n >= DOMImplementation._buffer_.length) { clearInterval(NAIBU._buff); DOMImplementation._buffer_ = null; NAIBU.Time.start(); return; } } + NAIBU._buff_num = n; + n = null; } }, 1); s = null;