Bug 1046101 part.13 Rename NS_MOUSE_SCROLL_EVENT to eMouseScrollEventClass r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Mon, 04 Aug 2014 14:28:51 +0900
changeset 197653 955ed4eff9c94f4401a98dbefc307697451ab286
parent 197652 df76962b36837df8be48ddd05e56d7ac2ec4c46c
child 197654 52e95550adbf7fa763d5acfb8d0d70f6ad026116
push id27249
push userryanvm@gmail.com
push dateMon, 04 Aug 2014 20:14:35 +0000
treeherdermozilla-central@7f81be7db528 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1046101
milestone34.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 1046101 part.13 Rename NS_MOUSE_SCROLL_EVENT to eMouseScrollEventClass r=smaug
dom/events/Event.cpp
dom/events/EventDispatcher.cpp
dom/events/EventNameList.h
dom/events/EventStateManager.cpp
dom/events/MouseEvent.cpp
dom/events/UIEvent.cpp
dom/events/UIEvent.h
dom/plugins/base/nsPluginInstanceOwner.cpp
dom/xbl/nsXBLEventHandler.cpp
layout/base/nsLayoutUtils.cpp
layout/xul/nsXULPopupManager.cpp
widget/BasicEvents.h
widget/MouseEvents.h
widget/gtk/nsGtkKeyUtils.cpp
widget/windows/KeyboardLayout.cpp
--- a/dom/events/Event.cpp
+++ b/dom/events/Event.cpp
@@ -154,17 +154,17 @@ NS_IMPL_CYCLE_COLLECTION_TRACE_END
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(Event)
   if (tmp->mEventIsInternal) {
     tmp->mEvent->target = nullptr;
     tmp->mEvent->currentTarget = nullptr;
     tmp->mEvent->originalTarget = nullptr;
     switch (tmp->mEvent->mClass) {
       case eMouseEventClass:
-      case NS_MOUSE_SCROLL_EVENT:
+      case eMouseScrollEventClass:
       case NS_WHEEL_EVENT:
       case NS_SIMPLE_GESTURE_EVENT:
       case NS_POINTER_EVENT:
         tmp->mEvent->AsMouseEventBase()->relatedTarget = nullptr;
         break;
       case eDragEventClass: {
         WidgetDragEvent* dragEvent = tmp->mEvent->AsDragEvent();
         dragEvent->dataTransfer = nullptr;
@@ -192,17 +192,17 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(Event)
   if (tmp->mEventIsInternal) {
     NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mEvent->target)
     NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mEvent->currentTarget)
     NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mEvent->originalTarget)
     switch (tmp->mEvent->mClass) {
       case eMouseEventClass:
-      case NS_MOUSE_SCROLL_EVENT:
+      case eMouseScrollEventClass:
       case NS_WHEEL_EVENT:
       case NS_SIMPLE_GESTURE_EVENT:
       case NS_POINTER_EVENT:
         NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mEvent->relatedTarget");
         cb.NoteXPCOMChild(tmp->mEvent->AsMouseEventBase()->relatedTarget);
         break;
       case eDragEventClass: {
         WidgetDragEvent* dragEvent = tmp->mEvent->AsDragEvent();
@@ -843,17 +843,17 @@ Event::GetScreenCoords(nsPresContext* aP
                        LayoutDeviceIntPoint aPoint)
 {
   if (EventStateManager::sIsPointerLocked) {
     return EventStateManager::sLastScreenPoint;
   }
 
   if (!aEvent || 
        (aEvent->mClass != eMouseEventClass &&
-        aEvent->mClass != NS_MOUSE_SCROLL_EVENT &&
+        aEvent->mClass != eMouseScrollEventClass &&
         aEvent->mClass != NS_WHEEL_EVENT &&
         aEvent->mClass != NS_POINTER_EVENT &&
         aEvent->mClass != NS_TOUCH_EVENT &&
         aEvent->mClass != eDragEventClass &&
         aEvent->mClass != NS_SIMPLE_GESTURE_EVENT)) {
     return nsIntPoint(0, 0);
   }
 
@@ -899,17 +899,17 @@ Event::GetClientCoords(nsPresContext* aP
                        CSSIntPoint aDefaultPoint)
 {
   if (EventStateManager::sIsPointerLocked) {
     return EventStateManager::sLastClientPoint;
   }
 
   if (!aEvent ||
       (aEvent->mClass != eMouseEventClass &&
-       aEvent->mClass != NS_MOUSE_SCROLL_EVENT &&
+       aEvent->mClass != eMouseScrollEventClass &&
        aEvent->mClass != NS_WHEEL_EVENT &&
        aEvent->mClass != NS_TOUCH_EVENT &&
        aEvent->mClass != eDragEventClass &&
        aEvent->mClass != NS_POINTER_EVENT &&
        aEvent->mClass != NS_SIMPLE_GESTURE_EVENT) ||
       !aPresContext ||
       !aEvent->AsGUIEvent()->widget) {
     return aDefaultPoint;
--- a/dom/events/EventDispatcher.cpp
+++ b/dom/events/EventDispatcher.cpp
@@ -703,17 +703,17 @@ EventDispatcher::CreateEvent(EventTarget
       return NS_NewDOMCompositionEvent(aDOMEvent, aOwner, aPresContext,
                                        aEvent->AsCompositionEvent());
     case eMouseEventClass:
       return NS_NewDOMMouseEvent(aDOMEvent, aOwner, aPresContext,
                                  aEvent->AsMouseEvent());
     case NS_FOCUS_EVENT:
       return NS_NewDOMFocusEvent(aDOMEvent, aOwner, aPresContext,
                                  aEvent->AsFocusEvent());
-    case NS_MOUSE_SCROLL_EVENT:
+    case eMouseScrollEventClass:
       return NS_NewDOMMouseScrollEvent(aDOMEvent, aOwner, aPresContext,
                                        aEvent->AsMouseScrollEvent());
     case NS_WHEEL_EVENT:
       return NS_NewDOMWheelEvent(aDOMEvent, aOwner, aPresContext,
                                  aEvent->AsWheelEvent());
     case eEditorInputEventClass:
       return NS_NewDOMInputEvent(aDOMEvent, aOwner, aPresContext,
                                  aEvent->AsEditorInputEvent());
--- a/dom/events/EventNameList.h
+++ b/dom/events/EventNameList.h
@@ -614,21 +614,21 @@ NON_IDL_EVENT(DOMFocusIn,
 NON_IDL_EVENT(DOMFocusOut,
               NS_UI_FOCUSOUT,
               EventNameType_HTMLXUL,
               eUIEventClass)
                                   
 NON_IDL_EVENT(DOMMouseScroll,
               NS_MOUSE_SCROLL,
               EventNameType_HTMLXUL,
-              NS_MOUSE_SCROLL_EVENT)
+              eMouseScrollEventClass)
 NON_IDL_EVENT(MozMousePixelScroll,
               NS_MOUSE_PIXEL_SCROLL,
               EventNameType_HTMLXUL,
-              NS_MOUSE_SCROLL_EVENT)
+              eMouseScrollEventClass)
                                                 
 NON_IDL_EVENT(open,
               NS_OPEN,
               EventNameType_None,
               NS_EVENT)
 
 NON_IDL_EVENT(dataavailable,
               NS_MEDIARECORDER_DATAAVAILABLE,
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -5111,17 +5111,17 @@ EventStateManager::DeltaAccumulator::Ini
   mX += aEvent->deltaX;
   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
-    // NS_MOUSE_SCROLL_EVENT (DOMMouseScroll) but not be used for scrolling
+    // eMouseScrollEventClass (DOMMouseScroll) but not be used for scrolling
     // of default action.  The transaction should be used only for the default
     // action.
     nsIScrollableFrame* scrollTarget =
       aESM->ComputeScrollTarget(aTargetFrame, aEvent,
                                 COMPUTE_LEGACY_MOUSE_SCROLL_EVENT_TARGET);
     nsIFrame* frame = do_QueryFrame(scrollTarget);
     nsPresContext* pc =
       frame ? frame->PresContext() : aTargetFrame->PresContext();
--- a/dom/events/MouseEvent.cpp
+++ b/dom/events/MouseEvent.cpp
@@ -66,17 +66,17 @@ MouseEvent::InitMouseEvent(const nsAStri
                            nsIDOMEventTarget* aRelatedTarget)
 {
   nsresult rv =
     UIEvent::InitUIEvent(aType, aCanBubble, aCancelable, aView, aDetail);
   NS_ENSURE_SUCCESS(rv, rv);
 
   switch(mEvent->mClass) {
     case eMouseEventClass:
-    case NS_MOUSE_SCROLL_EVENT:
+    case eMouseScrollEventClass:
     case NS_WHEEL_EVENT:
     case eDragEventClass:
     case NS_POINTER_EVENT:
     case NS_SIMPLE_GESTURE_EVENT: {
       WidgetMouseEventBase* mouseEventBase = mEvent->AsMouseEventBase();
       mouseEventBase->relatedTarget = aRelatedTarget;
       mouseEventBase->button = aButton;
       mouseEventBase->InitBasicModifiers(aCtrlKey, aAltKey, aShiftKey, aMetaKey);
@@ -120,17 +120,17 @@ MouseEvent::InitMouseEvent(const nsAStri
                                (modifiers & MODIFIER_ALT) != 0,
                                (modifiers & MODIFIER_SHIFT) != 0,
                                (modifiers & MODIFIER_META) != 0,
                                aButton, aRelatedTarget);
   NS_ENSURE_SUCCESS(rv, rv);
 
   switch(mEvent->mClass) {
     case eMouseEventClass:
-    case NS_MOUSE_SCROLL_EVENT:
+    case eMouseScrollEventClass:
     case NS_WHEEL_EVENT:
     case eDragEventClass:
     case NS_POINTER_EVENT:
     case NS_SIMPLE_GESTURE_EVENT:
       mEvent->AsInputEvent()->modifiers = modifiers;
       return NS_OK;
     default:
       MOZ_CRASH("There is no space to store the modifiers");
@@ -151,17 +151,17 @@ MouseEvent::Constructor(const GlobalObje
                     aParam.mScreenY, aParam.mClientX, aParam.mClientY,
                     aParam.mCtrlKey, aParam.mAltKey, aParam.mShiftKey,
                     aParam.mMetaKey, aParam.mButton, aParam.mRelatedTarget,
                     aRv);
   e->SetTrusted(trusted);
 
   switch (e->mEvent->mClass) {
     case eMouseEventClass:
-    case NS_MOUSE_SCROLL_EVENT:
+    case eMouseScrollEventClass:
     case NS_WHEEL_EVENT:
     case eDragEventClass:
     case NS_POINTER_EVENT:
     case NS_SIMPLE_GESTURE_EVENT:
       e->mEvent->AsMouseEventBase()->buttons = aParam.mButtons;
       break;
     default:
       break;
@@ -210,17 +210,17 @@ MouseEvent::GetButton(int16_t* aButton)
   return NS_OK;
 }
 
 int16_t
 MouseEvent::Button()
 {
   switch(mEvent->mClass) {
     case eMouseEventClass:
-    case NS_MOUSE_SCROLL_EVENT:
+    case eMouseScrollEventClass:
     case NS_WHEEL_EVENT:
     case eDragEventClass:
     case NS_POINTER_EVENT:
     case NS_SIMPLE_GESTURE_EVENT:
       return mEvent->AsMouseEventBase()->button;
     default:
       NS_WARNING("Tried to get mouse button for non-mouse event!");
       return WidgetMouseEvent::eLeftButton;
@@ -235,17 +235,17 @@ MouseEvent::GetButtons(uint16_t* aButton
   return NS_OK;
 }
 
 uint16_t
 MouseEvent::Buttons()
 {
   switch(mEvent->mClass) {
     case eMouseEventClass:
-    case NS_MOUSE_SCROLL_EVENT:
+    case eMouseScrollEventClass:
     case NS_WHEEL_EVENT:
     case eDragEventClass:
     case NS_POINTER_EVENT:
     case NS_SIMPLE_GESTURE_EVENT:
       return mEvent->AsMouseEventBase()->buttons;
     default:
       MOZ_CRASH("Tried to get mouse buttons for non-mouse event!");
   }
@@ -260,17 +260,17 @@ MouseEvent::GetRelatedTarget(nsIDOMEvent
 }
 
 already_AddRefed<EventTarget>
 MouseEvent::GetRelatedTarget()
 {
   nsCOMPtr<EventTarget> relatedTarget;
   switch(mEvent->mClass) {
     case eMouseEventClass:
-    case NS_MOUSE_SCROLL_EVENT:
+    case eMouseScrollEventClass:
     case NS_WHEEL_EVENT:
     case eDragEventClass:
     case NS_POINTER_EVENT:
     case NS_SIMPLE_GESTURE_EVENT:
       relatedTarget =
         do_QueryInterface(mEvent->AsMouseEventBase()->relatedTarget);
       break;
     default:
--- a/dom/events/UIEvent.cpp
+++ b/dom/events/UIEvent.cpp
@@ -114,17 +114,17 @@ nsIntPoint
 UIEvent::GetMovementPoint()
 {
   if (mPrivateDataDuplicated) {
     return mMovementPoint;
   }
 
   if (!mEvent ||
       (mEvent->mClass != eMouseEventClass &&
-       mEvent->mClass != NS_MOUSE_SCROLL_EVENT &&
+       mEvent->mClass != eMouseScrollEventClass &&
        mEvent->mClass != NS_WHEEL_EVENT &&
        mEvent->mClass != eDragEventClass &&
        mEvent->mClass != NS_POINTER_EVENT &&
        mEvent->mClass != NS_SIMPLE_GESTURE_EVENT) ||
        !mEvent->AsGUIEvent()->widget) {
     return nsIntPoint(0, 0);
   }
 
@@ -292,17 +292,17 @@ UIEvent::SetCancelBubble(bool aCancelBub
   return NS_OK;
 }
 
 nsIntPoint
 UIEvent::GetLayerPoint() const
 {
   if (!mEvent ||
       (mEvent->mClass != eMouseEventClass &&
-       mEvent->mClass != NS_MOUSE_SCROLL_EVENT &&
+       mEvent->mClass != eMouseScrollEventClass &&
        mEvent->mClass != NS_WHEEL_EVENT &&
        mEvent->mClass != NS_POINTER_EVENT &&
        mEvent->mClass != NS_TOUCH_EVENT &&
        mEvent->mClass != eDragEventClass &&
        mEvent->mClass != NS_SIMPLE_GESTURE_EVENT) ||
       !mPresContext ||
       mEventIsInternal) {
     return mLayerPoint;
--- a/dom/events/UIEvent.h
+++ b/dom/events/UIEvent.h
@@ -39,17 +39,17 @@ public:
   NS_IMETHOD_(void) Serialize(IPC::Message* aMsg, bool aSerializeInterfaceType) MOZ_OVERRIDE;
   NS_IMETHOD_(bool) Deserialize(const IPC::Message* aMsg, void** aIter) MOZ_OVERRIDE;
 
   static nsIntPoint CalculateScreenPoint(nsPresContext* aPresContext,
                                          WidgetEvent* aEvent)
   {
     if (!aEvent ||
         (aEvent->mClass != eMouseEventClass &&
-         aEvent->mClass != NS_MOUSE_SCROLL_EVENT &&
+         aEvent->mClass != eMouseScrollEventClass &&
          aEvent->mClass != NS_WHEEL_EVENT &&
          aEvent->mClass != eDragEventClass &&
          aEvent->mClass != NS_POINTER_EVENT &&
          aEvent->mClass != NS_SIMPLE_GESTURE_EVENT)) {
       return nsIntPoint(0, 0);
     }
 
     WidgetGUIEvent* event = aEvent->AsGUIEvent();
@@ -66,17 +66,17 @@ public:
   }
 
   static CSSIntPoint CalculateClientPoint(nsPresContext* aPresContext,
                                           WidgetEvent* aEvent,
                                           CSSIntPoint* aDefaultClientPoint)
   {
     if (!aEvent ||
         (aEvent->mClass != eMouseEventClass &&
-         aEvent->mClass != NS_MOUSE_SCROLL_EVENT &&
+         aEvent->mClass != eMouseScrollEventClass &&
          aEvent->mClass != NS_WHEEL_EVENT &&
          aEvent->mClass != eDragEventClass &&
          aEvent->mClass != NS_POINTER_EVENT &&
          aEvent->mClass != NS_SIMPLE_GESTURE_EVENT) ||
         !aPresContext ||
         !aEvent->AsGUIEvent()->widget) {
       return aDefaultClientPoint
              ? *aDefaultClientPoint
--- a/dom/plugins/base/nsPluginInstanceOwner.cpp
+++ b/dom/plugins/base/nsPluginInstanceOwner.cpp
@@ -2112,17 +2112,17 @@ nsEventStatus nsPluginInstanceOwner::Pro
               event.subwindow = None;
               event.same_screen = True;
             }
             break;
           }
       }
       break;
 
-   //XXX case NS_MOUSE_SCROLL_EVENT: not received.
+   //XXX case eMouseScrollEventClass: not received.
 
    case eKeyboardEventClass:
       if (anEvent.mPluginEvent)
         {
           XKeyEvent &event = pluginEvent.xkey;
 #ifdef MOZ_WIDGET_GTK
           event.root = GDK_ROOT_WINDOW();
           event.time = anEvent.time;
--- a/dom/xbl/nsXBLEventHandler.cpp
+++ b/dom/xbl/nsXBLEventHandler.cpp
@@ -146,17 +146,17 @@ nsXBLKeyEventHandler::HandleEvent(nsIDOM
 nsresult
 NS_NewXBLEventHandler(nsXBLPrototypeHandler* aHandler,
                       nsIAtom* aEventType,
                       nsXBLEventHandler** aResult)
 {
   switch (nsContentUtils::GetEventCategory(nsDependentAtomString(aEventType))) {
     case eDragEventClass:
     case eMouseEventClass:
-    case NS_MOUSE_SCROLL_EVENT:
+    case eMouseScrollEventClass:
     case NS_WHEEL_EVENT:
     case NS_SIMPLE_GESTURE_EVENT:
       *aResult = new nsXBLMouseEventHandler(aHandler);
       break;
     default:
       *aResult = new nsXBLEventHandler(aHandler);
       break;
   }
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -1865,17 +1865,17 @@ nsLayoutUtils::GetDOMEventCoordinatesRel
   return GetEventCoordinatesRelativeTo(event, aFrame);
 }
 
 nsPoint
 nsLayoutUtils::GetEventCoordinatesRelativeTo(const WidgetEvent* aEvent,
                                              nsIFrame* aFrame)
 {
   if (!aEvent || (aEvent->mClass != eMouseEventClass &&
-                  aEvent->mClass != NS_MOUSE_SCROLL_EVENT &&
+                  aEvent->mClass != eMouseScrollEventClass &&
                   aEvent->mClass != NS_WHEEL_EVENT &&
                   aEvent->mClass != eDragEventClass &&
                   aEvent->mClass != NS_SIMPLE_GESTURE_EVENT &&
                   aEvent->mClass != NS_POINTER_EVENT &&
                   aEvent->mClass != NS_GESTURENOTIFY_EVENT &&
                   aEvent->mClass != NS_TOUCH_EVENT &&
                   aEvent->mClass != eQueryContentEventClass))
     return nsPoint(NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE);
--- a/layout/xul/nsXULPopupManager.cpp
+++ b/layout/xul/nsXULPopupManager.cpp
@@ -542,17 +542,17 @@ nsXULPopupManager::InitTriggerEvent(nsID
         if (presShell && (presContext = presShell->GetPresContext())) {
           nsPresContext* rootDocPresContext =
             presContext->GetRootPresContext();
           if (!rootDocPresContext)
             return;
           nsIFrame* rootDocumentRootFrame = rootDocPresContext->
               PresShell()->FrameManager()->GetRootFrame();
           if ((event->mClass == eMouseEventClass || 
-               event->mClass == NS_MOUSE_SCROLL_EVENT ||
+               event->mClass == eMouseScrollEventClass ||
                event->mClass == NS_WHEEL_EVENT) &&
                !event->AsGUIEvent()->widget) {
             // no widget, so just use the client point if available
             nsCOMPtr<nsIDOMMouseEvent> mouseEvent = do_QueryInterface(aEvent);
             nsIntPoint clientPt;
             mouseEvent->GetClientX(&clientPt.x);
             mouseEvent->GetClientY(&clientPt.y);
 
--- a/widget/BasicEvents.h
+++ b/widget/BasicEvents.h
@@ -37,17 +37,17 @@ enum EventClassID MOZ_ENUM_TYPE(EventCla
   eTextEventClass,                   // WidgetTextEvent
   eQueryContentEventClass,           // WidgetQueryContentEvent
   eSelectionEventClass,              // WidgetSelectionEvent
   eEditorInputEventClass,            // InternalEditorInputEvent
 
   // MouseEvents.h
   eMouseEventClass,                  // WidgetMouseEvent
   eDragEventClass,                   // WidgetDragEvent
-  NS_MOUSE_SCROLL_EVENT,             // WidgetMouseScrollEvent
+  eMouseScrollEventClass,            // WidgetMouseScrollEvent
   NS_WHEEL_EVENT,                    // WidgetWheelEvent
   NS_POINTER_EVENT,                  // PointerEvent
 
   // TouchEvents.h
   NS_GESTURENOTIFY_EVENT,            // WidgetGestureNotifyEvent
   NS_SIMPLE_GESTURE_EVENT,           // WidgetSimpleGestureEvent
   NS_TOUCH_EVENT,                    // WidgetTouchEvent
 
--- a/widget/MouseEvents.h
+++ b/widget/MouseEvents.h
@@ -364,25 +364,27 @@ private:
 
 public:
   virtual WidgetMouseScrollEvent* AsMouseScrollEvent() MOZ_OVERRIDE
   {
     return this;
   }
 
   WidgetMouseScrollEvent(bool aIsTrusted, uint32_t aMessage,
-                         nsIWidget* aWidget) :
-    WidgetMouseEventBase(aIsTrusted, aMessage, aWidget, NS_MOUSE_SCROLL_EVENT),
-    delta(0), isHorizontal(false)
+                         nsIWidget* aWidget)
+    : WidgetMouseEventBase(aIsTrusted, aMessage, aWidget,
+                           eMouseScrollEventClass)
+    , delta(0)
+    , isHorizontal(false)
   {
   }
 
   virtual WidgetEvent* Duplicate() const MOZ_OVERRIDE
   {
-    MOZ_ASSERT(mClass == NS_MOUSE_SCROLL_EVENT,
+    MOZ_ASSERT(mClass == eMouseScrollEventClass,
                "Duplicate() must be overridden by sub class");
     // Not copying widget, it is a weak reference.
     WidgetMouseScrollEvent* result =
       new WidgetMouseScrollEvent(false, message, nullptr);
     result->AssignMouseScrollEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
--- a/widget/gtk/nsGtkKeyUtils.cpp
+++ b/widget/gtk/nsGtkKeyUtils.cpp
@@ -643,17 +643,17 @@ KeymapWrapper::InitInputEvent(WidgetInpu
          GetBoolName(aInputEvent.modifiers & MODIFIER_OS),
          GetBoolName(aInputEvent.modifiers & MODIFIER_ALTGRAPH),
          GetBoolName(aInputEvent.modifiers & MODIFIER_CAPSLOCK),
          GetBoolName(aInputEvent.modifiers & MODIFIER_NUMLOCK),
          GetBoolName(aInputEvent.modifiers & MODIFIER_SCROLLLOCK)));
 
     switch(aInputEvent.mClass) {
         case eMouseEventClass:
-        case NS_MOUSE_SCROLL_EVENT:
+        case eMouseScrollEventClass:
         case NS_WHEEL_EVENT:
         case eDragEventClass:
         case NS_SIMPLE_GESTURE_EVENT:
             break;
         default:
             return;
     }
 
--- a/widget/windows/KeyboardLayout.cpp
+++ b/widget/windows/KeyboardLayout.cpp
@@ -277,17 +277,17 @@ ModifierKeyState::Set(Modifiers aAddingM
 
 void
 ModifierKeyState::InitInputEvent(WidgetInputEvent& aInputEvent) const
 {
   aInputEvent.modifiers = mModifiers;
 
   switch(aInputEvent.mClass) {
     case eMouseEventClass:
-    case NS_MOUSE_SCROLL_EVENT:
+    case eMouseScrollEventClass:
     case NS_WHEEL_EVENT:
     case eDragEventClass:
     case NS_SIMPLE_GESTURE_EVENT:
       InitMouseEvent(aInputEvent);
       break;
     default:
       break;
   }