[Pkg-mozext-commits] [tabmixplus] 08/15: Call updateTabbarBottomPosition from our scrollbox.xml\toolbar binding to avoid timing issues in Linux Ubuntu and set tabstripInnerbox and mTabstrip flowing attribute again.
David Prévot
taffit at moszumanska.debian.org
Wed Mar 18 19:05:18 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 3696892717e77ec8a5eec84cc5d1f11e4152359b
Author: onemen <tabmix.onemen at gmail.com>
Date: Wed Mar 11 13:45:22 2015 +0200
Call updateTabbarBottomPosition from our scrollbox.xml\toolbar binding to avoid timing issues in Linux Ubuntu
and set tabstripInnerbox and mTabstrip flowing attribute again.
---
chrome/content/tab/scrollbox.xml | 34 ++++++++++++++++++++++++++++++++++
chrome/content/tab/tab.js | 32 ++++++--------------------------
2 files changed, 40 insertions(+), 26 deletions(-)
diff --git a/chrome/content/tab/scrollbox.xml b/chrome/content/tab/scrollbox.xml
index 5873099..ca60939 100644
--- a/chrome/content/tab/scrollbox.xml
+++ b/chrome/content/tab/scrollbox.xml
@@ -613,6 +613,7 @@
//XXX we don't check for aEvent.target != window to catch changs in browser-bottombox
// try to improve it
window.addEventListener("resize", this.tabmixHandleEvent, false);
+ this.updatePosition();
]]>
</constructor>
@@ -626,6 +627,39 @@
document.getAnonymousElementByAttribute(this, 'anonid', 'toolbar-innerbox');
</field>
+ <method name="updatePosition">
+ <body><![CDATA[
+ let tabBar = gBrowser.tabContainer;
+ Tabmix.setItem(tabBar.mTabstrip, "flowing", TabmixTabbar.flowing);
+ Tabmix.tabsUtils.tabstripInnerbox = document.getAnonymousElementByAttribute(
+ tabBar.mTabstrip._scrollbox, "class", "box-inherit scrollbox-innerbox");
+ let bottomToolbox = document.getElementById("tabmix-bottom-toolbox");
+ if (!bottomToolbox) {
+ bottomToolbox = document.createElement("toolbox");
+ bottomToolbox.setAttribute("id", "tabmix-bottom-toolbox");
+ bottomToolbox.collapsed = !gBrowser.tabContainer.visible;
+ if (navigator.oscpu.startsWith("Windows NT 6.1"))
+ bottomToolbox.setAttribute("tabmix_aero", true);
+ // if we decide to move this box into browser-bottombox
+ // remember to fix background css rules for all platform
+ let warningContainer = document.getElementById("full-screen-warning-container");
+ warningContainer.parentNode.insertBefore(bottomToolbox, warningContainer);
+ }
+ if (tabBar.visible)
+ gTMPprefObserver.updateTabbarBottomPosition();
+ else {
+ // the tabbar is hidden on startup
+ let height = tabBar.mTabstrip.scrollClientRect.height;
+ bottomToolbox.style.setProperty("height", height + "px", "important");
+ let tabsToolbar = document.getElementById("TabsToolbar");
+ tabsToolbar.style.setProperty("top", screen.availHeight + "px", "important");
+ tabsToolbar.setAttribute("width", screen.availWidth);
+ }
+ // force TabmixTabbar.setHeight to set tabbar height
+ TabmixTabbar.visibleRows = 1;
+ ]]></body>
+ </method>
+
<method name="tabmixHandleEvent">
<parameter name="aEvent"/>
<body><![CDATA[
diff --git a/chrome/content/tab/tab.js b/chrome/content/tab/tab.js
index 36e7adb..a746b0b 100644
--- a/chrome/content/tab/tab.js
+++ b/chrome/content/tab/tab.js
@@ -2033,43 +2033,23 @@ var gTMPprefObserver = {
TabmixTabbar.position = aPosition;
gBrowser.tabContainer._tabDropIndicator.removeAttribute("style");
var tabsToolbar = document.getElementById("TabsToolbar");
- var bottomToolbox = document.getElementById("tabmix-bottom-toolbox");
+ // setting tabbaronbottom attribute trigger updatePosition in our
+ // scrollbox.xml\toolbar binding
Tabmix.setItem(tabsToolbar, "tabbaronbottom", TabmixTabbar.position == 1 || null);
// TabsOnTop removed by bug 755593
if (window.TabsOnTop)
this.setTabsOnTop(TabmixTabbar.position == 1);
- if (TabmixTabbar.position == 1) {// bottom
- if (!bottomToolbox) {
- bottomToolbox = document.createElement("toolbox");
- bottomToolbox.setAttribute("id", "tabmix-bottom-toolbox");
- bottomToolbox.collapsed = !gBrowser.tabContainer.visible;
- if (navigator.oscpu.startsWith("Windows NT 6.1"))
- bottomToolbox.setAttribute("tabmix_aero", true);
- // if we decide to move this box into browser-bottombox
- // remember to fix background css rules for all platform
- let warningContainer = document.getElementById("full-screen-warning-container");
- warningContainer.parentNode.insertBefore(bottomToolbox, warningContainer);
- }
- if (gBrowser.tabContainer.visible)
- this.updateTabbarBottomPosition();
- else {
- // the tabbar is hidden on startup
- let height = gBrowser.tabContainer.mTabstrip.scrollClientRect.height;
- bottomToolbox.style.setProperty("height", height + "px", "important");
- tabsToolbar.style.setProperty("top", screen.availHeight + "px", "important");
- tabsToolbar.setAttribute("width", screen.availWidth);
- }
- }
- else {// top
+ if (TabmixTabbar.position === 0) {// top
this._bottomRect = {top:null, width:null, height:null};
+ let bottomToolbox = document.getElementById("tabmix-bottom-toolbox");
bottomToolbox.style.removeProperty("height");
tabsToolbar.style.removeProperty("top");
tabsToolbar.removeAttribute("width");
+ // force TabmixTabbar.setHeight to set tabbar height
+ TabmixTabbar.visibleRows = 1;
}
- // force TabmixTabbar.setHeight to set tabbar height
- TabmixTabbar.visibleRows = 1;
return true;
},
--
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