Bug 895274 part.13 Rename NS_KEY_AFTERE_DOWN to eAfterKeyDown r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Sat, 29 Aug 2015 08:58:28 +0900
changeset 289080 57679af15e80758688d4bc0f54b662a084ce0904
parent 289079 d826b30611d8941e7ff487ea8acd51cade119ce9
child 289081 15282e20479563dc050ec3015610d880001baed2
push id4931
push users.kaspari@gmail.com
push dateMon, 31 Aug 2015 11:53:12 +0000
reviewerssmaug
bugs895274
milestone43.0a1
Bug 895274 part.13 Rename NS_KEY_AFTERE_DOWN to eAfterKeyDown 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
@@ -238,17 +238,17 @@ EVENT(keyup,
       eKeyUp,
       EventNameType_HTMLXUL,
       eKeyboardEventClass)
 NON_IDL_EVENT(mozbrowserbeforekeydown,
               eBeforeKeyDown,
               EventNameType_None,
               eBeforeAfterKeyboardEventClass)
 NON_IDL_EVENT(mozbrowserafterkeydown,
-              NS_KEY_AFTER_DOWN,
+              eAfterKeyDown,
               EventNameType_None,
               eBeforeAfterKeyboardEventClass)
 NON_IDL_EVENT(mozbrowserbeforekeyup,
               NS_KEY_BEFORE_UP,
               EventNameType_None,
               eBeforeAfterKeyboardEventClass)
 NON_IDL_EVENT(mozbrowserafterkeyup,
               NS_KEY_AFTER_UP,
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -680,17 +680,17 @@ EventStateManager::PreHandleEvent(nsPres
            modifierMask == Prefs::ContentAccessModifierMask())) {
         HandleAccessKey(aPresContext, keyEvent, aStatus, nullptr,
                         eAccessKeyProcessingNormal, modifierMask);
       }
     }
     // then fall through...
   case eBeforeKeyDown:
   case eKeyDown:
-  case NS_KEY_AFTER_DOWN:
+  case eAfterKeyDown:
   case NS_KEY_BEFORE_UP:
   case eKeyUp:
   case NS_KEY_AFTER_UP:
     {
       nsIContent* content = GetFocusedContent();
       if (content)
         mCurrentTargetContent = content;
 
--- a/dom/events/KeyboardEvent.cpp
+++ b/dom/events/KeyboardEvent.cpp
@@ -150,17 +150,17 @@ KeyboardEvent::CharCode()
   // If this event is initialized with ctor, we shouldn't check event type.
   if (mInitializedByCtor) {
     return mEvent->AsKeyboardEvent()->charCode;
   }
 
   switch (mEvent->mMessage) {
   case eBeforeKeyDown:
   case eKeyDown:
-  case NS_KEY_AFTER_DOWN:
+  case eAfterKeyDown:
   case NS_KEY_BEFORE_UP:
   case eKeyUp:
   case NS_KEY_AFTER_UP:
     return 0;
   case eKeyPress:
     return mEvent->AsKeyboardEvent()->charCode;
   default:
     break;
@@ -196,17 +196,17 @@ KeyboardEvent::Which()
   // If this event is initialized with ctor, which can have independent value.
   if (mInitializedByCtor) {
     return mInitializedWhichValue;
   }
 
   switch (mEvent->mMessage) {
     case eBeforeKeyDown:
     case eKeyDown:
-    case NS_KEY_AFTER_DOWN:
+    case eAfterKeyDown:
     case NS_KEY_BEFORE_UP:
     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
       {
--- 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) ? NS_KEY_AFTER_DOWN : NS_KEY_AFTER_UP;
+    (aEvent.mMessage == eKeyDown) ? eAfterKeyDown : NS_KEY_AFTER_UP;
   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
@@ -19,17 +19,17 @@ NS_EVENT_MESSAGE(eWindowEventFirst,     
 // Widget may be destroyed
 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(NS_KEY_AFTER_DOWN,     eWindowEventFirst + 35)
+NS_EVENT_MESSAGE(eAfterKeyDown,         eWindowEventFirst + 35)
 NS_EVENT_MESSAGE(NS_KEY_BEFORE_UP,      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
--- a/widget/TextEvents.h
+++ b/widget/TextEvents.h
@@ -279,17 +279,17 @@ private:
 /******************************************************************************
  * mozilla::InternalBeforeAfterKeyboardEvent
  *
  * This is extended from WidgetKeyboardEvent and is mapped to DOM event
  * "BeforeAfterKeyboardEvent".
  *
  * Event mMessage: eBeforeKeyDown
  *                 NS_KEY_BEFORE_UP
- *                 NS_KEY_AFTER_DOWN
+ *                 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
@@ -119,17 +119,17 @@ bool
 WidgetEvent::HasKeyEventMessage() const
 {
   switch (mMessage) {
     case eKeyDown:
     case eKeyPress:
     case eKeyUp:
     case eBeforeKeyDown:
     case NS_KEY_BEFORE_UP:
-    case NS_KEY_AFTER_DOWN:
+    case eAfterKeyDown:
     case NS_KEY_AFTER_UP:
       return true;
     default:
       return false;
   }
 }
 
 bool