Bug 895274 part.12 Rename NS_KEY_BEFORE_DOWN to eBeforeKeyDown r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Sat, 29 Aug 2015 08:58:27 +0900
changeset 259925 d826b30611d8941e7ff487ea8acd51cade119ce9
parent 259924 4a2797061277a5a2a3ba878144431a3b2f50392f
child 259926 57679af15e80758688d4bc0f54b662a084ce0904
push id29296
push userryanvm@gmail.com
push dateSun, 30 Aug 2015 19:45:10 +0000
treeherdermozilla-central@2ad5077d86ba [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs895274
milestone43.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 895274 part.12 Rename NS_KEY_BEFORE_DOWN to eBeforeKeyDown 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
@@ -234,17 +234,17 @@ EVENT(keypress,
       eKeyPress,
       EventNameType_HTMLXUL,
       eKeyboardEventClass)
 EVENT(keyup,
       eKeyUp,
       EventNameType_HTMLXUL,
       eKeyboardEventClass)
 NON_IDL_EVENT(mozbrowserbeforekeydown,
-              NS_KEY_BEFORE_DOWN,
+              eBeforeKeyDown,
               EventNameType_None,
               eBeforeAfterKeyboardEventClass)
 NON_IDL_EVENT(mozbrowserafterkeydown,
               NS_KEY_AFTER_DOWN,
               EventNameType_None,
               eBeforeAfterKeyboardEventClass)
 NON_IDL_EVENT(mozbrowserbeforekeyup,
               NS_KEY_BEFORE_UP,
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -678,17 +678,17 @@ EventStateManager::PreHandleEvent(nsPres
       if (modifierMask &&
           (modifierMask == Prefs::ChromeAccessModifierMask() ||
            modifierMask == Prefs::ContentAccessModifierMask())) {
         HandleAccessKey(aPresContext, keyEvent, aStatus, nullptr,
                         eAccessKeyProcessingNormal, modifierMask);
       }
     }
     // then fall through...
-  case NS_KEY_BEFORE_DOWN:
+  case eBeforeKeyDown:
   case eKeyDown:
   case NS_KEY_AFTER_DOWN:
   case NS_KEY_BEFORE_UP:
   case eKeyUp:
   case NS_KEY_AFTER_UP:
     {
       nsIContent* content = GetFocusedContent();
       if (content)
--- a/dom/events/KeyboardEvent.cpp
+++ b/dom/events/KeyboardEvent.cpp
@@ -148,17 +148,17 @@ uint32_t
 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 NS_KEY_BEFORE_DOWN:
+  case eBeforeKeyDown:
   case eKeyDown:
   case NS_KEY_AFTER_DOWN:
   case NS_KEY_BEFORE_UP:
   case eKeyUp:
   case NS_KEY_AFTER_UP:
     return 0;
   case eKeyPress:
     return mEvent->AsKeyboardEvent()->charCode;
@@ -194,17 +194,17 @@ uint32_t
 KeyboardEvent::Which()
 {
   // If this event is initialized with ctor, which can have independent value.
   if (mInitializedByCtor) {
     return mInitializedWhichValue;
   }
 
   switch (mEvent->mMessage) {
-    case NS_KEY_BEFORE_DOWN:
+    case eBeforeKeyDown:
     case eKeyDown:
     case NS_KEY_AFTER_DOWN:
     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
--- 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) ? NS_KEY_BEFORE_DOWN : NS_KEY_BEFORE_UP;
+    (aEvent.mMessage == eKeyDown) ? eBeforeKeyDown : NS_KEY_BEFORE_UP;
   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
@@ -18,17 +18,17 @@ NS_EVENT_MESSAGE(eAllEvents,            
 NS_EVENT_MESSAGE(eWindowEventFirst,     100)
 // 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(NS_KEY_BEFORE_DOWN,    eWindowEventFirst + 34)
+NS_EVENT_MESSAGE(eBeforeKeyDown,        eWindowEventFirst + 34)
 NS_EVENT_MESSAGE(NS_KEY_AFTER_DOWN,     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
--- a/widget/TextEvents.h
+++ b/widget/TextEvents.h
@@ -277,17 +277,17 @@ private:
 
 
 /******************************************************************************
  * mozilla::InternalBeforeAfterKeyboardEvent
  *
  * This is extended from WidgetKeyboardEvent and is mapped to DOM event
  * "BeforeAfterKeyboardEvent".
  *
- * Event mMessage: NS_KEY_BEFORE_DOWN
+ * Event mMessage: eBeforeKeyDown
  *                 NS_KEY_BEFORE_UP
  *                 NS_KEY_AFTER_DOWN
  *                 NS_KEY_AFTER_UP
  ******************************************************************************/
 class InternalBeforeAfterKeyboardEvent : public WidgetKeyboardEvent
 {
 private:
   friend class dom::PBrowserParent;
--- a/widget/WidgetEventImpl.cpp
+++ b/widget/WidgetEventImpl.cpp
@@ -117,17 +117,17 @@ WidgetEvent::HasDragEventMessage() const
 
 bool
 WidgetEvent::HasKeyEventMessage() const
 {
   switch (mMessage) {
     case eKeyDown:
     case eKeyPress:
     case eKeyUp:
-    case NS_KEY_BEFORE_DOWN:
+    case eBeforeKeyDown:
     case NS_KEY_BEFORE_UP:
     case NS_KEY_AFTER_DOWN:
     case NS_KEY_AFTER_UP:
       return true;
     default:
       return false;
   }
 }