Bug 895274 part.15 Rename NS_KEY_AFTER_UP to eAfterKeyUp r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Sat, 29 Aug 2015 08:58:28 +0900
changeset 259928 ef04b1227c95e42b29d6bf0626c021b24871d767
parent 259927 15282e20479563dc050ec3015610d880001baed2
child 259929 90da8b9aaf2e777b0ed64773f75e4cd45a9b3e8a
push idunknown
push userunknown
push dateunknown
reviewerssmaug
bugs895274
milestone43.0a1
Bug 895274 part.15 Rename NS_KEY_AFTER_UP to eAfterKeyUp r=smaug
dom/events/EventNameList.h
dom/events/EventStateManager.cpp
dom/events/KeyboardEvent.cpp
layout/base/nsPresShell.cpp
widget/EventMessageList.h
widget/TextEvents.h
widget/WidgetEventImpl.cpp
--- a/dom/events/EventNameList.h
+++ b/dom/events/EventNameList.h
@@ -246,17 +246,17 @@ NON_IDL_EVENT(mozbrowserafterkeydown,
               eAfterKeyDown,
               EventNameType_None,
               eBeforeAfterKeyboardEventClass)
 NON_IDL_EVENT(mozbrowserbeforekeyup,
               eBeforeKeyUp,
               EventNameType_None,
               eBeforeAfterKeyboardEventClass)
 NON_IDL_EVENT(mozbrowserafterkeyup,
-              NS_KEY_AFTER_UP,
+              eAfterKeyUp,
               EventNameType_None,
               eBeforeAfterKeyboardEventClass)
 EVENT(loadeddata,
       NS_LOADEDDATA,
       EventNameType_HTML,
       eBasicEventClass)
 EVENT(loadedmetadata,
       NS_LOADEDMETADATA,
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -683,17 +683,17 @@ EventStateManager::PreHandleEvent(nsPres
       }
     }
     // then fall through...
   case eBeforeKeyDown:
   case eKeyDown:
   case eAfterKeyDown:
   case eBeforeKeyUp:
   case eKeyUp:
-  case NS_KEY_AFTER_UP:
+  case eAfterKeyUp:
     {
       nsIContent* content = GetFocusedContent();
       if (content)
         mCurrentTargetContent = content;
 
       // NOTE: Don't refer TextComposition::IsComposing() since DOM Level 3
       //       Events defines that KeyboardEvent.isComposing is true when it's
       //       dispatched after compositionstart and compositionend.
@@ -3302,17 +3302,17 @@ EventStateManager::PostHandleEvent(nsPre
   case NS_DRAGDROP_EXIT:
      // make sure to fire the enter and exit_synth events after the
      // NS_DRAGDROP_EXIT event, otherwise we'll clean up too early
     GenerateDragDropEnterExit(presContext, aEvent->AsDragEvent());
     break;
 
   case eBeforeKeyUp:
   case eKeyUp:
-  case NS_KEY_AFTER_UP:
+  case eAfterKeyUp:
     break;
 
   case eKeyPress:
     {
       WidgetKeyboardEvent* keyEvent = aEvent->AsKeyboardEvent();
       PostHandleKeyboardEvent(keyEvent, *aStatus, dispatchedToContentProcess);
     }
     break;
--- a/dom/events/KeyboardEvent.cpp
+++ b/dom/events/KeyboardEvent.cpp
@@ -153,17 +153,17 @@ KeyboardEvent::CharCode()
   }
 
   switch (mEvent->mMessage) {
   case eBeforeKeyDown:
   case eKeyDown:
   case eAfterKeyDown:
   case eBeforeKeyUp:
   case eKeyUp:
-  case NS_KEY_AFTER_UP:
+  case eAfterKeyUp:
     return 0;
   case eKeyPress:
     return mEvent->AsKeyboardEvent()->charCode;
   default:
     break;
   }
   return 0;
 }
