Bug 1259664 part.2 Rename WidgetWheelEvent::deltaY to WidgetWheelEvent::mDeltaY r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Thu, 31 Mar 2016 18:09:47 +0900
changeset 291198 b0338e680f6ce4d53d4f78fa78109ae0212a900c
parent 291197 7a58737fdf650018b9ee5df3184fe822d3391f3f
child 291199 f5574720a35c958e9ebc4c1ee61ad25ba8cff060
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.2 Rename WidgetWheelEvent::deltaY to WidgetWheelEvent::mDeltaY r=smaug MozReview-Commit-ID: 3xscKDblY4V
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
@@ -789,17 +789,17 @@ nsDOMWindowUtils::SendWheelEvent(float a
   nsCOMPtr<nsIWidget> widget = GetWidget(&offset);
   if (!widget) {
     return NS_ERROR_NULL_POINTER;
   }
 
   WidgetWheelEvent wheelEvent(true, eWheel, widget);
   wheelEvent.mModifiers = nsContentUtils::GetWidgetModifiers(aModifiers);
   wheelEvent.mDeltaX = aDeltaX;
-  wheelEvent.deltaY = aDeltaY;
+  wheelEvent.mDeltaY = 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 =
     (aOptions & WHEEL_EVENT_CUSTOMIZED_BY_USER_PREFS) != 0;
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -2190,31 +2190,31 @@ EventStateManager::DispatchLegacyMouseSc
         !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->mDeltaX * scrollAmountInCSSPixels.width);
-      pixelDeltaY = RoundDown(aEvent->deltaY * scrollAmountInCSSPixels.height);
+      pixelDeltaY = RoundDown(aEvent->mDeltaY * scrollAmountInCSSPixels.height);
       break;
 
     case nsIDOMWheelEvent::DOM_DELTA_LINE:
       scrollDeltaX = aEvent->lineOrPageDeltaX;
       scrollDeltaY = aEvent->lineOrPageDeltaY;
       pixelDeltaX = RoundDown(aEvent->mDeltaX * scrollAmountInCSSPixels.width);
-      pixelDeltaY = RoundDown(aEvent->deltaY * scrollAmountInCSSPixels.height);
+      pixelDeltaY = RoundDown(aEvent->mDeltaY * scrollAmountInCSSPixels.height);
       break;
 
     case nsIDOMWheelEvent::DOM_DELTA_PIXEL:
       scrollDeltaX = aEvent->lineOrPageDeltaX;
       scrollDeltaY = aEvent->lineOrPageDeltaY;
       pixelDeltaX = RoundDown(aEvent->mDeltaX);
-      pixelDeltaY = RoundDown(aEvent->deltaY);
+      pixelDeltaY = RoundDown(aEvent->mDeltaY);
       break;
 
     default:
       MOZ_CRASH("Invalid deltaMode value comes");
   }
 
   // Send the legacy events in following order:
   // 1. Vertical scroll
