Bug 989769 - Allow for vertical scrolls to interrupt horizontal swipes on OSX. r=smichaud, a=lsblakk
authorStephen Pohl <spohl.mozilla.bugs@gmail.com>
Wed, 07 May 2014 19:53:01 -0400
changeset 192278 a713e6bd540d
parent 192277 aa9bc2b880a1
child 192279 e9cfd7705824
push id3557
push userryanvm@gmail.com
push date2014-05-14 16:23 +0000
treeherdermozilla-beta@c3bcd563e6ce [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmichaud, lsblakk
bugs989769
milestone30.0
Bug 989769 - Allow for vertical scrolls to interrupt horizontal swipes on OSX. r=smichaud, a=lsblakk
widget/cocoa/nsChildView.mm
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -5010,33 +5010,22 @@ static int32_t RoundUp(double aDouble)
     return;
   }
 
   NPCocoaEvent cocoaEvent;
   ChildViewMouseTracker::AttachPluginEvent(wheelEvent, self, theEvent,
                                            NPCocoaEventScrollWheel,
                                            &cocoaEvent);
 
+  mGeckoChild->DispatchWindowEvent(wheelEvent);
+  if (!mGeckoChild) {
+    return;
+  }
+
 #ifdef __LP64__
-  // Only dispatch this event if we're not currently tracking a scroll event as
-  // swipe.
-  if (!mCancelSwipeAnimation || *mCancelSwipeAnimation == YES) {
-#endif // #ifdef __LP64__
-    mGeckoChild->DispatchWindowEvent(wheelEvent);
-    if (!mGeckoChild) {
-      return;
-    }
-#ifdef __LP64__
-  } else {
-    // Manually set these members here since we didn't dispatch the event.
-    wheelEvent.overflowDeltaX = wheelEvent.deltaX;
-    wheelEvent.overflowDeltaY = wheelEvent.deltaY;
-    wheelEvent.mViewPortIsOverscrolled = true;
-  }
-
   // overflowDeltaX and overflowDeltaY tell us when the user has tried to
   // scroll past the edge of a page (in those cases it's non-zero).
   if ((wheelEvent.deltaMode == nsIDOMWheelEvent::DOM_DELTA_PIXEL) &&
       (wheelEvent.deltaX != 0.0 || wheelEvent.deltaY != 0.0)) {
     [self maybeTrackScrollEventAsSwipe:theEvent
                        scrollOverflowX:wheelEvent.overflowDeltaX
                        scrollOverflowY:wheelEvent.overflowDeltaY
                 viewPortIsOverscrolled:wheelEvent.mViewPortIsOverscrolled];