Bug 1259664 part.1 Rename WidgetWheelEvent::deltaX to WidgetWheelEvent::mDeltaX r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Thu, 31 Mar 2016 18:55:59 +0900
changeset 291197 7a58737fdf650018b9ee5df3184fe822d3391f3f
parent 291196 1a33b1821e5bbafcd6837c755bc1d8fc6b25325b
child 291198 b0338e680f6ce4d53d4f78fa78109ae0212a900c
push id30130
push userkwierso@gmail.com
push dateFri, 01 Apr 2016 22:29:37 +0000
treeherdermozilla-central@b6ea6a3bb8a6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1259664
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 1259664 part.1 Rename WidgetWheelEvent::deltaX to WidgetWheelEvent::mDeltaX r=smaug MozReview-Commit-ID: F5dQHpPkWfA
dom/base/nsDOMWindowUtils.cpp
dom/events/EventStateManager.cpp
dom/events/WheelEvent.cpp
dom/events/WheelHandlingHelper.cpp
gfx/layers/apz/src/APZCTreeManager.cpp
widget/InputData.cpp
widget/MouseEvents.h
widget/WidgetEventImpl.cpp
widget/cocoa/nsChildView.mm
widget/gtk/nsWindow.cpp
widget/nsGUIEventIPC.h
widget/qt/nsWindow.cpp
widget/windows/WinMouseScrollHandler.cpp
widget/windows/nsWinGesture.cpp
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -788,17 +788,17 @@ nsDOMWindowUtils::SendWheelEvent(float a
   nsPoint offset;
   nsCOMPtr<nsIWidget> widget = GetWidget(&offset);
   if (!widget) {
     return NS_ERROR_NULL_POINTER;
   }
 
   WidgetWheelEvent wheelEvent(true, eWheel, widget);
   wheelEvent.mModifiers = nsContentUtils::GetWidgetModifiers(aModifiers);
-  wheelEvent.deltaX = aDeltaX;
+  wheelEvent.mDeltaX = aDeltaX;
   wheelEvent.deltaY = aDeltaY;
   wheelEvent.deltaZ = aDeltaZ;
   wheelEvent.deltaMode = 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 =
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -2189,31 +2189,31 @@ EventStateManager::DispatchLegacyMouseSc
       scrollDeltaX =
         !aEvent->lineOrPageDeltaX ? 0 :
           (aEvent->lineOrPageDeltaX > 0  ? nsIDOMUIEvent::SCROLL_PAGE_DOWN :
                                            nsIDOMUIEvent::SCROLL_PAGE_UP);
       scrollDeltaY =
         !aEvent->lineOrPageDeltaY ? 0 :
           (aEvent->lineOrPageDeltaY > 0  ? nsIDOMUIEvent::SCROLL_PAGE_DOWN :
                                            nsIDOMUIEvent::SCROLL_PAGE_UP);
-      pixelDeltaX = RoundDown(aEvent->deltaX * scrollAmountInCSSPixels.width);
+      pixelDeltaX = RoundDown(aEvent->mDeltaX * scrollAmountInCSSPixels.width);
       pixelDeltaY = RoundDown(aEvent->deltaY * scrollAmountInCSSPixels.height);
       break;
 
     case nsIDOMWheelEvent::DOM_DELTA_LINE:
       scrollDeltaX = aEvent->lineOrPageDeltaX;
       scrollDeltaY = aEvent->lineOrPageDeltaY;
-      pixelDeltaX = RoundDown(aEvent->deltaX * scrollAmountInCSSPixels.width);
+      pixelDeltaX = RoundDown(aEvent->mDeltaX * scrollAmountInCSSPixels.width);
       pixelDeltaY = RoundDown(aEvent->deltaY * scrollAmountInCSSPixels.height);
       break;
 
     case nsIDOMWheelEvent::DOM_DELTA_PIXEL:
       scrollDeltaX = aEvent->lineOrPageDeltaX;
       scrollDeltaY = aEvent->lineOrPageDeltaY;
-      pixelDeltaX = RoundDown(aEvent->deltaX);
+      pixelDeltaX = RoundDown(aEvent->mDeltaX);
       pixelDeltaY = RoundDown(aEvent->deltaY);
       break;
 
     default:
       MOZ_CRASH("Invalid deltaMode value comes");
   }
 
   // Send the legacy events in following order:
