Collapse/hide the tab bar automatically even if the webpage includes any plugin area

Logic A) Tab bar autohide is intentionally blocked by opened popup because the tab bar should not be hidden while you open a context menu on the tab bar.
Logic B) On the other hand, TST shows hidden popup on the content area if the webpage includes any plugin area, because Firefox cannot receive mousemove events on plugin areas.
As the result, the hidden popup unexpectedly blocked to hide the tab bar... The popup for the logic B must be ignored by the logic A.
This commit is contained in:
YUKI Hiroshi 2012-12-05 11:35:37 +09:00
parent f97f25c9e6
commit 5718fef495
3 changed files with 9 additions and 1 deletions

View File

@ -144,6 +144,7 @@
</menupopup>
<tooltip id="treestyletab-full-tree-tooltip"/>
<panel id="treestyletab-autohide-content-area-screen"
treestyletab-ignore-state="true"
onpopupshowing="if ('setConsumeRollupEvent' in this.popupBoxObject) this.popupBoxObject.setConsumeRollupEvent(Components.interfaces.nsIPopupBoxObject.ROLLUP_NO_CONSUME);"
onclick="this.hidePopup();"
onDOMMouseScroll="this.hidePopup()"/>

View File

@ -124,6 +124,7 @@ var TreeStyleTabBase = {
kNARROW_SCROLLBAR : 'treestyletab-narrow-scrollbar',
kFAVICONIZED : 'treestyletab-faviconized',
kBG_NOTIFY_PHASE : 'treestyletab-notifybgtab-phase',
kIGNORE_POPUP_STATE : 'treestyletab-ignore-state',
kTAB_INVERTED : 'treestyletab-tab-inverted',
kTAB_CONTENTS_INVERTED : 'treestyletab-tab-contents-inverted',

View File

@ -1084,7 +1084,13 @@ TreeStyleTabWindow.prototype = {
this._shownPopups = this._shownPopups.filter(function(aItem) {
if (typeof aItem == 'string')
aItem = this.document.getElementById(aItem);
return aItem && aItem.boxObject && ((aItem.boxObject.width || aItem.boxObject.height) && aItem.state != 'closed');
return (
aItem &&
aItem.getAttribute(this.kIGNORE_POPUP_STATE) != 'true' &&
aItem.boxObject &&
(aItem.boxObject.width || aItem.boxObject.height) &&
aItem.state != 'closed'
);
}, this);
return this._shownPopups.length > 0;
},