Bug 1259664 part.5 Rename WidgetWheelEvent::customizedByUserPrefs to WidgetWheelEvent::mCustomizedByUserPrefs r?smaug draft
authorMasayuki Nakano <masayuki@d-toybox.com>
Thu, 31 Mar 2016 18:44:01 +0900
changeset 346511 486f078b6f7c68afc8f97027e78105a0cf6c7a8b
parent 346510 93483f38b2fedd932853dd23bf4dfe6fa40aa5ba
child 346512 0c82f2cab7fd552bf9c8db0cee9df897a91706af
push id14400
push usermasayuki@d-toybox.com
push dateFri, 01 Apr 2016 07:07:56 +0000
reviewerssmaug
bugs1259664
milestone48.0a1
Bug 1259664 part.5 Rename WidgetWheelEvent::customizedByUserPrefs to WidgetWheelEvent::mCustomizedByUserPrefs r?smaug MozReview-Commit-ID: 9GksNZRtmmb
dom/base/nsDOMWindowUtils.cpp
dom/events/EventStateManager.cpp
gfx/layers/apz/src/APZCTreeManager.cpp
widget/MouseEvents.h
widget/nsGUIEventIPC.h
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -796,17 +796,17 @@ nsDOMWindowUtils::SendWheelEvent(float a
   wheelEvent.mDeltaX = aDeltaX;
   wheelEvent.mDeltaY = aDeltaY;
   wheelEvent.mDeltaZ = aDeltaZ;
   wheelEvent.mDeltaMode = aDeltaMode;
   wheelEvent.isMomentum =
     (aOptions & WHEEL_EVENT_CAUSED_BY_MOMENTUM) != 0;
   wheelEvent.mIsNoLineOrPageDelta =
     (aOptions & WHEEL_EVENT_CAUSED_BY_NO_LINE_OR_PAGE_DELTA_DEVICE) != 0;
-  wheelEvent.customizedByUserPrefs =
+  wheelEvent.mCustomizedByUserPrefs =
     (aOptions & WHEEL_EVENT_CUSTOMIZED_BY_USER_PREFS) != 0;
   wheelEvent.lineOrPageDeltaX = aLineOrPageDeltaX;
   wheelEvent.lineOrPageDeltaY = aLineOrPageDeltaY;
   wheelEvent.widget = widget;
 
   wheelEvent.mTime = PR_Now() / 1000;
 
   nsPresContext* presContext = GetPresContext();
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -5439,17 +5439,17 @@ EventStateManager::DeltaAccumulator::Com
                      WidgetWheelEvent* aEvent,
                      const nsIntSize& aScrollAmountInDevPixels)
 {
   MOZ_ASSERT(aEvent);
 
   // If the wheel event is line scroll and the delta value is computed from
   // system settings, allow to override the system speed.
   bool allowScrollSpeedOverride =
-    (!aEvent->customizedByUserPrefs &&
+    (!aEvent->mCustomizedByUserPrefs &&
      aEvent->mDeltaMode == nsIDOMWheelEvent::DOM_DELTA_LINE);
   DeltaValues acceleratedDelta =
     WheelTransaction::AccelerateWheelDelta(aEvent, allowScrollSpeedOverride);
 
   nsIntPoint result(0, 0);
   if (aEvent->mDeltaMode == nsIDOMWheelEvent::DOM_DELTA_PIXEL) {
     mPendingScrollAmountX += acceleratedDelta.deltaX;
     mPendingScrollAmountY += acceleratedDelta.deltaY;
@@ -5628,17 +5628,17 @@ 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) {
+  if (aEvent->mCustomizedByUserPrefs) {
     return;
   }
 
   Index index = GetIndexFor(aEvent);
   Init(index);
 
   aEvent->mDeltaX *= mMultiplierX[index];
   aEvent->mDeltaY *= mMultiplierY[index];
@@ -5650,17 +5650,17 @@ EventStateManager::WheelPrefs::ApplyUser
   if (!NeedToComputeLineOrPageDelta(aEvent)) {
     aEvent->lineOrPageDeltaX *= static_cast<int32_t>(mMultiplierX[index]);
     aEvent->lineOrPageDeltaY *= static_cast<int32_t>(mMultiplierY[index]);
   } else {
     aEvent->lineOrPageDeltaX = 0;
     aEvent->lineOrPageDeltaY = 0;
   }
 
-  aEvent->customizedByUserPrefs =
+  aEvent->mCustomizedByUserPrefs =
     ((mMultiplierX[index] != 1.0) || (mMultiplierY[index] != 1.0) ||
      (mMultiplierZ[index] != 1.0));
 }
 
 void
 EventStateManager::WheelPrefs::CancelApplyingUserPrefsFromOverflowDelta(
                                  WidgetWheelEvent* aEvent)
 {
--- a/gfx/layers/apz/src/APZCTreeManager.cpp
+++ b/gfx/layers/apz/src/APZCTreeManager.cpp
@@ -1100,17 +1100,17 @@ APZCTreeManager::ProcessWheelEvent(Widge
                          origin,
                          aEvent.mDeltaX, aEvent.mDeltaY,
                          aEvent.mAllowToOverrideSystemScrollSpeed);
 
   // We add the user multiplier as a separate field, rather than premultiplying
   // it, because if the input is converted back to a WidgetWheelEvent, then
   // EventStateManager would apply the delta a second time. We could in theory
   // work around this by asking ESM to customize the event much sooner, and
-  // then save the "customizedByUserPrefs" bit on ScrollWheelInput - but for
+  // then save the "mCustomizedByUserPrefs" bit on ScrollWheelInput - but for
   // now, this seems easier.
   EventStateManager::GetUserPrefsForWheelEvent(&aEvent,
     &input.mUserDeltaMultiplierX,
     &input.mUserDeltaMultiplierY);
 
   nsEventStatus status = ReceiveInputEvent(input, aOutTargetGuid, aOutInputBlockId);
   aEvent.refPoint.x = input.mOrigin.x;
   aEvent.refPoint.y = input.mOrigin.y;
--- a/widget/MouseEvents.h
+++ b/widget/MouseEvents.h
@@ -447,17 +447,17 @@ private:
   friend class mozilla::dom::PBrowserParent;
   friend class mozilla::dom::PBrowserChild;
 
   WidgetWheelEvent()
     : mDeltaX(0.0)
     , mDeltaY(0.0)
     , mDeltaZ(0.0)
     , mDeltaMode(nsIDOMWheelEvent::DOM_DELTA_PIXEL)
-    , customizedByUserPrefs(false)
+    , mCustomizedByUserPrefs(false)
     , isMomentum(false)
     , mIsNoLineOrPageDelta(false)
     , lineOrPageDeltaX(0)
     , lineOrPageDeltaY(0)
     , scrollType(SCROLL_DEFAULT)
     , overflowDeltaX(0.0)
     , overflowDeltaY(0.0)
     , mViewPortIsOverscrolled(false)
@@ -470,17 +470,17 @@ public:
   virtual WidgetWheelEvent* AsWheelEvent() override { return this; }
 
   WidgetWheelEvent(bool aIsTrusted, EventMessage aMessage, nsIWidget* aWidget)
     : WidgetMouseEventBase(aIsTrusted, aMessage, aWidget, eWheelEventClass)
     , mDeltaX(0.0)
     , mDeltaY(0.0)
     , mDeltaZ(0.0)
     , mDeltaMode(nsIDOMWheelEvent::DOM_DELTA_PIXEL)
-    , customizedByUserPrefs(false)
+    , mCustomizedByUserPrefs(false)
     , mayHaveMomentum(false)
     , isMomentum(false)
     , mIsNoLineOrPageDelta(false)
     , lineOrPageDeltaX(0)
     , lineOrPageDeltaY(0)
     , scrollType(SCROLL_DEFAULT)
     , overflowDeltaX(0.0)
     , overflowDeltaY(0.0)
@@ -521,17 +521,17 @@ public:
 
   // Should be one of nsIDOMWheelEvent::DOM_DELTA_*
   uint32_t mDeltaMode;
 
   // Following members are for internal use only, not for DOM event.
 
   // If the delta values are computed from prefs, this value is true.
   // Otherwise, i.e., they are computed from native events, false.
-  bool customizedByUserPrefs;
+  bool mCustomizedByUserPrefs;
 
   // true if the momentum events directly tied to this event may follow it.
   bool mayHaveMomentum;
   // true if the event is caused by momentum.
   bool isMomentum;
 
   // If device event handlers don't know when they should set lineOrPageDeltaX
   // and lineOrPageDeltaY, this is true.  Otherwise, false.
@@ -609,17 +609,17 @@ public:
   void AssignWheelEventData(const WidgetWheelEvent& aEvent, bool aCopyTargets)
   {
     AssignMouseEventBaseData(aEvent, aCopyTargets);
 
     mDeltaX = aEvent.mDeltaX;
     mDeltaY = aEvent.mDeltaY;
     mDeltaZ = aEvent.mDeltaZ;
     mDeltaMode = aEvent.mDeltaMode;
-    customizedByUserPrefs = aEvent.customizedByUserPrefs;
+    mCustomizedByUserPrefs = aEvent.mCustomizedByUserPrefs;
     mayHaveMomentum = aEvent.mayHaveMomentum;
     isMomentum = aEvent.isMomentum;
     mIsNoLineOrPageDelta = aEvent.mIsNoLineOrPageDelta;
     lineOrPageDeltaX = aEvent.lineOrPageDeltaX;
     lineOrPageDeltaY = aEvent.lineOrPageDeltaY;
     scrollType = aEvent.scrollType;
     overflowDeltaX = aEvent.overflowDeltaX;
     overflowDeltaY = aEvent.overflowDeltaY;
--- a/widget/nsGUIEventIPC.h
+++ b/widget/nsGUIEventIPC.h
@@ -159,17 +159,17 @@ struct ParamTraits<mozilla::WidgetWheelE
 
   static void Write(Message* aMsg, const paramType& aParam)
   {
     WriteParam(aMsg, static_cast<mozilla::WidgetMouseEventBase>(aParam));
     WriteParam(aMsg, aParam.mDeltaX);
     WriteParam(aMsg, aParam.mDeltaY);
     WriteParam(aMsg, aParam.mDeltaZ);
     WriteParam(aMsg, aParam.mDeltaMode);
-    WriteParam(aMsg, aParam.customizedByUserPrefs);
+    WriteParam(aMsg, aParam.mCustomizedByUserPrefs);
     WriteParam(aMsg, aParam.mayHaveMomentum);
     WriteParam(aMsg, aParam.isMomentum);
     WriteParam(aMsg, aParam.mIsNoLineOrPageDelta);
     WriteParam(aMsg, aParam.lineOrPageDeltaX);
     WriteParam(aMsg, aParam.lineOrPageDeltaY);
     WriteParam(aMsg, static_cast<int32_t>(aParam.scrollType));
     WriteParam(aMsg, aParam.overflowDeltaX);
     WriteParam(aMsg, aParam.overflowDeltaY);
@@ -183,17 +183,17 @@ struct ParamTraits<mozilla::WidgetWheelE
     int32_t scrollType = 0;
     bool rv =
       ReadParam(aMsg, aIter,
                 static_cast<mozilla::WidgetMouseEventBase*>(aResult)) &&
       ReadParam(aMsg, aIter, &aResult->mDeltaX) &&
       ReadParam(aMsg, aIter, &aResult->mDeltaY) &&
       ReadParam(aMsg, aIter, &aResult->mDeltaZ) &&
       ReadParam(aMsg, aIter, &aResult->mDeltaMode) &&
-      ReadParam(aMsg, aIter, &aResult->customizedByUserPrefs) &&
+      ReadParam(aMsg, aIter, &aResult->mCustomizedByUserPrefs) &&
       ReadParam(aMsg, aIter, &aResult->mayHaveMomentum) &&
       ReadParam(aMsg, aIter, &aResult->isMomentum) &&
       ReadParam(aMsg, aIter, &aResult->mIsNoLineOrPageDelta) &&
       ReadParam(aMsg, aIter, &aResult->lineOrPageDeltaX) &&
       ReadParam(aMsg, aIter, &aResult->lineOrPageDeltaY) &&
       ReadParam(aMsg, aIter, &scrollType) &&
       ReadParam(aMsg, aIter, &aResult->overflowDeltaX) &&
       ReadParam(aMsg, aIter, &aResult->overflowDeltaY) &&