[tbb-commits] [tor-browser] 34/34: Bug 1684739: Only check if swipe tracking is enabled on macOS if the event is a scrollwheel event. r=mstange, a=RyanVM

gitolite role git at cupani.torproject.org
Wed Apr 27 16:05:15 UTC 2022


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

richard pushed a commit to branch tor-browser-91.9esr-11.0-1
in repository tor-browser.

commit c801d6d34aec931da57d4f50490f6f52b3395ef0
Author: Stephen A Pohl <spohl.mozilla.bugs at gmail.com>
AuthorDate: Tue Apr 26 17:07:49 2022 +0000

    Bug 1684739: Only check if swipe tracking is enabled on macOS if the event is a scrollwheel event. r=mstange, a=RyanVM
    
    Differential Revision: https://phabricator.services.mozilla.com/D144728
---
 widget/cocoa/nsChildView.mm | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/widget/cocoa/nsChildView.mm b/widget/cocoa/nsChildView.mm
index c38a5eb8bfcc8..c0363dd6632c3 100644
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -2870,15 +2870,6 @@ NSEvent* gLastDragMouseDownEvent = nil;  // [strong]
 }
 
 - (bool)shouldConsiderStartingSwipeFromEvent:(NSEvent*)anEvent {
-  // This method checks whether the AppleEnableSwipeNavigateWithScrolls global
-  // preference is set.  If it isn't, fluid swipe tracking is disabled, and a
-  // horizontal two-finger gesture is always a scroll (even in Safari).  This
-  // preference can't (currently) be set from the Preferences UI -- only using
-  // 'defaults write'.
-  if (![NSEvent isSwipeTrackingFromScrollEventsEnabled]) {
-    return false;
-  }
-
   // Only initiate horizontal tracking for gestures that have just begun --
   // otherwise a scroll to one side of the page can have a swipe tacked on
   // to it.
@@ -2888,6 +2879,15 @@ NSEvent* gLastDragMouseDownEvent = nil;  // [strong]
     return false;
   }
 
+  // This method checks whether the AppleEnableSwipeNavigateWithScrolls global
+  // preference is set.  If it isn't, fluid swipe tracking is disabled, and a
+  // horizontal two-finger gesture is always a scroll (even in Safari).  This
+  // preference can't (currently) be set from the Preferences UI -- only using
+  // 'defaults write'.
+  if (![NSEvent isSwipeTrackingFromScrollEventsEnabled]) {
+    return false;
+  }
+
   // Only initiate horizontal tracking for events whose horizontal element is
   // at least eight times larger than its vertical element. This minimizes
   // performance problems with vertical scrolls (by minimizing the possibility

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the tbb-commits mailing list