[Pkg-mozext-commits] [tabmixplus] 03/23: Follow up bug 1219215 - part 1: remove window-drag bindings and other callers of WindowDraggingUtils, replace with using window-dragging region everywhere
David Prévot
taffit at moszumanska.debian.org
Wed Feb 17 18:33:59 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit 7f8593d66c5e0f57ff106437f192c4321c43d34a
Author: onemen <tabmix.onemen at gmail.com>
Date: Wed Feb 3 15:25:09 2016 +0200
Follow up bug 1219215 - part 1: remove window-drag bindings and other callers of WindowDraggingUtils, replace with using window-dragging region everywhere
---
chrome/content/overlay/browsr.css | 4 ++++
chrome/content/places/places.js | 3 ++-
chrome/content/tab/tab.js | 14 +++++++++++---
chrome/content/tabmix.js | 2 +-
4 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/chrome/content/overlay/browsr.css b/chrome/content/overlay/browsr.css
index 556c302..8c6dbf2 100644
--- a/chrome/content/overlay/browsr.css
+++ b/chrome/content/overlay/browsr.css
@@ -327,3 +327,7 @@ so display: none !important; does not hide the button */
#tabmix-rows-tooltip:not([flowing="multibar"]) {
display: none;
}
+
+#main-window[tabsintitlebar] #TabsToolbar[tabmix-disallow-drag] {
+ -moz-window-dragging: no-drag;
+}
diff --git a/chrome/content/places/places.js b/chrome/content/places/places.js
index aea5234..840c9fc 100644
--- a/chrome/content/places/places.js
+++ b/chrome/content/places/places.js
@@ -617,7 +617,8 @@ Tabmix.onContentLoaded = {
'let $ = $&', {check: Tabmix._debugMode && !Tabmix.isVersion(440)}
)._replace(
'this._dragBindingAlive',
- '$& && Tabmix.prefs.getBoolPref("tabbar.click_dragwindow")'
+ '$& && Tabmix.prefs.getBoolPref("tabbar.click_dragwindow")',
+ {check: !Tabmix.isVersion(470)}
)._replace(
'function rect(ele)',
'let rect = function _rect(ele)', // for strict mode
diff --git a/chrome/content/tab/tab.js b/chrome/content/tab/tab.js
index 620da20..54c304c 100644
--- a/chrome/content/tab/tab.js
+++ b/chrome/content/tab/tab.js
@@ -579,10 +579,12 @@ Tabmix.tabsUtils = {
return document.documentElement.hasAttribute("inDOMFullscreen");
},
- events: ["MozMouseHittest", "dblclick", "click", "dragstart",
- "drop", "dragend", "dragexit"],
+ events: ["dblclick", "click", "dragstart", "drop", "dragend", "dragexit"],
init: function() {
+ if (!Tabmix.isVersion(470)) {
+ this.events.unshift("MozMouseHittest");
+ }
TMP_eventListener.toggleEventListener(this.tabBar, this.events, true, this);
// add dragover event handler to TabsToolbar to capture dragging over
// tabbar margin area, filter out events that are out of the tabbar
@@ -1258,7 +1260,7 @@ var gTMPprefObserver = {
TMP_Places.onPreferencChanged(Services.prefs.getBoolPref(prefName));
break;
case "extensions.tabmix.tabbar.click_dragwindow":
- document.getElementById("TabsToolbar")._dragBindingAlive = Services.prefs.getBoolPref(prefName);
+ this.setTabbarDragging(Services.prefs.getBoolPref(prefName));
/* falls through */
case "extensions.tabmix.tabbar.dblclick_changesize": {
let dragwindow = Tabmix.prefs.getBoolPref("tabbar.click_dragwindow");
@@ -1602,6 +1604,12 @@ var gTMPprefObserver = {
}
},
+ setTabbarDragging: function(allowDrag) {
+ let TabsToolbar = document.getElementById("TabsToolbar");
+ TabsToolbar._dragBindingAlive = allowDrag;
+ Tabmix.setItem(TabsToolbar, "tabmix-disallow-drag", !allowDrag || null);
+ },
+
getStyleSheets: function TMP_PO_getStyleSheet(aHerf, aFirst) {
var styleSheet = [];
for (let i = 0; i < document.styleSheets.length; ++i) {
diff --git a/chrome/content/tabmix.js b/chrome/content/tabmix.js
index 1ce70a1..1532c50 100644
--- a/chrome/content/tabmix.js
+++ b/chrome/content/tabmix.js
@@ -185,7 +185,7 @@ Tabmix.afterDelayedStartup = function() {
if (!Tabmix.prefs.getBoolPref("tabbar.dblclick_changesize"))
TabmixTabClickOptions.toggleEventListener(true);
} else {
- document.getElementById("TabsToolbar")._dragBindingAlive = false;
+ gTMPprefObserver.setTabbarDragging(false);
}
TMP_extensionsCompatibility.onDelayedStartup();
--
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