Bug 1260651 part.34 Rename editor command classes and their file names r?mccr8 draft
authorMasayuki Nakano <masayuki@d-toybox.com>
Fri, 24 Jun 2016 11:45:22 +0900
changeset 385724 34af67d205ccec153580f67e34f7c9871d1728ea
parent 385723 ee1f724a1fefdb57a3e9f4dc5cd4440e8c43a853
child 385725 3ddbf5d1bde11c5b89bd7b2ec393ef7502540e3b
push id22582
push usermasayuki@d-toybox.com
push dateSat, 09 Jul 2016 03:13:39 +0000
reviewersmccr8
bugs1260651
milestone50.0a1
Bug 1260651 part.34 Rename editor command classes and their file names r?mccr8 This patch renames editor command classes listed below: * nsBaseEditorCommand -> mozilla::EditorCommandBase * nsUndoCommand -> mozilla::UndoCommand * nsRedoCommand -> mozilla::RedoCommand * nsClearUndoCommand -> mozilla::ClearUndoCommand * nsCutCommand -> mozilla::CutCommand * nsCutOrDeleteCommand -> mozilla::CutOrDeleteCommand * nsCopyCommand -> mozilla::CopyCommand * nsCopyOrDeleteCommand -> mozilla::CopyOrDeleteCommand * nsCopyAndCollapseToEndCommand -> mozilla::CopyAndCollapseToEndCommand * nsPasteCommand -> mozilla::PasteCommand * nsPasteTransferableCommand -> mozilla::PasteTransferableCommand * nsSwitchTextDirectionCommand -> mozilla::SwitchTextDirectionCommand * nsDeleteCommand -> mozilla::DeleteCommand * nsSelectAllCommand -> mozilla::SelectAllCommand * nsSelectionMoveCommands -> mozilla::SelectionMoveCommands * nsInsertPlaintextCommand -> mozilla::InsertPlaintextCommand * nsPasteQuotationCommand -> mozilla::PasteQuotationCommand MozReview-Commit-ID: Lf6Lc39FpqM
editor/libeditor/EditorCommands.cpp
editor/libeditor/EditorCommands.h
editor/libeditor/EditorController.cpp
editor/libeditor/moz.build
editor/libeditor/nsEditorCommands.cpp
editor/libeditor/nsEditorCommands.h
rename from editor/libeditor/nsEditorCommands.cpp
rename to editor/libeditor/EditorCommands.cpp
--- a/editor/libeditor/nsEditorCommands.cpp
+++ b/editor/libeditor/EditorCommands.cpp
@@ -1,14 +1,14 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "nsEditorCommands.h"
+#include "EditorCommands.h"
 
 #include "mozFlushType.h"
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/Assertions.h"
 #include "nsCOMPtr.h"
 #include "nsCRT.h"
 #include "nsDebug.h"
 #include "nsError.h"
@@ -26,364 +26,411 @@
 #include "nsString.h"
 #include "nsAString.h"
 
 class nsISupports;
 
 #define STATE_ENABLED "state_enabled"
 #define STATE_DATA "state_data"
 
