mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 828367 - APZC should not perform scrolling if BES detects panning distance is too small. r=cjones.
This commit is contained in:
parent
3a141ce4b7
commit
2c527faa56
@ -233,10 +233,19 @@ const ContentPanning = {
|
||||
}
|
||||
|
||||
let isPan = KineticPanning.isPan();
|
||||
if (!isPan) {
|
||||
// If panning distance is not large enough, both BES and APZC
|
||||
// should not perform scrolling
|
||||
evt.preventDefault();
|
||||
return;
|
||||
}
|
||||
|
||||
let isScroll = this.scrollCallback(delta.scale(-1));
|
||||
|
||||
if (this.detectingScrolling) {
|
||||
this.detectingScrolling = false;
|
||||
// Stop async-pan-zooming if the user is panning the subframe.
|
||||
if (isPan) {
|
||||
if (isScroll) {
|
||||
// We're going to drive synchronously scrolling an inner frame.
|
||||
Services.obs.notifyObservers(docShell, 'cancel-default-pan-zoom', null);
|
||||
} else {
|
||||
@ -246,8 +255,6 @@ const ContentPanning = {
|
||||
}
|
||||
}
|
||||
|
||||
this.scrollCallback(delta.scale(-1));
|
||||
|
||||
// If a pan action happens, cancel the active state of the
|
||||
// current target.
|
||||
if (!this.panning && isPan) {
|
||||
|
@ -1421,7 +1421,7 @@ void AsyncPanZoomController::ContentReceivedTouch(bool aPreventDefault) {
|
||||
|
||||
while (!mTouchQueue.IsEmpty()) {
|
||||
// we need to reset mDelayPanning before handling scrolling gesture.
|
||||
if (mTouchQueue[0].mType == MultiTouchInput::MULTITOUCH_MOVE) {
|
||||
if (!aPreventDefault && mTouchQueue[0].mType == MultiTouchInput::MULTITOUCH_MOVE) {
|
||||
mDelayPanning = false;
|
||||
}
|
||||
if (!aPreventDefault) {
|
||||
|
Loading…
Reference in New Issue
Block a user