[Pkg-mozext-commits] [firegestures] 03/13: [e10s] cancel auto-scroll when starting gesture with middle-button

David Prévot taffit at moszumanska.debian.org
Thu Jan 1 18:34:25 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository firegestures.

commit f39fbee24ac344aaeaf71c915db94694625a8731
Author: Gomita <gomita at xuldev.org>
Date:   Sat Dec 27 14:57:12 2014 +0900

    [e10s] cancel auto-scroll when starting gesture with middle-button
---
 chrome/content/firegestures/remote.js | 3 ---
 components/xdGestureHandler.js        | 7 +++++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/chrome/content/firegestures/remote.js b/chrome/content/firegestures/remote.js
index 69af8b7..077cca6 100644
--- a/chrome/content/firegestures/remote.js
+++ b/chrome/content/firegestures/remote.js
@@ -64,9 +64,6 @@ let FireGesturesRemote = {
 			// if the element is scrollbar, cancel starting gesture
 			// select event should be cancelled
 		}
-		else if (aData.button == 1) {
-			// [ToDo] cancel auto-scrolling?
-		}
 		// tell parent browser the source node and some info
 		sendSyncMessage("FireGesturesRemote:Response", { name: "sourceNode" }, { elt: elt });
 	},
diff --git a/components/xdGestureHandler.js b/components/xdGestureHandler.js
index c33623b..ce6b218 100644
--- a/components/xdGestureHandler.js
+++ b/components/xdGestureHandler.js
@@ -231,8 +231,6 @@ xdGestureHandler.prototype = {
 					if (this._triggerButton == 1 && !this._isMouseDownL && !this._isMouseDownR && !this._altKey(event)) {
 						this._state = STATE_GESTURE;
 						this._startGesture(event);
-						// prevent auto-scroll
-						event.stopPropagation();
 					}
 				}
 				else if (event.button == 2) {
@@ -270,6 +268,11 @@ xdGestureHandler.prototype = {
 						}
 						// mouse gesture
 						this._progressGesture(event);
+						// cancel auto-scroll if trigger button is middle
+						if (this._triggerButton == 1 && this._isMouseDownM && 
+						    this._drawArea.mCurrentBrowser._autoScrollPopup) {
+							this._drawArea.mCurrentBrowser._autoScrollPopup.hidePopup();
+						}
 					}
 				}
 				else if (this._state == STATE_WHEEL || this._state == STATE_ROCKER) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firegestures.git



More information about the Pkg-mozext-commits mailing list