@@ -2355,17 +2355,17 @@ EventStateManager::SendPixelScrollEvent(
   aState.mDefaultPreventedByContent = event.DefaultPreventedByContent();
 }
 
 nsIFrame*
 EventStateManager::ComputeScrollTarget(nsIFrame* aTargetFrame,
                                        WidgetWheelEvent* aEvent,
                                        ComputeScrollTargetOptions aOptions)
 {
-  return ComputeScrollTarget(aTargetFrame, aEvent->mDeltaX, aEvent->deltaY,
+  return ComputeScrollTarget(aTargetFrame, aEvent->mDeltaX, aEvent->mDeltaY,
                              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,
@@ -2657,29 +2657,29 @@ EventStateManager::DoScrollText(nsIScrol
   // values should stay zero.
   if (scrollFrameWeak.IsAlive()) {
     if (aEvent->mDeltaX &&
         overflowStyle.mHorizontal == NS_STYLE_OVERFLOW_HIDDEN &&
         !ComputeScrollTarget(scrollFrame, aEvent,
                              COMPUTE_SCROLLABLE_ANCESTOR_ALONG_X_AXIS)) {
       aEvent->overflowDeltaX = aEvent->mDeltaX;
     }
-    if (aEvent->deltaY &&
+    if (aEvent->mDeltaY &&
         overflowStyle.mVertical == NS_STYLE_OVERFLOW_HIDDEN &&
         !ComputeScrollTarget(scrollFrame, aEvent,
                              COMPUTE_SCROLLABLE_ANCESTOR_ALONG_Y_AXIS)) {
-      aEvent->overflowDeltaY = aEvent->deltaY;
+      aEvent->overflowDeltaY = aEvent->mDeltaY;
     }
   }
 
   NS_ASSERTION(aEvent->overflowDeltaX == 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),
+    (aEvent->overflowDeltaY > 0) == (aEvent->mDeltaY > 0),
     "The sign of overflowDeltaY is different from the scroll direction");
 
   WheelPrefs::GetInstance()->CancelApplyingUserPrefsFromOverflowDelta(aEvent);
 }
 
 void
 EventStateManager::DecideGestureEvent(WidgetGestureNotifyEvent* aEvent,
                                       nsIFrame* targetFrame)
@@ -3197,34 +3197,34 @@ 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->mDeltaX && !wheelEvent->deltaY)) {
+              (!wheelEvent->mDeltaX && !wheelEvent->mDeltaY)) {
             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->mDeltaX;
-          wheelEvent->overflowDeltaY = wheelEvent->deltaY;
+          wheelEvent->overflowDeltaY = wheelEvent->mDeltaY;
           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->mDeltaX && !wheelEvent->deltaY)) {
+              (!wheelEvent->mDeltaX && !wheelEvent->mDeltaY)) {
             break;
           }
 
           MOZ_ASSERT(static_cast<void*>(frameToScroll) ==
                        static_cast<void*>(pluginFrame));
           if (!WheelTransaction::WillHandleDefaultAction(wheelEvent,
                                                          frameToScroll)) {
             break;
@@ -3285,17 +3285,17 @@ EventStateManager::PostHandleEvent(nsPre
             // delta values must be overflown delta values.
             allDeltaOverflown = true;
           }
 
           if (!allDeltaOverflown) {
             break;
           }
           wheelEvent->overflowDeltaX = wheelEvent->mDeltaX;
-          wheelEvent->overflowDeltaY = wheelEvent->deltaY;
+          wheelEvent->overflowDeltaY = wheelEvent->mDeltaY;
           WheelPrefs::GetInstance()->
             CancelApplyingUserPrefsFromOverflowDelta(wheelEvent);
           wheelEvent->mViewPortIsOverscrolled = true;
           break;
       }
       *aStatus = nsEventStatus_eConsumeNoDefault;
     }
     break;
@@ -5353,17 +5353,17 @@ EventStateManager::DeltaAccumulator::Ini
         mIsNoLineOrPageDeltaDevice != aEvent->mIsNoLineOrPageDelta) {
       Reset();
     } else {
       // If the delta direction is changed, we should reset only the
       // accumulated values.
       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))) {
+      if (mY && aEvent->mDeltaY && ((aEvent->mDeltaY > 0.0) != (mY > 0.0))) {
         mY = mPendingScrollAmountY = 0.0;
       }
     }
   }
 
   mHandlingDeltaMode = aEvent->deltaMode;
   mIsNoLineOrPageDeltaDevice = aEvent->mIsNoLineOrPageDelta;
 
@@ -5376,25 +5376,25 @@ EventStateManager::DeltaAccumulator::Ini
     // 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->mDeltaX) {
       mX = aEvent->mDeltaX;
     }
-    if (aEvent->deltaY) {
-      mY = aEvent->deltaY;
+    if (aEvent->mDeltaY) {
+      mY = aEvent->mDeltaY;
     }
     mLastTime = TimeStamp::Now();
     return;
   }
 
   mX += aEvent->mDeltaX;
-  mY += aEvent->deltaY;
+  mY += aEvent->mDeltaY;
 
   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
     // of default action.  The transaction should be used only for the default
@@ -5636,17 +5636,17 @@ EventStateManager::WheelPrefs::ApplyUser
   if (aEvent->customizedByUserPrefs) {
     return;
   }
 
   Index index = GetIndexFor(aEvent);
   Init(index);
 
   aEvent->mDeltaX *= mMultiplierX[index];
-  aEvent->deltaY *= mMultiplierY[index];
+  aEvent->mDeltaY *= 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]);
     aEvent->lineOrPageDeltaY *= static_cast<int32_t>(mMultiplierY[index]);
