Bug 895274 part.14 Rename NS_KEY_BEFORE_UP to eBeforeKeyUp r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Sat, 29 Aug 2015 08:58:28 +0900
changeset 259927 15282e20479563dc050ec3015610d880001baed2
parent 259926 57679af15e80758688d4bc0f54b662a084ce0904
child 259928 ef04b1227c95e42b29d6bf0626c021b24871d767
push idunknown
push userunknown
push dateunknown
reviewerssmaug
bugs895274
milestone43.0a1
Bug 895274 part.14 Rename NS_KEY_BEFORE_UP to eBeforeKeyUp 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
@@ -242,17 +242,17 @@ NON_IDL_EVENT(mozbrowserbeforekeydown,
               eBeforeKeyDown,
               EventNameType_None,
               eBeforeAfterKeyboardEventClass)
 NON_IDL_EVENT(mozbrowserafterkeydown,
               eAfterKeyDown,
               EventNameType_None,
               eBeforeAfterKeyboardEventClass)
 NON_IDL_EVENT(mozbrowserbeforekeyup,
-              NS_KEY_BEFORE_UP,
+              eBeforeKeyUp,
               EventNameType_None,
               eBeforeAfterKeyboardEventClass)
 NON_IDL_EVENT(mozbrowserafterkeyup,
               NS_KEY_AFTER_UP,
               EventNameType_None,
               eBeforeAfterKeyboardEventClass)
 EVENT(loadeddata,
       NS_LOADEDDATA,
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -681,17 +681,17 @@ EventStateManager::PreHandleEvent(nsPres
         HandleAccessKey(aPresContext, keyEvent, aStatus, nullptr,
                         eAccessKeyProcessingNormal, modifierMask);
       }
     }
     // then fall through...
   case eBeforeKeyDown:
   case eKeyDown:
   case eAfterKeyDown:
-  case NS_KEY_BEFORE_UP:
+  case eBeforeKeyUp:
   case eKeyUp:
   case NS_KEY_AFTER_UP:
     {
       nsIContent* content = GetFocusedContent();
       if (content)
         mCurrentTargetContent = content;
 
       // NOTE: Don't refer TextComposition::IsComposing() since DOM Level 3
@@ -3300,17 +3300,17 @@ EventStateManager::PostHandleEvent(nsPre
       break;
     }
   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 NS_KEY_BEFORE_UP:
+  case eBeforeKeyUp:
   case eKeyUp:
   case NS_KEY_AFTER_UP:
     break;
 
   case eKeyPress:
     {
       WidgetKeyboardEvent* keyEvent = aEvent->AsKeyboardEvent();
       PostHandleKeyboardEvent(keyEvent, *aStatus, dispatchedToContentProcess);
--- a/dom/events/KeyboardEvent.cpp
+++ b/dom/events/KeyboardEvent.cpp
@@ -151,17 +151,17 @@ KeyboardEvent::CharCode()
   if (mInitializedByCtor) {
     return mEvent->AsKeyboardEvent()->charCode;
   }
 
   switch (mEvent->mMessage) {
   case eBeforeKeyDown:
   case eKeyDown:
   case eAfterKeyDown:
-  case NS_KEY_BEFORE_UP:
+  case eBeforeKeyUp:
   case eKeyUp:
   case NS_KEY_AFTER_UP:
     return 0;
   case eKeyPress:
     return mEvent->AsKeyboardEvent()->charCode;
   default:
     break;
   }
@@ -197,17 +197,17 @@ KeyboardEvent::Which()
   if (mInitializedByCtor) {
     return mInitializedWhichValue;
   }
 
   switch (mEvent->mMessage) {
     case eBeforeKeyDown:
     case eKeyDown:
     case eAfterKeyDown:
-    case NS_KEY_BEFORE_UP:
+    case eBeforeKeyUp:
     case eKeyUp:
     case NS_KEY_AFTER_UP:
       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;
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -6842,17 +6842,17 @@ PresShell::DispatchBeforeKeyboardEventIn
                                                bool& aDefaultPrevented)
 {
   size_t length = aChain.Length();
   if (!CanDispatchEvent(&aEvent) || !length) {
     return;
   }
 
   EventMessage message =
-    (aEvent.mMessage == eKeyDown) ? eBeforeKeyDown : NS_KEY_BEFORE_UP;
+    (aEvent.mMessage == eKeyDown) ? eBeforeKeyDown : eBeforeKeyUp;
   nsCOMPtr<EventTarget> eventTarget;
   // Dispatch before events from the outermost element.
   for (int32_t i = length - 1; i >= 0; i--) {
     eventTarget = do_QueryInterface(aChain[i]->OwnerDoc()->GetWindow());
     if (!eventTarget || !CanDispatchEvent(&aEvent)) {
       return;
     }
 
--- a/widget/EventMessageList.h
+++ b/widget/EventMessageList.h
@@ -20,17 +20,17 @@ NS_EVENT_MESSAGE(eWindowEventFirst,     
 NS_EVENT_MESSAGE(eWindowClose,          eWindowEventFirst + 1)
 
 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(NS_KEY_BEFORE_UP,      eWindowEventFirst + 36)
+NS_EVENT_MESSAGE(eBeforeKeyUp,          eWindowEventFirst + 36)
 NS_EVENT_MESSAGE(NS_KEY_AFTER_UP,       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
--- a/widget/TextEvents.h
+++ b/widget/TextEvents.h
@@ -278,17 +278,17 @@ private:
 
 /******************************************************************************
  * mozilla::InternalBeforeAfterKeyboardEvent
  *
  * This is extended from WidgetKeyboardEvent and is mapped to DOM event
  * "BeforeAfterKeyboardEvent".
  *
  * Event mMessage: eBeforeKeyDown
- *                 NS_KEY_BEFORE_UP
+ *                 eBeforeKeyUp
  *                 eAfterKeyDown
  *                 NS_KEY_AFTER_UP
  ******************************************************************************/
 class InternalBeforeAfterKeyboardEvent : public WidgetKeyboardEvent
 {
 private:
   friend class dom::PBrowserParent;
   friend class dom::PBrowserChild;
--- a/widget/WidgetEventImpl.cpp
+++ b/widget/WidgetEventImpl.cpp
@@ -118,17 +118,17 @@ WidgetEvent::HasDragEventMessage() const
 bool
 WidgetEvent::HasKeyEventMessage() const
 {
   switch (mMessage) {
     case eKeyDown:
     case eKeyPress:
     case eKeyUp:
     case eBeforeKeyDown:
-    case NS_KEY_BEFORE_UP:
+    case eBeforeKeyUp:
     case eAfterKeyDown:
     case NS_KEY_AFTER_UP:
       return true;
     default:
       return false;
   }
 }