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 288283 827864e6dceb86226326104a66720b61c7485601
parent 288282 f97f2238854e0463b9fae36f782d7baf5db512cc
child 288284 2474d1a769586d732a8b295d475631b581096d5e
push id30079
push userryanvm@gmail.com
push dateSat, 12 Mar 2016 20:24:19 +0000
treeherdermozilla-central@d1d47ba19ce9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1253041
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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