@@ -2355,17 +2355,17 @@ EventStateManager::SendPixelScrollEvent(
   aState.mDefaultPreventedByContent = event.DefaultPreventedByContent();
 }
 
 nsIFrame*
 EventStateManager::ComputeScrollTarget(nsIFrame* aTargetFrame,
                                        WidgetWheelEvent* aEvent,
                                        ComputeScrollTargetOptions aOptions)
 {
-  return ComputeScrollTarget(aTargetFrame, aEvent->deltaX, aEvent->deltaY,
+  return ComputeScrollTarget(aTargetFrame, aEvent->mDeltaX, aEvent->deltaY,
                              aEvent, aOptions);
 }
 
 // Overload ComputeScrollTarget method to allow passing "test" dx and dy when looking
 // for which scrollbarmediators to activate when two finger down on trackpad
 // and before any actual motion
 nsIFrame*
 EventStateManager::ComputeScrollTarget(nsIFrame* aTargetFrame,
@@ -2651,32 +2651,32 @@ EventStateManager::DoScrollText(nsIScrol
 
   // If CSS overflow properties caused not to scroll, the overflowDelta* values
   // should be same as delta* values since they may be used as gesture event by
   // widget.  However, if there is another scrollable element in the ancestor
   // along the axis, probably users don't want the operation to cause
   // additional action such as moving history.  In such case, overflowDelta
   // values should stay zero.
   if (scrollFrameWeak.IsAlive()) {
-    if (aEvent->deltaX &&
+    if (aEvent->mDeltaX &&
         overflowStyle.mHorizontal == NS_STYLE_OVERFLOW_HIDDEN &&
         !ComputeScrollTarget(scrollFrame, aEvent,
                              COMPUTE_SCROLLABLE_ANCESTOR_ALONG_X_AXIS)) {
-      aEvent->overflowDeltaX = aEvent->deltaX;
+      aEvent->overflowDeltaX = aEvent->mDeltaX;
     }
     if (aEvent->deltaY &&
         overflowStyle.mVertical == NS_STYLE_OVERFLOW_HIDDEN &&
         !ComputeScrollTarget(scrollFrame, aEvent,
                              COMPUTE_SCROLLABLE_ANCESTOR_ALONG_Y_AXIS)) {
       aEvent->overflowDeltaY = aEvent->deltaY;
     }
   }
 
   NS_ASSERTION(aEvent->overflowDeltaX == 0 ||
-    (aEvent->overflowDeltaX > 0) == (aEvent->deltaX > 0),
+    (aEvent->overflowDeltaX > 0) == (aEvent->mDeltaX > 0),
     "The sign of overflowDeltaX is different from the scroll direction");
   NS_ASSERTION(aEvent->overflowDeltaY == 0 ||
     (aEvent->overflowDeltaY > 0) == (aEvent->deltaY > 0),
     "The sign of overflowDeltaY is different from the scroll direction");
 
   WheelPrefs::GetInstance()->CancelApplyingUserPrefsFromOverflowDelta(aEvent);
 }
 
@@ -3197,33 +3197,33 @@ EventStateManager::PostHandleEvent(nsPre
       switch (action) {
         case WheelPrefs::ACTION_SCROLL: {
           // For scrolling of default action, we should honor the mouse wheel
           // transaction.
 
           ScrollbarsForWheel::PrepareToScrollText(this, aTargetFrame, wheelEvent);
 
           if (aEvent->mMessage != eWheel ||
-              (!wheelEvent->deltaX && !wheelEvent->deltaY)) {
+              (!wheelEvent->mDeltaX && !wheelEvent->deltaY)) {
             break;
           }
 
           nsIScrollableFrame* scrollTarget = do_QueryFrame(frameToScroll);
           ScrollbarsForWheel::SetActiveScrollTarget(scrollTarget);
 
           nsIFrame* rootScrollFrame = !aTargetFrame ? nullptr :
             aTargetFrame->PresContext()->PresShell()->GetRootScrollFrame();
           nsIScrollableFrame* rootScrollableFrame = nullptr;
           if (rootScrollFrame) {
             rootScrollableFrame = do_QueryFrame(rootScrollFrame);
           }
           if (!scrollTarget || scrollTarget == rootScrollableFrame) {
             wheelEvent->mViewPortIsOverscrolled = true;
           }
-          wheelEvent->overflowDeltaX = wheelEvent->deltaX;
+          wheelEvent->overflowDeltaX = wheelEvent->mDeltaX;
           wheelEvent->overflowDeltaY = wheelEvent->deltaY;
           WheelPrefs::GetInstance()->
             CancelApplyingUserPrefsFromOverflowDelta(wheelEvent);
           if (scrollTarget) {
             DoScrollText(scrollTarget, wheelEvent);
           } else {
             WheelTransaction::EndTransaction();
             ScrollbarsForWheel::Inactivate();
@@ -3249,17 +3249,17 @@ EventStateManager::PostHandleEvent(nsPre
           }
           DoScrollZoom(aTargetFrame, intDelta);
           break;
         }
         case WheelPrefs::ACTION_SEND_TO_PLUGIN:
           MOZ_ASSERT(pluginFrame);
 
           if (wheelEvent->mMessage != eWheel ||
-              (!wheelEvent->deltaX && !wheelEvent->deltaY)) {
+              (!wheelEvent->mDeltaX && !wheelEvent->deltaY)) {
             break;
           }
 
           MOZ_ASSERT(static_cast<void*>(frameToScroll) ==
                        static_cast<void*>(pluginFrame));
           if (!WheelTransaction::WillHandleDefaultAction(wheelEvent,
                                                          frameToScroll)) {
             break;
@@ -3284,17 +3284,17 @@ EventStateManager::PostHandleEvent(nsPre
             // The event was processed neither by APZ nor by us, so all of the
             // delta values must be overflown delta values.
             allDeltaOverflown = true;
           }
 
           if (!allDeltaOverflown) {
             break;
           }
-          wheelEvent->overflowDeltaX = wheelEvent->deltaX;
+          wheelEvent->overflowDeltaX = wheelEvent->mDeltaX;
           wheelEvent->overflowDeltaY = wheelEvent->deltaY;
           WheelPrefs::GetInstance()->
             CancelApplyingUserPrefsFromOverflowDelta(wheelEvent);
           wheelEvent->mViewPortIsOverscrolled = true;
           break;
       }
       *aStatus = nsEventStatus_eConsumeNoDefault;
     }
@@ -5350,17 +5350,17 @@ EventStateManager::DeltaAccumulator::Ini
   if (IsInTransaction()) {
     // If wheel event type is changed, reset the values.
     if (mHandlingDeltaMode != aEvent->deltaMode ||
         mIsNoLineOrPageDeltaDevice != aEvent->mIsNoLineOrPageDelta) {
       Reset();
     } else {
       // If the delta direction is changed, we should reset only the
       // accumulated values.
-      if (mX && aEvent->deltaX && ((aEvent->deltaX > 0.0) != (mX > 0.0))) {
+      if (mX && aEvent->mDeltaX && ((aEvent->mDeltaX > 0.0) != (mX > 0.0))) {
         mX = mPendingScrollAmountX = 0.0;
       }
       if (mY && aEvent->deltaY && ((aEvent->deltaY > 0.0) != (mY > 0.0))) {
         mY = mPendingScrollAmountY = 0.0;
       }
     }
   }
 
@@ -5373,27 +5373,27 @@ EventStateManager::DeltaAccumulator::Ini
   if (!mIsNoLineOrPageDeltaDevice &&
       !EventStateManager::WheelPrefs::GetInstance()->
         NeedToComputeLineOrPageDelta(aEvent)) {
     // Set the delta values to mX and mY.  They would be used when above block
     // resets mX/mY/mPendingScrollAmountX/mPendingScrollAmountY if the direction
     // is changed.
     // NOTE: We shouldn't accumulate the delta values, it might could cause
     //       overflow even though it's not a realistic situation.
-    if (aEvent->deltaX) {
-      mX = aEvent->deltaX;
+    if (aEvent->mDeltaX) {
+      mX = aEvent->mDeltaX;
     }
     if (aEvent->deltaY) {
       mY = aEvent->deltaY;
     }
     mLastTime = TimeStamp::Now();
     return;
   }
 
-  mX += aEvent->deltaX;
+  mX += aEvent->mDeltaX;
   mY += aEvent->deltaY;
 
   if (mHandlingDeltaMode == nsIDOMWheelEvent::DOM_DELTA_PIXEL) {
     // Records pixel delta values and init lineOrPageDeltaX and
     // lineOrPageDeltaY for wheel events which are caused by pixel only
     // devices.  Ignore mouse wheel transaction for computing this.  The
     // lineOrPageDelta values will be used by dispatching legacy
     // eMouseScrollEventClass (DOMMouseScroll) but not be used for scrolling
@@ -5635,17 +5635,17 @@ EventStateManager::WheelPrefs::ApplyUser
 {
   if (aEvent->customizedByUserPrefs) {
     return;
   }
 
   Index index = GetIndexFor(aEvent);
   Init(index);
 
-  aEvent->deltaX *= mMultiplierX[index];
+  aEvent->mDeltaX *= 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
   // value, we should use lineOrPageDelta values which were set by widget.
   // Otherwise, we need to compute them from accumulated delta values.
   if (!NeedToComputeLineOrPageDelta(aEvent)) {
     aEvent->lineOrPageDeltaX *= static_cast<int32_t>(mMultiplierX[index]);
@@ -5683,18 +5683,18 @@ EventStateManager::WheelPrefs::CancelApp
 
 EventStateManager::WheelPrefs::Action
 EventStateManager::WheelPrefs::ComputeActionFor(WidgetWheelEvent* aEvent)
 {
   Index index = GetIndexFor(aEvent);
   Init(index);
 
   bool deltaXPreferred =
-    (Abs(aEvent->deltaX) > Abs(aEvent->deltaY) &&
-     Abs(aEvent->deltaX) > Abs(aEvent->deltaZ));
+    (Abs(aEvent->mDeltaX) > Abs(aEvent->deltaY) &&
+     Abs(aEvent->mDeltaX) > Abs(aEvent->deltaZ));
   Action* actions = deltaXPreferred ? mOverriddenActionsX : mActions;
   if (actions[index] == ACTION_NONE || actions[index] == ACTION_SCROLL) {
     return actions[index];
   }
 
   // Momentum events shouldn't run special actions.
   if (aEvent->isMomentum) {
     // Use the default action.  Note that user might kill the wheel scrolling.
--- a/dom/events/WheelEvent.cpp
+++ b/dom/events/WheelEvent.cpp
@@ -60,29 +60,29 @@ WheelEvent::InitWheelEvent(const nsAStri
                            double aDeltaZ,
                            uint32_t aDeltaMode)
 {
   MouseEvent::InitMouseEvent(aType, aCanBubble, aCancelable, aView, aDetail,
                              aScreenX, aScreenY, aClientX, aClientY, aButton,
                              aRelatedTarget, aModifiersList);
 
   WidgetWheelEvent* wheelEvent = mEvent->AsWheelEvent();
-  wheelEvent->deltaX = aDeltaX;
+  wheelEvent->mDeltaX = aDeltaX;
   wheelEvent->deltaY = aDeltaY;
   wheelEvent->deltaZ = aDeltaZ;
   wheelEvent->deltaMode = aDeltaMode;
 }
 
 double
 WheelEvent::DeltaX()
 {
   if (!mAppUnitsPerDevPixel) {
-    return mEvent->AsWheelEvent()->deltaX;
+    return mEvent->AsWheelEvent()->mDeltaX;
   }
-  return mEvent->AsWheelEvent()->deltaX *
+  return mEvent->AsWheelEvent()->mDeltaX *
     mAppUnitsPerDevPixel / nsPresContext::AppUnitsPerCSSPixel();
 }
 
 double
 WheelEvent::DeltaY()
 {
   if (!mAppUnitsPerDevPixel) {
     return mEvent->AsWheelEvent()->deltaY;
--- a/dom/events/WheelHandlingHelper.cpp
+++ b/dom/events/WheelHandlingHelper.cpp
@@ -25,17 +25,17 @@
 
 namespace mozilla {
 
 /******************************************************************/
 /* mozilla::DeltaValues                                           */
 /******************************************************************/
 
 DeltaValues::DeltaValues(WidgetWheelEvent* aEvent)
-  : deltaX(aEvent->deltaX)
+  : deltaX(aEvent->mDeltaX)
   , deltaY(aEvent->deltaY)
 {
 }
 
 /******************************************************************/
 /* mozilla::WheelHandlingUtils                                    */
 /******************************************************************/
 
@@ -124,17 +124,17 @@ WheelTransaction::UpdateTransaction(Widg
 {
   nsIFrame* scrollToFrame = GetTargetFrame();
   nsIScrollableFrame* scrollableFrame = scrollToFrame->GetScrollTargetFrame();
   if (scrollableFrame) {
     scrollToFrame = do_QueryFrame(scrollableFrame);
   }
 
   if (!WheelHandlingUtils::CanScrollOn(scrollToFrame,
-                                       aEvent->deltaX, aEvent->deltaY)) {
+                                       aEvent->mDeltaX, aEvent->deltaY)) {
     OnFailToScrollTarget();
     // We should not modify the transaction state when the view will not be
     // scrolled actually.
     return false;
   }
 
   SetTimeout();
 
@@ -404,17 +404,17 @@ WheelTransaction::GetAccelerationFactor(
 /* static */ DeltaValues
 WheelTransaction::OverrideSystemScrollSpeed(WidgetWheelEvent* aEvent)
 {
   MOZ_ASSERT(sTargetFrame, "We don't have mouse scrolling transaction");
   MOZ_ASSERT(aEvent->deltaMode == nsIDOMWheelEvent::DOM_DELTA_LINE);
 
   // If the event doesn't scroll to both X and Y, we don't need to do anything
   // here.
-  if (!aEvent->deltaX && !aEvent->deltaY) {
+  if (!aEvent->mDeltaX && !aEvent->deltaY) {
     return DeltaValues(aEvent);
   }
 
   // We shouldn't override the scrolling speed on non root scroll frame.
   if (sTargetFrame !=
         sTargetFrame->PresContext()->PresShell()->GetRootScrollFrame()) {
     return DeltaValues(aEvent);
   }
--- a/gfx/layers/apz/src/APZCTreeManager.cpp
+++ b/gfx/layers/apz/src/APZCTreeManager.cpp
@@ -1092,17 +1092,17 @@ APZCTreeManager::ProcessWheelEvent(Widge
     scrollMode = ScrollWheelInput::SCROLLMODE_SMOOTH;
   }
 
   ScreenPoint origin(aEvent.refPoint.x, aEvent.refPoint.y);
   ScrollWheelInput input(aEvent.mTime, aEvent.mTimeStamp, 0,
                          scrollMode,
                          ScrollWheelInput::DeltaTypeForDeltaMode(aEvent.deltaMode),
                          origin,
-                         aEvent.deltaX, aEvent.deltaY,
+                         aEvent.mDeltaX, aEvent.deltaY,
                          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
   // now, this seems easier.
--- a/widget/InputData.cpp
+++ b/widget/InputData.cpp
@@ -391,17 +391,17 @@ PanGestureInput::ToWidgetWheelEvent(nsIW
     RoundedToInt(ViewAs<LayoutDevicePixel>(mPanStartPoint,
       PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent));
   wheelEvent.buttons = 0;
   wheelEvent.deltaMode = nsIDOMWheelEvent::DOM_DELTA_PIXEL;
   wheelEvent.mayHaveMomentum = true; // pan inputs may have momentum
   wheelEvent.isMomentum = IsMomentum();
   wheelEvent.lineOrPageDeltaX = mLineOrPageDeltaX;
   wheelEvent.lineOrPageDeltaY = mLineOrPageDeltaY;
-  wheelEvent.deltaX = mPanDisplacement.x;
+  wheelEvent.mDeltaX = mPanDisplacement.x;
   wheelEvent.deltaY = mPanDisplacement.y;
   wheelEvent.mFlags.mHandledByAPZ = mHandledByAPZ;
   return wheelEvent;
 }
 
 bool
 PanGestureInput::TransformToLocal(const ScreenToParentLayerMatrix4x4& aTransform)
 { 
@@ -458,17 +458,17 @@ DeltaModeForDeltaType(ScrollWheelInput::
 ScrollWheelInput::ScrollWheelInput(const WidgetWheelEvent& aWheelEvent)
   : InputData(SCROLLWHEEL_INPUT,
               aWheelEvent.mTime,
               aWheelEvent.mTimeStamp,
               aWheelEvent.mModifiers)
   , mDeltaType(DeltaTypeForDeltaMode(aWheelEvent.deltaMode))
   , mScrollMode(SCROLLMODE_INSTANT)
   , mHandledByAPZ(aWheelEvent.mFlags.mHandledByAPZ)
-  , mDeltaX(aWheelEvent.deltaX)
+  , mDeltaX(aWheelEvent.mDeltaX)
   , mDeltaY(aWheelEvent.deltaY)
   , mLineOrPageDeltaX(aWheelEvent.lineOrPageDeltaX)
   , mLineOrPageDeltaY(aWheelEvent.lineOrPageDeltaY)
   , mScrollSeriesNumber(0)
   , mUserDeltaMultiplierX(1.0)
   , mUserDeltaMultiplierY(1.0)
   , mMayHaveMomentum(aWheelEvent.mayHaveMomentum)
   , mIsMomentum(aWheelEvent.isMomentum)
@@ -489,17 +489,17 @@ ScrollWheelInput::ToWidgetWheelEvent(nsI
   wheelEvent.mTimeStamp = mTimeStamp;
   wheelEvent.refPoint =
     RoundedToInt(ViewAs<LayoutDevicePixel>(mOrigin,
       PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent));
   wheelEvent.buttons = 0;
   wheelEvent.deltaMode = DeltaModeForDeltaType(mDeltaType);
   wheelEvent.mayHaveMomentum = mMayHaveMomentum;
   wheelEvent.isMomentum = mIsMomentum;
-  wheelEvent.deltaX = mDeltaX;
+  wheelEvent.mDeltaX = mDeltaX;
   wheelEvent.deltaY = mDeltaY;
   wheelEvent.lineOrPageDeltaX = mLineOrPageDeltaX;
   wheelEvent.lineOrPageDeltaY = mLineOrPageDeltaY;
   wheelEvent.mAllowToOverrideSystemScrollSpeed =
     mAllowToOverrideSystemScrollSpeed;
   wheelEvent.mFlags.mHandledByAPZ = mHandledByAPZ;
   return wheelEvent;
 }
--- a/widget/MouseEvents.h
+++ b/widget/MouseEvents.h
@@ -443,17 +443,17 @@ public:
 
 class WidgetWheelEvent : public WidgetMouseEventBase
 {
 private:
   friend class mozilla::dom::PBrowserParent;
   friend class mozilla::dom::PBrowserChild;
 
   WidgetWheelEvent()
-    : deltaX(0.0)
+    : mDeltaX(0.0)
     , deltaY(0.0)
     , deltaZ(0.0)
     , deltaMode(nsIDOMWheelEvent::DOM_DELTA_PIXEL)
     , customizedByUserPrefs(false)
     , isMomentum(false)
     , mIsNoLineOrPageDelta(false)
     , lineOrPageDeltaX(0)
     , lineOrPageDeltaY(0)
@@ -466,17 +466,17 @@ private:
   {
   }
 
 public:
   virtual WidgetWheelEvent* AsWheelEvent() override { return this; }
 
   WidgetWheelEvent(bool aIsTrusted, EventMessage aMessage, nsIWidget* aWidget)
     : WidgetMouseEventBase(aIsTrusted, aMessage, aWidget, eWheelEventClass)
-    , deltaX(0.0)
+    , mDeltaX(0.0)
     , deltaY(0.0)
     , deltaZ(0.0)
     , deltaMode(nsIDOMWheelEvent::DOM_DELTA_PIXEL)
     , customizedByUserPrefs(false)
     , mayHaveMomentum(false)
     , isMomentum(false)
     , mIsNoLineOrPageDelta(false)
     , lineOrPageDeltaX(0)
@@ -506,21 +506,21 @@ public:
   // gesture, call TriggersSwipe() after the event has been processed
   // in order to find out whether a swipe should be started.
   bool TriggersSwipe() const
   {
     return mCanTriggerSwipe && mViewPortIsOverscrolled &&
            this->overflowDeltaX != 0.0;
   }
 
-  // NOTE: deltaX, deltaY and deltaZ may be customized by
+  // NOTE: mDeltaX, deltaY and deltaZ may be customized by
   //       mousewheel.*.delta_multiplier_* prefs which are applied by
   //       EventStateManager.  So, after widget dispatches this event,
   //       these delta values may have different values than before.
-  double deltaX;
+  double mDeltaX;
   double deltaY;
   double deltaZ;
 
   // Should be one of nsIDOMWheelEvent::DOM_DELTA_*
   uint32_t deltaMode;
 
   // Following members are for internal use only, not for DOM event.
 
@@ -578,21 +578,21 @@ public:
     SCROLL_SMOOTHLY
   };
   ScrollType scrollType;
 
   // overflowed delta values for scroll, these values are set by
   // nsEventStateManger.  If the default action of the wheel event isn't scroll,
   // these values always zero.  Otherwise, remaning delta values which are
   // not used by scroll are set.
-  // NOTE: deltaX, deltaY and deltaZ may be modified by EventStateManager.
+  // NOTE: mDeltaX, deltaY and deltaZ may be modified by EventStateManager.
   //       However, overflowDeltaX and overflowDeltaY indicate unused original
   //       delta values which are not applied the delta_multiplier prefs.
   //       So, if widget wanted to know the actual direction to be scrolled,
-  //       it would need to check the deltaX and deltaY.
+  //       it would need to check the mDeltaX and deltaY.
   double overflowDeltaX;
   double overflowDeltaY;
 
   // Whether or not the parent of the currently overscrolled frame is the
   // ViewPort. This is false in situations when an element on the page is being
   // overscrolled (such as a text field), but true when the 'page' is being
   // overscrolled.
   bool mViewPortIsOverscrolled;
@@ -605,17 +605,17 @@ public:
   // overridden.  Otherwise, the scroll speed won't be overridden even if
   // it's enabled by the pref.
   bool mAllowToOverrideSystemScrollSpeed;
 
   void AssignWheelEventData(const WidgetWheelEvent& aEvent, bool aCopyTargets)
   {
     AssignMouseEventBaseData(aEvent, aCopyTargets);
 
-    deltaX = aEvent.deltaX;
+    mDeltaX = aEvent.mDeltaX;
     deltaY = aEvent.deltaY;
     deltaZ = aEvent.deltaZ;
     deltaMode = aEvent.deltaMode;
     customizedByUserPrefs = aEvent.customizedByUserPrefs;
     mayHaveMomentum = aEvent.mayHaveMomentum;
     isMomentum = aEvent.isMomentum;
     mIsNoLineOrPageDelta = aEvent.mIsNoLineOrPageDelta;
     lineOrPageDeltaX = aEvent.lineOrPageDeltaX;
--- a/widget/WidgetEventImpl.cpp
+++ b/widget/WidgetEventImpl.cpp
@@ -272,17 +272,17 @@ WidgetEvent::IsAllowedToDispatchDOMEvent
       // Synthesized button up events also do not cause DOM events because they
       // do not have a reliable refPoint.
       return AsMouseEvent()->reason == WidgetMouseEvent::eReal;
 
     case eWheelEventClass: {
       // wheel event whose all delta values are zero by user pref applied, it
       // shouldn't cause a DOM event.
       const WidgetWheelEvent* wheelEvent = AsWheelEvent();
-      return wheelEvent->deltaX != 0.0 || wheelEvent->deltaY != 0.0 ||
+      return wheelEvent->mDeltaX != 0.0 || wheelEvent->deltaY != 0.0 ||
              wheelEvent->deltaZ != 0.0;
     }
 
     // Following events are handled in EventStateManager, so, we don't need to
     // dispatch DOM event for them into the DOM tree.
     case eQueryContentEventClass:
     case eSelectionEventClass:
     case eContentCommandEventClass:
@@ -380,19 +380,19 @@ WidgetWheelEvent::ComputeOverriddenDelta
   double factor = static_cast<double>(intFactor) / 100;
   return aDelta * factor;
 }
 
 double
 WidgetWheelEvent::OverriddenDeltaX() const
 {
   if (!mAllowToOverrideSystemScrollSpeed) {
-    return deltaX;
+    return mDeltaX;
   }
-  return ComputeOverriddenDelta(deltaX, false);
+  return ComputeOverriddenDelta(mDeltaX, false);
 }
 
 double
 WidgetWheelEvent::OverriddenDeltaY() const
 {
   if (!mAllowToOverrideSystemScrollSpeed) {
     return deltaY;
   }
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -2785,17 +2785,18 @@ nsChildView::DispatchAPZWheelInputEvent(
       case SCROLLWHEEL_INPUT: {
         event = aEvent.AsScrollWheelInput().ToWidgetWheelEvent(this);
         break;
       };
       default:
         MOZ_CRASH("unsupported event type");
         return;
     }
-    if (event.mMessage == eWheel && (event.deltaX != 0 || event.deltaY != 0)) {
+    if (event.mMessage == eWheel &&
+        (event.mDeltaX != 0 || event.deltaY != 0)) {
       ProcessUntransformedAPZEvent(&event, guid, inputBlockId, result);
     }
     return;
   }
 
   nsEventStatus status;
   switch(aEvent.mInputType) {
     case PANGESTURE_INPUT: {
@@ -2845,17 +2846,18 @@ nsChildView::DispatchAPZWheelInputEvent(
     case SCROLLWHEEL_INPUT: {
       event = aEvent.AsScrollWheelInput().ToWidgetWheelEvent(this);
       break;
     }
     default:
       MOZ_CRASH("unexpected event type");
       return;
   }
-  if (event.mMessage == eWheel && (event.deltaX != 0 || event.deltaY != 0)) {
+  if (event.mMessage == eWheel &&
+      (event.mDeltaX != 0 || event.deltaY != 0)) {
     DispatchEvent(&event, status);
   }
 }
 
 #ifdef ACCESSIBILITY
 already_AddRefed<a11y::Accessible>
 nsChildView::GetDocumentAccessible()
 {
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -3184,17 +3184,17 @@ nsWindow::OnScrollEvent(GdkEventScroll *
 #if GTK_CHECK_VERSION(3,4,0)
     case GDK_SCROLL_SMOOTH:
     {
         // As of GTK 3.4, all directional scroll events are provided by
         // the GDK_SCROLL_SMOOTH direction on XInput2 devices.
         mLastScrollEventTime = aEvent->time;
         // TODO - use a more appropriate scrolling unit than lines.
         // Multiply event deltas by 3 to emulate legacy behaviour.
-        wheelEvent.deltaX = aEvent->delta_x * 3;
+        wheelEvent.mDeltaX = aEvent->delta_x * 3;
         wheelEvent.deltaY = aEvent->delta_y * 3;
         wheelEvent.mIsNoLineOrPageDelta = true;
         // This next step manually unsets smooth scrolling for touch devices 
         // that trigger GDK_SCROLL_SMOOTH. We use the slave device, which 
         // represents the actual input.
         GdkDevice *device = gdk_event_get_source_device((GdkEvent*)aEvent);
         GdkInputSource source = gdk_device_get_source(device);
         if (source == GDK_SOURCE_TOUCHSCREEN ||
@@ -3206,20 +3206,20 @@ nsWindow::OnScrollEvent(GdkEventScroll *
 #endif
     case GDK_SCROLL_UP:
         wheelEvent.deltaY = wheelEvent.lineOrPageDeltaY = -3;
         break;
     case GDK_SCROLL_DOWN:
         wheelEvent.deltaY = wheelEvent.lineOrPageDeltaY = 3;
         break;
     case GDK_SCROLL_LEFT:
-        wheelEvent.deltaX = wheelEvent.lineOrPageDeltaX = -1;
+        wheelEvent.mDeltaX = wheelEvent.lineOrPageDeltaX = -1;
         break;
     case GDK_SCROLL_RIGHT:
-        wheelEvent.deltaX = wheelEvent.lineOrPageDeltaX = 1;
+        wheelEvent.mDeltaX = wheelEvent.lineOrPageDeltaX = 1;
         break;
     }
 
     wheelEvent.refPoint = GetRefPoint(this, aEvent);
 
     KeymapWrapper::InitInputEvent(wheelEvent, aEvent->state);
 
     wheelEvent.AssignEventTime(GetWidgetEventTime(aEvent->time));
--- a/widget/nsGUIEventIPC.h
+++ b/widget/nsGUIEventIPC.h
@@ -155,17 +155,17 @@ struct ParamTraits<mozilla::WidgetMouseE
 template<>
 struct ParamTraits<mozilla::WidgetWheelEvent>
 {
   typedef mozilla::WidgetWheelEvent paramType;
 
   static void Write(Message* aMsg, const paramType& aParam)
   {
     WriteParam(aMsg, static_cast<mozilla::WidgetMouseEventBase>(aParam));
-    WriteParam(aMsg, aParam.deltaX);
+    WriteParam(aMsg, aParam.mDeltaX);
     WriteParam(aMsg, aParam.deltaY);
     WriteParam(aMsg, aParam.deltaZ);
     WriteParam(aMsg, aParam.deltaMode);
     WriteParam(aMsg, aParam.customizedByUserPrefs);
     WriteParam(aMsg, aParam.mayHaveMomentum);
     WriteParam(aMsg, aParam.isMomentum);
     WriteParam(aMsg, aParam.mIsNoLineOrPageDelta);
     WriteParam(aMsg, aParam.lineOrPageDeltaX);
@@ -179,17 +179,17 @@ struct ParamTraits<mozilla::WidgetWheelE
   }
 
   static bool Read(const Message* aMsg, void** aIter, paramType* aResult)
   {
     int32_t scrollType = 0;
     bool rv =
       ReadParam(aMsg, aIter,
                 static_cast<mozilla::WidgetMouseEventBase*>(aResult)) &&
-      ReadParam(aMsg, aIter, &aResult->deltaX) &&
+      ReadParam(aMsg, aIter, &aResult->mDeltaX) &&
       ReadParam(aMsg, aIter, &aResult->deltaY) &&
       ReadParam(aMsg, aIter, &aResult->deltaZ) &&
       ReadParam(aMsg, aIter, &aResult->deltaMode) &&
       ReadParam(aMsg, aIter, &aResult->customizedByUserPrefs) &&
       ReadParam(aMsg, aIter, &aResult->mayHaveMomentum) &&
       ReadParam(aMsg, aIter, &aResult->isMomentum) &&
       ReadParam(aMsg, aIter, &aResult->mIsNoLineOrPageDelta) &&
       ReadParam(aMsg, aIter, &aResult->lineOrPageDeltaX) &&
--- a/widget/qt/nsWindow.cpp
+++ b/widget/qt/nsWindow.cpp
@@ -1275,17 +1275,17 @@ nsWindow::wheelEvent(QWheelEvent* aEvent
     //       direction scroll event.
     int32_t delta = (int)(aEvent->delta() / WHEEL_DELTA) * -3;
 
     switch (aEvent->orientation()) {
     case Qt::Vertical:
         wheelEvent.deltaY = wheelEvent.lineOrPageDeltaY = delta;
         break;
     case Qt::Horizontal:
-        wheelEvent.deltaX = wheelEvent.lineOrPageDeltaX = delta;
+        wheelEvent.mDeltaX = wheelEvent.lineOrPageDeltaX = delta;
         break;
     default:
         Q_ASSERT(0);
         break;
     }
 
     wheelEvent.refPoint.x = nscoord(aEvent->pos().x());
     wheelEvent.refPoint.y = nscoord(aEvent->pos().y());
--- a/widget/windows/WinMouseScrollHandler.cpp
+++ b/widget/windows/WinMouseScrollHandler.cpp
@@ -671,17 +671,17 @@ MouseScrollHandler::HandleScrollMessageA
     "MOZ_WM_VSCROLL or MOZ_WM_HSCROLL");
 
   mIsWaitingInternalMessage = false;
 
   ModifierKeyState modKeyState = GetModifierKeyState(aMessage);
 
   WidgetWheelEvent wheelEvent(true, eWheel, aWidget);
   double& delta =
-   (aMessage == MOZ_WM_VSCROLL) ? wheelEvent.deltaY : wheelEvent.deltaX;
+   (aMessage == MOZ_WM_VSCROLL) ? wheelEvent.deltaY : wheelEvent.mDeltaX;
   int32_t& lineOrPageDelta =
    (aMessage == MOZ_WM_VSCROLL) ? wheelEvent.lineOrPageDeltaY :
                                   wheelEvent.lineOrPageDeltaX;
 
   delta = 1.0;
   lineOrPageDelta = 1;
 
   switch (LOWORD(aWParam)) {
@@ -706,22 +706,22 @@ MouseScrollHandler::HandleScrollMessageA
   // XXX Current mouse position may not be same as when the original message
   //     is received.  We need to know the actual mouse cursor position when
   //     the original message was received.
   InitEvent(aWidget, wheelEvent);
 
   MOZ_LOG(gMouseScrollLog, LogLevel::Info,
     ("MouseScroll::HandleScrollMessageAsMouseWheelMessage: aWidget=%p, "
      "aMessage=MOZ_WM_%sSCROLL, aWParam=0x%08X, aLParam=0x%08X, "
-     "wheelEvent { refPoint: { x: %d, y: %d }, deltaX: %f, deltaY: %f, "
+     "wheelEvent { refPoint: { x: %d, y: %d }, mDeltaX: %f, deltaY: %f, "
      "lineOrPageDeltaX: %d, lineOrPageDeltaY: %d, "
      "isShift: %s, isControl: %s, isAlt: %s, isMeta: %s }",
      aWidget, (aMessage == MOZ_WM_VSCROLL) ? "V" : "H", aWParam, aLParam,
      wheelEvent.refPoint.x, wheelEvent.refPoint.y,
-     wheelEvent.deltaX, wheelEvent.deltaY,
+     wheelEvent.mDeltaX, wheelEvent.deltaY,
      wheelEvent.lineOrPageDeltaX, wheelEvent.lineOrPageDeltaY,
      GetBoolName(wheelEvent.IsShift()),
      GetBoolName(wheelEvent.IsControl()),
      GetBoolName(wheelEvent.IsAlt()),
      GetBoolName(wheelEvent.IsMeta())));
 
   aWidget->DispatchWheelEvent(&wheelEvent);
 }
@@ -843,17 +843,17 @@ MouseScrollHandler::LastEventInfo::InitW
   // Our positive delta value means to bottom or right.
   // But positive native delta value means to top or right.
   // Use orienter for computing our delta value with native delta value.
   int32_t orienter = mIsVertical ? -1 : 1;
 
   aWheelEvent.deltaMode = mIsPage ? nsIDOMWheelEvent::DOM_DELTA_PAGE :
                                     nsIDOMWheelEvent::DOM_DELTA_LINE;
 
-  double& delta = mIsVertical ? aWheelEvent.deltaY : aWheelEvent.deltaX;
+  double& delta = mIsVertical ? aWheelEvent.deltaY : aWheelEvent.mDeltaX;
   int32_t& lineOrPageDelta = mIsVertical ? aWheelEvent.lineOrPageDeltaY :
                                            aWheelEvent.lineOrPageDeltaX;
 
   double nativeDeltaPerUnit =
     mIsPage ? static_cast<double>(WHEEL_DELTA) :
               static_cast<double>(WHEEL_DELTA) / GetScrollAmount();
 
   delta = static_cast<double>(mDelta) * orienter / nativeDeltaPerUnit;
@@ -891,23 +891,23 @@ MouseScrollHandler::LastEventInfo::InitW
         // current delta value causes too big delta value.
         aWheelEvent.mAllowToOverrideSystemScrollSpeed = false;
       }
     }
   }
 
   MOZ_LOG(gMouseScrollLog, LogLevel::Info,
     ("MouseScroll::LastEventInfo::InitWheelEvent: aWidget=%p, "
-     "aWheelEvent { refPoint: { x: %d, y: %d }, deltaX: %f, deltaY: %f, "
+     "aWheelEvent { refPoint: { x: %d, y: %d }, mDeltaX: %f, deltaY: %f, "
      "lineOrPageDeltaX: %d, lineOrPageDeltaY: %d, "
      "isShift: %s, isControl: %s, isAlt: %s, isMeta: %s, "
      "mAllowToOverrideSystemScrollSpeed: %s }, "
      "mAccumulatedDelta: %d",
      aWidget, aWheelEvent.refPoint.x, aWheelEvent.refPoint.y,
-     aWheelEvent.deltaX, aWheelEvent.deltaY,
+     aWheelEvent.mDeltaX, aWheelEvent.deltaY,
      aWheelEvent.lineOrPageDeltaX, aWheelEvent.lineOrPageDeltaY,
      GetBoolName(aWheelEvent.IsShift()),
      GetBoolName(aWheelEvent.IsControl()),
      GetBoolName(aWheelEvent.IsAlt()),
      GetBoolName(aWheelEvent.IsMeta()),
      GetBoolName(aWheelEvent.mAllowToOverrideSystemScrollSpeed),
      mAccumulatedDelta));
 
--- a/widget/windows/nsWinGesture.cpp
+++ b/widget/windows/nsWinGesture.cpp
@@ -560,32 +560,32 @@ nsWinGesture::PanFeedbackFinalize(HWND h
   }
 
   UpdatePanningFeedback(hWnd, mPixelScrollOverflow.x, mPixelScrollOverflow.y, mPanInertiaActive);
 }
 
 bool
 nsWinGesture::PanDeltaToPixelScroll(WidgetWheelEvent& aWheelEvent)
 {
-  aWheelEvent.deltaX = aWheelEvent.deltaY = aWheelEvent.deltaZ = 0.0;
+  aWheelEvent.mDeltaX = aWheelEvent.deltaY = aWheelEvent.deltaZ = 0.0;
   aWheelEvent.lineOrPageDeltaX = aWheelEvent.lineOrPageDeltaY = 0;
 
   aWheelEvent.refPoint.x = mPanRefPoint.x;
   aWheelEvent.refPoint.y = mPanRefPoint.y;
   aWheelEvent.deltaMode = nsIDOMWheelEvent::DOM_DELTA_PIXEL;
   aWheelEvent.scrollType = WidgetWheelEvent::SCROLL_SYNCHRONOUSLY;
   aWheelEvent.mIsNoLineOrPageDelta = true;
 
   aWheelEvent.overflowDeltaX = 0.0;
   aWheelEvent.overflowDeltaY = 0.0;
 
   // Don't scroll the view if we are currently at a bounds, or, if we are
   // panning back from a max feedback position. This keeps the original drag point
   // constant.
   if (!mXAxisFeedback) {
-    aWheelEvent.deltaX = mPixelScrollDelta.x;
+    aWheelEvent.mDeltaX = mPixelScrollDelta.x;
   }
   if (!mYAxisFeedback) {
     aWheelEvent.deltaY = mPixelScrollDelta.y;
   }
 
-  return (aWheelEvent.deltaX != 0 || aWheelEvent.deltaY != 0);
+  return (aWheelEvent.mDeltaX != 0 || aWheelEvent.deltaY != 0);
 }