[Pkg-mozext-commits] [tabmixplus] 51/61: Leaving YouTube full screen (DOMFullscreen) removes hides the tab bar, when the tab bar in multi-row mode calling setHeight too soon set the height to zero.
David Prévot
taffit at moszumanska.debian.org
Fri Aug 28 19:09:22 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit a4ded9302f03d59398a57d1c8b01e7dc1c5bd0a8
Author: onemen <tabmix.onemen at gmail.com>
Date: Tue Aug 18 06:41:50 2015 +0300
Leaving YouTube full screen (DOMFullscreen) removes hides the tab bar, when the tab bar in multi-row mode calling setHeight too soon set the height to zero.
---
chrome/content/minit/tablib.js | 14 +++++++-------
chrome/content/tab/tab.js | 10 ++++++++--
chrome/content/tabmix.js | 8 ++++++++
3 files changed, 23 insertions(+), 9 deletions(-)
diff --git a/chrome/content/minit/tablib.js b/chrome/content/minit/tablib.js
index 4cdf586..7cb7ad8 100644
--- a/chrome/content/minit/tablib.js
+++ b/chrome/content/minit/tablib.js
@@ -515,14 +515,14 @@ var tablib = {
// FullScreen code related to tabs bellow content initialize by first
// fullScreen event, see TMP_eventListener.onFullScreen
if (Tabmix.isVersion(400)) {
- let $LF = '\n ';
Tabmix.changeCode(FullScreen, "FullScreen.showNavToolbox")._replace(
- 'gNavToolbox.style.marginTop = "";',
- '$&' + $LF +
- 'TMP_eventListener._updateMarginBottom("");' + $LF +
- 'TMP_eventListener.toggleTabbarVisibility(true);' + $LF +
- 'TMP_eventListener.updateMultiRow();' + $LF +
- 'setTimeout(function() {TMP_eventListener.updateMultiRow();},0);'
+ 'if (!this._isChromeCollapsed) {',
+ '$&\n ' +
+ 'TMP_eventListener.showNavToolbox();'
+ )._replace(
+ /(\})(\)?)$/,
+ ' TMP_eventListener.showNavToolbox();\n' +
+ '$1$2'
).toCode();
}
else
diff --git a/chrome/content/tab/tab.js b/chrome/content/tab/tab.js
index 28bedbf..c1558c5 100644
--- a/chrome/content/tab/tab.js
+++ b/chrome/content/tab/tab.js
@@ -219,8 +219,9 @@ var TabmixTabbar = {
// don't do anything when the tabbar is hidden
// by Print preview or others...
if (gInPrintPreviewMode || !gBrowser.tabContainer.visible ||
- FullScreen._isChromeCollapsed)
+ Tabmix.tabsUtils.inDOMFullscreen || FullScreen._isChromeCollapsed) {
return;
+ }
var tabsPosition = this.getTabsPosition();
// need to reset height
@@ -564,6 +565,10 @@ Tabmix.tabsUtils = {
return (this.tabstripInnerbox = elm);
},
+ get inDOMFullscreen() {
+ return document.documentElement.hasAttribute("inDOMFullscreen");
+ },
+
events: ["MozMouseHittest", "dblclick", "click", "dragstart",
"drop", "dragend", "dragexit"],
@@ -733,7 +738,8 @@ Tabmix.tabsUtils = {
},
updateVerticalTabStrip: function(aReset) {
- if (Tabmix.extensions.verticalTabBar || gInPrintPreviewMode || FullScreen._isChromeCollapsed ||
+ if (Tabmix.extensions.verticalTabBar || gInPrintPreviewMode ||
+ this.inDOMFullscreen || FullScreen._isChromeCollapsed ||
!this.tabBar.visible && TabmixTabbar.visibleRows == 1)
return null;
if (this._inUpdateVerticalTabStrip)
diff --git a/chrome/content/tabmix.js b/chrome/content/tabmix.js
index f0353fa..41d0d7a 100644
--- a/chrome/content/tabmix.js
+++ b/chrome/content/tabmix.js
@@ -714,6 +714,14 @@ var TMP_eventListener = {
this.updateMultiRow();
},
+ showNavToolbox: function() {
+ this._updateMarginBottom("");
+ this.toggleTabbarVisibility(true);
+ this.updateMultiRow();
+ setTimeout(() => this.updateMultiRow(), 0);
+ gBrowser.ensureTabIsVisible(gBrowser.selectedTab, false);
+ },
+
_updateMarginBottom: function TMP_EL__updateMarginBottom(aMargin) {
if (TabmixTabbar.position == 1) {
let bottomToolbox = document.getElementById("tabmix-bottom-toolbox");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git
More information about the Pkg-mozext-commits
mailing list