@@ -5683,17 +5683,17 @@ EventStateManager::WheelPrefs::CancelApp
 
 EventStateManager::WheelPrefs::Action
 EventStateManager::WheelPrefs::ComputeActionFor(WidgetWheelEvent* aEvent)
 {
   Index index = GetIndexFor(aEvent);
   Init(index);
 
   bool deltaXPreferred =
-    (Abs(aEvent->mDeltaX) > Abs(aEvent->deltaY) &&
+    (Abs(aEvent->mDeltaX) > Abs(aEvent->mDeltaY) &&
      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) {
--- a/dom/events/WheelEvent.cpp
+++ b/dom/events/WheelEvent.cpp
@@ -61,17 +61,17 @@ WheelEvent::InitWheelEvent(const nsAStri
                            uint32_t aDeltaMode)
 {
   MouseEvent::InitMouseEvent(aType, aCanBubble, aCancelable, aView, aDetail,
                              aScreenX, aScreenY, aClientX, aClientY, aButton,
                              aRelatedTarget, aModifiersList);
 
   WidgetWheelEvent* wheelEvent = mEvent->AsWheelEvent();
   wheelEvent->mDeltaX = aDeltaX;
-  wheelEvent->deltaY = aDeltaY;
+  wheelEvent->mDeltaY = aDeltaY;
   wheelEvent->deltaZ = aDeltaZ;
   wheelEvent->deltaMode = aDeltaMode;
 }
 
 double
 WheelEvent::DeltaX()
 {
   if (!mAppUnitsPerDevPixel) {
@@ -80,19 +80,19 @@ WheelEvent::DeltaX()
   return mEvent->AsWheelEvent()->mDeltaX *
     mAppUnitsPerDevPixel / nsPresContext::AppUnitsPerCSSPixel();
 }
 
 double
 WheelEvent::DeltaY()
 {
   if (!mAppUnitsPerDevPixel) {
-    return mEvent->AsWheelEvent()->deltaY;
+    return mEvent->AsWheelEvent()->mDeltaY;
   }
-  return mEvent->AsWheelEvent()->deltaY *
+  return mEvent->AsWheelEvent()->mDeltaY *
     mAppUnitsPerDevPixel / nsPresContext::AppUnitsPerCSSPixel();
 }
 
 double
 WheelEvent::DeltaZ()
 {
   if (!mAppUnitsPerDevPixel) {
     return mEvent->AsWheelEvent()->deltaZ;
--- a/dom/events/WheelHandlingHelper.cpp
+++ b/dom/events/WheelHandlingHelper.cpp
@@ -26,17 +26,17 @@
 namespace mozilla {
 
 /******************************************************************/
 /* mozilla::DeltaValues                                           */
 /******************************************************************/
 
 DeltaValues::DeltaValues(WidgetWheelEvent* aEvent)
   : deltaX(aEvent->mDeltaX)
-  , deltaY(aEvent->deltaY)
+  , deltaY(aEvent->mDeltaY)
 {
 }
 
 /******************************************************************/
 /* mozilla::WheelHandlingUtils                                    */
 /******************************************************************/
 
 /* static */ bool
@@ -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->mDeltaX, aEvent->deltaY)) {
+                                       aEvent->mDeltaX, aEvent->mDeltaY)) {
     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->mDeltaX && !aEvent->deltaY) {
+  if (!aEvent->mDeltaX && !aEvent->mDeltaY) {
     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.mDeltaX, aEvent.deltaY,
+                         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
   // now, this seems easier.
--- a/widget/InputData.cpp
+++ b/widget/InputData.cpp
@@ -392,17 +392,17 @@ PanGestureInput::ToWidgetWheelEvent(nsIW
       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.mDeltaX = mPanDisplacement.x;
-  wheelEvent.deltaY = mPanDisplacement.y;
+  wheelEvent.mDeltaY = mPanDisplacement.y;
   wheelEvent.mFlags.mHandledByAPZ = mHandledByAPZ;
   return wheelEvent;
 }
 
 bool
 PanGestureInput::TransformToLocal(const ScreenToParentLayerMatrix4x4& aTransform)
 { 
   Maybe<ParentLayerPoint> panStartPoint = UntransformBy(aTransform, mPanStartPoint);
@@ -459,17 +459,17 @@ ScrollWheelInput::ScrollWheelInput(const
   : InputData(SCROLLWHEEL_INPUT,
               aWheelEvent.mTime,
               aWheelEvent.mTimeStamp,
               aWheelEvent.mModifiers)
   , mDeltaType(DeltaTypeForDeltaMode(aWheelEvent.deltaMode))
   , mScrollMode(SCROLLMODE_INSTANT)
   , mHandledByAPZ(aWheelEvent.mFlags.mHandledByAPZ)
   , mDeltaX(aWheelEvent.mDeltaX)
-  , mDeltaY(aWheelEvent.deltaY)
+  , mDeltaY(aWheelEvent.mDeltaY)
   , mLineOrPageDeltaX(aWheelEvent.lineOrPageDeltaX)
   , mLineOrPageDeltaY(aWheelEvent.lineOrPageDeltaY)
   , mScrollSeriesNumber(0)
   , mUserDeltaMultiplierX(1.0)
   , mUserDeltaMultiplierY(1.0)
   , mMayHaveMomentum(aWheelEvent.mayHaveMomentum)
   , mIsMomentum(aWheelEvent.isMomentum)
   , mAllowToOverrideSystemScrollSpeed(
@@ -490,17 +490,17 @@ ScrollWheelInput::ToWidgetWheelEvent(nsI
   wheelEvent.refPoint =
     RoundedToInt(ViewAs<LayoutDevicePixel>(mOrigin,
       PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent));
   wheelEvent.buttons = 0;
   wheelEvent.deltaMode = DeltaModeForDeltaType(mDeltaType);
   wheelEvent.mayHaveMomentum = mMayHaveMomentum;
   wheelEvent.isMomentum = mIsMomentum;
   wheelEvent.mDeltaX = mDeltaX;
-  wheelEvent.deltaY = mDeltaY;
+  wheelEvent.mDeltaY = mDeltaY;
   wheelEvent.lineOrPageDeltaX = mLineOrPageDeltaX;
   wheelEvent.lineOrPageDeltaY = mLineOrPageDeltaY;
   wheelEvent.mAllowToOverrideSystemScrollSpeed =
     mAllowToOverrideSystemScrollSpeed;
   wheelEvent.mFlags.mHandledByAPZ = mHandledByAPZ;
   return wheelEvent;
 }
 
--- a/widget/MouseEvents.h
+++ b/widget/MouseEvents.h
@@ -444,17 +444,17 @@ public:
 class WidgetWheelEvent : public WidgetMouseEventBase
 {
 private:
   friend class mozilla::dom::PBrowserParent;
   friend class mozilla::dom::PBrowserChild;
 
   WidgetWheelEvent()
     : mDeltaX(0.0)
-    , deltaY(0.0)
+    , mDeltaY(0.0)
     , deltaZ(0.0)
     , deltaMode(nsIDOMWheelEvent::DOM_DELTA_PIXEL)
     , customizedByUserPrefs(false)
     , isMomentum(false)
     , mIsNoLineOrPageDelta(false)
     , lineOrPageDeltaX(0)
     , lineOrPageDeltaY(0)
     , scrollType(SCROLL_DEFAULT)
@@ -467,17 +467,17 @@ private:
   }
 
 public:
   virtual WidgetWheelEvent* AsWheelEvent() override { return this; }
 
   WidgetWheelEvent(bool aIsTrusted, EventMessage aMessage, nsIWidget* aWidget)
     : WidgetMouseEventBase(aIsTrusted, aMessage, aWidget, eWheelEventClass)
     , mDeltaX(0.0)
-    , deltaY(0.0)
+    , mDeltaY(0.0)
     , deltaZ(0.0)
     , deltaMode(nsIDOMWheelEvent::DOM_DELTA_PIXEL)
     , customizedByUserPrefs(false)
     , mayHaveMomentum(false)
     , isMomentum(false)
     , mIsNoLineOrPageDelta(false)
     , lineOrPageDeltaX(0)
     , lineOrPageDeltaY(0)
@@ -506,22 +506,22 @@ 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: mDeltaX, deltaY and deltaZ may be customized by
+  // NOTE: mDeltaX, mDeltaY 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 mDeltaX;
-  double deltaY;
+  double mDeltaY;
   double deltaZ;
 
   // Should be one of nsIDOMWheelEvent::DOM_DELTA_*
   uint32_t deltaMode;
 
   // Following members are for internal use only, not for DOM event.
 
   // If the delta values are computed from prefs, this value is true.
@@ -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: mDeltaX, deltaY and deltaZ may be modified by EventStateManager.
+  // NOTE: mDeltaX, mDeltaY 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 mDeltaX and deltaY.
+  //       it would need to check the mDeltaX and mDeltaY.
   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;
@@ -606,17 +606,17 @@ public:
   // it's enabled by the pref.
   bool mAllowToOverrideSystemScrollSpeed;
 
   void AssignWheelEventData(const WidgetWheelEvent& aEvent, bool aCopyTargets)
   {
     AssignMouseEventBaseData(aEvent, aCopyTargets);
 
     mDeltaX = aEvent.mDeltaX;
-    deltaY = aEvent.deltaY;
+    mDeltaY = aEvent.mDeltaY;
     deltaZ = aEvent.deltaZ;
     deltaMode = aEvent.deltaMode;
     customizedByUserPrefs = aEvent.customizedByUserPrefs;
     mayHaveMomentum = aEvent.mayHaveMomentum;
     isMomentum = aEvent.isMomentum;
     mIsNoLineOrPageDelta = aEvent.mIsNoLineOrPageDelta;
     lineOrPageDeltaX = aEvent.lineOrPageDeltaX;
     lineOrPageDeltaY = aEvent.lineOrPageDeltaY;
--- 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->mDeltaX != 0.0 || wheelEvent->deltaY != 0.0 ||
+      return wheelEvent->mDeltaX != 0.0 || wheelEvent->mDeltaY != 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:
@@ -389,19 +389,19 @@ WidgetWheelEvent::OverriddenDeltaX() con
   }
   return ComputeOverriddenDelta(mDeltaX, false);
 }
 
 double
 WidgetWheelEvent::OverriddenDeltaY() const
 {
   if (!mAllowToOverrideSystemScrollSpeed) {
-    return deltaY;
+    return mDeltaY;
   }
-  return ComputeOverriddenDelta(deltaY, true);
+  return ComputeOverriddenDelta(mDeltaY, true);
 }
 
 /******************************************************************************
  * mozilla::WidgetKeyboardEvent (TextEvents.h)
  ******************************************************************************/
 
 #define NS_DEFINE_KEYNAME(aCPPName, aDOMKeyName) MOZ_UTF16(aDOMKeyName),
 const char16_t* const WidgetKeyboardEvent::kKeyNames[] = {
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -2786,17 +2786,17 @@ nsChildView::DispatchAPZWheelInputEvent(
         event = aEvent.AsScrollWheelInput().ToWidgetWheelEvent(this);
         break;
       };
       default:
         MOZ_CRASH("unsupported event type");
         return;
     }
     if (event.mMessage == eWheel &&
-        (event.mDeltaX != 0 || event.deltaY != 0)) {
+        (event.mDeltaX != 0 || event.mDeltaY != 0)) {
       ProcessUntransformedAPZEvent(&event, guid, inputBlockId, result);
     }
     return;
   }
 
   nsEventStatus status;
   switch(aEvent.mInputType) {
     case PANGESTURE_INPUT: {
@@ -2847,17 +2847,17 @@ nsChildView::DispatchAPZWheelInputEvent(
       event = aEvent.AsScrollWheelInput().ToWidgetWheelEvent(this);
       break;
     }
     default:
       MOZ_CRASH("unexpected event type");
       return;
   }
   if (event.mMessage == eWheel &&
-      (event.mDeltaX != 0 || event.deltaY != 0)) {
+      (event.mDeltaX != 0 || event.mDeltaY != 0)) {
     DispatchEvent(&event, status);
   }
 }
 
 #ifdef ACCESSIBILITY
 already_AddRefed<a11y::Accessible>
 nsChildView::GetDocumentAccessible()
 {
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -3185,35 +3185,35 @@ nsWindow::OnScrollEvent(GdkEventScroll *
     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.mDeltaX = aEvent->delta_x * 3;
-        wheelEvent.deltaY = aEvent->delta_y * 3;
+        wheelEvent.mDeltaY = 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 ||
             source == GDK_SOURCE_TOUCHPAD) {
             wheelEvent.scrollType = WidgetWheelEvent::SCROLL_ASYNCHRONOUSELY;
         }
         break;
     }
 #endif
     case GDK_SCROLL_UP:
-        wheelEvent.deltaY = wheelEvent.lineOrPageDeltaY = -3;
+        wheelEvent.mDeltaY = wheelEvent.lineOrPageDeltaY = -3;
         break;
     case GDK_SCROLL_DOWN:
-        wheelEvent.deltaY = wheelEvent.lineOrPageDeltaY = 3;
+        wheelEvent.mDeltaY = wheelEvent.lineOrPageDeltaY = 3;
         break;
     case GDK_SCROLL_LEFT:
         wheelEvent.mDeltaX = wheelEvent.lineOrPageDeltaX = -1;
         break;
     case GDK_SCROLL_RIGHT:
         wheelEvent.mDeltaX = wheelEvent.lineOrPageDeltaX = 1;
         break;
     }
--- a/widget/nsGUIEventIPC.h
+++ b/widget/nsGUIEventIPC.h
@@ -156,17 +156,17 @@ 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.mDeltaX);
-    WriteParam(aMsg, aParam.deltaY);
+    WriteParam(aMsg, aParam.mDeltaY);
     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);
     WriteParam(aMsg, aParam.lineOrPageDeltaY);
@@ -180,17 +180,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->mDeltaX) &&
-      ReadParam(aMsg, aIter, &aResult->deltaY) &&
+      ReadParam(aMsg, aIter, &aResult->mDeltaY) &&
       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) &&
       ReadParam(aMsg, aIter, &aResult->lineOrPageDeltaY) &&
--- a/widget/qt/nsWindow.cpp
+++ b/widget/qt/nsWindow.cpp
@@ -1272,17 +1272,17 @@ nsWindow::wheelEvent(QWheelEvent* aEvent
     // this is opposite Gecko usage.
     // TODO: Store the unused delta values due to fraction round and add it
     //       to next event.  The stored values should be reset by other
     //       direction scroll event.
     int32_t delta = (int)(aEvent->delta() / WHEEL_DELTA) * -3;
 
     switch (aEvent->orientation()) {
     case Qt::Vertical:
-        wheelEvent.deltaY = wheelEvent.lineOrPageDeltaY = delta;
+        wheelEvent.mDeltaY = wheelEvent.lineOrPageDeltaY = delta;
         break;
     case Qt::Horizontal:
         wheelEvent.mDeltaX = wheelEvent.lineOrPageDeltaX = delta;
         break;
     default:
         Q_ASSERT(0);
         break;
     }
--- 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.mDeltaX;
+   (aMessage == MOZ_WM_VSCROLL) ? wheelEvent.mDeltaY : 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 }, mDeltaX: %f, deltaY: %f, "
+     "wheelEvent { refPoint: { x: %d, y: %d }, mDeltaX: %f, mDeltaY: %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.mDeltaX, wheelEvent.deltaY,
+     wheelEvent.mDeltaX, wheelEvent.mDeltaY,
      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.mDeltaX;
+  double& delta = mIsVertical ? aWheelEvent.mDeltaY : 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 }, mDeltaX: %f, deltaY: %f, "
+     "aWheelEvent { refPoint: { x: %d, y: %d }, mDeltaX: %f, mDeltaY: %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.mDeltaX, aWheelEvent.deltaY,
+     aWheelEvent.mDeltaX, aWheelEvent.mDeltaY,
      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,17 +560,17 @@ nsWinGesture::PanFeedbackFinalize(HWND h
   }
 
   UpdatePanningFeedback(hWnd, mPixelScrollOverflow.x, mPixelScrollOverflow.y, mPanInertiaActive);
 }
 
 bool
 nsWinGesture::PanDeltaToPixelScroll(WidgetWheelEvent& aWheelEvent)
 {
-  aWheelEvent.mDeltaX = aWheelEvent.deltaY = aWheelEvent.deltaZ = 0.0;
+  aWheelEvent.mDeltaX = aWheelEvent.mDeltaY = 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;
 
@@ -579,13 +579,13 @@ nsWinGesture::PanDeltaToPixelScroll(Widg
 
   // 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.mDeltaX = mPixelScrollDelta.x;
   }
   if (!mYAxisFeedback) {
-    aWheelEvent.deltaY = mPixelScrollDelta.y;
+    aWheelEvent.mDeltaY = mPixelScrollDelta.y;
   }
 
-  return (aWheelEvent.mDeltaX != 0 || aWheelEvent.deltaY != 0);
+  return (aWheelEvent.mDeltaX != 0 || aWheelEvent.mDeltaY != 0);
 }