From 236a26907f6f5de37357cd39926906ccc88ea219 Mon Sep 17 00:00:00 2001 From: piro Date: Fri, 26 Mar 2010 00:20:51 +0000 Subject: [PATCH] =?UTF-8?q?https://bugzilla.mozilla.org/show=5Fbug.cgi=3Fi?= =?UTF-8?q?d=3D554165=20=E3=81=B8=E3=81=AE=E5=AF=BE=E5=BF=9C?= 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@6466 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/treestyletabbrowser.js | 8 ++++---- modules/utils.js | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index 53748fb4..207f554c 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -546,8 +546,8 @@ TreeStyleTabBrowser.prototype = { this.onPrefChange('extensions.treestyletab.tabbar.invertTabContents'); this.onPrefChange('extensions.treestyletab.tabbar.invertClosebox'); - var tabContextMenu = document.getAnonymousElementByAttribute(b, 'anonid', 'tabContextMenu') || - document.getAnonymousElementByAttribute(b.tabContainer, 'anonid', 'tabContextMenu'); + var tabContextMenu = b.tabContextMenu || + document.getAnonymousElementByAttribute(b, 'anonid', 'tabContextMenu'); tabContextMenu.addEventListener('popupshowing', this, false); if (!('MultipleTabService' in window)) { window.setTimeout(function(aSelf, aTabBrowser, aPopup) { @@ -1293,8 +1293,8 @@ TreeStyleTabBrowser.prototype = { this.scrollBox.removeEventListener('overflow', this, true); this.scrollBox.removeEventListener('underflow', this, true); - var tabContextMenu = document.getAnonymousElementByAttribute(b, 'anonid', 'tabContextMenu') || - document.getAnonymousElementByAttribute(b.tabContainer, 'anonid', 'tabContextMenu'); + var tabContextMenu = b.tabContextMenu || + document.getAnonymousElementByAttribute(b, 'anonid', 'tabContextMenu'); tabContextMenu.removeEventListener('popupshowing', this, false); var allTabPopup = document.getAnonymousElementByAttribute(b.mTabContainer, 'anonid', 'alltabs-popup'); diff --git a/modules/utils.js b/modules/utils.js index a9a44013..28eaf421 100644 --- a/modules/utils.js +++ b/modules/utils.js @@ -662,7 +662,10 @@ var TreeStyleTabUtils = { getTabStrip : function TSTUtils_getTabStrip(aTabBrowser) { - return aTabBrowser.mStrip || aTabBrowser.tabContainer.parentNode; + var strip = aTabBrowser.mStrip; + return (strip && strip.localName == 'hbox') ? + strip : + aTabBrowser.tabContainer.parentNode; }, get tabStrip() {