From b120a9a5b2c0145b0a231164f46aef8c97a6cbf2 Mon Sep 17 00:00:00 2001 From: piro Date: Fri, 10 Sep 2010 02:17:00 +0000 Subject: [PATCH] =?UTF-8?q?Minefield=E3=81=A7=E3=81=AF=E3=81=86=E3=81=9D?= =?UTF-8?q?=E3=81=A3=E3=81=93=E5=8D=8A=E9=80=8F=E6=98=8E=E3=82=92=E4=BD=BF?= =?UTF-8?q?=E3=82=8F=E3=81=AA=E3=81=84=E3=82=88=E3=81=86=E3=81=AB?= 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@7168 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- .../treestyletabbrowser_autoHide.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/content/treestyletab/treestyletabbrowser_autoHide.js b/content/treestyletab/treestyletabbrowser_autoHide.js index 93343f5f..81295ccf 100644 --- a/content/treestyletab/treestyletabbrowser_autoHide.js +++ b/content/treestyletab/treestyletabbrowser_autoHide.js @@ -30,6 +30,8 @@ TreeStyleTabBrowserAutoHide.prototype = { kTRANSPARENT_FULL : 2, kTRANSPARENT_STYLE : ['none', 'part', 'full'], + emulatedTransparency : TreeStyleTabService.Comparator.compare(TreeStyleTabService.XULAppInfo.version, '4.0b5') < 0, + get mode() /* PUBLIC API */ { var mode = this.mOwner.browser.getAttribute(this.kMODE); @@ -597,6 +599,9 @@ TreeStyleTabBrowserAutoHide.prototype = { redrawContentArea : function TSTAutoHide_redrawContentArea() { + if (!this.emulatedTransparency) + return; + var sv = this.mOwner; var pos = sv.currentTabbarPosition; try { @@ -634,6 +639,9 @@ TreeStyleTabBrowserAutoHide.prototype = { }, redrawContentAreaWithDelay : function TSTAutoHide_redrawContentAreaWithDelay() { + if (!this.emulatedTransparency) + return; + window.setTimeout(function(aSelf) { aSelf.redrawContentArea(); }, 0, this); @@ -641,6 +649,9 @@ TreeStyleTabBrowserAutoHide.prototype = { resetContentAreas : function TSTAutoHide_resetContentAreas() { + if (!this.emulatedTransparency) + return; + this.mOwner.getTabsArray(this.mOwner.browser).forEach(function(aTab) { try { aTab.linkedBrowser.markupDocumentViewer.move(0, 0); @@ -652,11 +663,14 @@ TreeStyleTabBrowserAutoHide.prototype = { get shouldRedraw() { - return this.enabled && this.expanded; + return this.emulatedTransparency && this.enabled && this.expanded; }, drawBG : function TSTAutoHide_drawBG() { + if (!this.emulatedTransparency) + return; + var sv = this.mOwner; if (!this.tabbarCanvas || this.isResizing) return; @@ -811,7 +825,8 @@ TreeStyleTabBrowserAutoHide.prototype = { clearBG : function TSTAutoHide_clearBG() { - if (!this.tabbarCanvas) return; + if (!this.emulatedTransparency || !this.tabbarCanvas) + return; this.tabbarCanvas.style.display = 'none'; this.tabbarCanvas.style.margin = 0;