mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 931787: Avoid tracking vertical overscrolls on OSX if elastic overscroll is disabled. r=felipe
This commit is contained in:
parent
e5eaa246c9
commit
0671510313
@ -176,7 +176,8 @@ let gGestureSupport = {
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets up the history swipe animations for a swipe gesture event, if enabled.
|
||||
* Sets up swipe gestures. This includes setting up swipe animations for the
|
||||
* gesture, if enabled.
|
||||
*
|
||||
* @param aEvent
|
||||
* The swipe gesture start event.
|
||||
@ -189,18 +190,22 @@ let gGestureSupport = {
|
||||
}
|
||||
|
||||
let isVerticalSwipe = false;
|
||||
if (gHistorySwipeAnimation.active) {
|
||||
if (aEvent.direction == aEvent.DIRECTION_UP) {
|
||||
if (content.pageYOffset > 0) {
|
||||
return false;
|
||||
}
|
||||
isVerticalSwipe = true;
|
||||
} else if (aEvent.direction == aEvent.DIRECTION_DOWN) {
|
||||
if (content.pageYOffset < content.scrollMaxY) {
|
||||
return false;
|
||||
}
|
||||
isVerticalSwipe = true;
|
||||
if (aEvent.direction == aEvent.DIRECTION_UP) {
|
||||
if (content.pageYOffset > 0) {
|
||||
return false;
|
||||
}
|
||||
isVerticalSwipe = true;
|
||||
} else if (aEvent.direction == aEvent.DIRECTION_DOWN) {
|
||||
if (content.pageYOffset < content.scrollMaxY) {
|
||||
return false;
|
||||
}
|
||||
isVerticalSwipe = true;
|
||||
}
|
||||
if (isVerticalSwipe && !gHistorySwipeAnimation.active) {
|
||||
// Unlike horizontal swipes (which can navigate history even when
|
||||
// swipe animations are turned off) vertical swipes should not be tracked
|
||||
// if animations (bounce effect) aren't enabled.
|
||||
return false;
|
||||
}
|
||||
|
||||
let canGoBack = gHistorySwipeAnimation.canGoBack();
|
||||
|
Loading…
Reference in New Issue
Block a user