@@ -199,17 +199,17 @@ KeyboardEvent::Which()
   }
 
   switch (mEvent->mMessage) {
     case eBeforeKeyDown:
     case eKeyDown:
     case eAfterKeyDown:
     case eBeforeKeyUp:
     case eKeyUp:
-    case NS_KEY_AFTER_UP:
+    case eAfterKeyUp:
       return KeyCode();
     case eKeyPress:
       //Special case for 4xp bug 62878.  Try to make value of which
       //more closely mirror the values that 4.x gave for RETURN and BACKSPACE
       {
         uint32_t keyCode = mEvent->AsKeyboardEvent()->keyCode;
         if (keyCode == NS_VK_RETURN || keyCode == NS_VK_BACK) {
           return keyCode;
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -6876,17 +6876,17 @@ PresShell::DispatchAfterKeyboardEventInt
                                               size_t aStartOffset)
 {
   size_t length = aChain.Length();
   if (!CanDispatchEvent(&aEvent) || !length) {
     return;
   }
 
   EventMessage message =
-    (aEvent.mMessage == eKeyDown) ? eAfterKeyDown : NS_KEY_AFTER_UP;
+    (aEvent.mMessage == eKeyDown) ? eAfterKeyDown : eAfterKeyUp;
   bool embeddedCancelled = aEmbeddedCancelled;
   nsCOMPtr<EventTarget> eventTarget;
   // Dispatch after events from the innermost element.
   for (uint32_t i = aStartOffset; i < length; i++) {
     eventTarget = do_QueryInterface(aChain[i]->OwnerDoc()->GetWindow());
     if (!eventTarget || !CanDispatchEvent(&aEvent)) {
       return;
     }
--- a/widget/EventMessageList.h
+++ b/widget/EventMessageList.h
@@ -21,17 +21,17 @@ NS_EVENT_MESSAGE(eWindowClose,          
 
 NS_EVENT_MESSAGE(eKeyPress,             eWindowEventFirst + 31)
 NS_EVENT_MESSAGE(eKeyUp,                eWindowEventFirst + 32)
 NS_EVENT_MESSAGE(eKeyDown,              eWindowEventFirst + 33)
 
 NS_EVENT_MESSAGE(eBeforeKeyDown,        eWindowEventFirst + 34)
 NS_EVENT_MESSAGE(eAfterKeyDown,         eWindowEventFirst + 35)
 NS_EVENT_MESSAGE(eBeforeKeyUp,          eWindowEventFirst + 36)
-NS_EVENT_MESSAGE(NS_KEY_AFTER_UP,       eWindowEventFirst + 37)
+NS_EVENT_MESSAGE(eAfterKeyUp,           eWindowEventFirst + 37)
 
 NS_EVENT_MESSAGE(NS_RESIZE_EVENT,       eWindowEventFirst + 60)
 NS_EVENT_MESSAGE(NS_SCROLL_EVENT,       eWindowEventFirst + 61)
 
 // A plugin was clicked or otherwise focused. NS_PLUGIN_ACTIVATE should be
 // used when the window is not active. NS_PLUGIN_FOCUS should be used when
 // the window is active. In the latter case, the dispatcher of the event
 // is expected to ensure that the plugin's widget is focused beforehand.
--- a/widget/TextEvents.h
+++ b/widget/TextEvents.h
@@ -280,17 +280,17 @@ private:
  * mozilla::InternalBeforeAfterKeyboardEvent
  *
  * This is extended from WidgetKeyboardEvent and is mapped to DOM event
  * "BeforeAfterKeyboardEvent".
  *
  * Event mMessage: eBeforeKeyDown
  *                 eBeforeKeyUp
  *                 eAfterKeyDown
- *                 NS_KEY_AFTER_UP
+ *                 eAfterKeyUp
  ******************************************************************************/
 class InternalBeforeAfterKeyboardEvent : public WidgetKeyboardEvent
 {
 private:
   friend class dom::PBrowserParent;
   friend class dom::PBrowserChild;
 
   InternalBeforeAfterKeyboardEvent()
--- a/widget/WidgetEventImpl.cpp
+++ b/widget/WidgetEventImpl.cpp
@@ -120,17 +120,17 @@ WidgetEvent::HasKeyEventMessage() const
 {
   switch (mMessage) {
     case eKeyDown:
     case eKeyPress:
     case eKeyUp:
     case eBeforeKeyDown:
     case eBeforeKeyUp:
     case eAfterKeyDown:
-    case NS_KEY_AFTER_UP:
+    case eAfterKeyUp:
       return true;
     default:
       return false;
   }
 }
 
 bool
 WidgetEvent::HasIMEEventMessage() const