Bug 1046101 part.22 Rename NS_FOCUS_EVENT to eFocusEventClass r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Mon, 04 Aug 2014 14:28:54 +0900
changeset 220560 7d500741f3e97c5d1ba7a12292e223cfcec3a8a0
parent 220559 e45296e548c4a35416d96d413f0078cdf121a8f7
child 220561 b55f3c2894ff3e1fb18bed76900425f02a020826
push id583
push userbhearsum@mozilla.com
push dateMon, 24 Nov 2014 19:04:58 +0000
treeherdermozilla-release@c107e74250f4 [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.22 Rename NS_FOCUS_EVENT to eFocusEventClass r=smaug
dom/events/Event.cpp
dom/events/EventDispatcher.cpp
dom/events/EventNameList.h
widget/BasicEvents.h
widget/ContentEvents.h
--- a/dom/events/Event.cpp
+++ b/dom/events/Event.cpp
@@ -172,17 +172,17 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(Ev
         break;
       }
       case NS_CLIPBOARD_EVENT:
         tmp->mEvent->AsClipboardEvent()->clipboardData = nullptr;
         break;
       case NS_MUTATION_EVENT:
         tmp->mEvent->AsMutationEvent()->mRelatedNode = nullptr;
         break;
-      case NS_FOCUS_EVENT:
+      case eFocusEventClass:
         tmp->mEvent->AsFocusEvent()->relatedTarget = nullptr;
         break;
       default:
         break;
     }
   }
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mPresContext);
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mExplicitOriginalTarget);
@@ -215,17 +215,17 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(
       case NS_CLIPBOARD_EVENT:
         NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mEvent->clipboardData");
         cb.NoteXPCOMChild(tmp->mEvent->AsClipboardEvent()->clipboardData);
         break;
       case NS_MUTATION_EVENT:
         NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mEvent->mRelatedNode");
         cb.NoteXPCOMChild(tmp->mEvent->AsMutationEvent()->mRelatedNode);
         break;
-      case NS_FOCUS_EVENT:
+      case eFocusEventClass:
         NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mEvent->relatedTarget");
         cb.NoteXPCOMChild(tmp->mEvent->AsFocusEvent()->relatedTarget);
         break;
       default:
         break;
     }
   }
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPresContext)
--- a/dom/events/EventDispatcher.cpp
+++ b/dom/events/EventDispatcher.cpp
@@ -700,17 +700,17 @@ EventDispatcher::CreateEvent(EventTarget
       return NS_NewDOMKeyboardEvent(aDOMEvent, aOwner, aPresContext,
                                     aEvent->AsKeyboardEvent());
     case eCompositionEventClass:
       return NS_NewDOMCompositionEvent(aDOMEvent, aOwner, aPresContext,
                                        aEvent->AsCompositionEvent());
     case eMouseEventClass:
       return NS_NewDOMMouseEvent(aDOMEvent, aOwner, aPresContext,
                                  aEvent->AsMouseEvent());
-    case NS_FOCUS_EVENT:
+    case eFocusEventClass:
       return NS_NewDOMFocusEvent(aDOMEvent, aOwner, aPresContext,
                                  aEvent->AsFocusEvent());
     case eMouseScrollEventClass:
       return NS_NewDOMMouseScrollEvent(aDOMEvent, aOwner, aPresContext,
                                        aEvent->AsMouseScrollEvent());
     case eWheelEventClass:
       return NS_NewDOMWheelEvent(aDOMEvent, aOwner, aPresContext,
                                  aEvent->AsWheelEvent());
--- a/dom/events/EventNameList.h
+++ b/dom/events/EventNameList.h
@@ -424,25 +424,25 @@ EVENT(beforescriptexecute,
 EVENT(afterscriptexecute,
       NS_AFTER_SCRIPT_EXECUTE,
       EventNameType_HTMLXUL,
       NS_EVENT)
 
 FORWARDED_EVENT(blur,
                 NS_BLUR_CONTENT,
                 EventNameType_HTMLXUL,
-                NS_FOCUS_EVENT)
+                eFocusEventClass)
 ERROR_EVENT(error,
             NS_LOAD_ERROR,
             EventNameType_All,
             NS_EVENT)
 FORWARDED_EVENT(focus,
                 NS_FOCUS_CONTENT,
                 EventNameType_HTMLXUL,
-                NS_FOCUS_EVENT)
+                eFocusEventClass)
 FORWARDED_EVENT(load,
                 NS_LOAD,
                 EventNameType_All,
                 NS_EVENT)
 FORWARDED_EVENT(scroll,
                 NS_SCROLL_EVENT,
                 (EventNameType_HTMLXUL | EventNameType_SVGSVG),
                 NS_EVENT)
--- a/widget/BasicEvents.h
+++ b/widget/BasicEvents.h
@@ -50,17 +50,17 @@ enum EventClassID MOZ_ENUM_TYPE(EventCla
   eGestureNotifyEventClass,          // WidgetGestureNotifyEvent
   eSimpleGestureEventClass,          // WidgetSimpleGestureEvent
   eTouchEventClass,                  // WidgetTouchEvent
 
   // ContentEvents.h
   eScrollPortEventClass,             // InternalScrollPortEvent
   eScrollAreaEventClass,             // InternalScrollAreaEvent
   eFormEventClass,                   // InternalFormEvent
-  NS_FOCUS_EVENT,                    // InternalFocusEvent
+  eFocusEventClass,                  // InternalFocusEvent
   NS_CLIPBOARD_EVENT,                // InternalClipboardEvent
   NS_TRANSITION_EVENT,               // InternalTransitionEvent
   NS_ANIMATION_EVENT,                // InternalAnimationEvent
   NS_SVGZOOM_EVENT,                  // InternalSVGZoomEvent
   NS_SMIL_TIME_EVENT,                // InternalSMILTimeEvent
 
   // MiscEvents.h
   NS_COMMAND_EVENT,                  // WidgetCommandEvent
--- a/widget/ContentEvents.h
+++ b/widget/ContentEvents.h
@@ -189,25 +189,26 @@ public:
  * mozilla::InternalFocusEvent
  ******************************************************************************/
 
 class InternalFocusEvent : public InternalUIEvent
 {
 public:
   virtual InternalFocusEvent* AsFocusEvent() MOZ_OVERRIDE { return this; }
 
-  InternalFocusEvent(bool aIsTrusted, uint32_t aMessage) :
-    InternalUIEvent(aIsTrusted, aMessage, NS_FOCUS_EVENT),
-    fromRaise(false), isRefocus(false)
+  InternalFocusEvent(bool aIsTrusted, uint32_t aMessage)
+    : InternalUIEvent(aIsTrusted, aMessage, eFocusEventClass)
+    , fromRaise(false)
+    , isRefocus(false)
   {
   }
 
   virtual WidgetEvent* Duplicate() const MOZ_OVERRIDE
   {
-    MOZ_ASSERT(mClass == NS_FOCUS_EVENT,
+    MOZ_ASSERT(mClass == eFocusEventClass,
                "Duplicate() must be overridden by sub class");
     InternalFocusEvent* result = new InternalFocusEvent(false, message);
     result->AssignFocusEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
   /// The possible related target