[Pkg-mozext-commits] [tabmixplus] 14/51: Move tabstripInnerbox to Tabmix.tabsUtils
David Prévot
taffit at moszumanska.debian.org
Mon Feb 2 18:36:47 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 a6ad80d0fe668a259e7e1af6183abb745bd00d5f
Author: onemen <tabmix.onemen at gmail.com>
Date: Fri Jan 2 18:12:43 2015 +0200
Move tabstripInnerbox to Tabmix.tabsUtils
---
chrome/content/tab/tab.js | 15 +++++++++++----
chrome/content/tab/tabbrowser_4.xml | 7 ++-----
2 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/chrome/content/tab/tab.js b/chrome/content/tab/tab.js
index bec66f6..aa5dfb3 100644
--- a/chrome/content/tab/tab.js
+++ b/chrome/content/tab/tab.js
@@ -218,7 +218,7 @@ var TabmixTabbar = {
get singleRowHeight() {
let heights = this._heights[this._tabsPosition];
if (typeof(heights) == "undefined")
- return gBrowser.tabContainer.tabstripInnerbox.getBoundingClientRect().height;
+ return Tabmix.tabsUtils.tabstripInnerbox.getBoundingClientRect().height;
return heights[2] / 2;
},
@@ -260,8 +260,8 @@ var TabmixTabbar = {
if (aRows in this._heights[tabsPosition])
newHeight = this._heights[tabsPosition][aRows];
else {
- if (tabBar.tabstripInnerbox) {
- let height = tabBar.tabstripInnerbox.getBoundingClientRect().height;
+ if (Tabmix.tabsUtils.tabstripInnerbox) {
+ let height = Tabmix.tabsUtils.tabstripInnerbox.getBoundingClientRect().height;
if (tabBar.getAttribute("multibar") == "scrollbar") {
// We can get here if we switch to diffrent tabs position while in multibar
let rowHeight = height/tabBar.lastTabRowNumber;
@@ -563,6 +563,13 @@ Tabmix.tabsUtils = {
return (this.tabBar = gBrowser.tabContainer);
},
+ get tabstripInnerbox() {
+ delete this.tabstripInnerbox;
+ let elm = document.getAnonymousElementByAttribute(
+ this.tabBar.mTabstrip._scrollbox, "class", "box-inherit scrollbox-innerbox");
+ return (this.tabstripInnerbox = elm);
+ },
+
init: function() {
// add dragover event handler to TabsToolbar to capture dragging over
// tabbar margin area, filter out events that are out of the tabbar
@@ -634,7 +641,7 @@ Tabmix.tabsUtils = {
onUnload: function() {
if (this.tabBar.parentNode)
this.tabBar.parentNode.removeEventListener("dragover", this, true);
- delete this.tabBar.tabstripInnerbox;
+ delete this.tabstripInnerbox;
gBrowser.tabContainer._tabmixPositionalTabs = null;
},
diff --git a/chrome/content/tab/tabbrowser_4.xml b/chrome/content/tab/tabbrowser_4.xml
index f657b50..3605d50 100644
--- a/chrome/content/tab/tabbrowser_4.xml
+++ b/chrome/content/tab/tabbrowser_4.xml
@@ -344,10 +344,6 @@
extends="chrome://tabmixplus/content/tab/tabbrowser_proxy.xml#tabmix-tabbrowser-tabs-proxy">
<implementation implements="nsIDOMEventListener">
- <field name="tabstripInnerbox" readonly="true">
- document.getAnonymousElementByAttribute(this.mTabstrip._scrollbox, "class", "box-inherit scrollbox-innerbox");
- </field>
-
<constructor>
<![CDATA[
Tabmix.initialization.run("init", this);
@@ -467,7 +463,8 @@
<property name="topTabY" readonly="true">
<getter><![CDATA[
- return this.tabstripInnerbox.boxObject.y + Tabmix.getStyle(this.tabstripInnerbox, "paddingTop");
+ return Tabmix.tabsUtils.tabstripInnerbox.boxObject.y +
+ Tabmix.getStyle(Tabmix.tabsUtils.tabstripInnerbox, "paddingTop");
]]></getter>
</property>
--
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