mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 669979. Don't do zoom or history actions for momentum scrolls, no matter what's going on with pixel scrolling. r=smaug,masayuki
This commit is contained in:
parent
c358d9fe7e
commit
fb85e72ddc
@ -2671,14 +2671,15 @@ nsEventStateManager::ComputeWheelActionFor(nsMouseScrollEvent* aMouseEvent,
|
||||
// Do not scroll pixels when zooming
|
||||
action = -1;
|
||||
}
|
||||
} else if (aMouseEvent->scrollFlags & nsMouseScrollEvent::kHasPixels) {
|
||||
if (aUseSystemSettings ||
|
||||
action == MOUSE_SCROLL_N_LINES || action == MOUSE_SCROLL_PAGE ||
|
||||
(aMouseEvent->scrollFlags & nsMouseScrollEvent::kIsMomentum)) {
|
||||
// Don't scroll lines when a pixel scroll event will follow.
|
||||
// Also, don't do history scrolling or zooming for momentum scrolls.
|
||||
action = -1;
|
||||
}
|
||||
} else if (((aMouseEvent->scrollFlags & nsMouseScrollEvent::kHasPixels) &&
|
||||
(aUseSystemSettings ||
|
||||
action == MOUSE_SCROLL_N_LINES || action == MOUSE_SCROLL_PAGE)) ||
|
||||
((aMouseEvent->scrollFlags & nsMouseScrollEvent::kIsMomentum) &&
|
||||
(action == MOUSE_SCROLL_HISTORY || action == MOUSE_SCROLL_ZOOM))) {
|
||||
// Don't scroll lines or page when a pixel scroll event will follow.
|
||||
// Also, don't do history scrolling or zooming for momentum scrolls,
|
||||
// no matter what's going on with pixel scrolling.
|
||||
action = -1;
|
||||
}
|
||||
|
||||
return action;
|
||||
|
@ -35,7 +35,11 @@ function sendTouchpadScrollMotion(scrollbox, direction, ctrl, momentum) {
|
||||
};
|
||||
// first a line scroll
|
||||
synthesizeMouseScroll(scrollbox, 10, 10, event, win);
|
||||
// Then a line scroll with hasPixels set to false
|
||||
event.hasPixels = false;
|
||||
synthesizeMouseScroll(scrollbox, 10, 10, event, win);
|
||||
// then 5 pixel scrolls
|
||||
event.hasPixels = true;
|
||||
event.delta *= 3;
|
||||
event.type = "MozMousePixelScroll";
|
||||
event.hasPixels = false;
|
||||
|
Loading…
Reference in New Issue
Block a user