-nsBaseEditorCommand::nsBaseEditorCommand() {}
+namespace mozilla {
+
+/******************************************************************************
+ * mozilla::EditorCommandBase
+ ******************************************************************************/
 
-NS_IMPL_ISUPPORTS(nsBaseEditorCommand, nsIControllerCommand)
+EditorCommandBase::EditorCommandBase()
+{
+}
+
+NS_IMPL_ISUPPORTS(EditorCommandBase, nsIControllerCommand)
+
+/******************************************************************************
+ * mozilla::UndoCommand
+ ******************************************************************************/
 
 NS_IMETHODIMP
-nsUndoCommand::IsCommandEnabled(const char *aCommandName,
-                                nsISupports *aCommandRefCon,
-                                bool *outCmdEnabled)
+UndoCommand::IsCommandEnabled(const char* aCommandName,
+                              nsISupports* aCommandRefCon,
+                              bool* aIsEnabled)
 {
-  NS_ENSURE_ARG_POINTER(outCmdEnabled);
+  NS_ENSURE_ARG_POINTER(aIsEnabled);
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
   if (editor) {
     bool isEnabled, isEditable = false;
     nsresult rv = editor->GetIsSelectionEditable(&isEditable);
     NS_ENSURE_SUCCESS(rv, rv);
     if (isEditable)
-      return editor->CanUndo(&isEnabled, outCmdEnabled);
+      return editor->CanUndo(&isEnabled, aIsEnabled);
   }
 
-  *outCmdEnabled = false;
+  *aIsEnabled = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsUndoCommand::DoCommand(const char *aCommandName, nsISupports *aCommandRefCon)
+UndoCommand::DoCommand(const char* aCommandName,
+                       nsISupports* aCommandRefCon)
 {
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
   if (editor)
     return editor->Undo(1);
 
   return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
-nsUndoCommand::DoCommandParams(const char *aCommandName,
-                               nsICommandParams *aParams,
-                               nsISupports *aCommandRefCon)
+UndoCommand::DoCommandParams(const char* aCommandName,
+                             nsICommandParams* aParams,
+                             nsISupports* aCommandRefCon)
 {
   return DoCommand(aCommandName, aCommandRefCon);
 }
 
 NS_IMETHODIMP
-nsUndoCommand::GetCommandStateParams(const char *aCommandName,
-                                     nsICommandParams *aParams,
-                                     nsISupports *aCommandRefCon)
+UndoCommand::GetCommandStateParams(const char* aCommandName,
+                                   nsICommandParams* aParams,
+                                   nsISupports* aCommandRefCon)
 {
   bool canUndo;
   IsCommandEnabled(aCommandName, aCommandRefCon, &canUndo);
   return aParams->SetBooleanValue(STATE_ENABLED, canUndo);
 }
 
+/******************************************************************************
+ * mozilla::RedoCommand
+ ******************************************************************************/
+
 NS_IMETHODIMP
-nsRedoCommand::IsCommandEnabled(const char *aCommandName,
-                                nsISupports *aCommandRefCon,
-                                bool *outCmdEnabled)
+RedoCommand::IsCommandEnabled(const char* aCommandName,
+                              nsISupports* aCommandRefCon,
+                              bool* aIsEnabled)
 {
-  NS_ENSURE_ARG_POINTER(outCmdEnabled);
+  NS_ENSURE_ARG_POINTER(aIsEnabled);
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
   if (editor) {
     bool isEnabled, isEditable = false;
     nsresult rv = editor->GetIsSelectionEditable(&isEditable);
     NS_ENSURE_SUCCESS(rv, rv);
     if (isEditable)
-      return editor->CanRedo(&isEnabled, outCmdEnabled);
+      return editor->CanRedo(&isEnabled, aIsEnabled);
   }
 
-  *outCmdEnabled = false;
+  *aIsEnabled = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsRedoCommand::DoCommand(const char *aCommandName, nsISupports *aCommandRefCon)
+RedoCommand::DoCommand(const char* aCommandName,
+                       nsISupports* aCommandRefCon)
 {
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
   if (editor)
     return editor->Redo(1);
 
   return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
-nsRedoCommand::DoCommandParams(const char *aCommandName,
-                               nsICommandParams *aParams,
-                               nsISupports *aCommandRefCon)
+RedoCommand::DoCommandParams(const char* aCommandName,
+                             nsICommandParams* aParams,
+                             nsISupports* aCommandRefCon)
 {
   return DoCommand(aCommandName, aCommandRefCon);
 }
 
 NS_IMETHODIMP
-nsRedoCommand::GetCommandStateParams(const char *aCommandName,
-                                     nsICommandParams *aParams,
-                                     nsISupports *aCommandRefCon)
+RedoCommand::GetCommandStateParams(const char* aCommandName,
+                                   nsICommandParams* aParams,
+                                   nsISupports* aCommandRefCon)
 {
   bool canUndo;
   IsCommandEnabled(aCommandName, aCommandRefCon, &canUndo);
   return aParams->SetBooleanValue(STATE_ENABLED, canUndo);
 }
 
+/******************************************************************************
+ * mozilla::ClearUndoCommand
+ ******************************************************************************/
+
 NS_IMETHODIMP
-nsClearUndoCommand::IsCommandEnabled(const char *aCommandName,
-                                     nsISupports *refCon, bool *outCmdEnabled)
+ClearUndoCommand::IsCommandEnabled(const char* aCommandName,
+                                   nsISupports* aCommandRefCon,
+                                   bool* aIsEnabled)
 {
-  NS_ENSURE_ARG_POINTER(outCmdEnabled);
-  nsCOMPtr<nsIEditor> editor = do_QueryInterface(refCon);
+  NS_ENSURE_ARG_POINTER(aIsEnabled);
+  nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
   if (editor)
-    return editor->GetIsSelectionEditable(outCmdEnabled);
+    return editor->GetIsSelectionEditable(aIsEnabled);
 
-  *outCmdEnabled = false;
+  *aIsEnabled = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsClearUndoCommand::DoCommand(const char *aCommandName, nsISupports *refCon)
+ClearUndoCommand::DoCommand(const char* aCommandName,
+                            nsISupports* aCommandRefCon)
 {
-  nsCOMPtr<nsIEditor> editor = do_QueryInterface(refCon);
+  nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
   NS_ENSURE_TRUE(editor, NS_ERROR_NOT_IMPLEMENTED);
 
   editor->EnableUndo(false); // Turning off undo clears undo/redo stacks.
   editor->EnableUndo(true);  // This re-enables undo/redo.
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsClearUndoCommand::DoCommandParams(const char *aCommandName,
-                                    nsICommandParams *aParams,
-                                    nsISupports *refCon)
+ClearUndoCommand::DoCommandParams(const char* aCommandName,
+                                  nsICommandParams* aParams,
+                                  nsISupports* aCommandRefCon)
 {
-  return DoCommand(aCommandName, refCon);
+  return DoCommand(aCommandName, aCommandRefCon);
 }
 
 NS_IMETHODIMP
-nsClearUndoCommand::GetCommandStateParams(const char *aCommandName,
-                                          nsICommandParams *aParams,
-                                          nsISupports *refCon)
+ClearUndoCommand::GetCommandStateParams(const char* aCommandName,
+                                        nsICommandParams* aParams,
+                                        nsISupports* aCommandRefCon)
 {
   NS_ENSURE_ARG_POINTER(aParams);
 
   bool enabled;
-  nsresult rv = IsCommandEnabled(aCommandName, refCon, &enabled);
+  nsresult rv = IsCommandEnabled(aCommandName, aCommandRefCon, &enabled);
   NS_ENSURE_SUCCESS(rv, rv);
 
   return aParams->SetBooleanValue(STATE_ENABLED, enabled);
 }
 
+/******************************************************************************
+ * mozilla::CutCommand
+ ******************************************************************************/
+
 NS_IMETHODIMP
-nsCutCommand::IsCommandEnabled(const char *aCommandName,
-                               nsISupports *aCommandRefCon, bool *outCmdEnabled)
+CutCommand::IsCommandEnabled(const char* aCommandName,
+                             nsISupports* aCommandRefCon,
+                             bool* aIsEnabled)
 {
-  NS_ENSURE_ARG_POINTER(outCmdEnabled);
+  NS_ENSURE_ARG_POINTER(aIsEnabled);
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
   if (editor) {
     bool isEditable = false;
     nsresult rv = editor->GetIsSelectionEditable(&isEditable);
     NS_ENSURE_SUCCESS(rv, rv);
     if (isEditable)
-      return editor->CanCut(outCmdEnabled);
+      return editor->CanCut(aIsEnabled);
   }
 
-  *outCmdEnabled = false;
+  *aIsEnabled = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsCutCommand::DoCommand(const char *aCommandName, nsISupports *aCommandRefCon)
+CutCommand::DoCommand(const char* aCommandName,
+                      nsISupports* aCommandRefCon)
 {
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
   if (editor)
     return editor->Cut();
 
   return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
-nsCutCommand::DoCommandParams(const char *aCommandName,
-                              nsICommandParams *aParams,
-                              nsISupports *aCommandRefCon)
+CutCommand::DoCommandParams(const char* aCommandName,
+                            nsICommandParams* aParams,
+                            nsISupports* aCommandRefCon)
 {
   return DoCommand(aCommandName, aCommandRefCon);
 }
 
 NS_IMETHODIMP
-nsCutCommand::GetCommandStateParams(const char *aCommandName,
-                                    nsICommandParams *aParams,
-                                    nsISupports *aCommandRefCon)
+CutCommand::GetCommandStateParams(const char* aCommandName,
+                                  nsICommandParams* aParams,
+                                  nsISupports* aCommandRefCon)
 {
   bool canUndo;
   IsCommandEnabled(aCommandName, aCommandRefCon, &canUndo);
   return aParams->SetBooleanValue(STATE_ENABLED, canUndo);
 }
 
+/******************************************************************************
+ * mozilla::CutOrDeleteCommand
+ ******************************************************************************/
+
 NS_IMETHODIMP
-nsCutOrDeleteCommand::IsCommandEnabled(const char *aCommandName,
-                                       nsISupports *aCommandRefCon,
-                                       bool *outCmdEnabled)
+CutOrDeleteCommand::IsCommandEnabled(const char* aCommandName,
+                                     nsISupports* aCommandRefCon,
+                                     bool* aIsEnabled)
 {
-  NS_ENSURE_ARG_POINTER(outCmdEnabled);
+  NS_ENSURE_ARG_POINTER(aIsEnabled);
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
   if (editor)
-    return editor->GetIsSelectionEditable(outCmdEnabled);
+    return editor->GetIsSelectionEditable(aIsEnabled);
 
-  *outCmdEnabled = false;
+  *aIsEnabled = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsCutOrDeleteCommand::DoCommand(const char *aCommandName,
-                                nsISupports *aCommandRefCon)
+CutOrDeleteCommand::DoCommand(const char* aCommandName,
+                              nsISupports* aCommandRefCon)
 {
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
   if (editor) {
     nsCOMPtr<nsISelection> selection;
     nsresult rv = editor->GetSelection(getter_AddRefs(selection));
     if (NS_SUCCEEDED(rv) && selection && selection->Collapsed()) {
       return editor->DeleteSelection(nsIEditor::eNext, nsIEditor::eStrip);
     }
     return editor->Cut();
   }
 
   return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
-nsCutOrDeleteCommand::DoCommandParams(const char *aCommandName,
-                                      nsICommandParams *aParams,
-                                      nsISupports *aCommandRefCon)
+CutOrDeleteCommand::DoCommandParams(const char* aCommandName,
+                                    nsICommandParams* aParams,
+                                    nsISupports* aCommandRefCon)
 {
   return DoCommand(aCommandName, aCommandRefCon);
 }
 
 NS_IMETHODIMP
-nsCutOrDeleteCommand::GetCommandStateParams(const char *aCommandName,
-                                            nsICommandParams *aParams,
-                                            nsISupports *aCommandRefCon)
+CutOrDeleteCommand::GetCommandStateParams(const char* aCommandName,
+                                          nsICommandParams* aParams,
+                                          nsISupports* aCommandRefCon)
 {
   bool canUndo;
   IsCommandEnabled(aCommandName, aCommandRefCon, &canUndo);
   return aParams->SetBooleanValue(STATE_ENABLED, canUndo);
 }
 
+/******************************************************************************
+ * mozilla::CopyCommand
+ ******************************************************************************/
+
 NS_IMETHODIMP
-nsCopyCommand::IsCommandEnabled(const char *aCommandName,
-                                nsISupports *aCommandRefCon,
-                                bool *outCmdEnabled)
+CopyCommand::IsCommandEnabled(const char* aCommandName,
+                              nsISupports* aCommandRefCon,
+                              bool* aIsEnabled)
 {
-  NS_ENSURE_ARG_POINTER(outCmdEnabled);
+  NS_ENSURE_ARG_POINTER(aIsEnabled);
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
   if (editor)
-    return editor->CanCopy(outCmdEnabled);
+    return editor->CanCopy(aIsEnabled);
 
-  *outCmdEnabled = false;
+  *aIsEnabled = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsCopyCommand::DoCommand(const char *aCommandName, nsISupports *aCommandRefCon)
+CopyCommand::DoCommand(const char* aCommandName,
+                       nsISupports* aCommandRefCon)
 {
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
   if (editor)
     return editor->Copy();
 
   return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
-nsCopyCommand::DoCommandParams(const char *aCommandName,
-                               nsICommandParams *aParams,
-                               nsISupports *aCommandRefCon)
+CopyCommand::DoCommandParams(const char* aCommandName,
+                             nsICommandParams* aParams,
+                             nsISupports* aCommandRefCon)
 {
   return DoCommand(aCommandName, aCommandRefCon);
 }
 
 NS_IMETHODIMP
-nsCopyCommand::GetCommandStateParams(const char *aCommandName,
-                                     nsICommandParams *aParams,
-                                     nsISupports *aCommandRefCon)
+CopyCommand::GetCommandStateParams(const char* aCommandName,
+                                   nsICommandParams* aParams,
+                                   nsISupports* aCommandRefCon)
 {
   bool canUndo;
   IsCommandEnabled(aCommandName, aCommandRefCon, &canUndo);
   return aParams->SetBooleanValue(STATE_ENABLED, canUndo);
 }
 
+/******************************************************************************
+ * mozilla::CopyOrDeleteCommand
+ ******************************************************************************/
+
 NS_IMETHODIMP
-nsCopyOrDeleteCommand::IsCommandEnabled(const char *aCommandName,
-                                        nsISupports *aCommandRefCon,
-                                        bool *outCmdEnabled)
+CopyOrDeleteCommand::IsCommandEnabled(const char* aCommandName,
+                                      nsISupports* aCommandRefCon,
+                                      bool* aIsEnabled)
 {
-  NS_ENSURE_ARG_POINTER(outCmdEnabled);
+  NS_ENSURE_ARG_POINTER(aIsEnabled);
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
   if (editor)
-    return editor->GetIsSelectionEditable(outCmdEnabled);
+    return editor->GetIsSelectionEditable(aIsEnabled);
 
-  *outCmdEnabled = false;
+  *aIsEnabled = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsCopyOrDeleteCommand::DoCommand(const char *aCommandName,
-                                 nsISupports *aCommandRefCon)
+CopyOrDeleteCommand::DoCommand(const char* aCommandName,
+                               nsISupports* aCommandRefCon)
 {
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
   if (editor) {
     nsCOMPtr<nsISelection> selection;
     nsresult rv = editor->GetSelection(getter_AddRefs(selection));
     if (NS_SUCCEEDED(rv) && selection && selection->Collapsed()) {
       return editor->DeleteSelection(nsIEditor::eNextWord, nsIEditor::eStrip);
     }
     return editor->Copy();
   }
 
   return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
-nsCopyOrDeleteCommand::DoCommandParams(const char *aCommandName,
-                                       nsICommandParams *aParams,
-                                       nsISupports *aCommandRefCon)
+CopyOrDeleteCommand::DoCommandParams(const char* aCommandName,
+                                     nsICommandParams* aParams,
+                                     nsISupports* aCommandRefCon)
 {
   return DoCommand(aCommandName, aCommandRefCon);
 }
 
 NS_IMETHODIMP
-nsCopyOrDeleteCommand::GetCommandStateParams(const char *aCommandName,
-                                             nsICommandParams *aParams,
-                                             nsISupports *aCommandRefCon)
+CopyOrDeleteCommand::GetCommandStateParams(const char* aCommandName,
+                                           nsICommandParams* aParams,
+                                           nsISupports* aCommandRefCon)
 {
   bool canUndo;
   IsCommandEnabled(aCommandName, aCommandRefCon, &canUndo);
   return aParams->SetBooleanValue(STATE_ENABLED, canUndo);
 }
 
+/******************************************************************************
+ * mozilla::CopyAndCollapseToEndCommand
+ ******************************************************************************/
+
 NS_IMETHODIMP
-nsCopyAndCollapseToEndCommand::IsCommandEnabled(const char *aCommandName,
-                                                nsISupports *aCommandRefCon,
-                                                bool *outCmdEnabled)
+CopyAndCollapseToEndCommand::IsCommandEnabled(const char* aCommandName,
+                                              nsISupports* aCommandRefCon,
+                                              bool* aIsEnabled)
 {
-  NS_ENSURE_ARG_POINTER(outCmdEnabled);
+  NS_ENSURE_ARG_POINTER(aIsEnabled);
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
   if (editor)
-    return editor->CanCopy(outCmdEnabled);
+    return editor->CanCopy(aIsEnabled);
 
-  *outCmdEnabled = false;
+  *aIsEnabled = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsCopyAndCollapseToEndCommand::DoCommand(const char *aCommandName,
-                                         nsISupports *aCommandRefCon)
+CopyAndCollapseToEndCommand::DoCommand(const char* aCommandName,
+                                       nsISupports* aCommandRefCon)
 {
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
   if (editor) {
     nsresult rv = editor->Copy();
     if (NS_FAILED(rv)) {
       return rv;
     }
 
@@ -394,127 +441,136 @@ nsCopyAndCollapseToEndCommand::DoCommand
     }
     return rv;
   }
 
   return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
-nsCopyAndCollapseToEndCommand::DoCommandParams(const char *aCommandName,
-                                               nsICommandParams *aParams,
-                                               nsISupports *aCommandRefCon)
+CopyAndCollapseToEndCommand::DoCommandParams(const char* aCommandName,
+                                             nsICommandParams* aParams,
+                                             nsISupports* aCommandRefCon)
 {
   return DoCommand(aCommandName, aCommandRefCon);
 }
 
 NS_IMETHODIMP
-nsCopyAndCollapseToEndCommand::GetCommandStateParams(
-  const char *aCommandName, nsICommandParams *aParams,
-  nsISupports *aCommandRefCon)
+CopyAndCollapseToEndCommand::GetCommandStateParams(const char* aCommandName,
+                                                   nsICommandParams* aParams,
+                                                   nsISupports* aCommandRefCon)
 {
   bool canUndo;
   IsCommandEnabled(aCommandName, aCommandRefCon, &canUndo);
   return aParams->SetBooleanValue(STATE_ENABLED, canUndo);
 }
 
+/******************************************************************************
+ * mozilla::PasteCommand
+ ******************************************************************************/
+
 NS_IMETHODIMP
-nsPasteCommand::IsCommandEnabled(const char *aCommandName,
-                                 nsISupports *aCommandRefCon,
-                                 bool *outCmdEnabled)
+PasteCommand::IsCommandEnabled(const char* aCommandName,
+                               nsISupports* aCommandRefCon,
+                               bool* aIsEnabled)
 {
-  NS_ENSURE_ARG_POINTER(outCmdEnabled);
+  NS_ENSURE_ARG_POINTER(aIsEnabled);
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
   if (editor) {
     bool isEditable = false;
     nsresult rv = editor->GetIsSelectionEditable(&isEditable);
     NS_ENSURE_SUCCESS(rv, rv);
     if (isEditable)
-      return editor->CanPaste(nsIClipboard::kGlobalClipboard, outCmdEnabled);
+      return editor->CanPaste(nsIClipboard::kGlobalClipboard, aIsEnabled);
   }
 
-  *outCmdEnabled = false;
+  *aIsEnabled = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsPasteCommand::DoCommand(const char *aCommandName, nsISupports *aCommandRefCon)
+PasteCommand::DoCommand(const char* aCommandName,
+                        nsISupports* aCommandRefCon)
 {
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
   NS_ENSURE_TRUE(editor, NS_ERROR_FAILURE);
 
   return editor->Paste(nsIClipboard::kGlobalClipboard);
 }
 
 NS_IMETHODIMP
-nsPasteCommand::DoCommandParams(const char *aCommandName,
-                                nsICommandParams *aParams,
-                                nsISupports *aCommandRefCon)
+PasteCommand::DoCommandParams(const char* aCommandName,
+                              nsICommandParams* aParams,
+                              nsISupports* aCommandRefCon)
 {
   return DoCommand(aCommandName, aCommandRefCon);
 }
 
 NS_IMETHODIMP
-nsPasteCommand::GetCommandStateParams(const char *aCommandName,
-                                      nsICommandParams *aParams,
-                                      nsISupports *aCommandRefCon)
+PasteCommand::GetCommandStateParams(const char* aCommandName,
+                                    nsICommandParams* aParams,
+                                    nsISupports* aCommandRefCon)
 {
   bool canUndo;
   IsCommandEnabled(aCommandName, aCommandRefCon, &canUndo);
   return aParams->SetBooleanValue(STATE_ENABLED, canUndo);
 }
 
+/******************************************************************************
+ * mozilla::PasteTransferableCommand
+ ******************************************************************************/
+
 NS_IMETHODIMP
-nsPasteTransferableCommand::IsCommandEnabled(const char *aCommandName,
-                                             nsISupports *aCommandRefCon,
-                                             bool *outCmdEnabled)
+PasteTransferableCommand::IsCommandEnabled(const char* aCommandName,
+                                           nsISupports* aCommandRefCon,
+                                           bool* aIsEnabled)
 {
-  NS_ENSURE_ARG_POINTER(outCmdEnabled);
+  NS_ENSURE_ARG_POINTER(aIsEnabled);
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
   if (editor) {
     bool isEditable = false;
     nsresult rv = editor->GetIsSelectionEditable(&isEditable);
     NS_ENSURE_SUCCESS(rv, rv);
     if (isEditable)
-      return editor->CanPasteTransferable(nullptr, outCmdEnabled);
+      return editor->CanPasteTransferable(nullptr, aIsEnabled);
   }
 
-  *outCmdEnabled = false;
+  *aIsEnabled = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsPasteTransferableCommand::DoCommand(const char *aCommandName,
-                                      nsISupports *aCommandRefCon)
+PasteTransferableCommand::DoCommand(const char* aCommandName,
+                                    nsISupports* aCommandRefCon)
 {
   return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
-nsPasteTransferableCommand::DoCommandParams(const char *aCommandName,
-                                            nsICommandParams *aParams,
-                                            nsISupports *aCommandRefCon)
+PasteTransferableCommand::DoCommandParams(const char* aCommandName,
+                                          nsICommandParams* aParams,
+                                          nsISupports* aCommandRefCon)
 {
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
   NS_ENSURE_TRUE(editor, NS_ERROR_FAILURE);
 
   nsCOMPtr<nsISupports> supports;
   aParams->GetISupportsValue("transferable", getter_AddRefs(supports));
   NS_ENSURE_TRUE(supports, NS_ERROR_FAILURE);
 
   nsCOMPtr<nsITransferable> trans = do_QueryInterface(supports);
   NS_ENSURE_TRUE(trans, NS_ERROR_FAILURE);
 
   return editor->PasteTransferable(trans);
 }
 
 NS_IMETHODIMP
-nsPasteTransferableCommand::GetCommandStateParams(const char *aCommandName,
-                                                  nsICommandParams *aParams,
-                                                  nsISupports *aCommandRefCon)
+PasteTransferableCommand::GetCommandStateParams(const char* aCommandName,
+                                                nsICommandParams* aParams,
+                                                nsISupports* aCommandRefCon)
 {
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
   NS_ENSURE_TRUE(editor, NS_ERROR_FAILURE);
 
   nsCOMPtr<nsITransferable> trans;
 
   nsCOMPtr<nsISupports> supports;
   aParams->GetISupportsValue("transferable", getter_AddRefs(supports));
@@ -525,88 +581,96 @@ nsPasteTransferableCommand::GetCommandSt
 
   bool canPaste;
   nsresult rv = editor->CanPasteTransferable(trans, &canPaste);
   NS_ENSURE_SUCCESS(rv, rv);
 
   return aParams->SetBooleanValue(STATE_ENABLED, canPaste);
 }
 
+/******************************************************************************
+ * mozilla::SwitchTextDirectionCommand
+ ******************************************************************************/
+
 NS_IMETHODIMP
-nsSwitchTextDirectionCommand::IsCommandEnabled(const char *aCommandName,
-                                               nsISupports *aCommandRefCon,
-                                               bool *outCmdEnabled)
+SwitchTextDirectionCommand::IsCommandEnabled(const char* aCommandName,
+                                             nsISupports* aCommandRefCon,
+                                             bool* aIsEnabled)
 {
-  NS_ENSURE_ARG_POINTER(outCmdEnabled);
+  NS_ENSURE_ARG_POINTER(aIsEnabled);
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
   if (editor)
-    return editor->GetIsSelectionEditable(outCmdEnabled);
+    return editor->GetIsSelectionEditable(aIsEnabled);
 
-  *outCmdEnabled = false;
+  *aIsEnabled = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsSwitchTextDirectionCommand::DoCommand(const char *aCommandName,
-                                        nsISupports *aCommandRefCon)
+SwitchTextDirectionCommand::DoCommand(const char* aCommandName,
+                                      nsISupports* aCommandRefCon)
 {
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
   NS_ENSURE_TRUE(editor, NS_ERROR_FAILURE);
 
   return editor->SwitchTextDirection();
 }
 
 NS_IMETHODIMP
-nsSwitchTextDirectionCommand::DoCommandParams(const char *aCommandName,
-                                              nsICommandParams *aParams,
-                                              nsISupports *aCommandRefCon)
+SwitchTextDirectionCommand::DoCommandParams(const char* aCommandName,
+                                            nsICommandParams* aParams,
+                                            nsISupports* aCommandRefCon)
 {
   return DoCommand(aCommandName, aCommandRefCon);
 }
 
 NS_IMETHODIMP
-nsSwitchTextDirectionCommand::GetCommandStateParams(const char *aCommandName,
-                                                    nsICommandParams *aParams,
-                                                    nsISupports *aCommandRefCon)
+SwitchTextDirectionCommand::GetCommandStateParams(const char* aCommandName,
+                                                  nsICommandParams* aParams,
+                                                  nsISupports* aCommandRefCon)
 {
   bool canSwitchTextDirection = true;
   IsCommandEnabled(aCommandName, aCommandRefCon, &canSwitchTextDirection);
   return aParams->SetBooleanValue(STATE_ENABLED, canSwitchTextDirection);
 }
 
+/******************************************************************************
+ * mozilla::DeleteCommand
+ ******************************************************************************/
+
 NS_IMETHODIMP
-nsDeleteCommand::IsCommandEnabled(const char *aCommandName,
-                                  nsISupports *aCommandRefCon,
-                                  bool *outCmdEnabled)
+DeleteCommand::IsCommandEnabled(const char* aCommandName,
+                                nsISupports* aCommandRefCon,
+                                bool* aIsEnabled)
 {
-  NS_ENSURE_ARG_POINTER(outCmdEnabled);
+  NS_ENSURE_ARG_POINTER(aIsEnabled);
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
-  *outCmdEnabled = false;
+  *aIsEnabled = false;
 
   if (!editor) {
     return NS_OK;
   }
 
   // We can generally delete whenever the selection is editable.  However,
   // cmd_delete doesn't make sense if the selection is collapsed because it's
   // directionless, which is the same condition under which we can't cut.
-  nsresult rv = editor->GetIsSelectionEditable(outCmdEnabled);
+  nsresult rv = editor->GetIsSelectionEditable(aIsEnabled);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  if (!nsCRT::strcmp("cmd_delete", aCommandName) && *outCmdEnabled) {
-    rv = editor->CanDelete(outCmdEnabled);
+  if (!nsCRT::strcmp("cmd_delete", aCommandName) && *aIsEnabled) {
+    rv = editor->CanDelete(aIsEnabled);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsDeleteCommand::DoCommand(const char *aCommandName,
-                           nsISupports *aCommandRefCon)
+DeleteCommand::DoCommand(const char* aCommandName,
+                         nsISupports* aCommandRefCon)
 {
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
   NS_ENSURE_TRUE(editor, NS_ERROR_FAILURE);
 
   nsIEditor::EDirection deleteDir = nsIEditor::eNone;
 
   if (!nsCRT::strcmp("cmd_delete", aCommandName)) {
     // Really this should probably be eNone, but it only makes a difference if
@@ -628,97 +692,105 @@ nsDeleteCommand::DoCommand(const char *a
   } else {
     MOZ_CRASH("Unrecognized nsDeleteCommand");
   }
 
   return editor->DeleteSelection(deleteDir, nsIEditor::eStrip);
 }
 
 NS_IMETHODIMP
-nsDeleteCommand::DoCommandParams(const char *aCommandName,
-                                 nsICommandParams *aParams,
-                                 nsISupports *aCommandRefCon)
+DeleteCommand::DoCommandParams(const char* aCommandName,
+                               nsICommandParams* aParams,
+                               nsISupports* aCommandRefCon)
 {
   return DoCommand(aCommandName, aCommandRefCon);
 }
 
 NS_IMETHODIMP
-nsDeleteCommand::GetCommandStateParams(const char *aCommandName,
-                                       nsICommandParams *aParams,
-                                       nsISupports *aCommandRefCon)
+DeleteCommand::GetCommandStateParams(const char* aCommandName,
+                                     nsICommandParams* aParams,
+                                     nsISupports* aCommandRefCon)
 {
   bool canUndo;
   IsCommandEnabled(aCommandName, aCommandRefCon, &canUndo);
   return aParams->SetBooleanValue(STATE_ENABLED, canUndo);
 }
 
+/******************************************************************************
+ * mozilla::SelectAllCommand
+ ******************************************************************************/
+
 NS_IMETHODIMP
-nsSelectAllCommand::IsCommandEnabled(const char *aCommandName,
-                                     nsISupports *aCommandRefCon,
-                                     bool *outCmdEnabled)
+SelectAllCommand::IsCommandEnabled(const char* aCommandName,
+                                   nsISupports* aCommandRefCon,
+                                   bool* aIsEnabled)
 {
-  NS_ENSURE_ARG_POINTER(outCmdEnabled);
+  NS_ENSURE_ARG_POINTER(aIsEnabled);
 
   nsresult rv = NS_OK;
   // You can always select all, unless the selection is editable,
   // and the editable region is empty!
-  *outCmdEnabled = true;
+  *aIsEnabled = true;
   bool docIsEmpty;
 
   // you can select all if there is an editor which is non-empty
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
   if (editor) {
     rv = editor->GetDocumentIsEmpty(&docIsEmpty);
     NS_ENSURE_SUCCESS(rv, rv);
-    *outCmdEnabled = !docIsEmpty;
+    *aIsEnabled = !docIsEmpty;
   }
 
   return rv;
 }
 
 NS_IMETHODIMP
-nsSelectAllCommand::DoCommand(const char *aCommandName,
-                              nsISupports *aCommandRefCon)
+SelectAllCommand::DoCommand(const char* aCommandName,
+                            nsISupports* aCommandRefCon)
 {
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
   if (editor)
     return editor->SelectAll();
 
   return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
-nsSelectAllCommand::DoCommandParams(const char *aCommandName,
-                                    nsICommandParams *aParams,
-                                    nsISupports *aCommandRefCon)
+SelectAllCommand::DoCommandParams(const char* aCommandName,
+                                  nsICommandParams* aParams,
+                                  nsISupports* aCommandRefCon)
 {
   return DoCommand(aCommandName, aCommandRefCon);
 }
 
 NS_IMETHODIMP
-nsSelectAllCommand::GetCommandStateParams(const char *aCommandName,
-                                          nsICommandParams *aParams,
-                                          nsISupports *aCommandRefCon)
+SelectAllCommand::GetCommandStateParams(const char* aCommandName,
+                                        nsICommandParams* aParams,
+                                        nsISupports* aCommandRefCon)
 {
   bool canUndo;
   IsCommandEnabled(aCommandName, aCommandRefCon, &canUndo);
   return aParams->SetBooleanValue(STATE_ENABLED, canUndo);
 }
 
+/******************************************************************************
+ * mozilla::SelectionMoveCommands
+ ******************************************************************************/
+
 NS_IMETHODIMP
-nsSelectionMoveCommands::IsCommandEnabled(const char *aCommandName,
-                                          nsISupports *aCommandRefCon,
-                                          bool *outCmdEnabled)
+SelectionMoveCommands::IsCommandEnabled(const char* aCommandName,
+                                        nsISupports* aCommandRefCon,
+                                        bool* aIsEnabled)
 {
-  NS_ENSURE_ARG_POINTER(outCmdEnabled);
+  NS_ENSURE_ARG_POINTER(aIsEnabled);
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
   if (editor)
-    return editor->GetIsSelectionEditable(outCmdEnabled);
+    return editor->GetIsSelectionEditable(aIsEnabled);
 
-  *outCmdEnabled = false;
+  *aIsEnabled = false;
   return NS_OK;
 }
 
 static const struct ScrollCommand {
   const char *reverseScroll;
   const char *forwardScroll;
   nsresult (NS_STDCALL nsISelectionController::*scroll)(bool);
 } scrollCommands[] = {
@@ -777,18 +849,18 @@ static const struct PhysicalCommand {
     nsISelectionController::MOVE_RIGHT, 1 },
   { "cmd_moveUp2", "cmd_selectUp2",
     nsISelectionController::MOVE_UP, 1 },
   { "cmd_moveDown2", "cmd_selectDown2",
     nsISelectionController::MOVE_DOWN, 1 }
 };
 
 NS_IMETHODIMP
-nsSelectionMoveCommands::DoCommand(const char *aCommandName,
-                                   nsISupports *aCommandRefCon)
+SelectionMoveCommands::DoCommand(const char* aCommandName,
+                                 nsISupports* aCommandRefCon)
 {
   nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
   NS_ENSURE_TRUE(editor, NS_ERROR_FAILURE);
 
   nsCOMPtr<nsIDOMDocument> domDoc;
   editor->GetDocument(getter_AddRefs(domDoc));
   nsCOMPtr<nsIDocument> doc = do_QueryInterface(domDoc);
   if (doc) {
@@ -835,136 +907,146 @@ nsSelectionMoveCommands::DoCommand(const
       return selCont->PhysicalMove(cmd.direction, cmd.amount, true);
     }
   }
 
   return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
-nsSelectionMoveCommands::DoCommandParams(const char *aCommandName,
-                                         nsICommandParams *aParams,
-                                         nsISupports *aCommandRefCon)
+SelectionMoveCommands::DoCommandParams(const char* aCommandName,
+                                       nsICommandParams* aParams,
+                                       nsISupports* aCommandRefCon)
 {
   return DoCommand(aCommandName, aCommandRefCon);
 }
 
 NS_IMETHODIMP
-nsSelectionMoveCommands::GetCommandStateParams(const char *aCommandName,
-                                               nsICommandParams *aParams,
-                                               nsISupports *aCommandRefCon)
+SelectionMoveCommands::GetCommandStateParams(const char* aCommandName,
+                                             nsICommandParams* aParams,
+                                             nsISupports* aCommandRefCon)
 {
   bool canUndo;
   IsCommandEnabled(aCommandName, aCommandRefCon, &canUndo);
   return aParams->SetBooleanValue(STATE_ENABLED, canUndo);
 }
 
+/******************************************************************************
+ * mozilla::InsertPlaintextCommand
+ ******************************************************************************/
+
 NS_IMETHODIMP
-nsInsertPlaintextCommand::IsCommandEnabled(const char *aCommandName,
-                                           nsISupports *refCon,
-                                           bool *outCmdEnabled)
+InsertPlaintextCommand::IsCommandEnabled(const char* aCommandName,
+                                         nsISupports* aCommandRefCon,
+                                         bool* aIsEnabled)
 {
-  NS_ENSURE_ARG_POINTER(outCmdEnabled);
-  nsCOMPtr<nsIEditor> editor = do_QueryInterface(refCon);
+  NS_ENSURE_ARG_POINTER(aIsEnabled);
+  nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
   if (editor)
-    return editor->GetIsSelectionEditable(outCmdEnabled);
+    return editor->GetIsSelectionEditable(aIsEnabled);
 
-  *outCmdEnabled = false;
+  *aIsEnabled = false;
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
-nsInsertPlaintextCommand::DoCommand(const char *aCommandName,
-                                    nsISupports *refCon)
+InsertPlaintextCommand::DoCommand(const char* aCommandName,
+                                  nsISupports* aCommandRefCon)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
-nsInsertPlaintextCommand::DoCommandParams(const char *aCommandName,
-                                          nsICommandParams *aParams,
-                                          nsISupports *refCon)
+InsertPlaintextCommand::DoCommandParams(const char* aCommandName,
+                                        nsICommandParams* aParams,
+                                        nsISupports* aCommandRefCon)
 {
   NS_ENSURE_ARG_POINTER(aParams);
 
-  nsCOMPtr<nsIPlaintextEditor> editor = do_QueryInterface(refCon);
+  nsCOMPtr<nsIPlaintextEditor> editor = do_QueryInterface(aCommandRefCon);
   NS_ENSURE_TRUE(editor, NS_ERROR_NOT_IMPLEMENTED);
 
   // Get text to insert from command params
   nsAutoString text;
   nsresult rv = aParams->GetStringValue(STATE_DATA, text);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (!text.IsEmpty())
     return editor->InsertText(text);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsInsertPlaintextCommand::GetCommandStateParams(const char *aCommandName,
-                                                nsICommandParams *aParams,
-                                                nsISupports *refCon)
+InsertPlaintextCommand::GetCommandStateParams(const char* aCommandName,
+                                              nsICommandParams* aParams,
+                                              nsISupports* aCommandRefCon)
 {
   NS_ENSURE_ARG_POINTER(aParams);
 
-  bool outCmdEnabled = false;
-  IsCommandEnabled(aCommandName, refCon, &outCmdEnabled);
-  return aParams->SetBooleanValue(STATE_ENABLED, outCmdEnabled);
+  bool aIsEnabled = false;
+  IsCommandEnabled(aCommandName, aCommandRefCon, &aIsEnabled);
+  return aParams->SetBooleanValue(STATE_ENABLED, aIsEnabled);
 }
 
+/******************************************************************************
+ * mozilla::PasteQuotationCommand
+ ******************************************************************************/
+
 NS_IMETHODIMP
-nsPasteQuotationCommand::IsCommandEnabled(const char *aCommandName,
-                                          nsISupports *refCon,
-                                          bool *outCmdEnabled)
+PasteQuotationCommand::IsCommandEnabled(const char* aCommandName,
+                                        nsISupports* aCommandRefCon,
+                                        bool* aIsEnabled)
 {
-  NS_ENSURE_ARG_POINTER(outCmdEnabled);
+  NS_ENSURE_ARG_POINTER(aIsEnabled);
 
-  nsCOMPtr<nsIEditor> editor = do_QueryInterface(refCon);
-  nsCOMPtr<nsIEditorMailSupport> mailEditor = do_QueryInterface(refCon);
+  nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
+  nsCOMPtr<nsIEditorMailSupport> mailEditor = do_QueryInterface(aCommandRefCon);
   if (editor && mailEditor) {
     uint32_t flags;
     editor->GetFlags(&flags);
     if (!(flags & nsIPlaintextEditor::eEditorSingleLineMask))
-      return editor->CanPaste(nsIClipboard::kGlobalClipboard, outCmdEnabled);
+      return editor->CanPaste(nsIClipboard::kGlobalClipboard, aIsEnabled);
   }
 
-  *outCmdEnabled = false;
+  *aIsEnabled = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsPasteQuotationCommand::DoCommand(const char *aCommandName,
-                                   nsISupports *refCon)
+PasteQuotationCommand::DoCommand(const char* aCommandName,
+                                 nsISupports* aCommandRefCon)
 {
-  nsCOMPtr<nsIEditorMailSupport> mailEditor = do_QueryInterface(refCon);
+  nsCOMPtr<nsIEditorMailSupport> mailEditor = do_QueryInterface(aCommandRefCon);
   if (mailEditor)
     return mailEditor->PasteAsQuotation(nsIClipboard::kGlobalClipboard);
 
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
-nsPasteQuotationCommand::DoCommandParams(const char *aCommandName,
-                                         nsICommandParams *aParams,
-                                         nsISupports *refCon)
+PasteQuotationCommand::DoCommandParams(const char* aCommandName,
+                                       nsICommandParams* aParams,
+                                       nsISupports* aCommandRefCon)
 {
-  nsCOMPtr<nsIEditorMailSupport> mailEditor = do_QueryInterface(refCon);
+  nsCOMPtr<nsIEditorMailSupport> mailEditor = do_QueryInterface(aCommandRefCon);
   if (mailEditor)
     return mailEditor->PasteAsQuotation(nsIClipboard::kGlobalClipboard);
 
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
-nsPasteQuotationCommand::GetCommandStateParams(const char *aCommandName,
-                                               nsICommandParams *aParams,
-                                               nsISupports *refCon)
+PasteQuotationCommand::GetCommandStateParams(const char* aCommandName,
+                                             nsICommandParams* aParams,
+                                             nsISupports* aCommandRefCon)
 {
-  nsCOMPtr<nsIEditor> editor = do_QueryInterface(refCon);
+  nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
   if (editor) {
     bool enabled = false;
     editor->CanPaste(nsIClipboard::kGlobalClipboard, &enabled);
     aParams->SetBooleanValue(STATE_ENABLED, enabled);
   }
 
   return NS_OK;
 }
+
+} // namespace mozilla
rename from editor/libeditor/nsEditorCommands.h
rename to editor/libeditor/EditorCommands.h
--- a/editor/libeditor/nsEditorCommands.h
+++ b/editor/libeditor/EditorCommands.h
@@ -1,87 +1,104 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef nsIEditorCommand_h_
-#define nsIEditorCommand_h_
+#ifndef EditorCommands_h_
+#define EditorCommands_h_
 
 #include "nsIControllerCommand.h"
 #include "nsISupportsImpl.h"
 #include "nscore.h"
 
 class nsICommandParams;
 class nsISupports;
 
-// This is a virtual base class for commands registered with the editor controller.
-// Note that such commands can be shared by more than on editor instance, so
-// MUST be stateless. Any state must be stored via the refCon (an nsIEditor).
-class nsBaseEditorCommand : public nsIControllerCommand
+namespace mozilla {
+
+/**
+ * This is a virtual base class for commands registered with the editor
+ * controller.  Note that such commands can be shared by more than on editor
+ * instance, so MUST be stateless. Any state must be stored via the refCon
+ * (an nsIEditor).
+ */
+
+class EditorCommandBase : public nsIControllerCommand
 {
 public:
-  nsBaseEditorCommand();
+  EditorCommandBase();
 
   NS_DECL_ISUPPORTS
 
-  NS_IMETHOD  IsCommandEnabled(const char * aCommandName, nsISupports *aCommandRefCon, bool *_retval) override = 0;
-  NS_IMETHOD  DoCommand(const char *aCommandName, nsISupports *aCommandRefCon) override = 0;
+  NS_IMETHOD IsCommandEnabled(const char* aCommandName,
+                              nsISupports* aCommandRefCon,
+                              bool* aIsEnabled) override = 0;
+  NS_IMETHOD DoCommand(const char* aCommandName,
+                       nsISupports* aCommandRefCon) override = 0;
 
 protected:
-  virtual ~nsBaseEditorCommand() {}
+  virtual ~EditorCommandBase() {}
 };
 
 
-#define NS_DECL_EDITOR_COMMAND(_cmd)                    \
-class _cmd : public nsBaseEditorCommand                 \
-{                                                       \
-public:                                                 \
-  NS_IMETHOD IsCommandEnabled(const char * aCommandName, nsISupports *aCommandRefCon, bool *_retval) override; \
-  NS_IMETHOD DoCommand(const char *aCommandName, nsISupports *aCommandRefCon) override; \
-  NS_IMETHOD DoCommandParams(const char *aCommandName,nsICommandParams *aParams, nsISupports *aCommandRefCon) override; \
-  NS_IMETHOD GetCommandStateParams(const char *aCommandName,nsICommandParams *aParams, nsISupports *aCommandRefCon) override; \
+#define NS_DECL_EDITOR_COMMAND(_cmd)                                           \
+class _cmd final : public EditorCommandBase                                    \
+{                                                                              \
+public:                                                                        \
+  NS_IMETHOD IsCommandEnabled(const char* aCommandName,                        \
+                              nsISupports* aCommandRefCon,                     \
+                              bool* aIsEnabled) override;                      \
+  NS_IMETHOD DoCommand(const char* aCommandName,                               \
+                       nsISupports* aCommandRefCon) override;                  \
+  NS_IMETHOD DoCommandParams(const char* aCommandName,                         \
+                             nsICommandParams* aParams,                        \
+                             nsISupports* aCommandRefCon) override;            \
+  NS_IMETHOD GetCommandStateParams(const char* aCommandName,                   \
+                                   nsICommandParams* aParams,                  \
+                                   nsISupports* aCommandRefCon) override;      \
 };
 
-
-
 // basic editor commands
-NS_DECL_EDITOR_COMMAND(nsUndoCommand)
-NS_DECL_EDITOR_COMMAND(nsRedoCommand)
-NS_DECL_EDITOR_COMMAND(nsClearUndoCommand)
+NS_DECL_EDITOR_COMMAND(UndoCommand)
+NS_DECL_EDITOR_COMMAND(RedoCommand)
+NS_DECL_EDITOR_COMMAND(ClearUndoCommand)
 
-NS_DECL_EDITOR_COMMAND(nsCutCommand)
-NS_DECL_EDITOR_COMMAND(nsCutOrDeleteCommand)
-NS_DECL_EDITOR_COMMAND(nsCopyCommand)
-NS_DECL_EDITOR_COMMAND(nsCopyOrDeleteCommand)
-NS_DECL_EDITOR_COMMAND(nsCopyAndCollapseToEndCommand)
-NS_DECL_EDITOR_COMMAND(nsPasteCommand)
-NS_DECL_EDITOR_COMMAND(nsPasteTransferableCommand)
-NS_DECL_EDITOR_COMMAND(nsSwitchTextDirectionCommand)
-NS_DECL_EDITOR_COMMAND(nsDeleteCommand)
-NS_DECL_EDITOR_COMMAND(nsSelectAllCommand)
+NS_DECL_EDITOR_COMMAND(CutCommand)
+NS_DECL_EDITOR_COMMAND(CutOrDeleteCommand)
+NS_DECL_EDITOR_COMMAND(CopyCommand)
+NS_DECL_EDITOR_COMMAND(CopyOrDeleteCommand)
+NS_DECL_EDITOR_COMMAND(CopyAndCollapseToEndCommand)
+NS_DECL_EDITOR_COMMAND(PasteCommand)
+NS_DECL_EDITOR_COMMAND(PasteTransferableCommand)
+NS_DECL_EDITOR_COMMAND(SwitchTextDirectionCommand)
+NS_DECL_EDITOR_COMMAND(DeleteCommand)
+NS_DECL_EDITOR_COMMAND(SelectAllCommand)
 
-NS_DECL_EDITOR_COMMAND(nsSelectionMoveCommands)
+NS_DECL_EDITOR_COMMAND(SelectionMoveCommands)
 
 // Insert content commands
-NS_DECL_EDITOR_COMMAND(nsInsertPlaintextCommand)
-NS_DECL_EDITOR_COMMAND(nsPasteQuotationCommand)
+NS_DECL_EDITOR_COMMAND(InsertPlaintextCommand)
+NS_DECL_EDITOR_COMMAND(PasteQuotationCommand)
 
 
 #if 0
 // template for new command
 NS_IMETHODIMP
-nsFooCommand::IsCommandEnabled(const char * aCommandName, nsISupports *aCommandRefCon, bool *_retval)
+FooCommand::IsCommandEnabled(const char* aCommandName,
+                             nsISupports* aCommandRefCon,
+                             bool* aIsEnabled)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
-
 NS_IMETHODIMP
-nsFooCommand::DoCommand(const char *aCommandName, const nsAString & aCommandParams, nsISupports *aCommandRefCon)
+FooCommand::DoCommand(const char* aCommandName,
+                      const nsAString& aCommandParams,
+                      nsISupports* aCommandRefCon)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
-
-
 #endif
 
-#endif // nsIEditorCommand_h_
+} // namespace mozilla
+
+#endif // #ifndef EditorCommands_h_
--- a/editor/libeditor/EditorController.cpp
+++ b/editor/libeditor/EditorController.cpp
@@ -1,18 +1,18 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/EditorController.h"
 
+#include "EditorCommands.h"
 #include "mozilla/mozalloc.h"
 #include "nsDebug.h"
-#include "nsEditorCommands.h"
 #include "nsError.h"
 #include "nsIControllerCommandTable.h"
 
 class nsIControllerCommand;
 
 namespace mozilla {
 
 #define NS_REGISTER_ONE_COMMAND(_cmdClass, _cmdName)                           \
@@ -46,98 +46,99 @@ namespace mozilla {
 // static
 nsresult
 EditorController::RegisterEditingCommands(
                     nsIControllerCommandTable* aCommandTable)
 {
   // now register all our commands
   // These are commands that will be used in text widgets, and in composer
 
-  NS_REGISTER_ONE_COMMAND(nsUndoCommand, "cmd_undo");
-  NS_REGISTER_ONE_COMMAND(nsRedoCommand, "cmd_redo");
-  NS_REGISTER_ONE_COMMAND(nsClearUndoCommand, "cmd_clearUndo");
+  NS_REGISTER_ONE_COMMAND(UndoCommand, "cmd_undo");
+  NS_REGISTER_ONE_COMMAND(RedoCommand, "cmd_redo");
+  NS_REGISTER_ONE_COMMAND(ClearUndoCommand, "cmd_clearUndo");
 
-  NS_REGISTER_ONE_COMMAND(nsCutCommand, "cmd_cut");
-  NS_REGISTER_ONE_COMMAND(nsCutOrDeleteCommand, "cmd_cutOrDelete");
-  NS_REGISTER_ONE_COMMAND(nsCopyCommand, "cmd_copy");
-  NS_REGISTER_ONE_COMMAND(nsCopyOrDeleteCommand, "cmd_copyOrDelete");
-  NS_REGISTER_ONE_COMMAND(nsCopyAndCollapseToEndCommand,
+  NS_REGISTER_ONE_COMMAND(CutCommand, "cmd_cut");
+  NS_REGISTER_ONE_COMMAND(CutOrDeleteCommand, "cmd_cutOrDelete");
+  NS_REGISTER_ONE_COMMAND(CopyCommand, "cmd_copy");
+  NS_REGISTER_ONE_COMMAND(CopyOrDeleteCommand, "cmd_copyOrDelete");
+  NS_REGISTER_ONE_COMMAND(CopyAndCollapseToEndCommand,
                           "cmd_copyAndCollapseToEnd");
-  NS_REGISTER_ONE_COMMAND(nsSelectAllCommand, "cmd_selectAll");
+  NS_REGISTER_ONE_COMMAND(SelectAllCommand, "cmd_selectAll");
 
-  NS_REGISTER_ONE_COMMAND(nsPasteCommand, "cmd_paste");
-  NS_REGISTER_ONE_COMMAND(nsPasteTransferableCommand, "cmd_pasteTransferable");
+  NS_REGISTER_ONE_COMMAND(PasteCommand, "cmd_paste");
+  NS_REGISTER_ONE_COMMAND(PasteTransferableCommand, "cmd_pasteTransferable");
 
-  NS_REGISTER_ONE_COMMAND(nsSwitchTextDirectionCommand, "cmd_switchTextDirection");
+  NS_REGISTER_ONE_COMMAND(SwitchTextDirectionCommand,
+                          "cmd_switchTextDirection");
 
-  NS_REGISTER_FIRST_COMMAND(nsDeleteCommand, "cmd_delete");
-  NS_REGISTER_NEXT_COMMAND(nsDeleteCommand, "cmd_deleteCharBackward");
-  NS_REGISTER_NEXT_COMMAND(nsDeleteCommand, "cmd_deleteCharForward");
-  NS_REGISTER_NEXT_COMMAND(nsDeleteCommand, "cmd_deleteWordBackward");
-  NS_REGISTER_NEXT_COMMAND(nsDeleteCommand, "cmd_deleteWordForward");
-  NS_REGISTER_NEXT_COMMAND(nsDeleteCommand, "cmd_deleteToBeginningOfLine");
-  NS_REGISTER_LAST_COMMAND(nsDeleteCommand, "cmd_deleteToEndOfLine");
+  NS_REGISTER_FIRST_COMMAND(DeleteCommand, "cmd_delete");
+  NS_REGISTER_NEXT_COMMAND(DeleteCommand, "cmd_deleteCharBackward");
+  NS_REGISTER_NEXT_COMMAND(DeleteCommand, "cmd_deleteCharForward");
+  NS_REGISTER_NEXT_COMMAND(DeleteCommand, "cmd_deleteWordBackward");
+  NS_REGISTER_NEXT_COMMAND(DeleteCommand, "cmd_deleteWordForward");
+  NS_REGISTER_NEXT_COMMAND(DeleteCommand, "cmd_deleteToBeginningOfLine");
+  NS_REGISTER_LAST_COMMAND(DeleteCommand, "cmd_deleteToEndOfLine");
 
   // Insert content
-  NS_REGISTER_ONE_COMMAND(nsInsertPlaintextCommand, "cmd_insertText");
-  NS_REGISTER_ONE_COMMAND(nsPasteQuotationCommand,  "cmd_pasteQuote");
+  NS_REGISTER_ONE_COMMAND(InsertPlaintextCommand, "cmd_insertText");
+  NS_REGISTER_ONE_COMMAND(PasteQuotationCommand, "cmd_pasteQuote");
 
   return NS_OK;
 }
 
 // static
 nsresult
 EditorController::RegisterEditorCommands(
                     nsIControllerCommandTable* aCommandTable)
 {
   // These are commands that will be used in text widgets only.
 
-  NS_REGISTER_FIRST_COMMAND(nsSelectionMoveCommands, "cmd_scrollTop");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_scrollBottom");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_moveTop");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_moveBottom");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_selectTop");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_selectBottom");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_lineNext");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_linePrevious");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_selectLineNext");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_selectLinePrevious");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_charPrevious");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_charNext");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_selectCharPrevious");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_selectCharNext");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_beginLine");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_endLine");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_selectBeginLine");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_selectEndLine");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_wordPrevious");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_wordNext");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_selectWordPrevious");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_selectWordNext");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_scrollPageUp");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_scrollPageDown");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_scrollLineUp");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_scrollLineDown");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_movePageUp");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_movePageDown");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_selectPageUp");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_selectPageDown");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_moveLeft");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_moveRight");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_moveUp");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_moveDown");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_moveLeft2");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_moveRight2");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_moveUp2");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_moveDown2");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_selectLeft");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_selectRight");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_selectUp");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_selectDown");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_selectLeft2");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_selectRight2");
-  NS_REGISTER_NEXT_COMMAND(nsSelectionMoveCommands, "cmd_selectUp2");
-  NS_REGISTER_LAST_COMMAND(nsSelectionMoveCommands, "cmd_selectDown2");
+  NS_REGISTER_FIRST_COMMAND(SelectionMoveCommands, "cmd_scrollTop");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_scrollBottom");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_moveTop");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_moveBottom");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_selectTop");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_selectBottom");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_lineNext");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_linePrevious");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_selectLineNext");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_selectLinePrevious");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_charPrevious");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_charNext");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_selectCharPrevious");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_selectCharNext");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_beginLine");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_endLine");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_selectBeginLine");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_selectEndLine");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_wordPrevious");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_wordNext");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_selectWordPrevious");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_selectWordNext");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_scrollPageUp");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_scrollPageDown");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_scrollLineUp");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_scrollLineDown");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_movePageUp");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_movePageDown");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_selectPageUp");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_selectPageDown");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_moveLeft");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_moveRight");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_moveUp");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_moveDown");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_moveLeft2");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_moveRight2");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_moveUp2");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_moveDown2");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_selectLeft");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_selectRight");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_selectUp");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_selectDown");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_selectLeft2");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_selectRight2");
+  NS_REGISTER_NEXT_COMMAND(SelectionMoveCommands, "cmd_selectUp2");
+  NS_REGISTER_LAST_COMMAND(SelectionMoveCommands, "cmd_selectDown2");
 
   return NS_OK;
 }
 
 } // namespace mozilla
