[Bug 1228250]

Masayuki 1228250 at bugs.launchpad.net
Thu Mar 14 05:11:29 UTC 2019


Created attachment 8915954
Bug 143038 Make users can scroll contents horizontally with vertical wheel operation with a modifier

This patch declares a new pref,
"mousewheel.modifier_to_treat_vertical_wheel_as_horizontal_scroll", this takes
a keycode of modifier keys as its value.  The default value is 16 (NS_VK_SHIFT)
on Windows, Linux and Android and 0 (meaning disabled) on macOS.  The reason
why this new feature is disabled on macOS is, if user turns vertical wheel of
mice with Shift key, macOS notifies us of horizontal scroll events.  So, we
don't need to care this feature by ourselves on macOS.

If a modifier keycode is specified to the pref as expected, EventStateManager
and EventStateManager::WheelPrefs treats vertical wheel operation as horizontal
scroll when coming wheel event without the modifier causes scroll.

In such case, EventStateManager::WheelPrefs::NeedToTreatAsHorizontalScroll()
returns true.  Otherwise, false.  If this returns true, default action handler
of wheel events such as EventStateManager::PostHandleEvent() and
IAPZCTreeManager::ReceiveInputEvent() swaps deltaX values and deltaY values of
coming wheel event temporarily and restore them.
AutoTemporarilyWheelDeltaSwapper in WheelHandlingHelper guarantees this
restoring.

So, this patch does NOT change any wheel event information on web apps.  Only
changes its default action.  This is same behavior as Chromium.

Note that with this patch, users cannot navigate the tab's history with
Shift + vertical-wheel in the default settings.  However, I guess that the
usage of this feature is less than the number of users who wants to scroll
contents horizontally with vertical mouse wheel.  Of course,
Shift + horizontal-wheel is available for navigating tab's history even after
this change.

Review commit: https://reviewboard.mozilla.org/r/186794/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/186794/

-- 
You received this bug notification because you are a member of Mozilla
Bugs, which is subscribed to Mozilla Firefox.
https://bugs.launchpad.net/bugs/1228250

Title:
  [Shift + Mouse-Scroll-Wheel] Does NOT Scroll Horizontally

To manage notifications about this bug go to:
https://bugs.launchpad.net/firefox/+bug/1228250/+subscriptions



More information about the Ubuntu-mozillateam-bugs mailing list