Bug 895274 part.164 Rename NS_CONTENT_COMMAND_COPY to eContentCommandCopy r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Fri, 11 Sep 2015 01:59:52 +0900
changeset 294413 1c4f895797d85ea7853977809150c656ac9d807b
parent 294412 54ac42eda76f6f66400846dd5a32e92b827ff389
child 294414 4bc7de51bb6ef20f52ac77b6d58d3df281e9e8db
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [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.164 Rename NS_CONTENT_COMMAND_COPY to eContentCommandCopy 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
@@ -2053,17 +2053,17 @@ nsDOMWindowUtils::SendContentCommandEven
   nsCOMPtr<nsIWidget> widget = GetWidget();
   if (!widget)
     return NS_ERROR_FAILURE;
 
   EventMessage msg;
   if (aType.EqualsLiteral("cut"))
     msg = eContentCommandCut;
   else if (aType.EqualsLiteral("copy"))
-    msg = NS_CONTENT_COMMAND_COPY;
+    msg = eContentCommandCopy;
   else if (aType.EqualsLiteral("paste"))
     msg = NS_CONTENT_COMMAND_PASTE;
   else if (aType.EqualsLiteral("delete"))
     msg = NS_CONTENT_COMMAND_DELETE;
   else if (aType.EqualsLiteral("undo"))
     msg = NS_CONTENT_COMMAND_UNDO;
   else if (aType.EqualsLiteral("redo"))
     msg = NS_CONTENT_COMMAND_REDO;
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -743,17 +743,17 @@ EventStateManager::PreHandleEvent(nsPres
         InitLineOrPageDelta(aTargetFrame, this, wheelEvent);
     }
     break;
   case eSetSelection:
     IMEStateManager::HandleSelectionEvent(aPresContext, GetFocusedContent(),
                                           aEvent->AsSelectionEvent());
     break;
   case eContentCommandCut:
-  case NS_CONTENT_COMMAND_COPY:
+  case eContentCommandCopy:
   case NS_CONTENT_COMMAND_PASTE:
   case NS_CONTENT_COMMAND_DELETE:
   case NS_CONTENT_COMMAND_UNDO:
   case NS_CONTENT_COMMAND_REDO:
   case eContentCommandPasteTransferable:
     DoContentCommandEvent(aEvent->AsContentCommandEvent());
     break;
   case NS_CONTENT_COMMAND_SCROLL:
@@ -5035,17 +5035,17 @@ EventStateManager::DoContentCommandEvent
 
   nsCOMPtr<nsPIWindowRoot> root = window->GetTopWindowRoot();
   NS_ENSURE_TRUE(root, NS_ERROR_FAILURE);
   const char* cmd;
   switch (aEvent->mMessage) {
     case eContentCommandCut:
       cmd = "cmd_cut";
       break;
-    case NS_CONTENT_COMMAND_COPY:
+    case eContentCommandCopy:
       cmd = "cmd_copy";
       break;
     case NS_CONTENT_COMMAND_PASTE:
       cmd = "cmd_paste";
       break;
     case NS_CONTENT_COMMAND_DELETE:
       cmd = "cmd_delete";
       break;
--- a/widget/EventMessageList.h
+++ b/widget/EventMessageList.h
@@ -296,17 +296,17 @@ NS_EVENT_MESSAGE(ePluginInputEvent,     
 // Events to manipulate selection (WidgetSelectionEvent)
 NS_EVENT_MESSAGE(eSelectionEventFirst,  3700)
 // Clear any previous selection and set the given range as the selection
 NS_EVENT_MESSAGE(eSetSelection,         eSelectionEventFirst)
 
 // Events of commands for the contents
 NS_EVENT_MESSAGE(eContentCommandEventFirst,        3800)
 NS_EVENT_MESSAGE(eContentCommandCut,               eContentCommandEventFirst)
-NS_EVENT_MESSAGE(NS_CONTENT_COMMAND_COPY,          eContentCommandEventFirst + 1)
+NS_EVENT_MESSAGE(eContentCommandCopy,              eContentCommandEventFirst + 1)
 NS_EVENT_MESSAGE(NS_CONTENT_COMMAND_PASTE,         eContentCommandEventFirst + 2)
 NS_EVENT_MESSAGE(NS_CONTENT_COMMAND_DELETE,        eContentCommandEventFirst + 3)
 NS_EVENT_MESSAGE(NS_CONTENT_COMMAND_UNDO,          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
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -3032,17 +3032,17 @@ nsWindow::OnKeyPressEvent(GdkEventKey *a
         case XF86XK_Search:
             return DispatchCommandEvent(nsGkAtoms::Search);
         case XF86XK_Favorites:
             return DispatchCommandEvent(nsGkAtoms::Bookmarks);
         case XF86XK_HomePage:
             return DispatchCommandEvent(nsGkAtoms::Home);
         case XF86XK_Copy:
         case GDK_F16:  // F16, F20, F18, F14 are old keysyms for Copy Cut Paste Undo
-            return DispatchContentCommandEvent(NS_CONTENT_COMMAND_COPY);
+            return DispatchContentCommandEvent(eContentCommandCopy);
         case XF86XK_Cut:
         case GDK_F20:
             return DispatchContentCommandEvent(eContentCommandCut);
         case XF86XK_Paste:
         case GDK_F18:
             return DispatchContentCommandEvent(NS_CONTENT_COMMAND_PASTE);
         case GDK_Redo:
             return DispatchContentCommandEvent(NS_CONTENT_COMMAND_REDO);
--- a/widget/qt/nsWindow.cpp
+++ b/widget/qt/nsWindow.cpp
@@ -1197,17 +1197,17 @@ nsWindow::keyPressEvent(QKeyEvent* aEven
         case Qt::Key_Search:
             return DispatchCommandEvent(nsGkAtoms::Search);
         case Qt::Key_Favorites:
             return DispatchCommandEvent(nsGkAtoms::Bookmarks);
         case Qt::Key_HomePage:
             return DispatchCommandEvent(nsGkAtoms::Home);
         case Qt::Key_Copy:
         case Qt::Key_F16: // F16, F20, F18, F14 are old keysyms for Copy Cut Paste Undo
-            return DispatchContentCommandEvent(NS_CONTENT_COMMAND_COPY);
+            return DispatchContentCommandEvent(eContentCommandCopy);
         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(NS_CONTENT_COMMAND_PASTE);
         case Qt::Key_F14:
--- a/widget/windows/KeyboardLayout.cpp
+++ b/widget/windows/KeyboardLayout.cpp
@@ -1349,17 +1349,17 @@ NativeKey::HandleAppCommandMessage() con
         // We shouldn't consume the message always because if we don't handle
         // the message, the sender (typically, utility of keyboard or mouse)
         // may send other key messages which indicate well known shortcut key.
         consumed = DispatchCommandEvent(appCommand);
         break;
 
       // Use content command for following commands:
       case APPCOMMAND_COPY:
-        contentCommandMessage = NS_CONTENT_COMMAND_COPY;
+        contentCommandMessage = eContentCommandCopy;
         break;
       case APPCOMMAND_CUT:
         contentCommandMessage = eContentCommandCut;
         break;
       case APPCOMMAND_PASTE:
         contentCommandMessage = NS_CONTENT_COMMAND_PASTE;
         break;
       case APPCOMMAND_REDO:
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -5659,17 +5659,17 @@ nsWindow::ProcessMessage(UINT msg, WPARA
       WidgetContentCommandEvent command(true, eContentCommandCut, this);
       DispatchWindowEvent(&command);
       result = true;
     }
     break;
 
     case WM_COPY:
     {
-      WidgetContentCommandEvent command(true, NS_CONTENT_COMMAND_COPY, this);
+      WidgetContentCommandEvent command(true, eContentCommandCopy, this);
       DispatchWindowEvent(&command);
       result = true;
     }
     break;
 
     case WM_PASTE:
     {
       WidgetContentCommandEvent command(true, NS_CONTENT_COMMAND_PASTE, this);