Bug 895274 part.184 Rename NS_WHEEL_WHEEL to eWheel r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Fri, 11 Sep 2015 01:59:54 +0900
changeset 294433 e777173540407236c2b24357c854920757748f74
parent 294432 7a008c1909daacb25f473b4a46f39b73dd556659
child 294434 dd0a5b24d93ccd9dcec8cea76127a564ff9eaf02
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs895274
milestone43.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 895274 part.184 Rename NS_WHEEL_WHEEL to eWheel r=smaug
dom/base/nsDOMWindowUtils.cpp
dom/events/EventNameList.h
dom/events/EventStateManager.cpp
dom/events/WheelHandlingHelper.cpp
layout/base/AccessibleCaretEventHub.cpp
layout/base/TouchCaret.cpp
layout/base/gtest/TestAccessibleCaretEventHub.cpp
layout/base/nsPresShell.cpp
layout/generic/nsPluginFrame.cpp
widget/EventMessageList.h
widget/InputData.cpp
widget/cocoa/nsChildView.mm
widget/gtk/nsWindow.cpp
widget/qt/nsWindow.cpp
widget/windows/WinMouseScrollHandler.cpp
widget/windows/nsWindow.cpp
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -820,17 +820,17 @@ nsDOMWindowUtils::SendWheelEvent(float a
 
   // get the widget to send the event to
   nsPoint offset;
   nsCOMPtr<nsIWidget> widget = GetWidget(&offset);
   if (!widget) {
     return NS_ERROR_NULL_POINTER;
   }
 
-  WidgetWheelEvent wheelEvent(true, NS_WHEEL_WHEEL, widget);
+  WidgetWheelEvent wheelEvent(true, eWheel, widget);
   wheelEvent.modifiers = nsContentUtils::GetWidgetModifiers(aModifiers);
   wheelEvent.deltaX = aDeltaX;
   wheelEvent.deltaY = aDeltaY;
   wheelEvent.deltaZ = aDeltaZ;
   wheelEvent.deltaMode = aDeltaMode;
   wheelEvent.isMomentum =
     (aOptions & WHEEL_EVENT_CAUSED_BY_MOMENTUM) != 0;
   wheelEvent.mIsNoLineOrPageDelta =
--- a/dom/events/EventNameList.h
+++ b/dom/events/EventNameList.h
@@ -413,17 +413,17 @@ EVENT(volumechange,
       eVolumeChange,
       EventNameType_HTML,
       eBasicEventClass)
 EVENT(waiting,
       eWaiting,
       EventNameType_HTML,
       eBasicEventClass)
 EVENT(wheel,
-      NS_WHEEL_WHEEL,
+      eWheel,
       EventNameType_All,
       eWheelEventClass)
 EVENT(copy,
       eCopy,
       EventNameType_HTMLXUL,
       eClipboardEventClass)
 EVENT(cut,
       eCut,
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -706,29 +706,29 @@ EventStateManager::PreHandleEvent(nsPres
       //       TextComposition::IsComposing() is false even before
       //       compositionend if there is no composing string.
       WidgetKeyboardEvent* keyEvent = aEvent->AsKeyboardEvent();
       nsRefPtr<TextComposition> composition =
         IMEStateManager::GetTextCompositionFor(keyEvent);
       keyEvent->mIsComposing = !!composition;
     }
     break;
-  case NS_WHEEL_WHEEL:
+  case eWheel:
   case NS_WHEEL_START:
   case NS_WHEEL_STOP:
     {
       NS_ASSERTION(aEvent->mFlags.mIsTrusted,
                    "Untrusted wheel event shouldn't be here");
 
       nsIContent* content = GetFocusedContent();
       if (content) {
         mCurrentTargetContent = content;
       }
 
-      if (aEvent->mMessage != NS_WHEEL_WHEEL) {
+      if (aEvent->mMessage != eWheel) {
         break;
       }
 
       WidgetWheelEvent* wheelEvent = aEvent->AsWheelEvent();
       WheelPrefs::GetInstance()->ApplyUserPrefsToDelta(wheelEvent);
 
       // If we won't dispatch a DOM event for this event, nothing to do anymore.
       if (!wheelEvent->IsAllowedToDispatchDOMEvent()) {
@@ -3016,17 +3016,17 @@ EventStateManager::PostHandleEvent(nsPre
       nsIScrollableFrame* scrollTarget =
         ComputeScrollTarget(aTargetFrame, wheelEvent,
                             COMPUTE_DEFAULT_ACTION_TARGET);
       if (scrollTarget) {
         scrollTarget->ScrollSnap();
       }
     }
     break;
-  case NS_WHEEL_WHEEL:
+  case eWheel:
   case NS_WHEEL_START:
     {
       MOZ_ASSERT(aEvent->mFlags.mIsTrusted);
 
       if (*aStatus == nsEventStatus_eConsumeNoDefault) {
         ScrollbarsForWheel::Inactivate();
         break;
       }
@@ -3043,17 +3043,17 @@ 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 != NS_WHEEL_WHEEL ||
+          if (aEvent->mMessage != eWheel ||
               (!wheelEvent->deltaX && !wheelEvent->deltaY)) {
             break;
           }
 
           nsIScrollableFrame* scrollTarget =
             ComputeScrollTarget(aTargetFrame, wheelEvent,
                                 COMPUTE_DEFAULT_ACTION_TARGET);
 
@@ -5567,17 +5567,17 @@ EventStateManager::WheelPrefs::HasUserPr
 
   return mMultiplierX[index] != 1.0 ||
          mMultiplierY[index] != 1.0;
 }
 
 bool
 EventStateManager::WheelEventIsScrollAction(WidgetWheelEvent* aEvent)
 {
-  return aEvent->mMessage == NS_WHEEL_WHEEL &&
+  return aEvent->mMessage == eWheel &&
          WheelPrefs::GetInstance()->ComputeActionFor(aEvent) == WheelPrefs::ACTION_SCROLL;
 }
 
 bool
 EventStateManager::WheelEventNeedsDeltaMultipliers(WidgetWheelEvent* aEvent)
 {
   return WheelPrefs::GetInstance()->HasUserPrefsForDelta(aEvent);
 }
--- a/dom/events/WheelHandlingHelper.cpp
+++ b/dom/events/WheelHandlingHelper.cpp
@@ -89,17 +89,17 @@ WheelTransaction::OwnScrollbars(bool aOw
   sOwnScrollbars = aOwn;
 }
 
 /* static */ void
 WheelTransaction::BeginTransaction(nsIFrame* aTargetFrame,
                                    WidgetWheelEvent* aEvent)
 {
   NS_ASSERTION(!sTargetFrame, "previous transaction is not finished!");
-  MOZ_ASSERT(aEvent->mMessage == NS_WHEEL_WHEEL,
+  MOZ_ASSERT(aEvent->mMessage == eWheel,
              "Transaction must be started with a wheel event");
   ScrollbarsForWheel::OwnWheelTransaction(false);
   sTargetFrame = aTargetFrame;
   sScrollSeriesCounter = 0;
   if (!UpdateTransaction(aEvent)) {
     NS_ERROR("BeginTransaction is called even cannot scroll the frame");
     EndTransaction();
   }
@@ -171,17 +171,17 @@ WheelTransaction::OnEvent(WidgetEvent* a
     // was not fired by timer, then the scroll event will scroll old frame,
     // therefore, we should call OnTimeout here and ensure to finish the old
     // transaction.
     OnTimeout(nullptr, nullptr);
     return;
   }
 
   switch (aEvent->mMessage) {
-    case NS_WHEEL_WHEEL:
+    case eWheel:
       if (sMouseMoved != 0 &&
           OutOfTime(sMouseMoved, GetIgnoreMoveDelayTime())) {
         // Terminate the current mousewheel transaction if the mouse moved more
         // than ignoremovedelay milliseconds ago
         EndTransaction();
       }
       return;
     case eMouseMove:
--- a/layout/base/AccessibleCaretEventHub.cpp
+++ b/layout/base/AccessibleCaretEventHub.cpp
@@ -529,18 +529,18 @@ AccessibleCaretEventHub::HandleMouseEven
 
   return rv;
 }
 
 nsEventStatus
 AccessibleCaretEventHub::HandleWheelEvent(WidgetWheelEvent* aEvent)
 {
   switch (aEvent->mMessage) {
-  case NS_WHEEL_WHEEL:
-    AC_LOGV("NS_WHEEL_WHEEL, isMomentum %d, state: %s", aEvent->isMomentum,
+  case eWheel:
+    AC_LOGV("eWheel, isMomentum %d, state: %s", aEvent->isMomentum,
             mState->Name());
     mState->OnScrolling(this);
     break;
 
   case NS_WHEEL_START:
     AC_LOGV("NS_WHEEL_START, state: %s", mState->Name());
     mState->OnScrollStart(this);
     break;
--- a/layout/base/TouchCaret.cpp
+++ b/layout/base/TouchCaret.cpp
@@ -781,17 +781,17 @@ TouchCaret::HandleEvent(WidgetEvent* aEv
     case NS_TOUCH_CANCEL:
       mTouchesId.Clear();
       SetState(TOUCHCARET_NONE);
       LaunchExpirationTimer();
       break;
     case eKeyUp:
     case eKeyDown:
     case eKeyPress:
-    case NS_WHEEL_WHEEL:
+    case eWheel:
     case NS_WHEEL_START:
     case NS_WHEEL_STOP:
       // Disable touch caret while key/wheel event is received.
       TOUCHCARET_LOG("Receive key/wheel event %d", aEvent->mMessage);
       SetVisibility(false);
       break;
     case eMouseLongTap:
       if (mState == TOUCHCARET_TOUCHDRAG_ACTIVE) {
--- a/layout/base/gtest/TestAccessibleCaretEventHub.cpp
+++ b/layout/base/gtest/TestAccessibleCaretEventHub.cpp
@@ -731,28 +731,28 @@ TEST_F(AccessibleCaretEventHubTester, Te
   }
 
   check.Call("1");
 
   HandleEventAndCheckState(CreateWheelEvent(NS_WHEEL_START),
                            MockAccessibleCaretEventHub::ScrollState(),
                            nsEventStatus_eIgnore);
 
-  HandleEventAndCheckState(CreateWheelEvent(NS_WHEEL_WHEEL),
+  HandleEventAndCheckState(CreateWheelEvent(eWheel),
                            MockAccessibleCaretEventHub::ScrollState(),
                            nsEventStatus_eIgnore);
 
   mHub->ScrollPositionChanged();
 
   HandleEventAndCheckState(CreateWheelEvent(NS_WHEEL_STOP),
                            MockAccessibleCaretEventHub::PostScrollState(),
                            nsEventStatus_eIgnore);
 
   // Momentum scroll
-  HandleEventAndCheckState(CreateWheelEvent(NS_WHEEL_WHEEL),
+  HandleEventAndCheckState(CreateWheelEvent(eWheel),
                            MockAccessibleCaretEventHub::PostScrollState(),
                            nsEventStatus_eIgnore);
 
   check.Call("2");
 
   // Simulate scroll end fired by timer.
   MockAccessibleCaretEventHub::FireScrollEnd(nullptr, mHub);
   EXPECT_EQ(mHub->GetState(), MockAccessibleCaretEventHub::NoActionState());
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -470,17 +470,17 @@ public:
       if (aVisitor.mEvent->mMessage == eMouseDown ||
           aVisitor.mEvent->mMessage == eMouseUp) {
         // Mouse-up and mouse-down events call nsFrame::HandlePress/Release
         // which call GetContentOffsetsFromPoint which requires up-to-date layout.
         // Bring layout up-to-date now so that GetCurrentEventFrame() below
         // will return a real frame and we don't have to worry about
         // destroying it by flushing later.
         mPresShell->FlushPendingNotifications(Flush_Layout);
-      } else if (aVisitor.mEvent->mMessage == NS_WHEEL_WHEEL &&
+      } else if (aVisitor.mEvent->mMessage == eWheel &&
                  aVisitor.mEventStatus != nsEventStatus_eConsumeNoDefault) {
         nsIFrame* frame = mPresShell->GetCurrentEventFrame();
         if (frame) {
           // chrome (including addons) should be able to know if content
           // handles both D3E "wheel" event and legacy mouse scroll events.
           // We should dispatch legacy mouse events before dispatching the
           // "wheel" event into system group.
           nsRefPtr<EventStateManager> esm =
--- a/layout/generic/nsPluginFrame.cpp
+++ b/layout/generic/nsPluginFrame.cpp
@@ -1784,17 +1784,17 @@ nsPluginFrame::HandleEvent(nsPresContext
 #ifdef XP_WIN
   rv = nsPluginFrameSuper::HandleEvent(aPresContext, anEvent, anEventStatus);
   return rv;
 #endif
 
 #ifdef XP_MACOSX
   // we want to process some native mouse events in the cocoa event model
   if ((anEvent->mMessage == eMouseEnterIntoWidget ||
-       anEvent->mMessage == NS_WHEEL_WHEEL) &&
+       anEvent->mMessage == eWheel) &&
       mInstanceOwner->GetEventModel() == NPEventModelCocoa) {
     *anEventStatus = mInstanceOwner->ProcessEvent(*anEvent);
     // Due to plugin code reentering Gecko, this frame may be dead at this
     // point.
     return rv;
   }
 
   // These two calls to nsIPresShell::SetCapturingContext() (on mouse-down
--- a/widget/EventMessageList.h
+++ b/widget/EventMessageList.h
@@ -378,17 +378,18 @@ NS_EVENT_MESSAGE(NS_TOUCH_END,          
 NS_EVENT_MESSAGE(NS_TOUCH_CANCEL,        NS_TOUCH_EVENT_START + 3)
 
 // Pointerlock DOM API
 NS_EVENT_MESSAGE(NS_POINTERLOCK_START,   5300)
 NS_EVENT_MESSAGE(NS_POINTERLOCKCHANGE,   NS_POINTERLOCK_START)
 NS_EVENT_MESSAGE(NS_POINTERLOCKERROR,    NS_POINTERLOCK_START + 1)
 
 NS_EVENT_MESSAGE(eWheelEventFirst,       5400)
-NS_EVENT_MESSAGE(NS_WHEEL_WHEEL,         eWheelEventFirst)
+// eWheel is the event message of DOM wheel event.
+NS_EVENT_MESSAGE(eWheel,                 eWheelEventFirst)
 NS_EVENT_MESSAGE(NS_WHEEL_START,         eWheelEventFirst + 1)
 NS_EVENT_MESSAGE(NS_WHEEL_STOP,          eWheelEventFirst + 2)
 
 //System time is changed
 NS_EVENT_MESSAGE(NS_MOZ_TIME_CHANGE_EVENT, 5500)
 
 // Network packet events.
 NS_EVENT_MESSAGE(NS_NETWORK_EVENT_START,    5600)
--- a/widget/InputData.cpp
+++ b/widget/InputData.cpp
@@ -236,17 +236,17 @@ PanGestureInput::IsMomentum() const
     default:
       return false;
   }
 }
 
 WidgetWheelEvent
 PanGestureInput::ToWidgetWheelEvent(nsIWidget* aWidget) const
 {
-  WidgetWheelEvent wheelEvent(true, NS_WHEEL_WHEEL, aWidget);
+  WidgetWheelEvent wheelEvent(true, eWheel, aWidget);
   wheelEvent.modifiers = this->modifiers;
   wheelEvent.time = mTime;
   wheelEvent.timeStamp = mTimeStamp;
   wheelEvent.refPoint =
     RoundedToInt(ViewAs<LayoutDevicePixel>(mPanStartPoint,
       PixelCastJustification::LayoutDeviceToScreenForUntransformedEvent));
   wheelEvent.buttons = 0;
   wheelEvent.deltaMode = nsIDOMWheelEvent::DOM_DELTA_PIXEL;
@@ -308,17 +308,17 @@ DeltaModeForDeltaType(ScrollWheelInput::
     default:
       return nsIDOMWheelEvent::DOM_DELTA_PIXEL;
   }
 }
 
 WidgetWheelEvent
 ScrollWheelInput::ToWidgetWheelEvent(nsIWidget* aWidget) const
 {
-  WidgetWheelEvent wheelEvent(true, NS_WHEEL_WHEEL, aWidget);
+  WidgetWheelEvent wheelEvent(true, eWheel, aWidget);
   wheelEvent.modifiers = this->modifiers;
   wheelEvent.time = mTime;
   wheelEvent.timeStamp = mTimeStamp;
   wheelEvent.refPoint =
     RoundedToInt(ViewAs<LayoutDevicePixel>(mOrigin,
       PixelCastJustification::LayoutDeviceToScreenForUntransformedEvent));
   wheelEvent.buttons = 0;
   wheelEvent.deltaMode = DeltaModeForDeltaType(mDeltaType);
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -2750,17 +2750,17 @@ nsChildView::DispatchAPZWheelInputEvent(
     // has been started since the beginning of the swipe, the swipe tracker
     // will know to ignore the event.
     nsEventStatus status = mSwipeTracker->ProcessEvent(aEvent.AsPanGestureInput());
     if (status == nsEventStatus_eConsumeNoDefault) {
       return;
     }
   }
 
-  WidgetWheelEvent event(true, NS_WHEEL_WHEEL, this);
+  WidgetWheelEvent event(true, eWheel, this);
 
   if (mAPZC) {
     uint64_t inputBlockId = 0;
     ScrollableLayerGuid guid;
 
     nsEventStatus result = mAPZC->ReceiveInputEvent(aEvent, &guid, &inputBlockId);
     if (result == nsEventStatus_eConsumeNoDefault) {
       return;
@@ -2803,18 +2803,17 @@ nsChildView::DispatchAPZWheelInputEvent(
       case SCROLLWHEEL_INPUT: {
         event = aEvent.AsScrollWheelInput().ToWidgetWheelEvent(this);
         break;
       };
       default:
         MOZ_CRASH("unsupported event type");
         return;
     }
-    if (event.mMessage == NS_WHEEL_WHEEL &&
-        (event.deltaX != 0 || event.deltaY != 0)) {
+    if (event.mMessage == eWheel && (event.deltaX != 0 || event.deltaY != 0)) {
       ProcessUntransformedAPZEvent(&event, guid, inputBlockId, result);
     }
     return;
   }
 
   nsEventStatus status;
   switch(aEvent.mInputType) {
     case PANGESTURE_INPUT: {
@@ -2848,18 +2847,17 @@ nsChildView::DispatchAPZWheelInputEvent(
     case SCROLLWHEEL_INPUT: {
       event = aEvent.AsScrollWheelInput().ToWidgetWheelEvent(this);
       break;
     }
     default:
       MOZ_CRASH("unexpected event type");
       return;
   }
-  if (event.mMessage == NS_WHEEL_WHEEL &&
-      (event.deltaX != 0 || event.deltaY != 0)) {
+  if (event.mMessage == eWheel && (event.deltaX != 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
@@ -3129,17 +3129,17 @@ nsWindow::OnScrollEvent(GdkEventScroll *
     if (CheckForRollup(aEvent->x_root, aEvent->y_root, true, false))
         return;
 #if GTK_CHECK_VERSION(3,4,0)
     // check for duplicate legacy scroll event, see GNOME bug 726878
     if (aEvent->direction != GDK_SCROLL_SMOOTH &&
         mLastScrollEventTime == aEvent->time)
         return; 
 #endif
-    WidgetWheelEvent wheelEvent(true, NS_WHEEL_WHEEL, this);
+    WidgetWheelEvent wheelEvent(true, eWheel, this);
     wheelEvent.deltaMode = nsIDOMWheelEvent::DOM_DELTA_LINE;
     switch (aEvent->direction) {
 #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;
--- a/widget/qt/nsWindow.cpp
+++ b/widget/qt/nsWindow.cpp
@@ -1254,17 +1254,17 @@ nsWindow::keyReleaseEvent(QKeyEvent* aEv
 
     return DispatchEvent(&event);
 }
 
 nsEventStatus
 nsWindow::wheelEvent(QWheelEvent* aEvent)
 {
     // check to see if we should rollup
-    WidgetWheelEvent wheelEvent(true, NS_WHEEL_WHEEL, this);
+    WidgetWheelEvent wheelEvent(true, eWheel, this);
     wheelEvent.deltaMode = nsIDOMWheelEvent::DOM_DELTA_LINE;
 
     // negative values for aEvent->delta indicate downward scrolling;
     // 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;
--- a/widget/windows/WinMouseScrollHandler.cpp
+++ b/widget/windows/WinMouseScrollHandler.cpp
@@ -621,33 +621,33 @@ MouseScrollHandler::HandleMouseWheelMess
 
   mLastEventInfo.RecordEvent(eventInfo);
 
   ModifierKeyState modKeyState = GetModifierKeyState(aMessage);
 
   // Grab the widget, it might be destroyed by a DOM event handler.
   nsRefPtr<nsWindowBase> kungFuDethGrip(aWidget);
 
-  WidgetWheelEvent wheelEvent(true, NS_WHEEL_WHEEL, aWidget);
+  WidgetWheelEvent wheelEvent(true, eWheel, aWidget);
   if (mLastEventInfo.InitWheelEvent(aWidget, wheelEvent, modKeyState)) {
     MOZ_LOG(gMouseScrollLog, LogLevel::Info,
       ("MouseScroll::HandleMouseWheelMessage: dispatching "
-       "NS_WHEEL_WHEEL event"));
+       "eWheel event"));
     aWidget->DispatchWheelEvent(&wheelEvent);
     if (aWidget->Destroyed()) {
       MOZ_LOG(gMouseScrollLog, LogLevel::Info,
         ("MouseScroll::HandleMouseWheelMessage: The window was destroyed "
-         "by NS_WHEEL_WHEEL event"));
+         "by eWheel event"));
       mLastEventInfo.ResetTransaction();
       return;
     }
   }
   else {
     MOZ_LOG(gMouseScrollLog, LogLevel::Info,
-      ("MouseScroll::HandleMouseWheelMessage: NS_WHEEL_WHEEL event is not "
+      ("MouseScroll::HandleMouseWheelMessage: eWheel event is not "
        "dispatched"));
   }
 }
 
 void
 MouseScrollHandler::HandleScrollMessageAsMouseWheelMessage(nsWindowBase* aWidget,
                                                            UINT aMessage,
                                                            WPARAM aWParam,
@@ -657,17 +657,17 @@ MouseScrollHandler::HandleScrollMessageA
     (aMessage == MOZ_WM_VSCROLL || aMessage == MOZ_WM_HSCROLL),
     "HandleScrollMessageAsMouseWheelMessage must be called with "
     "MOZ_WM_VSCROLL or MOZ_WM_HSCROLL");
 
   mIsWaitingInternalMessage = false;
 
   ModifierKeyState modKeyState = GetModifierKeyState(aMessage);
 
-  WidgetWheelEvent wheelEvent(true, NS_WHEEL_WHEEL, aWidget);
+  WidgetWheelEvent wheelEvent(true, eWheel, aWidget);
   double& delta =
    (aMessage == MOZ_WM_VSCROLL) ? wheelEvent.deltaY : wheelEvent.deltaX;
   int32_t& lineOrPageDelta =
    (aMessage == MOZ_WM_VSCROLL) ? wheelEvent.lineOrPageDeltaY :
                                   wheelEvent.lineOrPageDeltaX;
 
   delta = 1.0;
   lineOrPageDelta = 1;
@@ -814,17 +814,17 @@ MouseScrollHandler::LastEventInfo::Round
 }
 
 bool
 MouseScrollHandler::LastEventInfo::InitWheelEvent(
                                      nsWindowBase* aWidget,
                                      WidgetWheelEvent& aWheelEvent,
                                      const ModifierKeyState& aModKeyState)
 {
-  MOZ_ASSERT(aWheelEvent.mMessage == NS_WHEEL_WHEEL);
+  MOZ_ASSERT(aWheelEvent.mMessage == eWheel);
 
   // XXX Why don't we use lParam value? We should use lParam value because
   //     our internal message is always posted by original message handler.
   //     So, GetMessagePos() may return different cursor position.
   InitEvent(aWidget, aWheelEvent);
 
   aModKeyState.InitInputEvent(aWheelEvent);
 
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -6480,17 +6480,17 @@ bool nsWindow::OnGesture(WPARAM wParam, 
 {
   // Treatment for pan events which translate into scroll events:
   if (mGesture.IsPanEvent(lParam)) {
     if ( !mGesture.ProcessPanMessage(mWnd, wParam, lParam) )
       return false; // ignore
 
     nsEventStatus status;
 
-    WidgetWheelEvent wheelEvent(true, NS_WHEEL_WHEEL, this);
+    WidgetWheelEvent wheelEvent(true, eWheel, this);
 
     ModifierKeyState modifierKeyState;
     modifierKeyState.InitInputEvent(wheelEvent);
 
     wheelEvent.button      = 0;
     wheelEvent.time        = ::GetMessageTime();
     wheelEvent.timeStamp   = GetMessageTimeStamp(wheelEvent.time);
     wheelEvent.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_TOUCH;