diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-08-25 19:56:18 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-08-25 19:56:18 +0200 |
commit | f0e053a1b4b42ef3344032589d1c02ff21e21f6f (patch) | |
tree | e28f860afbf557c411c25f5fb679e076e6c3dded /dom/events/EventStateManager.cpp | |
parent | 74c6c585ab519e3314bdf6b0fa23d8aa757b78a5 (diff) | |
download | UXP-f0e053a1b4b42ef3344032589d1c02ff21e21f6f.tar UXP-f0e053a1b4b42ef3344032589d1c02ff21e21f6f.tar.gz UXP-f0e053a1b4b42ef3344032589d1c02ff21e21f6f.tar.lz UXP-f0e053a1b4b42ef3344032589d1c02ff21e21f6f.tar.xz UXP-f0e053a1b4b42ef3344032589d1c02ff21e21f6f.zip |
Add a horizontal scroll action option for mouse wheel.
Resolves #732
Diffstat (limited to 'dom/events/EventStateManager.cpp')
-rw-r--r-- | dom/events/EventStateManager.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/dom/events/EventStateManager.cpp b/dom/events/EventStateManager.cpp index 7bbfe21b7..868bee1a3 100644 --- a/dom/events/EventStateManager.cpp +++ b/dom/events/EventStateManager.cpp @@ -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. |