--- a/editor/libeditor/moz.build
+++ b/editor/libeditor/moz.build
@@ -21,25 +21,25 @@ UNIFIED_SOURCES += [
     'ChangeAttributeTransaction.cpp',
     'ChangeStyleTransaction.cpp',
     'CompositionTransaction.cpp',
     'CreateElementTransaction.cpp',
     'DeleteNodeTransaction.cpp',
     'DeleteRangeTransaction.cpp',
     'DeleteTextTransaction.cpp',
     'EditAggregateTransaction.cpp',
+    'EditorCommands.cpp',
     'EditorController.cpp',
     'EditorUtils.cpp',
     'EditTransactionBase.cpp',
     'HTMLEditUtils.cpp',
     'InsertNodeTransaction.cpp',
     'InsertTextTransaction.cpp',
     'JoinNodeTransaction.cpp',
     'nsEditor.cpp',
-    'nsEditorCommands.cpp',
     'nsEditorEventListener.cpp',
     'nsHTMLAbsPosition.cpp',
     'nsHTMLAnonymousUtils.cpp',
     'nsHTMLCSSUtils.cpp',
     'nsHTMLDataTransfer.cpp',
     'nsHTMLEditor.cpp',
     'nsHTMLEditorEventListener.cpp',
     'nsHTMLEditorStyle.cpp',