From 05ba50c688ea568c22fa0dd5267e238fefd4dca8 Mon Sep 17 00:00:00 2001 From: piro Date: Thu, 24 Dec 2009 06:44:00 +0000 Subject: [PATCH] =?UTF-8?q?=E6=93=8D=E4=BD=9C=E3=81=8C=E3=81=8D=E3=81=8B?= =?UTF-8?q?=E3=81=AA=E3=81=8F=E3=81=AA=E3=82=8B=E5=95=8F=E9=A1=8C=E3=82=92?= =?UTF-8?q?=E8=A7=A3=E6=B6=88=EF=BC=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@5598 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/res/stopRendering.js | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/content/treestyletab/res/stopRendering.js b/content/treestyletab/res/stopRendering.js index 1edcc0ae..22b2dfdb 100644 --- a/content/treestyletab/res/stopRendering.js +++ b/content/treestyletab/res/stopRendering.js @@ -27,23 +27,20 @@ revision : currentRevision, _stopLevel : 0, - _lastFocusedWindow : null, - get rootContentViewer() + get baswWindow() { return window.top .QueryInterface(Components.interfaces.nsIInterfaceRequestor) .getInterface(Components.interfaces.nsIWebNavigation) .QueryInterface(Components.interfaces.nsIDocShell) - .contentViewer - .QueryInterface(Components.interfaces.nsIMarkupDocumentViewer); + .QueryInterface(Components.interfaces.nsIBaseWindow); }, stop : function() { if (!this._stopLevel) { - this._lastFocusedWindow = window.top.document.commandDispatcher.focusedWindow; - this.rootContentViewer.hide(); + this.baswWindow.setPosition(window.top.innerWidth * 3, window.top.innerHeight * 3); } this._stopLevel++; }, @@ -52,11 +49,7 @@ { this._stopLevel--; if (!this._stopLevel) { - this.rootContentViewer.show(); - if (this._lastFocusedWindow) { - window.top.document.commandDispatcher.focusedWindow = this._lastFocusedWindow; - } - this._lastFocusedWindow = null; + this.baswWindow.setPosition(0, 0); } }