Bug 895274 part.167 Rename NS_CONTENT_COMMAND_UNDO to eContentCommandUndo r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Fri, 11 Sep 2015 01:59:53 +0900
changeset 296121 5863be1170c9bffe100db5bc150cba567a4f97e7
parent 296120 fc17970a9de262e7408326cfc5ce8f26b936bbfc
child 296122 29bac9c0a25ab19f1d46e0304d262604c815c4e8
push id962
push userjlund@mozilla.com
push dateFri, 04 Dec 2015 23:28:54 +0000
treeherdermozilla-release@23a2d286e80f [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.167 Rename NS_CONTENT_COMMAND_UNDO to eContentCommandUndo r=smaug
dom/base/nsDOMWindowUtils.cpp
dom/events/EventStateManager.cpp
widget/EventMessageList.h
widget/gtk/nsWindow.cpp
widget/qt/nsWindow.cpp
widget/windows/KeyboardLayout.cpp
widget/windows/nsWindow.cpp
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -2059,17 +2059,17 @@ nsDOMWindowUtils::SendContentCommandEven
     msg = eContentCommandCut;
   else if (aType.EqualsLiteral("copy"))
     msg = eContentCommandCopy;
   else if (aType.EqualsLiteral("paste"))
     msg = eContentCommandPaste;
   else if (aType.EqualsLiteral("delete"))
     msg = eContentCommandDelete;
   else if (aType.EqualsLiteral("undo"))
-    msg = NS_CONTENT_COMMAND_UNDO;
+    msg = eContentCommandUndo;
   else if (aType.EqualsLiteral("redo"))
     msg = NS_CONTENT_COMMAND_REDO;
   else if (aType.EqualsLiteral("pasteTransferable"))
     msg = eContentCommandPasteTransferable;
   else
     return NS_ERROR_FAILURE;
 
   WidgetContentCommandEvent event(true, msg, widget);
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -746,17 +746,17 @@ EventStateManager::PreHandleEvent(nsPres
   case eSetSelection:
     IMEStateManager::HandleSelectionEvent(aPresContext, GetFocusedContent(),
                                           aEvent->AsSelectionEvent());
     break;
   case eContentCommandCut:
   case eContentCommandCopy:
   case eContentCommandPaste:
   case eContentCommandDelete:
-  case NS_CONTENT_COMMAND_UNDO:
+  case eContentCommandUndo:
   case NS_CONTENT_COMMAND_REDO:
   case eContentCommandPasteTransferable:
     DoContentCommandEvent(aEvent->AsContentCommandEvent());
     break;
   case NS_CONTENT_COMMAND_SCROLL:
     {
       DoContentCommandScrollEvent(aEvent->AsContentCommandEvent());
     }
@@ -5044,17 +5044,17 @@ EventStateManager::DoContentCommandEvent
       cmd = "cmd_copy";
       break;
     case eContentCommandPaste:
       cmd = "cmd_paste";
       break;
     case eContentCommandDelete:
       cmd = "cmd_delete";
       break;
-    case NS_CONTENT_COMMAND_UNDO:
+    case eContentCommandUndo:
       cmd = "cmd_undo";
       break;
     case NS_CONTENT_COMMAND_REDO:
       cmd = "cmd_redo";
       break;
     case eContentCommandPasteTransferable:
       cmd = "cmd_pasteTransferable";
       break;
--- a/widget/EventMessageList.h
+++ b/widget/EventMessageList.h
@@ -299,17 +299,17 @@ NS_EVENT_MESSAGE(eSelectionEventFirst,  
 NS_EVENT_MESSAGE(eSetSelection,         eSelectionEventFirst)
 
 // Events of commands for the contents
 NS_EVENT_MESSAGE(eContentCommandEventFirst,        3800)
 NS_EVENT_MESSAGE(eContentCommandCut,               eContentCommandEventFirst)
 NS_EVENT_MESSAGE(eContentCommandCopy,              eContentCommandEventFirst + 1)
 NS_EVENT_MESSAGE(eContentCommandPaste,             eContentCommandEventFirst + 2)
 NS_EVENT_MESSAGE(eContentCommandDelete,            eContentCommandEventFirst + 3)
-NS_EVENT_MESSAGE(NS_CONTENT_COMMAND_UNDO,          eContentCommandEventFirst + 4)
+NS_EVENT_MESSAGE(eContentCommandUndo,              eContentCommandEventFirst + 4)
 NS_EVENT_MESSAGE(NS_CONTENT_COMMAND_REDO,          eContentCommandEventFirst + 5)
 NS_EVENT_MESSAGE(eContentCommandPasteTransferable, eContentCommandEventFirst + 6)
 // NS_CONTENT_COMMAND_SCROLL scrolls the nearest scrollable element to the
 // currently focused content or latest DOM selection. This would normally be
 // the same element scrolled by keyboard scroll commands, except that this event
 // will scroll an element scrollable in either direction.  I.e., if the nearest
 // scrollable ancestor element can only be scrolled vertically, and horizontal
 // scrolling is requested using this event, no scrolling will occur.
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -3043,17 +3043,17 @@ nsWindow::OnKeyPressEvent(GdkEventKey *a
             return DispatchContentCommandEvent(eContentCommandCut);
         case XF86XK_Paste:
         case GDK_F18:
             return DispatchContentCommandEvent(eContentCommandPaste);
         case GDK_Redo:
             return DispatchContentCommandEvent(NS_CONTENT_COMMAND_REDO);
         case GDK_Undo:
         case GDK_F14:
-            return DispatchContentCommandEvent(NS_CONTENT_COMMAND_UNDO);
+            return DispatchContentCommandEvent(eContentCommandUndo);
     }
 #endif /* ! AIX */
 #endif /* MOZ_X11 */
 
     WidgetKeyboardEvent event(true, eKeyPress, this);
     KeymapWrapper::InitKeyEvent(event, aEvent);
 
     // before we dispatch a key, check if it's the context menu key.
--- a/widget/qt/nsWindow.cpp
+++ b/widget/qt/nsWindow.cpp
@@ -1206,25 +1206,25 @@ nsWindow::keyPressEvent(QKeyEvent* aEven
         case Qt::Key_Cut:
         case Qt::Key_F20:
             return DispatchContentCommandEvent(eContentCommandCut);
         case Qt::Key_Paste:
         case Qt::Key_F18:
         case Qt::Key_F9:
             return DispatchContentCommandEvent(eContentCommandPaste);
         case Qt::Key_F14:
-            return DispatchContentCommandEvent(NS_CONTENT_COMMAND_UNDO);
+            return DispatchContentCommandEvent(eContentCommandUndo);
     }
 
     // Qt::Key_Redo and Qt::Key_Undo are not available yet.
     if (aEvent->nativeVirtualKey() == 0xff66) {
         return DispatchContentCommandEvent(NS_CONTENT_COMMAND_REDO);
     }
     if (aEvent->nativeVirtualKey() == 0xff65) {
-        return DispatchContentCommandEvent(NS_CONTENT_COMMAND_UNDO);
+        return DispatchContentCommandEvent(eContentCommandUndo);
     }
 
     WidgetKeyboardEvent event(true, eKeyPress, this);
     InitKeyEvent(event, aEvent);
     // Seend the key press event
     return DispatchEvent(&event);
 }
 
--- a/widget/windows/KeyboardLayout.cpp
+++ b/widget/windows/KeyboardLayout.cpp
@@ -1361,17 +1361,17 @@ NativeKey::HandleAppCommandMessage() con
         break;
       case APPCOMMAND_PASTE:
         contentCommandMessage = eContentCommandPaste;
         break;
       case APPCOMMAND_REDO:
         contentCommandMessage = NS_CONTENT_COMMAND_REDO;
         break;
       case APPCOMMAND_UNDO:
-        contentCommandMessage = NS_CONTENT_COMMAND_UNDO;
+        contentCommandMessage = eContentCommandUndo;
         break;
     }
 
     if (contentCommandMessage) {
       WidgetContentCommandEvent contentCommandEvent(true, contentCommandMessage,
                                                     mWidget);
       mWidget->DispatchWindowEvent(&contentCommandEvent);
       consumed = true;
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -5675,17 +5675,17 @@ nsWindow::ProcessMessage(UINT msg, WPARA
       WidgetContentCommandEvent command(true, eContentCommandPaste, this);
       DispatchWindowEvent(&command);
       result = true;
     }
     break;
 
     case EM_UNDO:
     {
-      WidgetContentCommandEvent command(true, NS_CONTENT_COMMAND_UNDO, this);
+      WidgetContentCommandEvent command(true, eContentCommandUndo, this);
       DispatchWindowEvent(&command);
       *aRetValue = (LRESULT)(command.mSucceeded && command.mIsEnabled);
       result = true;
     }
     break;
 
     case EM_REDO:
     {
@@ -5707,18 +5707,17 @@ nsWindow::ProcessMessage(UINT msg, WPARA
         *aRetValue = (LRESULT)(command.mSucceeded && command.mIsEnabled);
         result = true;
       }
     }
     break;
 
     case EM_CANUNDO:
     {
-      WidgetContentCommandEvent command(true, NS_CONTENT_COMMAND_UNDO,
-                                        this, true);
+      WidgetContentCommandEvent command(true, eContentCommandUndo, this, true);
       DispatchWindowEvent(&command);
       *aRetValue = (LRESULT)(command.mSucceeded && command.mIsEnabled);
       result = true;
     }
     break;
 
     case EM_CANREDO:
     {