Bug 895274 part.166 Rename NS_CONTENT_COMMAND_DELETE to eContentCommandDelete r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Fri, 11 Sep 2015 01:59:52 +0900
changeset 296120 fc17970a9de262e7408326cfc5ce8f26b936bbfc
parent 296119 4bc7de51bb6ef20f52ac77b6d58d3df281e9e8db
child 296121 5863be1170c9bffe100db5bc150cba567a4f97e7
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.166 Rename NS_CONTENT_COMMAND_DELETE to eContentCommandDelete r=smaug
dom/base/nsDOMWindowUtils.cpp
dom/events/EventStateManager.cpp
widget/EventMessageList.h
widget/cocoa/TextInputHandler.mm
widget/gtk/IMContextWrapper.cpp
widget/windows/nsWindow.cpp
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -2057,17 +2057,17 @@ nsDOMWindowUtils::SendContentCommandEven
   EventMessage msg;
   if (aType.EqualsLiteral("cut"))
     msg = eContentCommandCut;
   else if (aType.EqualsLiteral("copy"))
     msg = eContentCommandCopy;
   else if (aType.EqualsLiteral("paste"))
     msg = eContentCommandPaste;
   else if (aType.EqualsLiteral("delete"))
-    msg = NS_CONTENT_COMMAND_DELETE;
+    msg = eContentCommandDelete;
   else if (aType.EqualsLiteral("undo"))
     msg = NS_CONTENT_COMMAND_UNDO;
   else if (aType.EqualsLiteral("redo"))
     msg = NS_CONTENT_COMMAND_REDO;
   else if (aType.EqualsLiteral("pasteTransferable"))
     msg = eContentCommandPasteTransferable;
   else
     return NS_ERROR_FAILURE;
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -745,17 +745,17 @@ EventStateManager::PreHandleEvent(nsPres
     break;
   case eSetSelection:
     IMEStateManager::HandleSelectionEvent(aPresContext, GetFocusedContent(),
                                           aEvent->AsSelectionEvent());
     break;
   case eContentCommandCut:
   case eContentCommandCopy:
   case eContentCommandPaste:
-  case NS_CONTENT_COMMAND_DELETE:
+  case eContentCommandDelete:
   case NS_CONTENT_COMMAND_UNDO:
   case NS_CONTENT_COMMAND_REDO:
   case eContentCommandPasteTransferable:
     DoContentCommandEvent(aEvent->AsContentCommandEvent());
     break;
   case NS_CONTENT_COMMAND_SCROLL:
     {
       DoContentCommandScrollEvent(aEvent->AsContentCommandEvent());
@@ -5041,17 +5041,17 @@ EventStateManager::DoContentCommandEvent
       cmd = "cmd_cut";
       break;
     case eContentCommandCopy:
       cmd = "cmd_copy";
       break;
     case eContentCommandPaste:
       cmd = "cmd_paste";
       break;
-    case NS_CONTENT_COMMAND_DELETE:
+    case eContentCommandDelete:
       cmd = "cmd_delete";
       break;
     case NS_CONTENT_COMMAND_UNDO:
       cmd = "cmd_undo";
       break;
     case NS_CONTENT_COMMAND_REDO:
       cmd = "cmd_redo";
       break;
--- a/widget/EventMessageList.h
+++ b/widget/EventMessageList.h
@@ -298,17 +298,17 @@ NS_EVENT_MESSAGE(eSelectionEventFirst,  
 // 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(eContentCommandCopy,              eContentCommandEventFirst + 1)
 NS_EVENT_MESSAGE(eContentCommandPaste,             eContentCommandEventFirst + 2)
-NS_EVENT_MESSAGE(NS_CONTENT_COMMAND_DELETE,        eContentCommandEventFirst + 3)
+NS_EVENT_MESSAGE(eContentCommandDelete,            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
 // will scroll an element scrollable in either direction.  I.e., if the nearest
 // scrollable ancestor element can only be scrolled vertically, and horizontal
--- a/widget/cocoa/TextInputHandler.mm
+++ b/widget/cocoa/TextInputHandler.mm
@@ -2094,18 +2094,17 @@ TextInputHandler::InsertText(NSAttribute
     // If this is caused by a key input, the keypress event which will be
     // dispatched later should cause the delete.  Therefore, nothing to do here.
     // Although, we're not sure if such case is actually possible.
     if (!currentKeyEvent) {
       return;
     }
     // Delete the selected range.
     nsRefPtr<TextInputHandler> kungFuDeathGrip(this);
-    WidgetContentCommandEvent deleteCommandEvent(true,
-                                                 NS_CONTENT_COMMAND_DELETE,
+    WidgetContentCommandEvent deleteCommandEvent(true, eContentCommandDelete,
                                                  mWidget);
     DispatchEvent(deleteCommandEvent);
     NS_ENSURE_TRUE_VOID(deleteCommandEvent.mSucceeded);
     // Be aware! The widget might be destroyed here.
     return;
   }
 
   if (str.Length() != 1 || IsIMEComposing()) {
--- a/widget/gtk/IMContextWrapper.cpp
+++ b/widget/gtk/IMContextWrapper.cpp
@@ -2075,18 +2075,17 @@ IMContextWrapper::DeleteText(GtkIMContex
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
             ("GTKIM: %p   DeleteText(), FAILED, setting selection caused "
              "focus change or window destroyed",
              this));
         return NS_ERROR_FAILURE;
     }
 
     // Delete the selection
-    WidgetContentCommandEvent contentCommandEvent(true,
-                                                  NS_CONTENT_COMMAND_DELETE,
+    WidgetContentCommandEvent contentCommandEvent(true, eContentCommandDelete,
                                                   mLastFocusedWindow);
     mLastFocusedWindow->DispatchEvent(&contentCommandEvent, status);
 
     if (!contentCommandEvent.mSucceeded ||
         lastFocusedWindow != mLastFocusedWindow ||
         lastFocusedWindow->Destroyed()) {
         MOZ_LOG(gGtkIMLog, LogLevel::Error,
             ("GTKIM: %p   DeleteText(), FAILED, deleting the selection caused "
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -5643,17 +5643,17 @@ nsWindow::ProcessMessage(UINT msg, WPARA
           mGesture.SetWinGestureSupport(mWnd, gestureNotifyEvent.panDirection);
       }
       result = false; //should always bubble to DefWindowProc
     }
     break;
 
     case WM_CLEAR:
     {
-      WidgetContentCommandEvent command(true, NS_CONTENT_COMMAND_DELETE, this);
+      WidgetContentCommandEvent command(true, eContentCommandDelete, this);
       DispatchWindowEvent(&command);
       result = true;
     }
     break;
 
     case WM_CUT:
     {
       WidgetContentCommandEvent command(true, eContentCommandCut, this);