Bug 1253041 - Don't apply user wheel prefs more than once. r=smaug
authorAndrew McCreight <continuation@gmail.com>
Fri, 11 Mar 2016 06:41:44 -0800
changeset 339544 827864e6dceb86226326104a66720b61c7485601
parent 339543 f97f2238854e0463b9fae36f782d7baf5db512cc
child 339545 2474d1a769586d732a8b295d475631b581096d5e
push id12762
push userbmo:rail@mozilla.com
push dateFri, 11 Mar 2016 19:47:45 +0000
reviewerssmaug
bugs1253041
milestone48.0a1
Bug 1253041 - Don't apply user wheel prefs more than once. r=smaug This causes the preferences to be applied twice for events that are sent to the child process
dom/events/EventStateManager.cpp
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -5619,16 +5619,20 @@ EventStateManager::WheelPrefs::Init(Even
   mOverriddenActionsX[aIndex] = (actionOverrideX == -1)
                               ? static_cast<Action>(action)
                               : static_cast<Action>(actionOverrideX);
 }
 
 void
 EventStateManager::WheelPrefs::ApplyUserPrefsToDelta(WidgetWheelEvent* aEvent)
 {
+  if (aEvent->customizedByUserPrefs) {
+    return;
+  }
+
   Index index = GetIndexFor(aEvent);
   Init(index);
 
   aEvent->deltaX *= mMultiplierX[index];
   aEvent->deltaY *= mMultiplierY[index];
   aEvent->deltaZ *= mMultiplierZ[index];
 
   // If the multiplier is 1.0 or -1.0, i.e., it doesn't change the absolute