Add a horizontal scroll action option for mouse wheel.

Resolves #732
This commit is contained in:
wolfbeast 2018-08-25 19:56:18 +02:00 committed by Roy Tam
commit 4932cf3ea0
3 changed files with 10 additions and 3 deletions

View file

@ -3240,6 +3240,11 @@ EventStateManager::PostHandleEvent(nsPresContext* aPresContext,
action = WheelPrefs::GetInstance()->ComputeActionFor(wheelEvent);
}
switch (action) {
case WheelPrefs::ACTION_HSCROLL: {
// Swap axes and fall through
double deltaX = wheelEvent->mDeltaX;
wheelEvent->mDeltaX = wheelEvent->mDeltaY;
wheelEvent->mDeltaY = deltaX;
case WheelPrefs::ACTION_SCROLL: {
// For scrolling of default action, we should honor the mouse wheel
// transaction.