Bug 751554 part 5 - Rename OperationID to EditAction; r=ehsan
authorAryeh Gregor <ayg@aryeh.name>
Sun, 12 Aug 2012 21:28:26 +0300
changeset 102171 f89feda9d99743dbae5fef2cacd8ae46b5a78e6f
parent 102170 038266727ddc37a3573aa535ab3892f04ffb6229
child 102178 c14e2d5f17de87fefd570085152f394ebc59a3e0
child 102179 ee73e7a89076deb0d85b9b52d6b19411e1091e5f
child 102323 92727400355ae693fa19fb22932f9d7a1f18c741
push id23267
push userryanvm@gmail.com
push dateMon, 13 Aug 2012 00:26:47 +0000
treeherdermozilla-central@f89feda9d997 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs751554
milestone17.0a1
first release with
nightly linux32
f89feda9d997 / 17.0a1 / 20120813030532 / files
nightly linux64
f89feda9d997 / 17.0a1 / 20120813030532 / files
nightly mac
f89feda9d997 / 17.0a1 / 20120813030532 / files
nightly win32
f89feda9d997 / 17.0a1 / 20120813030532 / files
nightly win64
f89feda9d997 / 17.0a1 / 20120813030532 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 751554 part 5 - Rename OperationID to EditAction; r=ehsan
editor/libeditor/base/nsEditRules.h
editor/libeditor/base/nsEditor.cpp
editor/libeditor/base/nsEditor.h
editor/libeditor/base/nsEditorUtils.h
editor/libeditor/html/nsHTMLAbsPosition.cpp
editor/libeditor/html/nsHTMLDataTransfer.cpp
editor/libeditor/html/nsHTMLEditRules.cpp
editor/libeditor/html/nsHTMLEditRules.h
editor/libeditor/html/nsHTMLEditor.cpp
editor/libeditor/html/nsHTMLEditor.h
editor/libeditor/html/nsHTMLEditorStyle.cpp
editor/libeditor/html/nsTableEditor.cpp
editor/libeditor/text/nsPlaintextEditor.cpp
editor/libeditor/text/nsPlaintextEditor.h
editor/libeditor/text/nsTextEditRules.cpp
editor/libeditor/text/nsTextEditRules.h
extensions/spellcheck/src/mozInlineSpellChecker.cpp
extensions/spellcheck/src/mozInlineSpellChecker.h
--- a/editor/libeditor/base/nsEditRules.h
+++ b/editor/libeditor/base/nsEditRules.h
@@ -19,39 +19,39 @@ class nsISelection;
 /***************************************************************************
  * base for an object to encapsulate any additional info needed to be passed
  * to rules system by the editor
  */
 class nsRulesInfo
 {
   public:
   
-  nsRulesInfo(OperationID aAction) : action(aAction) {}
+  nsRulesInfo(EditAction aAction) : action(aAction) {}
   virtual ~nsRulesInfo() {}
   
-  OperationID action;
+  EditAction action;
 };
 
 /***************************************************************************
  * Interface of editing rules.
  *  
  */
 class nsIEditRules : public nsISupports
 {
 public:
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_IEDITRULES_IID)
   
 //Interfaces for addref and release and queryinterface
 //NOTE: Use   NS_DECL_ISUPPORTS_INHERITED in any class inherited from nsIEditRules
 
   NS_IMETHOD Init(nsPlaintextEditor *aEditor)=0;
   NS_IMETHOD DetachEditor()=0;
-  NS_IMETHOD BeforeEdit(OperationID action,
+  NS_IMETHOD BeforeEdit(EditAction action,
                         nsIEditor::EDirection aDirection) = 0;
-  NS_IMETHOD AfterEdit(OperationID action,
+  NS_IMETHOD AfterEdit(EditAction action,
                        nsIEditor::EDirection aDirection) = 0;
   NS_IMETHOD WillDoAction(mozilla::Selection* aSelection, nsRulesInfo* aInfo,
                           bool* aCancel, bool* aHandled) = 0;
   NS_IMETHOD DidDoAction(nsISelection *aSelection, nsRulesInfo *aInfo, nsresult aResult)=0;
   NS_IMETHOD DocumentIsEmpty(bool *aDocumentIsEmpty)=0;
   NS_IMETHOD DocumentModified()=0;
 };
 
--- a/editor/libeditor/base/nsEditor.cpp
+++ b/editor/libeditor/base/nsEditor.cpp
@@ -138,17 +138,17 @@ extern nsIParserService *sParserService;
 nsEditor::nsEditor()
 :  mPlaceHolderName(nullptr)
 ,  mSelState(nullptr)
 ,  mPhonetic(nullptr)
 ,  mModCount(0)
 ,  mFlags(0)
 ,  mUpdateCount(0)
 ,  mPlaceHolderBatch(0)
-,  mAction(OperationID::none)
+,  mAction(EditAction::none)
 ,  mHandlingActionCount(0)
 ,  mIMETextOffset(0)
 ,  mIMEBufferLength(0)
 ,  mDirection(eNone)
 ,  mDocDirtyState(-1)
 ,  mSpellcheckCheckboxState(eTriUnset)
 ,  mInIMEMode(false)
 ,  mIsIMEComposing(false)
@@ -780,17 +780,17 @@ nsEditor::Undo(PRUint32 aCount)
 #endif
 
   ForceCompositionEnd();
 
   bool hasTxnMgr, hasTransaction = false;
   CanUndo(&hasTxnMgr, &hasTransaction);
   NS_ENSURE_TRUE(hasTransaction, NS_OK);
 
-  nsAutoRules beginRulesSniffing(this, OperationID::undo, nsIEditor::eNone);
+  nsAutoRules beginRulesSniffing(this, EditAction::undo, nsIEditor::eNone);
 
   if (!mTxnMgr) {
     return NS_OK;
   }
 
   for (PRUint32 i = 0; i < aCount; ++i) {
     nsresult rv = mTxnMgr->UndoTransaction();
     NS_ENSURE_SUCCESS(rv, rv);
@@ -823,17 +823,17 @@ nsEditor::Redo(PRUint32 aCount)
 #ifdef NS_DEBUG_EDITOR
   if (gNoisy) { printf("Editor::Redo ----------\n"); }
 #endif
 
   bool hasTxnMgr, hasTransaction = false;
   CanRedo(&hasTxnMgr, &hasTransaction);
   NS_ENSURE_TRUE(hasTransaction, NS_OK);
 
-  nsAutoRules beginRulesSniffing(this, OperationID::redo, nsIEditor::eNone);
+  nsAutoRules beginRulesSniffing(this, EditAction::redo, nsIEditor::eNone);
 
   if (!mTxnMgr) {
     return NS_OK;
   }
 
   for (PRUint32 i = 0; i < aCount; ++i) {
     nsresult rv = mTxnMgr->RedoTransaction();
     NS_ENSURE_SUCCESS(rv, rv);
@@ -1342,17 +1342,17 @@ NS_IMETHODIMP nsEditor::SetSpellcheckUse
 
 NS_IMETHODIMP nsEditor::CreateNode(const nsAString& aTag,
                                    nsIDOMNode *    aParent,
                                    PRInt32         aPosition,
                                    nsIDOMNode **   aNewNode)
 {
   PRInt32 i;
 
-  nsAutoRules beginRulesSniffing(this, OperationID::createNode, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::createNode, nsIEditor::eNext);
   
   for (i = 0; i < mActionListeners.Count(); i++)
     mActionListeners[i]->WillCreateNode(aTag, aParent, aPosition);
 
   nsRefPtr<CreateElementTxn> txn;
   nsresult result = CreateTxnForCreateElement(aTag, aParent, aPosition,
                                               getter_AddRefs(txn));
   if (NS_SUCCEEDED(result)) 
@@ -1374,17 +1374,17 @@ NS_IMETHODIMP nsEditor::CreateNode(const
 }
 
 
 NS_IMETHODIMP nsEditor::InsertNode(nsIDOMNode * aNode,
                                    nsIDOMNode * aParent,
                                    PRInt32      aPosition)
 {
   PRInt32 i;
-  nsAutoRules beginRulesSniffing(this, OperationID::insertNode, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::insertNode, nsIEditor::eNext);
 
   for (i = 0; i < mActionListeners.Count(); i++)
     mActionListeners[i]->WillInsertNode(aNode, aParent, aPosition);
 
   nsRefPtr<InsertElementTxn> txn;
   nsresult result = CreateTxnForInsertElement(aNode, aParent, aPosition,
                                               getter_AddRefs(txn));
   if (NS_SUCCEEDED(result))  {
@@ -1401,17 +1401,17 @@ NS_IMETHODIMP nsEditor::InsertNode(nsIDO
 
 
 NS_IMETHODIMP 
 nsEditor::SplitNode(nsIDOMNode * aNode,
                     PRInt32      aOffset,
                     nsIDOMNode **aNewLeftNode)
 {
   PRInt32 i;
-  nsAutoRules beginRulesSniffing(this, OperationID::splitNode, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::splitNode, nsIEditor::eNext);
 
   for (i = 0; i < mActionListeners.Count(); i++)
     mActionListeners[i]->WillSplitNode(aNode, aOffset);
 
   nsRefPtr<SplitElementTxn> txn;
   nsresult result = CreateTxnForSplitNode(aNode, aOffset, getter_AddRefs(txn));
   if (NS_SUCCEEDED(result))  
   {
@@ -1450,17 +1450,17 @@ nsEditor::JoinNodes(nsINode* aNodeToKeep
 }
 
 NS_IMETHODIMP
 nsEditor::JoinNodes(nsIDOMNode * aLeftNode,
                     nsIDOMNode * aRightNode,
                     nsIDOMNode * aParent)
 {
   PRInt32 i;
-  nsAutoRules beginRulesSniffing(this, OperationID::joinNode, nsIEditor::ePrevious);
+  nsAutoRules beginRulesSniffing(this, EditAction::joinNode, nsIEditor::ePrevious);
 
   // remember some values; later used for saved selection updating.
   // find the offset between the nodes to be joined.
   PRInt32 offset = GetChildOffset(aRightNode, aParent);
   // find the number of children of the lefthand node
   PRUint32 oldLeftNodeLen;
   nsresult result = GetLengthOfDOMNode(aLeftNode, oldLeftNodeLen);
   NS_ENSURE_SUCCESS(result, result);
@@ -1489,17 +1489,17 @@ nsEditor::DeleteNode(nsIDOMNode* aNode)
   nsCOMPtr<nsINode> node = do_QueryInterface(aNode);
   NS_ENSURE_STATE(node);
   return DeleteNode(node);
 }
 
 nsresult
 nsEditor::DeleteNode(nsINode* aNode)
 {
-  nsAutoRules beginRulesSniffing(this, OperationID::createNode, nsIEditor::ePrevious);
+  nsAutoRules beginRulesSniffing(this, EditAction::createNode, nsIEditor::ePrevious);
 
   // save node location for selection updating code.
   for (PRInt32 i = 0; i < mActionListeners.Count(); i++) {
     mActionListeners[i]->WillDeleteNode(aNode->AsDOMNode());
   }
 
   nsRefPtr<DeleteNodeTxn> txn;
   nsresult res = CreateTxnForDeleteNode(aNode, getter_AddRefs(txn));
@@ -2177,30 +2177,30 @@ nsEditor::GetRootElement(nsIDOMElement *
   rootElement.forget(aRootElement);
   return NS_OK;
 }
 
 
 /** All editor operations which alter the doc should be prefaced
  *  with a call to StartOperation, naming the action and direction */
 NS_IMETHODIMP
-nsEditor::StartOperation(OperationID opID, nsIEditor::EDirection aDirection)
+nsEditor::StartOperation(EditAction opID, nsIEditor::EDirection aDirection)
 {
   mAction = opID;
   mDirection = aDirection;
   return NS_OK;
 }
 
 
 /** All editor operations which alter the doc should be followed
  *  with a call to EndOperation */
 NS_IMETHODIMP
 nsEditor::EndOperation()
 {
-  mAction = OperationID::none;
+  mAction = EditAction::none;
   mDirection = eNone;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsEditor::CloneAttribute(const nsAString & aAttribute,
                          nsIDOMNode *aDestNode, nsIDOMNode *aSourceNode)
 {
@@ -2700,17 +2700,17 @@ NS_IMETHODIMP nsEditor::CreateTxnForInse
 
 NS_IMETHODIMP nsEditor::DeleteText(nsIDOMCharacterData *aElement,
                               PRUint32             aOffset,
                               PRUint32             aLength)
 {
   nsRefPtr<DeleteTextTxn> txn;
   nsresult result = CreateTxnForDeleteText(aElement, aOffset, aLength,
                                            getter_AddRefs(txn));
-  nsAutoRules beginRulesSniffing(this, OperationID::deleteText, nsIEditor::ePrevious);
+  nsAutoRules beginRulesSniffing(this, EditAction::deleteText, nsIEditor::ePrevious);
   if (NS_SUCCEEDED(result))  
   {
     // let listeners know what's up
     PRInt32 i;
     for (i = 0; i < mActionListeners.Count(); i++)
       mActionListeners[i]->WillDeleteText(aElement, aOffset, aLength);
     
     result = DoTransaction(txn); 
@@ -4306,17 +4306,17 @@ nsEditor::DeleteSelectionImpl(EDirection
   PRInt32 deleteCharOffset = 0, deleteCharLength = 0;
   res = CreateTxnForDeleteSelection(aAction, getter_AddRefs(txn),
                                     getter_AddRefs(deleteNode),
                                     &deleteCharOffset, &deleteCharLength);
   nsCOMPtr<nsIDOMCharacterData> deleteCharData(do_QueryInterface(deleteNode));
 
   if (NS_SUCCEEDED(res))  
   {
-    nsAutoRules beginRulesSniffing(this, OperationID::deleteSelection, aAction);
+    nsAutoRules beginRulesSniffing(this, EditAction::deleteSelection, aAction);
     PRInt32 i;
     // Notify nsIEditActionListener::WillDelete[Selection|Text|Node]
     if (!deleteNode)
       for (i = 0; i < mActionListeners.Count(); i++)
         mActionListeners[i]->WillDeleteSelection(selection);
     else if (deleteCharData)
       for (i = 0; i < mActionListeners.Count(); i++)
         mActionListeners[i]->WillDeleteText(deleteCharData, deleteCharOffset, 1);
@@ -5029,17 +5029,17 @@ nsEditor::HandleKeyPressEvent(nsIDOMKeyE
       DeleteSelection(nsIEditor::eNext, nsIEditor::eStrip);
       aKeyEvent->PreventDefault(); // consumed
       return NS_OK; 
   }
   return NS_OK;
 }
 
 nsresult
-nsEditor::HandleInlineSpellCheck(OperationID action,
+nsEditor::HandleInlineSpellCheck(EditAction action,
                                    nsISelection *aSelection,
                                    nsIDOMNode *previousSelectedNode,
                                    PRInt32 previousSelectedOffset,
                                    nsIDOMNode *aStartNode,
                                    PRInt32 aStartOffset,
                                    nsIDOMNode *aEndNode,
                                    PRInt32 aEndOffset)
 {
--- a/editor/libeditor/base/nsEditor.h
+++ b/editor/libeditor/base/nsEditor.h
@@ -82,17 +82,17 @@ struct IMEState;
 } // namespace widget
 } // namespace mozilla
 
 #define kMOZEditorBogusNodeAttrAtom nsEditProperty::mozEditorBogusNode
 #define kMOZEditorBogusNodeValue NS_LITERAL_STRING("TRUE")
 
 // This is PRInt32 instead of PRInt16 because nsIInlineSpellChecker.idl's
 // spellCheckAfterEditorChange is defined to take it as a long.
-MOZ_BEGIN_ENUM_CLASS(OperationID, PRInt32)
+MOZ_BEGIN_ENUM_CLASS(EditAction, PRInt32)
   ignore = -1,
   none = 0,
   undo,
   redo,
   insertNode,
   createNode,
   deleteNode,
   splitNode,
@@ -120,21 +120,21 @@ MOZ_BEGIN_ENUM_CLASS(OperationID, PRInt3
   insertQuotation     = 3009,
   htmlPaste           = 3012,
   loadHTML            = 3013,
   resetTextProperties = 3014,
   setAbsolutePosition = 3015,
   removeAbsolutePosition = 3016,
   decreaseZIndex      = 3017,
   increaseZIndex      = 3018
-MOZ_END_ENUM_CLASS(OperationID)
+MOZ_END_ENUM_CLASS(EditAction)
 
-inline bool operator!(const OperationID& aOp)
+inline bool operator!(const EditAction& aOp)
 {
-  return aOp == OperationID::none;
+  return aOp == EditAction::none;
 }
 
 /** implementation of an editor object.  it will be the controller/focal point 
  *  for the main editor services. i.e. the GUIManager, publishing, transaction 
  *  manager, event interfaces. the idea for the event interfaces is to have them 
  *  delegate the actual commands to the editor independent of the XPFE implementation.
  */
 class nsEditor : public nsIEditor,
@@ -415,17 +415,17 @@ protected:
     // regardless of DOM. Also, check to see if spell check should be skipped or not.
     return !IsPasswordEditor() && !IsReadonly() && !IsDisabled() && !ShouldSkipSpellCheck();
   }
 
 public:
 
   /** All editor operations which alter the doc should be prefaced
    *  with a call to StartOperation, naming the action and direction */
-  NS_IMETHOD StartOperation(OperationID opID,
+  NS_IMETHOD StartOperation(EditAction opID,
                             nsIEditor::EDirection aDirection);
 
   /** All editor operations which alter the doc should be followed
    *  with a call to EndOperation */
   NS_IMETHOD EndOperation();
 
   /** routines for managing the preservation of selection across 
    *  various editor actions */
@@ -652,17 +652,17 @@ public:
 
   void BeginUpdateViewBatch(void);
   virtual nsresult EndUpdateViewBatch(void);
 
   bool GetShouldTxnSetSelection();
 
   virtual nsresult HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent);
 
-  nsresult HandleInlineSpellCheck(OperationID action,
+  nsresult HandleInlineSpellCheck(EditAction action,
                                     nsISelection *aSelection,
                                     nsIDOMNode *previousSelectedNode,
                                     PRInt32 previousSelectedOffset,
                                     nsIDOMNode *aStartNode,
                                     PRInt32 aStartOffset,
                                     nsIDOMNode *aEndNode,
                                     PRInt32 aEndOffset);
 
@@ -867,17 +867,17 @@ protected:
   nsRangeUpdater    mRangeUpdater;       // utility class object for maintaining preserved ranges
 
   PRUint32          mModCount;     // number of modifications (for undo/redo stack)
   PRUint32          mFlags;        // behavior flags. See nsIPlaintextEditor.idl for the flags we use.
 
   PRInt32           mUpdateCount;
 
   PRInt32           mPlaceHolderBatch;   // nesting count for batching
-  OperationID       mAction;             // the current editor action
+  EditAction        mAction;             // the current editor action
   PRUint32          mHandlingActionCount;
 
   PRUint32          mIMETextOffset;    // offset in text node where IME comp string begins
   PRUint32          mIMEBufferLength;  // current length of IME comp string
 
   EDirection        mDirection;          // the current direction of editor action
   PRInt8            mDocDirtyState;      // -1 = not initialized
   PRUint8           mSpellcheckCheckboxState; // a Tristate value
--- a/editor/libeditor/base/nsEditorUtils.h
+++ b/editor/libeditor/base/nsEditorUtils.h
@@ -73,17 +73,17 @@ class NS_STACK_CLASS nsAutoSelectionRese
 
 /***************************************************************************
  * stack based helper class for StartOperation()/EndOperation() sandwich
  */
 class NS_STACK_CLASS nsAutoRules
 {
   public:
   
-  nsAutoRules(nsEditor *ed, OperationID action,
+  nsAutoRules(nsEditor *ed, EditAction action,
               nsIEditor::EDirection aDirection) :
          mEd(ed), mDoNothing(false)
   { 
     if (mEd && !mEd->mAction) // mAction will already be set if this is nested call
     {
       mEd->StartOperation(action, aDirection);
     }
     else mDoNothing = true; // nested calls will end up here
--- a/editor/libeditor/html/nsHTMLAbsPosition.cpp
+++ b/editor/libeditor/html/nsHTMLAbsPosition.cpp
@@ -56,27 +56,27 @@ using namespace mozilla;
 
 #define  BLACK_BG_RGB_TRIGGER 0xd0
 
 NS_IMETHODIMP
 nsHTMLEditor::AbsolutePositionSelection(bool aEnabled)
 {
   nsAutoEditBatch beginBatching(this);
   nsAutoRules beginRulesSniffing(this,
-                                 aEnabled ? OperationID::setAbsolutePosition :
-                                            OperationID::removeAbsolutePosition,
+                                 aEnabled ? EditAction::setAbsolutePosition :
+                                            EditAction::removeAbsolutePosition,
                                  nsIEditor::eNext);
   
   // the line below does not match the code; should it be removed?
   // Find out if the selection is collapsed:
   nsRefPtr<Selection> selection = GetSelection();
   NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);
 
-  nsTextRulesInfo ruleInfo(aEnabled ? OperationID::setAbsolutePosition :
-                                      OperationID::removeAbsolutePosition);
+  nsTextRulesInfo ruleInfo(aEnabled ? EditAction::setAbsolutePosition :
+                                      EditAction::removeAbsolutePosition);
   bool cancel, handled;
   nsresult res = mRules->WillDoAction(selection, &ruleInfo, &cancel, &handled);
   if (NS_FAILED(res) || cancel)
     return res;
   
   return mRules->DidDoAction(selection, &ruleInfo, res);
 }
 
@@ -169,26 +169,26 @@ nsHTMLEditor::SetElementZIndex(nsIDOMEle
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsHTMLEditor::RelativeChangeZIndex(PRInt32 aChange)
 {
   nsAutoEditBatch beginBatching(this);
   nsAutoRules beginRulesSniffing(this,
-                                 (aChange < 0) ? OperationID::decreaseZIndex :
-                                                 OperationID::increaseZIndex,
+                                 (aChange < 0) ? EditAction::decreaseZIndex :
+                                                 EditAction::increaseZIndex,
                                  nsIEditor::eNext);
   
   // brade: can we get rid of this comment?
   // Find out if the selection is collapsed:
   nsRefPtr<Selection> selection = GetSelection();
   NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);
-  nsTextRulesInfo ruleInfo(aChange < 0 ? OperationID::decreaseZIndex :
-                                         OperationID::increaseZIndex);
+  nsTextRulesInfo ruleInfo(aChange < 0 ? EditAction::decreaseZIndex :
+                                         EditAction::increaseZIndex);
   bool cancel, handled;
   nsresult res = mRules->WillDoAction(selection, &ruleInfo, &cancel, &handled);
   if (cancel || NS_FAILED(res))
     return res;
   
   return mRules->DidDoAction(selection, &ruleInfo, res);
 }
 
--- a/editor/libeditor/html/nsHTMLDataTransfer.cpp
+++ b/editor/libeditor/html/nsHTMLDataTransfer.cpp
@@ -150,23 +150,23 @@ static nsCOMPtr<nsIDOMNode> GetTablePare
 
 NS_IMETHODIMP nsHTMLEditor::LoadHTML(const nsAString & aInputString)
 {
   NS_ENSURE_TRUE(mRules, NS_ERROR_NOT_INITIALIZED);
 
   // force IME commit; set up rules sniffing and batching
   ForceCompositionEnd();
   nsAutoEditBatch beginBatching(this);
-  nsAutoRules beginRulesSniffing(this, OperationID::loadHTML, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::loadHTML, nsIEditor::eNext);
 
   // Get selection
   nsRefPtr<Selection> selection = GetSelection();
   NS_ENSURE_STATE(selection);
 
-  nsTextRulesInfo ruleInfo(OperationID::loadHTML);
+  nsTextRulesInfo ruleInfo(EditAction::loadHTML);
   bool cancel, handled;
   nsresult rv = mRules->WillDoAction(selection, &ruleInfo, &cancel, &handled);
   NS_ENSURE_SUCCESS(rv, rv);
   if (cancel) {
     return NS_OK; // rules canceled the operation
   }
 
   if (!handled)
@@ -247,17 +247,17 @@ nsHTMLEditor::DoInsertHTMLWithContext(co
                                       bool aDeleteSelection,
                                       bool aTrustedInput)
 {
   NS_ENSURE_TRUE(mRules, NS_ERROR_NOT_INITIALIZED);
 
   // force IME commit; set up rules sniffing and batching
   ForceCompositionEnd();
   nsAutoEditBatch beginBatching(this);
-  nsAutoRules beginRulesSniffing(this, OperationID::htmlPaste, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::htmlPaste, nsIEditor::eNext);
 
   // Get selection
   nsRefPtr<Selection> selection = GetSelection();
   NS_ENSURE_STATE(selection);
 
   // create a dom document fragment that represents the structure to paste
   nsCOMPtr<nsIDOMNode> fragmentAsNode, streamStartParent, streamEndParent;
   PRInt32 streamStartOffset = 0, streamEndOffset = 0;
@@ -386,17 +386,17 @@ nsHTMLEditor::DoInsertHTMLWithContext(co
       rv = DeleteTableCell(1);
       NS_ENSURE_SUCCESS(rv, rv);
     }
     // collapse selection to beginning of deleted table content
     selection->CollapseToStart();
   }
 
   // give rules a chance to handle or cancel
-  nsTextRulesInfo ruleInfo(OperationID::insertElement);
+  nsTextRulesInfo ruleInfo(EditAction::insertElement);
   bool cancel, handled;
   rv = mRules->WillDoAction(selection, &ruleInfo, &cancel, &handled);
   NS_ENSURE_SUCCESS(rv, rv);
   if (cancel) {
     return NS_OK; // rules canceled the operation
   }
 
   if (!handled)
@@ -1741,24 +1741,24 @@ NS_IMETHODIMP nsHTMLEditor::PasteAsQuota
   nsAutoString citation;
   return PasteAsCitedQuotation(citation, aSelectionType);
 }
 
 NS_IMETHODIMP nsHTMLEditor::PasteAsCitedQuotation(const nsAString & aCitation,
                                                   PRInt32 aSelectionType)
 {
   nsAutoEditBatch beginBatching(this);
-  nsAutoRules beginRulesSniffing(this, OperationID::insertQuotation, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::insertQuotation, nsIEditor::eNext);
 
   // get selection
   nsRefPtr<Selection> selection = GetSelection();
   NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);
 
   // give rules a chance to handle or cancel
-  nsTextRulesInfo ruleInfo(OperationID::insertElement);
+  nsTextRulesInfo ruleInfo(EditAction::insertElement);
   bool cancel, handled;
   nsresult rv = mRules->WillDoAction(selection, &ruleInfo, &cancel, &handled);
   NS_ENSURE_SUCCESS(rv, rv);
   if (cancel || handled) {
     return NS_OK; // rules canceled the operation
   }
 
   nsCOMPtr<nsIDOMNode> newNode;
@@ -1949,20 +1949,20 @@ nsHTMLEditor::InsertAsPlaintextQuotation
     return nsPlaintextEditor::InsertAsQuotation(aQuotedText, aNodeInserted);
 
   nsCOMPtr<nsIDOMNode> newNode;
   // get selection
   nsRefPtr<Selection> selection = GetSelection();
   NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);
 
   nsAutoEditBatch beginBatching(this);
-  nsAutoRules beginRulesSniffing(this, OperationID::insertQuotation, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::insertQuotation, nsIEditor::eNext);
 
   // give rules a chance to handle or cancel
-  nsTextRulesInfo ruleInfo(OperationID::insertElement);
+  nsTextRulesInfo ruleInfo(EditAction::insertElement);
   bool cancel, handled;
   nsresult rv = mRules->WillDoAction(selection, &ruleInfo, &cancel, &handled);
   NS_ENSURE_SUCCESS(rv, rv);
   if (cancel || handled) {
     return NS_OK; // rules canceled the operation
   }
 
   // Wrap the inserted quote in a <span> so it won't be wrapped:
@@ -2042,20 +2042,20 @@ nsHTMLEditor::InsertAsCitedQuotation(con
 
   nsCOMPtr<nsIDOMNode> newNode;
 
   // get selection
   nsRefPtr<Selection> selection = GetSelection();
   NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);
 
   nsAutoEditBatch beginBatching(this);
-  nsAutoRules beginRulesSniffing(this, OperationID::insertQuotation, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::insertQuotation, nsIEditor::eNext);
 
   // give rules a chance to handle or cancel
-  nsTextRulesInfo ruleInfo(OperationID::insertElement);
+  nsTextRulesInfo ruleInfo(EditAction::insertElement);
   bool cancel, handled;
   nsresult rv = mRules->WillDoAction(selection, &ruleInfo, &cancel, &handled);
   NS_ENSURE_SUCCESS(rv, rv);
   if (cancel || handled) {
     return NS_OK; // rules canceled the operation
   }
 
   rv = DeleteSelectionAndCreateNode(NS_LITERAL_STRING("blockquote"), getter_AddRefs(newNode));
--- a/editor/libeditor/html/nsHTMLEditRules.cpp
+++ b/editor/libeditor/html/nsHTMLEditRules.cpp
@@ -84,29 +84,29 @@ static bool IsBlockNode(nsIDOMNode* node
 }
 
 static bool IsInlineNode(nsIDOMNode* node)
 {
   return !IsBlockNode(node);
 }
 
 static bool
-IsStyleCachePreservingAction(OperationID action)
-{
-  return action == OperationID::deleteSelection ||
-         action == OperationID::insertBreak ||
-         action == OperationID::makeList ||
-         action == OperationID::indent ||
-         action == OperationID::outdent ||
-         action == OperationID::align ||
-         action == OperationID::makeBasicBlock ||
-         action == OperationID::removeList ||
-         action == OperationID::makeDefListItem ||
-         action == OperationID::insertElement ||
-         action == OperationID::insertQuotation;
+IsStyleCachePreservingAction(EditAction action)
+{
+  return action == EditAction::deleteSelection ||
+         action == EditAction::insertBreak ||
+         action == EditAction::makeList ||
+         action == EditAction::indent ||
+         action == EditAction::outdent ||
+         action == EditAction::align ||
+         action == EditAction::makeBasicBlock ||
+         action == EditAction::removeList ||
+         action == EditAction::makeDefListItem ||
+         action == EditAction::insertElement ||
+         action == EditAction::insertQuotation;
 }
  
 class nsTableCellAndListItemFunctor : public nsBoolDomIterFunctor
 {
   public:
     virtual bool operator()(nsIDOMNode* aNode)  // used to build list of all li's, td's & th's iterator covers
     {
       if (nsHTMLEditUtils::IsTableCell(aNode)) return true;
@@ -272,17 +272,17 @@ nsHTMLEditRules::Init(nsPlaintextEditor 
 NS_IMETHODIMP
 nsHTMLEditRules::DetachEditor()
 {
   mHTMLEditor = nullptr;
   return nsTextEditRules::DetachEditor();
 }
 
 NS_IMETHODIMP
-nsHTMLEditRules::BeforeEdit(OperationID action,
+nsHTMLEditRules::BeforeEdit(EditAction action,
                             nsIEditor::EDirection aDirection)
 {
   if (mLockRulesSniffing) return NS_OK;
   
   nsAutoLockRulesSniffing lockIt((nsTextEditRules*)this);
   mDidExplicitlySetInterline = false;
 
   if (!mActionNesting++)
@@ -325,19 +325,19 @@ nsHTMLEditRules::BeforeEdit(OperationID 
     }
     if(mUtilRange)
     {
       // ditto for mUtilRange.
       mUtilRange->Reset(); 
     }
 
     // remember current inline styles for deletion and normal insertion operations
-    if (action == OperationID::insertText ||
-        action == OperationID::insertIMEText ||
-        action == OperationID::deleteSelection ||
+    if (action == EditAction::insertText ||
+        action == EditAction::insertIMEText ||
+        action == EditAction::deleteSelection ||
         IsStyleCachePreservingAction(action)) {
       nsCOMPtr<nsIDOMNode> selNode = selStartNode;
       if (aDirection == nsIEditor::eNext)
         selNode = selEndNode;
       res = CacheInlineStyles(selNode);
       NS_ENSURE_SUCCESS(res, res);
     }
 
@@ -356,17 +356,17 @@ nsHTMLEditRules::BeforeEdit(OperationID 
     // let rules remember the top level action
     mTheAction = action;
   }
   return NS_OK;
 }
 
 
 NS_IMETHODIMP
-nsHTMLEditRules::AfterEdit(OperationID action,
+nsHTMLEditRules::AfterEdit(EditAction action,
                            nsIEditor::EDirection aDirection)
 {
   if (mLockRulesSniffing) return NS_OK;
 
   nsAutoLockRulesSniffing lockIt(this);
 
   NS_PRECONDITION(mActionNesting>0, "bad action nesting!");
   nsresult res = NS_OK;
@@ -391,21 +391,21 @@ nsHTMLEditRules::AfterEdit(OperationID a
     }
   }
 
   return res;
 }
 
 
 nsresult
-nsHTMLEditRules::AfterEditInner(OperationID action,
+nsHTMLEditRules::AfterEditInner(EditAction action,
                                 nsIEditor::EDirection aDirection)
 {
   ConfirmSelectionInBody();
-  if (action == OperationID::ignore) return NS_OK;
+  if (action == EditAction::ignore) return NS_OK;
   
   nsCOMPtr<nsISelection>selection;
   nsresult res = mHTMLEditor->GetSelection(getter_AddRefs(selection));
   NS_ENSURE_SUCCESS(res, res);
   
   nsCOMPtr<nsIDOMNode> rangeStartParent, rangeEndParent;
   PRInt32 rangeStartOffset = 0, rangeEndOffset = 0;
   // do we have a real range to act on?
@@ -415,59 +415,59 @@ nsHTMLEditRules::AfterEditInner(Operatio
     mDocChangeRange->GetStartContainer(getter_AddRefs(rangeStartParent));
     mDocChangeRange->GetEndContainer(getter_AddRefs(rangeEndParent));
     mDocChangeRange->GetStartOffset(&rangeStartOffset);
     mDocChangeRange->GetEndOffset(&rangeEndOffset);
     if (rangeStartParent && rangeEndParent) 
       bDamagedRange = true; 
   }
   
-  if (bDamagedRange && !((action == OperationID::undo) || (action == OperationID::redo)))
+  if (bDamagedRange && !((action == EditAction::undo) || (action == EditAction::redo)))
   {
     // don't let any txns in here move the selection around behind our back.
     // Note that this won't prevent explicit selection setting from working.
     nsAutoTxnsConserveSelection dontSpazMySelection(mHTMLEditor);
    
     // expand the "changed doc range" as needed
     res = PromoteRange(mDocChangeRange, action);
     NS_ENSURE_SUCCESS(res, res);
 
     // if we did a ranged deletion, make sure we have a place to put caret.
     // Note we only want to do this if the overall operation was deletion,
-    // not if deletion was done along the way for OperationID::loadHTML, OperationID::insertText, etc.
+    // not if deletion was done along the way for EditAction::loadHTML, EditAction::insertText, etc.
     // That's why this is here rather than DidDeleteSelection().
-    if ((action == OperationID::deleteSelection) && mDidRangedDelete)
+    if ((action == EditAction::deleteSelection) && mDidRangedDelete)
     {
       res = InsertBRIfNeeded(selection);
       NS_ENSURE_SUCCESS(res, res);
     }  
     
     // add in any needed <br>s, and remove any unneeded ones.
     res = AdjustSpecialBreaks();
     NS_ENSURE_SUCCESS(res, res);
     
     // merge any adjacent text nodes
-    if ( (action != OperationID::insertText &&
-         action != OperationID::insertIMEText) )
+    if ( (action != EditAction::insertText &&
+         action != EditAction::insertIMEText) )
     {
       res = mHTMLEditor->CollapseAdjacentTextNodes(mDocChangeRange);
       NS_ENSURE_SUCCESS(res, res);
     }
 
     // clean up any empty nodes in the selection
     res = RemoveEmptyNodes();
     NS_ENSURE_SUCCESS(res, res);
 
     // attempt to transform any unneeded nbsp's into spaces after doing various operations
-    if ((action == OperationID::insertText) || 
-        (action == OperationID::insertIMEText) ||
-        (action == OperationID::deleteSelection) ||
-        (action == OperationID::insertBreak) || 
-        (action == OperationID::htmlPaste ||
-        (action == OperationID::loadHTML)))
+    if ((action == EditAction::insertText) || 
+        (action == EditAction::insertIMEText) ||
+        (action == EditAction::deleteSelection) ||
+        (action == EditAction::insertBreak) || 
+        (action == EditAction::htmlPaste ||
+        (action == EditAction::loadHTML)))
     {
       res = AdjustWhitespace(selection);
       NS_ENSURE_SUCCESS(res, res);
       
       // also do this for original selection endpoints. 
       nsWSRunObject(mHTMLEditor, mRangeItem->startNode,
                     mRangeItem->startOffset).AdjustWhitespace();
       // we only need to handle old selection endpoint if it was different from start
@@ -481,31 +481,31 @@ nsHTMLEditRules::AfterEditInner(Operatio
     // if we created a new block, make sure selection lands in it
     if (mNewBlock)
     {
       res = PinSelectionToNewBlock(selection);
       mNewBlock = 0;
     }
 
     // adjust selection for insert text, html paste, and delete actions
-    if ((action == OperationID::insertText) || 
-        (action == OperationID::insertIMEText) ||
-        (action == OperationID::deleteSelection) ||
-        (action == OperationID::insertBreak) || 
-        (action == OperationID::htmlPaste ||
-        (action == OperationID::loadHTML)))
+    if ((action == EditAction::insertText) || 
+        (action == EditAction::insertIMEText) ||
+        (action == EditAction::deleteSelection) ||
+        (action == EditAction::insertBreak) || 
+        (action == EditAction::htmlPaste ||
+        (action == EditAction::loadHTML)))
     {
       res = AdjustSelection(selection, aDirection);
       NS_ENSURE_SUCCESS(res, res);
     }
 
     // check for any styles which were removed inappropriately
-    if (action == OperationID::insertText ||
-        action == OperationID::insertIMEText ||
-        action == OperationID::deleteSelection ||
+    if (action == EditAction::insertText ||
+        action == EditAction::insertIMEText ||
+        action == EditAction::deleteSelection ||
         IsStyleCachePreservingAction(action)) {
       mHTMLEditor->mTypeInState->UpdateSelState(selection);
       res = ReapplyCachedStyles();
       NS_ENSURE_SUCCESS(res, res);
       res = ClearCachedStyles();
       NS_ENSURE_SUCCESS(res, res);
     }    
   }
@@ -543,19 +543,19 @@ nsHTMLEditRules::WillDoAction(Selection*
   *aCancel = false;
   *aHandled = false;
 
   // my kingdom for dynamic cast
   nsTextRulesInfo *info = static_cast<nsTextRulesInfo*>(aInfo);
 
   // Deal with actions for which we don't need to check whether the selection is
   // editable.
-  if (info->action == OperationID::outputText ||
-      info->action == OperationID::undo ||
-      info->action == OperationID::redo) {
+  if (info->action == EditAction::outputText ||
+      info->action == EditAction::undo ||
+      info->action == EditAction::redo) {
     return nsTextEditRules::WillDoAction(aSelection, aInfo, aCancel, aHandled);
   }
 
   // Nothing to do if there's no selection to act on
   if (!aSelection) {
     return NS_OK;
   }
   NS_ENSURE_TRUE(aSelection->GetRangeCount(), NS_OK);
@@ -578,77 +578,77 @@ nsHTMLEditRules::WillDoAction(Selection*
 
     if (!mHTMLEditor->IsModifiableNode(range->GetCommonAncestor())) {
       *aCancel = true;
       return NS_OK;
     }
   }
 
   switch (info->action) {
-    case OperationID::insertText:
-    case OperationID::insertIMEText:
+    case EditAction::insertText:
+    case EditAction::insertIMEText:
       return WillInsertText(info->action, aSelection, aCancel, aHandled,
                             info->inString, info->outString, info->maxLength);
-    case OperationID::loadHTML:
+    case EditAction::loadHTML:
       return WillLoadHTML(aSelection, aCancel);
-    case OperationID::insertBreak:
+    case EditAction::insertBreak:
       return WillInsertBreak(aSelection, aCancel, aHandled);
-    case OperationID::deleteSelection:
+    case EditAction::deleteSelection:
       return WillDeleteSelection(aSelection, info->collapsedAction,
                                  info->stripWrappers, aCancel, aHandled);
-    case OperationID::makeList:
+    case EditAction::makeList:
       return WillMakeList(aSelection, info->blockType, info->entireList,
                           info->bulletType, aCancel, aHandled);
-    case OperationID::indent:
+    case EditAction::indent:
       return WillIndent(aSelection, aCancel, aHandled);
-    case OperationID::outdent:
+    case EditAction::outdent:
       return WillOutdent(aSelection, aCancel, aHandled);
-    case OperationID::setAbsolutePosition:
+    case EditAction::setAbsolutePosition:
       return WillAbsolutePosition(aSelection, aCancel, aHandled);
-    case OperationID::removeAbsolutePosition:
+    case EditAction::removeAbsolutePosition:
       return WillRemoveAbsolutePosition(aSelection, aCancel, aHandled);
-    case OperationID::align:
+    case EditAction::align:
       return WillAlign(aSelection, info->alignType, aCancel, aHandled);
-    case OperationID::makeBasicBlock:
+    case EditAction::makeBasicBlock:
       return WillMakeBasicBlock(aSelection, info->blockType, aCancel, aHandled);
-    case OperationID::removeList:
+    case EditAction::removeList:
       return WillRemoveList(aSelection, info->bOrdered, aCancel, aHandled);
-    case OperationID::makeDefListItem:
+    case EditAction::makeDefListItem:
       return WillMakeDefListItem(aSelection, info->blockType, info->entireList,
                                  aCancel, aHandled);
-    case OperationID::insertElement:
+    case EditAction::insertElement:
       return WillInsert(aSelection, aCancel);
-    case OperationID::decreaseZIndex:
+    case EditAction::decreaseZIndex:
       return WillRelativeChangeZIndex(aSelection, -1, aCancel, aHandled);
-    case OperationID::increaseZIndex:
+    case EditAction::increaseZIndex:
       return WillRelativeChangeZIndex(aSelection, 1, aCancel, aHandled);
     default:
       return nsTextEditRules::WillDoAction(aSelection, aInfo,
                                            aCancel, aHandled);
   }
 }
 
 
 NS_IMETHODIMP 
 nsHTMLEditRules::DidDoAction(nsISelection *aSelection,
                              nsRulesInfo *aInfo, nsresult aResult)
 {
   nsTextRulesInfo *info = static_cast<nsTextRulesInfo*>(aInfo);
   switch (info->action)
   {
-    case OperationID::insertBreak:
+    case EditAction::insertBreak:
       return DidInsertBreak(aSelection, aResult);
-    case OperationID::deleteSelection:
+    case EditAction::deleteSelection:
       return DidDeleteSelection(aSelection, info->collapsedAction, aResult);
-    case OperationID::makeBasicBlock:
-    case OperationID::indent:
-    case OperationID::outdent:
-    case OperationID::align:
+    case EditAction::makeBasicBlock:
+    case EditAction::indent:
+    case EditAction::outdent:
+    case EditAction::align:
       return DidMakeBasicBlock(aSelection, aInfo, aResult);
-    case OperationID::setAbsolutePosition: {
+    case EditAction::setAbsolutePosition: {
       nsresult rv = DidMakeBasicBlock(aSelection, aInfo, aResult);
       NS_ENSURE_SUCCESS(rv, rv);
       return DidAbsolutePosition();
     }
     default:
       // pass thru to nsTextEditRules
       return nsTextEditRules::DidDoAction(aSelection, aInfo, aResult);
   }
@@ -797,23 +797,23 @@ nsHTMLEditRules::GetAlignment(bool *aMix
            offset == rootOffset)
   {
     // if we have selected the body, let's look at the first editable node
     mHTMLEditor->GetNextNode(parent, offset, true, address_of(nodeToExamine));
   }
   else
   {
     nsCOMArray<nsIDOMRange> arrayOfRanges;
-    res = GetPromotedRanges(selection, arrayOfRanges, OperationID::align);
+    res = GetPromotedRanges(selection, arrayOfRanges, EditAction::align);
     NS_ENSURE_SUCCESS(res, res);
 
     // use these ranges to construct a list of nodes to act on.
     nsCOMArray<nsIDOMNode> arrayOfNodes;
     res = GetNodesForOperation(arrayOfRanges, arrayOfNodes,
-                               OperationID::align, true);
+                               EditAction::align, true);
     NS_ENSURE_SUCCESS(res, res);                                 
     nodeToExamine = arrayOfNodes.SafeObjectAt(0);
   }
 
   NS_ENSURE_TRUE(nodeToExamine, NS_ERROR_NULL_POINTER);
 
   NS_NAMED_LITERAL_STRING(typeAttrName, "align");
   nsIAtom  *dummyProperty = nullptr;
@@ -922,17 +922,17 @@ nsHTMLEditRules::GetIndentState(bool *aC
   nsCOMPtr<nsISelection>selection;
   nsresult res = mHTMLEditor->GetSelection(getter_AddRefs(selection));
   NS_ENSURE_SUCCESS(res, res);
   nsCOMPtr<nsISelectionPrivate> selPriv(do_QueryInterface(selection));
   NS_ENSURE_TRUE(selPriv, NS_ERROR_FAILURE);
 
   // contruct a list of nodes to act on.
   nsCOMArray<nsIDOMNode> arrayOfNodes;
-  res = GetNodesFromSelection(selection, OperationID::indent,
+  res = GetNodesFromSelection(selection, EditAction::indent,
                               arrayOfNodes, true);
   NS_ENSURE_SUCCESS(res, res);
 
   // examine nodes in selection for blockquotes or list elements;
   // these we can outdent.  Note that we return true for canOutdent
   // if *any* of the selection is outdentable, rather than all of it.
   PRInt32 listCount = arrayOfNodes.Count();
   PRInt32 i;
@@ -1221,44 +1221,44 @@ nsHTMLEditRules::WillInsert(nsISelection
       // the selection start to be before the mozBR.
       selNode = nsEditor::GetNodeLocation(priorNode, &selOffset);
       res = aSelection->Collapse(selNode,selOffset);
       NS_ENSURE_SUCCESS(res, res);
     }
   }
 
   if (mDidDeleteSelection &&
-      (mTheAction == OperationID::insertText ||
-       mTheAction == OperationID::insertIMEText ||
-       mTheAction == OperationID::deleteSelection)) {
+      (mTheAction == EditAction::insertText ||
+       mTheAction == EditAction::insertIMEText ||
+       mTheAction == EditAction::deleteSelection)) {
     res = ReapplyCachedStyles();
     NS_ENSURE_SUCCESS(res, res);
   }
   // For most actions we want to clear the cached styles, but there are
   // exceptions
   if (!IsStyleCachePreservingAction(mTheAction)) {
     res = ClearCachedStyles();
     NS_ENSURE_SUCCESS(res, res);
   }
 
   return NS_OK;
 }    
 
 nsresult
-nsHTMLEditRules::WillInsertText(OperationID aAction,
+nsHTMLEditRules::WillInsertText(EditAction aAction,
                                 Selection*       aSelection,
                                 bool            *aCancel,
                                 bool            *aHandled,
                                 const nsAString *inString,
                                 nsAString       *outString,
                                 PRInt32          aMaxLength)
 {  
   if (!aSelection || !aCancel || !aHandled) { return NS_ERROR_NULL_POINTER; }
 
-  if (inString->IsEmpty() && aAction != OperationID::insertIMEText) {
+  if (inString->IsEmpty() && aAction != EditAction::insertIMEText) {
     // HACK: this is a fix for bug 19395
     // I can't outlaw all empty insertions
     // because IME transaction depend on them
     // There is more work to do to make the 
     // world safe for IME.
     *aCancel = true;
     *aHandled = false;
     return NS_OK;
@@ -1296,17 +1296,17 @@ nsHTMLEditRules::WillInsertText(Operatio
   NS_ENSURE_SUCCESS(res, res);
 
   // dont put text in places that can't have it
   if (!mHTMLEditor->IsTextNode(selNode) &&
       !mHTMLEditor->CanContainTag(selNode, nsGkAtoms::textTagName)) {
     return NS_ERROR_FAILURE;
   }
     
-  if (aAction == OperationID::insertIMEText) {
+  if (aAction == EditAction::insertIMEText) {
     // Right now the nsWSRunObject code bails on empty strings, but IME needs 
     // the InsertTextImpl() call to still happen since empty strings are meaningful there.
     if (inString->IsEmpty())
     {
       res = mHTMLEditor->InsertTextImpl(*inString, address_of(selNode), &selOffset, doc);
     }
     else
     {
@@ -2716,17 +2716,17 @@ nsHTMLEditRules::JoinBlocks(nsCOMPtr<nsI
 */
 nsresult
 nsHTMLEditRules::MoveBlock(nsIDOMNode *aLeftBlock, nsIDOMNode *aRightBlock, PRInt32 aLeftOffset, PRInt32 aRightOffset)
 {
   nsCOMArray<nsIDOMNode> arrayOfNodes;
   nsCOMPtr<nsISupports> isupports;
   // GetNodesFromPoint is the workhorse that figures out what we wnat to move.
   nsresult res = GetNodesFromPoint(DOMPoint(aRightBlock,aRightOffset),
-                                   OperationID::makeList, arrayOfNodes, true);
+                                   EditAction::makeList, arrayOfNodes, true);
   NS_ENSURE_SUCCESS(res, res);
   PRInt32 listCount = arrayOfNodes.Count();
   PRInt32 i;
   for (i=0; i<listCount; i++)
   {
     // get the node to act on
     nsIDOMNode* curNode = arrayOfNodes[i];
     if (IsBlockNode(curNode))
@@ -3160,17 +3160,17 @@ nsHTMLEditRules::WillRemoveList(Selectio
   *aCancel = false;
   *aHandled = true;
   
   nsresult res = NormalizeSelection(aSelection);
   NS_ENSURE_SUCCESS(res, res);
   nsAutoSelectionReset selectionResetter(aSelection, mHTMLEditor);
   
   nsCOMArray<nsIDOMRange> arrayOfRanges;
-  res = GetPromotedRanges(aSelection, arrayOfRanges, OperationID::makeList);
+  res = GetPromotedRanges(aSelection, arrayOfRanges, EditAction::makeList);
   NS_ENSURE_SUCCESS(res, res);
   
   // use these ranges to contruct a list of nodes to act on.
   nsCOMArray<nsIDOMNode> arrayOfNodes;
   res = GetListActionNodes(arrayOfNodes, false);
   NS_ENSURE_SUCCESS(res, res);                                 
                                      
   // Remove all non-editable nodes.  Leave them be.
@@ -3248,17 +3248,17 @@ nsHTMLEditRules::WillMakeBasicBlock(Sele
   NS_ENSURE_SUCCESS(res, res);
   nsAutoSelectionReset selectionResetter(aSelection, mHTMLEditor);
   nsAutoTxnsConserveSelection dontSpazMySelection(mHTMLEditor);
   *aHandled = true;
   nsString tString(*aBlockType);
 
   // contruct a list of nodes to act on.
   nsCOMArray<nsIDOMNode> arrayOfNodes;
-  res = GetNodesFromSelection(aSelection, OperationID::makeBasicBlock,
+  res = GetNodesFromSelection(aSelection, EditAction::makeBasicBlock,
                               arrayOfNodes);
   NS_ENSURE_SUCCESS(res, res);
 
   // Remove all non-editable nodes.  Leave them be.
   PRInt32 listCount = arrayOfNodes.Count();
   PRInt32 i;
   for (i=listCount-1; i>=0; i--)
   {
@@ -3440,17 +3440,17 @@ nsHTMLEditRules::WillCSSIndent(Selection
     arrayOfNodes.AppendObject(liNode);
   }
   else
   {
     // convert the selection ranges into "promoted" selection ranges:
     // this basically just expands the range to include the immediate
     // block parent, and then further expands to include any ancestors
     // whose children are all in the range
-    res = GetNodesFromSelection(aSelection, OperationID::indent, arrayOfNodes);
+    res = GetNodesFromSelection(aSelection, EditAction::indent, arrayOfNodes);
     NS_ENSURE_SUCCESS(res, res);
   }
   
   NS_NAMED_LITERAL_STRING(quoteType, "blockquote");
   // if nothing visible in list, make an empty block
   if (ListIsEmptyLine(arrayOfNodes))
   {
     nsCOMPtr<nsIDOMNode> parent, theBlock;
@@ -3622,22 +3622,22 @@ nsHTMLEditRules::WillHTMLIndent(Selectio
   nsAutoSelectionReset selectionResetter(aSelection, mHTMLEditor);
   
   // convert the selection ranges into "promoted" selection ranges:
   // this basically just expands the range to include the immediate
   // block parent, and then further expands to include any ancestors
   // whose children are all in the range
   
   nsCOMArray<nsIDOMRange> arrayOfRanges;
-  res = GetPromotedRanges(aSelection, arrayOfRanges, OperationID::indent);
+  res = GetPromotedRanges(aSelection, arrayOfRanges, EditAction::indent);
   NS_ENSURE_SUCCESS(res, res);
   
   // use these ranges to contruct a list of nodes to act on.
   nsCOMArray<nsIDOMNode> arrayOfNodes;
-  res = GetNodesForOperation(arrayOfRanges, arrayOfNodes, OperationID::indent);
+  res = GetNodesForOperation(arrayOfRanges, arrayOfNodes, EditAction::indent);
   NS_ENSURE_SUCCESS(res, res);                                 
                                      
   NS_NAMED_LITERAL_STRING(quoteType, "blockquote");
 
   // if nothing visible in list, make an empty block
   if (ListIsEmptyLine(arrayOfNodes))
   {
     nsCOMPtr<nsIDOMNode> parent, theBlock;
@@ -3845,17 +3845,17 @@ nsHTMLEditRules::WillOutdent(Selection* 
   {
     nsAutoSelectionReset selectionResetter(aSelection, mHTMLEditor);
     
     // convert the selection ranges into "promoted" selection ranges:
     // this basically just expands the range to include the immediate
     // block parent, and then further expands to include any ancestors
     // whose children are all in the range
     nsCOMArray<nsIDOMNode> arrayOfNodes;
-    res = GetNodesFromSelection(aSelection, OperationID::outdent,
+    res = GetNodesFromSelection(aSelection, EditAction::outdent,
                                 arrayOfNodes);
     NS_ENSURE_SUCCESS(res, res);
 
     // Ok, now go through all the nodes and remove a level of blockquoting, 
     // or whatever is appropriate.  Wohoo!
 
     nsCOMPtr<nsIDOMNode> curBlockQuote, firstBQChild, lastBQChild;
     bool curBlockQuoteIsIndentedWithCSS = false;
@@ -4419,17 +4419,17 @@ nsHTMLEditRules::WillAlign(Selection* aS
   nsAutoSelectionReset selectionResetter(aSelection, mHTMLEditor);
 
   // convert the selection ranges into "promoted" selection ranges:
   // this basically just expands the range to include the immediate
   // block parent, and then further expands to include any ancestors
   // whose children are all in the range
   *aHandled = true;
   nsCOMArray<nsIDOMNode> arrayOfNodes;
-  res = GetNodesFromSelection(aSelection, OperationID::align, arrayOfNodes);
+  res = GetNodesFromSelection(aSelection, EditAction::align, arrayOfNodes);
   NS_ENSURE_SUCCESS(res, res);
 
   // if we don't have any nodes, or we have only a single br, then we are
   // creating an empty alignment div.  We have to do some different things for these.
   bool emptyDiv = false;
   PRInt32 listCount = arrayOfNodes.Count();
   if (!listCount) emptyDiv = true;
   if (listCount == 1)
@@ -5204,33 +5204,33 @@ nsHTMLEditRules::NormalizeSelection(nsIS
 
 
 ///////////////////////////////////////////////////////////////////////////
 // GetPromotedPoint: figure out where a start or end point for a block
 //                   operation really is
 void
 nsHTMLEditRules::GetPromotedPoint(RulesEndpoint aWhere, nsIDOMNode* aNode,
                                   PRInt32 aOffset,
-                                  OperationID actionID,
+                                  EditAction actionID,
                                   nsCOMPtr<nsIDOMNode>* outNode,
                                   PRInt32* outOffset)
 {
   nsCOMPtr<nsINode> node = do_QueryInterface(aNode);
   MOZ_ASSERT(node && outNode && outOffset);
 
   // default values
   *outNode = node->AsDOMNode();
   *outOffset = aOffset;
 
   // we do one thing for text actions, something else entirely for other
   // actions
-  if (actionID == OperationID::insertText ||
-      actionID == OperationID::insertIMEText ||
-      actionID == OperationID::insertBreak ||
-      actionID == OperationID::deleteText) {
+  if (actionID == EditAction::insertText ||
+      actionID == EditAction::insertIMEText ||
+      actionID == EditAction::insertBreak ||
+      actionID == EditAction::deleteText) {
     bool isSpace, isNBSP;
     nsCOMPtr<nsIContent> content = do_QueryInterface(node), temp;
     // for text actions, we want to look backwards (or forwards, as
     // appropriate) for additional whitespace or nbsp's.  We may have to act on
     // these later even though they are outside of the initial selection.  Even
     // if they are in another node!
     while (content) {
       PRInt32 offset;
@@ -5289,32 +5289,32 @@ nsHTMLEditRules::GetPromotedPoint(RulesE
     nsCOMPtr<nsIContent> nearNode =
       mHTMLEditor->GetPriorHTMLNode(node, offset, true);
     while (!nearNode && node->Tag() != nsGkAtoms::body &&
            node->GetNodeParent()) {
       // some cutoffs are here: we don't need to also include them in the
       // aWhere == kEnd case.  as long as they are in one or the other it will
       // work.  special case for outdent: don't keep looking up if we have
       // found a blockquote element to act on
-      if (actionID == OperationID::outdent &&
+      if (actionID == EditAction::outdent &&
           node->Tag() == nsGkAtoms::blockquote) {
         break;
       }
 
       PRInt32 parentOffset = node->GetNodeParent()->IndexOf(node);
       nsCOMPtr<nsINode> parent = node->GetNodeParent();
 
       // Don't walk past the editable section. Note that we need to check
       // before walking up to a parent because we need to return the parent
       // object, so the parent itself might not be in the editable area, but
       // it's OK if we're not performing a block-level action.
-      bool blockLevelAction = actionID == OperationID::indent ||
-                              actionID == OperationID::outdent ||
-                              actionID == OperationID::align ||
-                              actionID == OperationID::makeBasicBlock;
+      bool blockLevelAction = actionID == EditAction::indent ||
+                              actionID == EditAction::outdent ||
+                              actionID == EditAction::align ||
+                              actionID == EditAction::makeBasicBlock;
       if (!mHTMLEditor->IsDescendantOfEditorRoot(parent) &&
           (blockLevelAction || !mHTMLEditor->IsDescendantOfEditorRoot(node))) {
         break;
       }
 
       node = parent;
       offset = parentOffset;
       nearNode = mHTMLEditor->GetPriorHTMLNode(node, offset, true);
@@ -5381,17 +5381,17 @@ nsHTMLEditRules::GetPromotedPoint(RulesE
 
 ///////////////////////////////////////////////////////////////////////////
 // GetPromotedRanges: run all the selection range endpoint through 
 //                    GetPromotedPoint()
 //                       
 nsresult 
 nsHTMLEditRules::GetPromotedRanges(nsISelection *inSelection, 
                                    nsCOMArray<nsIDOMRange> &outArrayOfRanges, 
-                                   OperationID inOperationType)
+                                   EditAction inOperationType)
 {
   NS_ENSURE_TRUE(inSelection, NS_ERROR_NULL_POINTER);
 
   PRInt32 rangeCount;
   nsresult res = inSelection->GetRangeCount(&rangeCount);
   NS_ENSURE_SUCCESS(res, res);
   
   PRInt32 i;
@@ -5422,17 +5422,17 @@ nsHTMLEditRules::GetPromotedRanges(nsISe
 
 
 ///////////////////////////////////////////////////////////////////////////
 // PromoteRange: expand a range to include any parents for which all
 //               editable children are already in range. 
 //                       
 nsresult 
 nsHTMLEditRules::PromoteRange(nsIDOMRange *inRange, 
-                              OperationID inOperationType)
+                              EditAction inOperationType)
 {
   NS_ENSURE_TRUE(inRange, NS_ERROR_NULL_POINTER);
   nsresult res;
   nsCOMPtr<nsIDOMNode> startNode, endNode;
   PRInt32 startOffset, endOffset;
   
   res = inRange->GetStartContainer(getter_AddRefs(startNode));
   NS_ENSURE_SUCCESS(res, res);
@@ -5522,17 +5522,17 @@ private:
 
 ///////////////////////////////////////////////////////////////////////////
 // GetNodesForOperation: run through the ranges in the array and construct 
 //                       a new array of nodes to be acted on.
 //                       
 nsresult 
 nsHTMLEditRules::GetNodesForOperation(nsCOMArray<nsIDOMRange>& inArrayOfRanges, 
                                       nsCOMArray<nsIDOMNode>& outArrayOfNodes, 
-                                      OperationID inOperationType,
+                                      EditAction inOperationType,
                                       bool aDontTouchContent)
 {
   PRInt32 rangeCount = inArrayOfRanges.Count();
   
   PRInt32 i;
   nsCOMPtr<nsIDOMRange> opRange;
 
   nsresult res = NS_OK;
@@ -5605,50 +5605,50 @@ nsHTMLEditRules::GetNodesForOperation(ns
       NS_ENSURE_SUCCESS(res, res);
       if (!outArrayOfNodes.AppendObjects(nodes))
         return NS_ERROR_OUT_OF_MEMORY;
     }
   }    
 
   // certain operations should not act on li's and td's, but rather inside 
   // them.  alter the list as needed
-  if (inOperationType == OperationID::makeBasicBlock) {
+  if (inOperationType == EditAction::makeBasicBlock) {
     PRInt32 listCount = outArrayOfNodes.Count();
     for (i=listCount-1; i>=0; i--)
     {
       nsCOMPtr<nsIDOMNode> node = outArrayOfNodes[i];
       if (nsHTMLEditUtils::IsListItem(node))
       {
         PRInt32 j=i;
         outArrayOfNodes.RemoveObjectAt(i);
         res = GetInnerContent(node, outArrayOfNodes, &j);
         NS_ENSURE_SUCCESS(res, res);
       }
     }
   }
   // indent/outdent already do something special for list items, but
   // we still need to make sure we don't act on table elements
-  else if (inOperationType == OperationID::outdent ||
-           inOperationType == OperationID::indent ||
-           inOperationType == OperationID::setAbsolutePosition) {
+  else if (inOperationType == EditAction::outdent ||
+           inOperationType == EditAction::indent ||
+           inOperationType == EditAction::setAbsolutePosition) {
     PRInt32 listCount = outArrayOfNodes.Count();
     for (i=listCount-1; i>=0; i--)
     {
       nsCOMPtr<nsIDOMNode> node = outArrayOfNodes[i];
       if (nsHTMLEditUtils::IsTableElementButNotTable(node))
       {
         PRInt32 j=i;
         outArrayOfNodes.RemoveObjectAt(i);
         res = GetInnerContent(node, outArrayOfNodes, &j);
         NS_ENSURE_SUCCESS(res, res);
       }
     }
   }
   // outdent should look inside of divs.
-  if (inOperationType == OperationID::outdent &&
+  if (inOperationType == EditAction::outdent &&
       !mHTMLEditor->IsCSSEnabled()) {
     PRInt32 listCount = outArrayOfNodes.Count();
     for (i=listCount-1; i>=0; i--)
     {
       nsCOMPtr<nsIDOMNode> node = outArrayOfNodes[i];
       if (nsHTMLEditUtils::IsDiv(node))
       {
         PRInt32 j=i;
@@ -5657,22 +5657,22 @@ nsHTMLEditRules::GetNodesForOperation(ns
         NS_ENSURE_SUCCESS(res, res);
       }
     }
   }
 
 
   // post process the list to break up inline containers that contain br's.
   // but only for operations that might care, like making lists or para's...
-  if (inOperationType == OperationID::makeBasicBlock ||
-      inOperationType == OperationID::makeList ||
-      inOperationType == OperationID::align ||
-      inOperationType == OperationID::setAbsolutePosition ||
-      inOperationType == OperationID::indent ||
-      inOperationType == OperationID::outdent) {
+  if (inOperationType == EditAction::makeBasicBlock ||
+      inOperationType == EditAction::makeList ||
+      inOperationType == EditAction::align ||
+      inOperationType == EditAction::setAbsolutePosition ||
+      inOperationType == EditAction::indent ||
+      inOperationType == EditAction::outdent) {
     PRInt32 listCount = outArrayOfNodes.Count();
     for (i=listCount-1; i>=0; i--)
     {
       nsCOMPtr<nsIDOMNode> node = outArrayOfNodes[i];
       if (!aDontTouchContent && IsInlineNode(node) 
            && mHTMLEditor->IsContainer(node) && !mHTMLEditor->IsTextNode(node))
       {
         nsCOMArray<nsIDOMNode> arrayOfInlines;
@@ -5766,17 +5766,17 @@ nsHTMLEditRules::GetListActionNodes(nsCO
     if (outArrayOfNodes.Count()) return NS_OK;
   }
 
   {
     // We don't like other people messing with our selection!
     nsAutoTxnsConserveSelection dontSpazMySelection(mHTMLEditor);
 
     // contruct a list of nodes to act on.
-    res = GetNodesFromSelection(selection, OperationID::makeList,
+    res = GetNodesFromSelection(selection, EditAction::makeList,
                                 outArrayOfNodes, aDontTouchContent);
     NS_ENSURE_SUCCESS(res, res);
   }
                
   // pre process our list of nodes...                      
   PRInt32 listCount = outArrayOfNodes.Count();
   PRInt32 i;
   for (i=listCount-1; i>=0; i--)
@@ -5896,17 +5896,17 @@ nsresult
 nsHTMLEditRules::GetParagraphFormatNodes(nsCOMArray<nsIDOMNode>& outArrayOfNodes,
                                          bool aDontTouchContent)
 {  
   nsCOMPtr<nsISelection>selection;
   nsresult res = mHTMLEditor->GetSelection(getter_AddRefs(selection));
   NS_ENSURE_SUCCESS(res, res);
 
   // contruct a list of nodes to act on.
-  res = GetNodesFromSelection(selection, OperationID::makeBasicBlock,
+  res = GetNodesFromSelection(selection, EditAction::makeBasicBlock,
                               outArrayOfNodes, aDontTouchContent);
   NS_ENSURE_SUCCESS(res, res);
 
   // pre process our list of nodes...                      
   PRInt32 listCount = outArrayOfNodes.Count();
   PRInt32 i;
   for (i=listCount-1; i>=0; i--)
   {
@@ -6069,17 +6069,17 @@ nsHTMLEditRules::GetHighestInlineParent(
 
 
 ///////////////////////////////////////////////////////////////////////////
 // GetNodesFromPoint: given a particular operation, construct a list  
 //                     of nodes from a point that will be operated on. 
 //                       
 nsresult 
 nsHTMLEditRules::GetNodesFromPoint(DOMPoint point,
-                                   OperationID operation,
+                                   EditAction operation,
                                    nsCOMArray<nsIDOMNode> &arrayOfNodes,
                                    bool dontTouchContent)
 {
   nsresult res;
 
   // get our point
   nsCOMPtr<nsIDOMNode> node;
   PRInt32 offset;
@@ -6110,17 +6110,17 @@ nsHTMLEditRules::GetNodesFromPoint(DOMPo
 
 
 ///////////////////////////////////////////////////////////////////////////
 // GetNodesFromSelection: given a particular operation, construct a list  
 //                     of nodes from the selection that will be operated on. 
 //                       
 nsresult 
 nsHTMLEditRules::GetNodesFromSelection(nsISelection *selection,
-                                       OperationID operation,
+                                       EditAction operation,
                                        nsCOMArray<nsIDOMNode>& arrayOfNodes,
                                        bool dontTouchContent)
 {
   NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);
   nsresult res;
   
   // promote selection ranges
   nsCOMArray<nsIDOMRange> arrayOfRanges;
@@ -8578,23 +8578,23 @@ nsHTMLEditRules::WillAbsolutePosition(Se
   
   // convert the selection ranges into "promoted" selection ranges:
   // this basically just expands the range to include the immediate
   // block parent, and then further expands to include any ancestors
   // whose children are all in the range
   
   nsCOMArray<nsIDOMRange> arrayOfRanges;
   res = GetPromotedRanges(aSelection, arrayOfRanges,
-                          OperationID::setAbsolutePosition);
+                          EditAction::setAbsolutePosition);
   NS_ENSURE_SUCCESS(res, res);
   
   // use these ranges to contruct a list of nodes to act on.
   nsCOMArray<nsIDOMNode> arrayOfNodes;
   res = GetNodesForOperation(arrayOfRanges, arrayOfNodes,
-                             OperationID::setAbsolutePosition);
+                             EditAction::setAbsolutePosition);
   NS_ENSURE_SUCCESS(res, res);                                 
                                      
   NS_NAMED_LITERAL_STRING(divType, "div");
 
 
   // if nothing visible in list, make an empty block
   if (ListIsEmptyLine(arrayOfNodes))
   {
--- a/editor/libeditor/html/nsHTMLEditRules.h
+++ b/editor/libeditor/html/nsHTMLEditRules.h
@@ -72,19 +72,19 @@ public:
   
             nsHTMLEditRules();
   virtual   ~nsHTMLEditRules();
 
 
   // nsIEditRules methods
   NS_IMETHOD Init(nsPlaintextEditor *aEditor);
   NS_IMETHOD DetachEditor();
-  NS_IMETHOD BeforeEdit(OperationID action,
+  NS_IMETHOD BeforeEdit(EditAction action,
                         nsIEditor::EDirection aDirection);
-  NS_IMETHOD AfterEdit(OperationID action,
+  NS_IMETHOD AfterEdit(EditAction action,
                        nsIEditor::EDirection aDirection);
   NS_IMETHOD WillDoAction(mozilla::Selection* aSelection, nsRulesInfo* aInfo,
                           bool* aCancel, bool* aHandled);
   NS_IMETHOD DidDoAction(nsISelection *aSelection, nsRulesInfo *aInfo, nsresult aResult);
   NS_IMETHOD DocumentModified();
 
   nsresult GetListState(bool *aMixed, bool *aOL, bool *aUL, bool *aDL);
   nsresult GetListItemState(bool *aMixed, bool *aLI, bool *aDT, bool *aDD);
@@ -123,17 +123,17 @@ protected:
   enum BRLocation
   {
     kBeforeBlock,
     kBlockEnd
   };
 
   // nsHTMLEditRules implementation methods
   nsresult WillInsert(nsISelection *aSelection, bool *aCancel);
-  nsresult WillInsertText(  OperationID aAction,
+  nsresult WillInsertText(  EditAction aAction,
                             mozilla::Selection* aSelection,
                             bool            *aCancel,
                             bool            *aHandled,
                             const nsAString *inString,
                             nsAString       *outString,
                             PRInt32          aMaxLength);
   nsresult WillLoadHTML(nsISelection *aSelection, bool *aCancel);
   nsresult WillInsertBreak(mozilla::Selection* aSelection,
@@ -203,17 +203,17 @@ protected:
   nsresult ReturnInHeader(nsISelection *aSelection, nsIDOMNode *aHeader, nsIDOMNode *aTextNode, PRInt32 aOffset);
   nsresult ReturnInParagraph(nsISelection *aSelection, nsIDOMNode *aHeader, nsIDOMNode *aTextNode, PRInt32 aOffset, bool *aCancel, bool *aHandled);
   nsresult SplitParagraph(nsIDOMNode *aPara,
                           nsIDOMNode *aBRNode, 
                           nsISelection *aSelection,
                           nsCOMPtr<nsIDOMNode> *aSelNode, 
                           PRInt32 *aOffset);
   nsresult ReturnInListItem(nsISelection *aSelection, nsIDOMNode *aHeader, nsIDOMNode *aTextNode, PRInt32 aOffset);
-  nsresult AfterEditInner(OperationID action,
+  nsresult AfterEditInner(EditAction action,
                           nsIEditor::EDirection aDirection);
   nsresult RemovePartOfBlock(nsIDOMNode *aBlock, 
                              nsIDOMNode *aStartChild, 
                              nsIDOMNode *aEndChild,
                              nsCOMPtr<nsIDOMNode> *aLeftNode = 0,
                              nsCOMPtr<nsIDOMNode> *aRightNode = 0);
   nsresult SplitBlock(nsIDOMNode *aBlock, 
                       nsIDOMNode *aStartChild, 
@@ -248,35 +248,35 @@ protected:
                               bool *aHandled);
   nsresult CheckForInvisibleBR(nsIDOMNode *aBlock, nsHTMLEditRules::BRLocation aWhere, 
                                nsCOMPtr<nsIDOMNode> *outBRNode, PRInt32 aOffset=0);
   nsresult ExpandSelectionForDeletion(nsISelection *aSelection);
   bool IsFirstNode(nsIDOMNode *aNode);
   bool IsLastNode(nsIDOMNode *aNode);
   nsresult NormalizeSelection(nsISelection *inSelection);
   void GetPromotedPoint(RulesEndpoint aWhere, nsIDOMNode* aNode,
-                        PRInt32 aOffset, OperationID actionID,
+                        PRInt32 aOffset, EditAction actionID,
                         nsCOMPtr<nsIDOMNode>* outNode, PRInt32* outOffset);
   nsresult GetPromotedRanges(nsISelection *inSelection, 
                              nsCOMArray<nsIDOMRange> &outArrayOfRanges, 
-                             OperationID inOperationType);
+                             EditAction inOperationType);
   nsresult PromoteRange(nsIDOMRange *inRange,
-                        OperationID inOperationType);
+                        EditAction inOperationType);
   nsresult GetNodesForOperation(nsCOMArray<nsIDOMRange>& inArrayOfRanges, 
                                 nsCOMArray<nsIDOMNode>& outArrayOfNodes, 
-                                OperationID inOperationType,
+                                EditAction inOperationType,
                                 bool aDontTouchContent=false);
   nsresult GetChildNodesForOperation(nsIDOMNode *inNode, 
                                      nsCOMArray<nsIDOMNode>& outArrayOfNodes);
   nsresult GetNodesFromPoint(DOMPoint point,
-                             OperationID operation,
+                             EditAction operation,
                              nsCOMArray<nsIDOMNode>& arrayOfNodes,
                              bool dontTouchContent);
   nsresult GetNodesFromSelection(nsISelection *selection,
-                                 OperationID operation,
+                                 EditAction operation,
                                  nsCOMArray<nsIDOMNode>& arrayOfNodes,
                                  bool aDontTouchContent=false);
   nsresult GetListActionNodes(nsCOMArray<nsIDOMNode> &outArrayOfNodes, bool aEntireList, bool aDontTouchContent=false);
   void GetDefinitionListItemTypes(mozilla::dom::Element* aElement, bool* aDT, bool* aDD);
   nsresult GetParagraphFormatNodes(nsCOMArray<nsIDOMNode>& outArrayOfNodes, bool aDontTouchContent=false);
   nsresult LookInsideDivBQandList(nsCOMArray<nsIDOMNode>& aNodeArray);
   nsresult BustUpInlinesAtRangeEndpoints(nsRangeStore &inRange);
   nsresult BustUpInlinesAtBRs(nsIDOMNode *inNode, 
--- a/editor/libeditor/html/nsHTMLEditor.cpp
+++ b/editor/libeditor/html/nsHTMLEditor.cpp
@@ -1162,17 +1162,17 @@ nsHTMLEditor::CollapseSelectionToDeepest
 
 
 // This is mostly like InsertHTMLWithCharsetAndContext, 
 //  but we can't use that because it is selection-based and 
 //  the rules code won't let us edit under the <head> node
 NS_IMETHODIMP
 nsHTMLEditor::ReplaceHeadContentsWithHTML(const nsAString& aSourceToInsert)
 {
-  nsAutoRules beginRulesSniffing(this, OperationID::ignore, nsIEditor::eNone); // don't do any post processing, rules get confused
+  nsAutoRules beginRulesSniffing(this, EditAction::ignore, nsIEditor::eNone); // don't do any post processing, rules get confused
   nsCOMPtr<nsISelection> selection;
   nsresult res = GetSelection(getter_AddRefs(selection));
   NS_ENSURE_SUCCESS(res, res);
   NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);
 
   ForceCompositionEnd();
 
   // Do not use nsAutoRules -- rules code won't let us insert in <head>
@@ -1484,26 +1484,26 @@ nsHTMLEditor::InsertElementAtSelection(n
   nsresult res = NS_ERROR_NOT_INITIALIZED;
   
   NS_ENSURE_TRUE(aElement, NS_ERROR_NULL_POINTER);
   
   nsCOMPtr<nsIDOMNode> node = do_QueryInterface(aElement);
   
   ForceCompositionEnd();
   nsAutoEditBatch beginBatching(this);
-  nsAutoRules beginRulesSniffing(this, OperationID::insertElement, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::insertElement, nsIEditor::eNext);
 
   nsRefPtr<Selection> selection = GetSelection();
   if (!selection) {
     return NS_ERROR_FAILURE;
   }
 
   // hand off to the rules system, see if it has anything to say about this
   bool cancel, handled;
-  nsTextRulesInfo ruleInfo(OperationID::insertElement);
+  nsTextRulesInfo ruleInfo(EditAction::insertElement);
   ruleInfo.insertElement = aElement;
   res = mRules->WillDoAction(selection, &ruleInfo, &cancel, &handled);
   if (cancel || (NS_FAILED(res))) return res;
 
   if (!handled)
   {
     if (aDeleteSelection)
     {
@@ -1945,23 +1945,23 @@ nsHTMLEditor::MakeOrChangeList(const nsA
   if (!mRules) { return NS_ERROR_NOT_INITIALIZED; }
 
   // Protect the edit rules object from dying
   nsCOMPtr<nsIEditRules> kungFuDeathGrip(mRules);
 
   bool cancel, handled;
 
   nsAutoEditBatch beginBatching(this);
-  nsAutoRules beginRulesSniffing(this, OperationID::makeList, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::makeList, nsIEditor::eNext);
   
   // pre-process
   nsRefPtr<Selection> selection = GetSelection();
   NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);
 
-  nsTextRulesInfo ruleInfo(OperationID::makeList);
+  nsTextRulesInfo ruleInfo(EditAction::makeList);
   ruleInfo.blockType = &aListType;
   ruleInfo.entireList = entireList;
   ruleInfo.bulletType = &aBulletType;
   res = mRules->WillDoAction(selection, &ruleInfo, &cancel, &handled);
   if (cancel || (NS_FAILED(res))) return res;
 
   if (!handled)
   {
@@ -2021,23 +2021,23 @@ nsHTMLEditor::RemoveList(const nsAString
   if (!mRules) { return NS_ERROR_NOT_INITIALIZED; }
 
   // Protect the edit rules object from dying
   nsCOMPtr<nsIEditRules> kungFuDeathGrip(mRules);
 
   bool cancel, handled;
 
   nsAutoEditBatch beginBatching(this);
-  nsAutoRules beginRulesSniffing(this, OperationID::removeList, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::removeList, nsIEditor::eNext);
   
   // pre-process
   nsRefPtr<Selection> selection = GetSelection();
   NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);
 
-  nsTextRulesInfo ruleInfo(OperationID::removeList);
+  nsTextRulesInfo ruleInfo(EditAction::removeList);
   if (aListType.LowerCaseEqualsLiteral("ol"))
     ruleInfo.bOrdered = true;
   else  ruleInfo.bOrdered = false;
   res = mRules->WillDoAction(selection, &ruleInfo, &cancel, &handled);
   if (cancel || (NS_FAILED(res))) return res;
 
   // no default behavior for this yet.  what would it mean?
 
@@ -2052,22 +2052,22 @@ nsHTMLEditor::MakeDefinitionItem(const n
   if (!mRules) { return NS_ERROR_NOT_INITIALIZED; }
 
   // Protect the edit rules object from dying
   nsCOMPtr<nsIEditRules> kungFuDeathGrip(mRules);
 
   bool cancel, handled;
 
   nsAutoEditBatch beginBatching(this);
-  nsAutoRules beginRulesSniffing(this, OperationID::makeDefListItem, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::makeDefListItem, nsIEditor::eNext);
   
   // pre-process
   nsRefPtr<Selection> selection = GetSelection();
   NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);
-  nsTextRulesInfo ruleInfo(OperationID::makeDefListItem);
+  nsTextRulesInfo ruleInfo(EditAction::makeDefListItem);
   ruleInfo.blockType = &aItemType;
   res = mRules->WillDoAction(selection, &ruleInfo, &cancel, &handled);
   if (cancel || (NS_FAILED(res))) return res;
 
   if (!handled)
   {
     // todo: no default for now.  we count on rules to handle it.
   }
@@ -2083,22 +2083,22 @@ nsHTMLEditor::InsertBasicBlock(const nsA
   if (!mRules) { return NS_ERROR_NOT_INITIALIZED; }
 
   // Protect the edit rules object from dying
   nsCOMPtr<nsIEditRules> kungFuDeathGrip(mRules);
 
   bool cancel, handled;
 
   nsAutoEditBatch beginBatching(this);
-  nsAutoRules beginRulesSniffing(this, OperationID::makeBasicBlock, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::makeBasicBlock, nsIEditor::eNext);
   
   // pre-process
   nsRefPtr<Selection> selection = GetSelection();
   NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);
-  nsTextRulesInfo ruleInfo(OperationID::makeBasicBlock);
+  nsTextRulesInfo ruleInfo(EditAction::makeBasicBlock);
   ruleInfo.blockType = &aBlockType;
   res = mRules->WillDoAction(selection, &ruleInfo, &cancel, &handled);
   if (cancel || (NS_FAILED(res))) return res;
 
   if (!handled)
   {
     // Find out if the selection is collapsed:
     bool isCollapsed = selection->Collapsed();
@@ -2151,20 +2151,20 @@ nsHTMLEditor::Indent(const nsAString& aI
 {
   nsresult res;
   if (!mRules) { return NS_ERROR_NOT_INITIALIZED; }
 
   // Protect the edit rules object from dying
   nsCOMPtr<nsIEditRules> kungFuDeathGrip(mRules);
 
   bool cancel, handled;
-  OperationID opID = OperationID::indent;
+  EditAction opID = EditAction::indent;
   if (aIndent.LowerCaseEqualsLiteral("outdent"))
   {
-    opID = OperationID::outdent;
+    opID = EditAction::outdent;
   }
   nsAutoEditBatch beginBatching(this);
   nsAutoRules beginRulesSniffing(this, opID, nsIEditor::eNext);
   
   // pre-process
   nsRefPtr<Selection> selection = GetSelection();
   NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);
 
@@ -2231,25 +2231,25 @@ nsHTMLEditor::Indent(const nsAString& aI
 
 NS_IMETHODIMP
 nsHTMLEditor::Align(const nsAString& aAlignType)
 {
   // Protect the edit rules object from dying
   nsCOMPtr<nsIEditRules> kungFuDeathGrip(mRules);
 
   nsAutoEditBatch beginBatching(this);
-  nsAutoRules beginRulesSniffing(this, OperationID::align, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::align, nsIEditor::eNext);
 
   nsCOMPtr<nsIDOMNode> node;
   bool cancel, handled;
   
   // Find out if the selection is collapsed:
   nsRefPtr<Selection> selection = GetSelection();
   NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);
-  nsTextRulesInfo ruleInfo(OperationID::align);
+  nsTextRulesInfo ruleInfo(EditAction::align);
   ruleInfo.alignType = &aAlignType;
   nsresult res = mRules->WillDoAction(selection, &ruleInfo, &cancel, &handled);
   if (cancel || NS_FAILED(res))
     return res;
   
   res = mRules->DidDoAction(selection, &ruleInfo, res);
   return res;
 }
@@ -3474,17 +3474,17 @@ nsHTMLEditor::StyleSheetLoaded(nsCSSStyl
 
   return NS_OK;
 }
 
 
 /** All editor operations which alter the doc should be prefaced
  *  with a call to StartOperation, naming the action and direction */
 NS_IMETHODIMP
-nsHTMLEditor::StartOperation(OperationID opID,
+nsHTMLEditor::StartOperation(EditAction opID,
                              nsIEditor::EDirection aDirection)
 {
   // Protect the edit rules object from dying
   nsCOMPtr<nsIEditRules> kungFuDeathGrip(mRules);
 
   nsEditor::StartOperation(opID, aDirection);  // will set mAction, mDirection
   if (mRules) return mRules->BeforeEdit(mAction, mDirection);
   return NS_OK;
@@ -4659,22 +4659,22 @@ nsHTMLEditor::SetCSSBackgroundColor(cons
   // Protect the edit rules object from dying
   nsCOMPtr<nsIEditRules> kungFuDeathGrip(mRules);
 
   nsRefPtr<Selection> selection = GetSelection();
 
   bool isCollapsed = selection->Collapsed();
 
   nsAutoEditBatch batchIt(this);
-  nsAutoRules beginRulesSniffing(this, OperationID::insertElement, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::insertElement, nsIEditor::eNext);
   nsAutoSelectionReset selectionResetter(selection, this);
   nsAutoTxnsConserveSelection dontSpazMySelection(this);
   
   bool cancel, handled;
-  nsTextRulesInfo ruleInfo(OperationID::setTextProperty);
+  nsTextRulesInfo ruleInfo(EditAction::setTextProperty);
   nsresult res = mRules->WillDoAction(selection, &ruleInfo, &cancel, &handled);
   NS_ENSURE_SUCCESS(res, res);
   if (!cancel && !handled)
   {
     // get selection range enumerator
     nsCOMPtr<nsIEnumerator> enumerator;
     res = selection->GetEnumerator(getter_AddRefs(enumerator));
     NS_ENSURE_SUCCESS(res, res);
--- a/editor/libeditor/html/nsHTMLEditor.h
+++ b/editor/libeditor/html/nsHTMLEditor.h
@@ -268,17 +268,17 @@ public:
 
   NS_IMETHOD PasteTransferable(nsITransferable *aTransferable);
   NS_IMETHOD CanPasteTransferable(nsITransferable *aTransferable, bool *aCanPaste);
 
   NS_IMETHOD DebugUnitTests(PRInt32 *outNumTests, PRInt32 *outNumTestsFailed);
 
   /** All editor operations which alter the doc should be prefaced
    *  with a call to StartOperation, naming the action and direction */
-  NS_IMETHOD StartOperation(OperationID opID,
+  NS_IMETHOD StartOperation(EditAction opID,
                             nsIEditor::EDirection aDirection);
 
   /** All editor operations which alter the doc should be followed
    *  with a call to EndOperation */
   NS_IMETHOD EndOperation();
 
   /** returns true if aParentTag can contain a child of type aChildTag */
   virtual bool TagCanContainTag(nsIAtom* aParentTag, nsIAtom* aChildTag);
--- a/editor/libeditor/html/nsHTMLEditorStyle.cpp
+++ b/editor/libeditor/html/nsHTMLEditorStyle.cpp
@@ -122,22 +122,22 @@ nsHTMLEditor::SetInlineProperty(nsIAtom 
   if (selection->Collapsed()) {
     // manipulating text attributes on a collapsed selection only sets state
     // for the next text insertion
     mTypeInState->SetProp(aProperty, aAttribute, aValue);
     return NS_OK;
   }
 
   nsAutoEditBatch batchIt(this);
-  nsAutoRules beginRulesSniffing(this, OperationID::insertElement, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::insertElement, nsIEditor::eNext);
   nsAutoSelectionReset selectionResetter(selection, this);
   nsAutoTxnsConserveSelection dontSpazMySelection(this);
 
   bool cancel, handled;
-  nsTextRulesInfo ruleInfo(OperationID::setTextProperty);
+  nsTextRulesInfo ruleInfo(EditAction::setTextProperty);
   nsresult res = mRules->WillDoAction(selection, &ruleInfo, &cancel, &handled);
   NS_ENSURE_SUCCESS(res, res);
   if (!cancel && !handled) {
     // get selection range enumerator
     nsCOMPtr<nsIEnumerator> enumerator;
     res = selection->GetEnumerator(getter_AddRefs(enumerator));
     NS_ENSURE_SUCCESS(res, res);
     NS_ENSURE_TRUE(enumerator, NS_ERROR_FAILURE);
@@ -1327,17 +1327,17 @@ NS_IMETHODIMP nsHTMLEditor::GetInlinePro
     val = &aValue;
   return GetInlinePropertyBase( aProperty, att, val, aFirst, aAny, aAll, &outValue);
 }
 
 
 NS_IMETHODIMP nsHTMLEditor::RemoveAllInlineProperties()
 {
   nsAutoEditBatch batchIt(this);
-  nsAutoRules beginRulesSniffing(this, OperationID::resetTextProperties, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::resetTextProperties, nsIEditor::eNext);
 
   nsresult res = RemoveInlinePropertyImpl(nullptr, nullptr);
   NS_ENSURE_SUCCESS(res, res);
   return ApplyDefaultProperties();
 }
 
 NS_IMETHODIMP nsHTMLEditor::RemoveInlineProperty(nsIAtom *aProperty, const nsAString &aAttribute)
 {
@@ -1367,22 +1367,22 @@ nsresult nsHTMLEditor::RemoveInlinePrope
       mTypeInState->ClearProp(aProperty, *aAttribute);
     } else {
       mTypeInState->ClearAllProps();
     }
     return NS_OK;
   }
 
   nsAutoEditBatch batchIt(this);
-  nsAutoRules beginRulesSniffing(this, OperationID::removeTextProperty, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::removeTextProperty, nsIEditor::eNext);
   nsAutoSelectionReset selectionResetter(selection, this);
   nsAutoTxnsConserveSelection dontSpazMySelection(this);
   
   bool cancel, handled;
-  nsTextRulesInfo ruleInfo(OperationID::removeTextProperty);
+  nsTextRulesInfo ruleInfo(EditAction::removeTextProperty);
   res = mRules->WillDoAction(selection, &ruleInfo, &cancel, &handled);
   NS_ENSURE_SUCCESS(res, res);
   if (!cancel && !handled)
   {
     // get selection range enumerator
     nsCOMPtr<nsIEnumerator> enumerator;
     res = selection->GetEnumerator(getter_AddRefs(enumerator));
     NS_ENSURE_SUCCESS(res, res);
@@ -1561,17 +1561,17 @@ nsHTMLEditor::RelativeFontChange( PRInt3
 
     // manipulating text attributes on a collapsed selection only sets state for the next text insertion
     mTypeInState->SetProp(atom, EmptyString(), EmptyString());
     return NS_OK;
   }
   
   // wrap with txn batching, rules sniffing, and selection preservation code
   nsAutoEditBatch batchIt(this);
-  nsAutoRules beginRulesSniffing(this, OperationID::setTextProperty, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::setTextProperty, nsIEditor::eNext);
   nsAutoSelectionReset selectionResetter(selection, this);
   nsAutoTxnsConserveSelection dontSpazMySelection(this);
 
   // get selection range enumerator
   nsCOMPtr<nsIEnumerator> enumerator;
   nsresult res = selection->GetEnumerator(getter_AddRefs(enumerator));
   NS_ENSURE_SUCCESS(res, res);
   NS_ENSURE_TRUE(enumerator, NS_ERROR_FAILURE);
--- a/editor/libeditor/html/nsTableEditor.cpp
+++ b/editor/libeditor/html/nsTableEditor.cpp
@@ -419,17 +419,17 @@ nsHTMLEditor::InsertTableColumn(PRInt32 
                       &curStartRowIndex, &curStartColIndex,
                       &rowSpan, &colSpan, 
                       &actualRowSpan, &actualColSpan, &isSelected);
   NS_ENSURE_SUCCESS(res, res);
   NS_ENSURE_TRUE(curCell, NS_ERROR_FAILURE);
 
   nsAutoEditBatch beginBatching(this);
   // Prevent auto insertion of BR in new cell until we're done
-  nsAutoRules beginRulesSniffing(this, OperationID::insertNode, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::insertNode, nsIEditor::eNext);
 
   // Use column after current cell if requested
   if (aAfter)
   {
     startColIndex += actualColSpan;
     //Detect when user is adding after a COLSPAN=0 case
     // Assume they want to stop the "0" behavior and
     // really add a new column. Thus we set the 
@@ -556,17 +556,17 @@ nsHTMLEditor::InsertTableRow(PRInt32 aNu
   NS_ENSURE_TRUE(curCell, NS_ERROR_FAILURE);
   
   PRInt32 rowCount, colCount;
   res = GetTableSize(table, &rowCount, &colCount);
   NS_ENSURE_SUCCESS(res, res);
 
   nsAutoEditBatch beginBatching(this);
   // Prevent auto insertion of BR in new cell until we're done
-  nsAutoRules beginRulesSniffing(this, OperationID::insertNode, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::insertNode, nsIEditor::eNext);
 
   if (aAfter)
   {
     // Use row after current cell
     startRowIndex += actualRowSpan;
 
     //Detect when user is adding after a ROWSPAN=0 case
     // Assume they want to stop the "0" behavior and
@@ -756,17 +756,17 @@ nsHTMLEditor::DeleteTableCell(PRInt32 aN
                          &startRowIndex, &startColIndex);
 
   NS_ENSURE_SUCCESS(res, res);
   // Don't fail if we didn't find a table or cell
   NS_ENSURE_TRUE(table && cell, NS_EDITOR_ELEMENT_NOT_FOUND);
 
   nsAutoEditBatch beginBatching(this);
   // Prevent rules testing until we're done
-  nsAutoRules beginRulesSniffing(this, OperationID::deleteNode, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::deleteNode, nsIEditor::eNext);
 
   nsCOMPtr<nsIDOMElement> firstCell;
   nsCOMPtr<nsIDOMRange> range;
   res = GetFirstSelectedCell(getter_AddRefs(range), getter_AddRefs(firstCell));
   NS_ENSURE_SUCCESS(res, res);
 
   PRInt32 rangeCount;
   res = selection->GetRangeCount(&rangeCount);
@@ -949,17 +949,17 @@ nsHTMLEditor::DeleteTableCellContents()
                        &startRowIndex, &startColIndex);
   NS_ENSURE_SUCCESS(res, res);
   // Don't fail if no cell found
   NS_ENSURE_TRUE(cell, NS_EDITOR_ELEMENT_NOT_FOUND);
 
 
   nsAutoEditBatch beginBatching(this);
   // Prevent rules testing until we're done
-  nsAutoRules beginRulesSniffing(this, OperationID::deleteNode, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::deleteNode, nsIEditor::eNext);
   //Don't let Rules System change the selection
   nsAutoTxnsConserveSelection dontChangeSelection(this);
 
 
   nsCOMPtr<nsIDOMElement> firstCell;
   nsCOMPtr<nsIDOMRange> range;
   res = GetFirstSelectedCell(getter_AddRefs(range), getter_AddRefs(firstCell));
   NS_ENSURE_SUCCESS(res, res);
@@ -990,17 +990,17 @@ nsHTMLEditor::DeleteTableCellContents()
 }
 
 NS_IMETHODIMP
 nsHTMLEditor::DeleteCellContents(nsIDOMElement *aCell)
 {
   NS_ENSURE_TRUE(aCell, NS_ERROR_NULL_POINTER);
 
   // Prevent rules testing until we're done
-  nsAutoRules beginRulesSniffing(this, OperationID::deleteNode, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::deleteNode, nsIEditor::eNext);
 
   nsCOMPtr<nsIDOMNode> child;
   bool hasChild;
   aCell->HasChildNodes(&hasChild);
 
   while (hasChild)
   {
     aCell->GetLastChild(getter_AddRefs(child));
@@ -1034,17 +1034,17 @@ nsHTMLEditor::DeleteTableColumn(PRInt32 
   if(startColIndex == 0 && aNumber >= colCount)
     return DeleteTable2(table, selection);
 
   // Check for counts too high
   aNumber = NS_MIN(aNumber,(colCount-startColIndex));
 
   nsAutoEditBatch beginBatching(this);
   // Prevent rules testing until we're done
-  nsAutoRules beginRulesSniffing(this, OperationID::deleteNode, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::deleteNode, nsIEditor::eNext);
 
   // Test if deletion is controlled by selected cells
   nsCOMPtr<nsIDOMElement> firstCell;
   nsCOMPtr<nsIDOMRange> range;
   res = GetFirstSelectedCell(getter_AddRefs(range), getter_AddRefs(firstCell));
   NS_ENSURE_SUCCESS(res, res);
 
   PRInt32 rangeCount;
@@ -1210,17 +1210,17 @@ nsHTMLEditor::DeleteTableRow(PRInt32 aNu
   NS_ENSURE_SUCCESS(res, res);
 
   // Shortcut the case of deleting all rows in table
   if(startRowIndex == 0 && aNumber >= rowCount)
     return DeleteTable2(table, selection);
 
   nsAutoEditBatch beginBatching(this);
   // Prevent rules testing until we're done
-  nsAutoRules beginRulesSniffing(this, OperationID::deleteNode, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::deleteNode, nsIEditor::eNext);
 
   nsCOMPtr<nsIDOMElement> firstCell;
   nsCOMPtr<nsIDOMRange> range;
   res = GetFirstSelectedCell(getter_AddRefs(range), getter_AddRefs(firstCell));
   NS_ENSURE_SUCCESS(res, res);
 
   PRInt32 rangeCount;
   res = selection->GetRangeCount(&rangeCount);
@@ -1297,17 +1297,17 @@ nsHTMLEditor::DeleteRow(nsIDOMElement *a
   nsCOMPtr<nsIDOMElement> cell;
   nsCOMPtr<nsIDOMElement> cellInDeleteRow;
   PRInt32 startRowIndex, startColIndex, rowSpan, colSpan, actualRowSpan, actualColSpan;
   bool    isSelected;
   PRInt32 colIndex = 0;
   nsresult res = NS_OK;
    
   // Prevent rules testing until we're done
-  nsAutoRules beginRulesSniffing(this, OperationID::deleteNode, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::deleteNode, nsIEditor::eNext);
 
   // The list of cells we will change rowspan in
   //  and the new rowspan values for each
   nsTArray<nsCOMPtr<nsIDOMElement> > spanCellList;
   nsTArray<PRInt32> newSpanList;
 
   // Scan through cells in row to do rowspan adjustments
   // Note that after we delete row, startRowIndex will point to the
@@ -1722,17 +1722,17 @@ nsHTMLEditor::SplitTableCell()
   NS_ENSURE_SUCCESS(res, res);
 
   // Must have some span to split
   if (actualRowSpan <= 1 && actualColSpan <= 1)
     return NS_OK;
   
   nsAutoEditBatch beginBatching(this);
   // Prevent auto insertion of BR in new cell until we're done
-  nsAutoRules beginRulesSniffing(this, OperationID::insertNode, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::insertNode, nsIEditor::eNext);
 
   // We reset selection  
   nsSetSelectionAfterTableEdit setCaret(this, table, startRowIndex, startColIndex, ePreviousColumn, false);
   //...so suppress Rules System selection munging
   nsAutoTxnsConserveSelection dontChangeSelection(this);
 
   nsCOMPtr<nsIDOMElement> newCell;
   PRInt32 rowIndex = startRowIndex;
@@ -1940,17 +1940,17 @@ nsHTMLEditor::SplitCellIntoRows(nsIDOMEl
 
 NS_IMETHODIMP
 nsHTMLEditor::SwitchTableCellHeaderType(nsIDOMElement *aSourceCell, nsIDOMElement **aNewCell)
 {
   NS_ENSURE_TRUE(aSourceCell, NS_ERROR_NULL_POINTER);
 
   nsAutoEditBatch beginBatching(this);
   // Prevent auto insertion of BR in new cell created by ReplaceContainer
-  nsAutoRules beginRulesSniffing(this, OperationID::insertNode, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::insertNode, nsIEditor::eNext);
 
   nsCOMPtr<nsIDOMNode> newNode;
 
   // Save current selection to restore when done
   // This is needed so ReplaceContainer can monitor selection
   //  when replacing nodes
   nsRefPtr<Selection> selection = GetSelection();
   NS_ENSURE_TRUE(selection, NS_ERROR_FAILURE);
@@ -2199,17 +2199,17 @@ nsHTMLEditor::JoinTableCells(bool aMerge
             NS_ENSURE_SUCCESS(res, res);
           }
         }
       }
     }
 
     // All cell contents are merged. Delete the empty cells we accumulated
     // Prevent rules testing until we're done
-    nsAutoRules beginRulesSniffing(this, OperationID::deleteNode, nsIEditor::eNext);
+    nsAutoRules beginRulesSniffing(this, EditAction::deleteNode, nsIEditor::eNext);
 
     for (PRUint32 i = 0, n = deleteList.Length(); i < n; i++)
     {
       nsIDOMElement *elementPtr = deleteList[i];
       if (elementPtr)
       {
         nsCOMPtr<nsIDOMNode> node = do_QueryInterface(elementPtr);
         res = DeleteNode(node);
@@ -2325,17 +2325,17 @@ nsHTMLEditor::MergeCells(nsCOMPtr<nsIDOM
                          nsCOMPtr<nsIDOMElement> aCellToMerge,
                          bool aDeleteCellToMerge)
 {
   nsCOMPtr<dom::Element> targetCell = do_QueryInterface(aTargetCell);
   nsCOMPtr<dom::Element> cellToMerge = do_QueryInterface(aCellToMerge);
   NS_ENSURE_TRUE(targetCell && cellToMerge, NS_ERROR_NULL_POINTER);
 
   // Prevent rules testing until we're done
-  nsAutoRules beginRulesSniffing(this, OperationID::deleteNode, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::deleteNode, nsIEditor::eNext);
 
   // Don't need to merge if cell is empty
   if (!IsEmptyCell(cellToMerge)) {
     // Get index of last child in target cell
     // If we fail or don't have children, 
     //  we insert at index 0
     PRInt32 insertIndex = 0;
 
@@ -2503,17 +2503,17 @@ nsHTMLEditor::NormalizeTable(nsIDOMEleme
   res = GetTableSize(table, &rowCount, &colCount);
   NS_ENSURE_SUCCESS(res, res);
 
   // Save current selection
   nsAutoSelectionReset selectionResetter(selection, this);
 
   nsAutoEditBatch beginBatching(this);
   // Prevent auto insertion of BR in new cell until we're done
-  nsAutoRules beginRulesSniffing(this, OperationID::insertNode, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::insertNode, nsIEditor::eNext);
 
   nsCOMPtr<nsIDOMElement> cell;
   PRInt32 startRowIndex, startColIndex, rowSpan, colSpan, actualRowSpan, actualColSpan;
   bool    isSelected;
 
   // Scan all cells in each row to detect bad rowspan values
   for(rowIndex = 0; rowIndex < rowCount; rowIndex++)
   {
--- a/editor/libeditor/text/nsPlaintextEditor.cpp
+++ b/editor/libeditor/text/nsPlaintextEditor.cpp
@@ -515,17 +515,17 @@ NS_IMETHODIMP nsPlaintextEditor::CreateB
 
 nsresult
 nsPlaintextEditor::InsertBR(nsCOMPtr<nsIDOMNode>* outBRNode)
 {
   NS_ENSURE_TRUE(outBRNode, NS_ERROR_NULL_POINTER);
   *outBRNode = nullptr;
 
   // calling it text insertion to trigger moz br treatment by rules
-  nsAutoRules beginRulesSniffing(this, OperationID::insertText, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::insertText, nsIEditor::eNext);
 
   nsCOMPtr<nsISelection> selection;
   nsresult res = GetSelection(getter_AddRefs(selection));
   NS_ENSURE_SUCCESS(res, res);
 
   if (!selection->Collapsed()) {
     res = DeleteSelection(nsIEditor::eNone, nsIEditor::eStrip);
     NS_ENSURE_SUCCESS(res, res);
@@ -635,17 +635,17 @@ nsPlaintextEditor::DeleteSelection(EDire
   nsCOMPtr<nsIEditRules> kungFuDeathGrip(mRules);
 
   nsresult result;
 
   HandlingTrustedAction trusted(this, aAction != eNone);
 
   // delete placeholder txns merge.
   nsAutoPlaceHolderBatch batch(this, nsGkAtoms::DeleteTxnName);
-  nsAutoRules beginRulesSniffing(this, OperationID::deleteSelection, aAction);
+  nsAutoRules beginRulesSniffing(this, EditAction::deleteSelection, aAction);
 
   // pre-process
   nsRefPtr<Selection> selection = GetSelection();
   NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);
 
   // If there is an existing selection when an extended delete is requested,
   //  platforms that use "caret-style" caret positioning collapse the
   //  selection to the  start and then create a new selection.
@@ -661,17 +661,17 @@ nsPlaintextEditor::DeleteSelection(EDire
       NS_ENSURE_SUCCESS(result, result);
     }
     else
     { 
       aAction = eNone;
     }
   }
 
-  nsTextRulesInfo ruleInfo(OperationID::deleteSelection);
+  nsTextRulesInfo ruleInfo(EditAction::deleteSelection);
   ruleInfo.collapsedAction = aAction;
   ruleInfo.stripWrappers = aStripWrappers;
   bool cancel, handled;
   result = mRules->WillDoAction(selection, &ruleInfo, &cancel, &handled);
   NS_ENSURE_SUCCESS(result, result);
   if (!cancel && !handled)
   {
     result = DeleteSelectionImpl(aAction, aStripWrappers);
@@ -687,20 +687,20 @@ nsPlaintextEditor::DeleteSelection(EDire
 
 NS_IMETHODIMP nsPlaintextEditor::InsertText(const nsAString &aStringToInsert)
 {
   if (!mRules) { return NS_ERROR_NOT_INITIALIZED; }
 
   // Protect the edit rules object from dying
   nsCOMPtr<nsIEditRules> kungFuDeathGrip(mRules);
 
-  OperationID opID = OperationID::insertText;
+  EditAction opID = EditAction::insertText;
   if (mInIMEMode) 
   {
-    opID = OperationID::insertIMEText;
+    opID = EditAction::insertIMEText;
   }
   nsAutoPlaceHolderBatch batch(this, nullptr); 
   nsAutoRules beginRulesSniffing(this, opID, nsIEditor::eNext);
 
   // pre-process
   nsRefPtr<Selection> selection = GetSelection();
   NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);
   nsAutoString resultString;
@@ -730,29 +730,29 @@ NS_IMETHODIMP nsPlaintextEditor::InsertT
 NS_IMETHODIMP nsPlaintextEditor::InsertLineBreak()
 {
   if (!mRules) { return NS_ERROR_NOT_INITIALIZED; }
 
   // Protect the edit rules object from dying
   nsCOMPtr<nsIEditRules> kungFuDeathGrip(mRules);
 
   nsAutoEditBatch beginBatching(this);
-  nsAutoRules beginRulesSniffing(this, OperationID::insertBreak, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::insertBreak, nsIEditor::eNext);
 
   // pre-process
   nsRefPtr<Selection> selection = GetSelection();
   NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);
 
   // Batching the selection and moving nodes out from under the caret causes
   // caret turds. Ask the shell to invalidate the caret now to avoid the turds.
   nsCOMPtr<nsIPresShell> shell = GetPresShell();
   NS_ENSURE_TRUE(shell, NS_ERROR_NOT_INITIALIZED);
   shell->MaybeInvalidateCaretPosition();
 
-  nsTextRulesInfo ruleInfo(OperationID::insertBreak);
+  nsTextRulesInfo ruleInfo(EditAction::insertBreak);
   ruleInfo.maxLength = mMaxTextLength;
   bool cancel, handled;
   nsresult res = mRules->WillDoAction(selection, &ruleInfo, &cancel, &handled);
   NS_ENSURE_SUCCESS(res, res);
   if (!cancel && !handled)
   {
     // get the (collapsed) selection location
     nsCOMPtr<nsIDOMNode> selNode;
@@ -1077,19 +1077,19 @@ nsPlaintextEditor::Undo(PRUint32 aCount)
   nsCOMPtr<nsIEditRules> kungFuDeathGrip(mRules);
 
   HandlingTrustedAction trusted(this);
 
   nsAutoUpdateViewBatch beginViewBatching(this);
 
   ForceCompositionEnd();
 
-  nsAutoRules beginRulesSniffing(this, OperationID::undo, nsIEditor::eNone);
+  nsAutoRules beginRulesSniffing(this, EditAction::undo, nsIEditor::eNone);
 
-  nsTextRulesInfo ruleInfo(OperationID::undo);
+  nsTextRulesInfo ruleInfo(EditAction::undo);
   nsRefPtr<Selection> selection = GetSelection();
   bool cancel, handled;
   nsresult result = mRules->WillDoAction(selection, &ruleInfo, &cancel, &handled);
   
   if (!cancel && NS_SUCCEEDED(result))
   {
     result = nsEditor::Undo(aCount);
     result = mRules->DidDoAction(selection, &ruleInfo, result);
@@ -1106,19 +1106,19 @@ nsPlaintextEditor::Redo(PRUint32 aCount)
   nsCOMPtr<nsIEditRules> kungFuDeathGrip(mRules);
 
   HandlingTrustedAction trusted(this);
 
   nsAutoUpdateViewBatch beginViewBatching(this);
 
   ForceCompositionEnd();
 
-  nsAutoRules beginRulesSniffing(this, OperationID::redo, nsIEditor::eNone);
+  nsAutoRules beginRulesSniffing(this, EditAction::redo, nsIEditor::eNone);
 
-  nsTextRulesInfo ruleInfo(OperationID::redo);
+  nsTextRulesInfo ruleInfo(EditAction::redo);
   nsRefPtr<Selection> selection = GetSelection();
   bool cancel, handled;
   nsresult result = mRules->WillDoAction(selection, &ruleInfo, &cancel, &handled);
   
   if (!cancel && NS_SUCCEEDED(result))
   {
     result = nsEditor::Redo(aCount);
     result = mRules->DidDoAction(selection, &ruleInfo, result);
@@ -1251,17 +1251,17 @@ NS_IMETHODIMP
 nsPlaintextEditor::OutputToString(const nsAString& aFormatType,
                                   PRUint32 aFlags,
                                   nsAString& aOutputString)
 {
   // Protect the edit rules object from dying
   nsCOMPtr<nsIEditRules> kungFuDeathGrip(mRules);
 
   nsString resultString;
-  nsTextRulesInfo ruleInfo(OperationID::outputText);
+  nsTextRulesInfo ruleInfo(EditAction::outputText);
   ruleInfo.outString = &resultString;
   // XXX Struct should store a nsAReadable*
   nsAutoString str(aFormatType);
   ruleInfo.outputFormat = &str;
   bool cancel, handled;
   nsresult rv = mRules->WillDoAction(nullptr, &ruleInfo, &cancel, &handled);
   if (cancel || NS_FAILED(rv)) { return rv; }
   if (handled)
@@ -1387,20 +1387,20 @@ nsPlaintextEditor::InsertAsQuotation(con
   if (!aQuotedText.IsEmpty() && (aQuotedText.Last() != PRUnichar('\n')))
     quotedStuff.Append(PRUnichar('\n'));
 
   // get selection
   nsRefPtr<Selection> selection = GetSelection();
   NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);
 
   nsAutoEditBatch beginBatching(this);
-  nsAutoRules beginRulesSniffing(this, OperationID::insertText, nsIEditor::eNext);
+  nsAutoRules beginRulesSniffing(this, EditAction::insertText, nsIEditor::eNext);
 
   // give rules a chance to handle or cancel
-  nsTextRulesInfo ruleInfo(OperationID::insertElement);
+  nsTextRulesInfo ruleInfo(EditAction::insertElement);
   bool cancel, handled;
   rv = mRules->WillDoAction(selection, &ruleInfo, &cancel, &handled);
   NS_ENSURE_SUCCESS(rv, rv);
   if (cancel) return NS_OK; // rules canceled the operation
   if (!handled)
   {
     rv = InsertText(quotedStuff);
 
@@ -1515,17 +1515,17 @@ nsPlaintextEditor::GetEmbeddedObjects(ns
   *aNodeList = 0;
   return NS_OK;
 }
 
 
 /** All editor operations which alter the doc should be prefaced
  *  with a call to StartOperation, naming the action and direction */
 NS_IMETHODIMP
-nsPlaintextEditor::StartOperation(OperationID opID,
+nsPlaintextEditor::StartOperation(EditAction opID,
                                   nsIEditor::EDirection aDirection)
 {
   // Protect the edit rules object from dying
   nsCOMPtr<nsIEditRules> kungFuDeathGrip(mRules);
 
   nsEditor::StartOperation(opID, aDirection);  // will set mAction, mDirection
   if (mRules) return mRules->BeforeEdit(mAction, mDirection);
   return NS_OK;
--- a/editor/libeditor/text/nsPlaintextEditor.h
+++ b/editor/libeditor/text/nsPlaintextEditor.h
@@ -104,17 +104,17 @@ public:
   NS_IMETHOD OutputToStream(nsIOutputStream* aOutputStream,
                             const nsAString& aFormatType,
                             const nsACString& aCharsetOverride,
                             PRUint32 aFlags);
 
 
   /** All editor operations which alter the doc should be prefaced
    *  with a call to StartOperation, naming the action and direction */
-  NS_IMETHOD StartOperation(OperationID opID,
+  NS_IMETHOD StartOperation(EditAction opID,
                             nsIEditor::EDirection aDirection);
 
   /** All editor operations which alter the doc should be followed
    *  with a call to EndOperation */
   NS_IMETHOD EndOperation();
 
   /** make the given selection span the entire document */
   NS_IMETHOD SelectEntireDocument(nsISelection *aSelection);
--- a/editor/libeditor/text/nsTextEditRules.cpp
+++ b/editor/libeditor/text/nsTextEditRules.cpp
@@ -58,17 +58,17 @@ using namespace mozilla;
 nsTextEditRules::nsTextEditRules()
 : mEditor(nullptr)
 , mPasswordText()
 , mPasswordIMEText()
 , mPasswordIMEIndex(0)
 , mActionNesting(0)
 , mLockRulesSniffing(false)
 , mDidExplicitlySetInterline(false)
-, mTheAction(OperationID::none)
+, mTheAction(EditAction::none)
 , mLastStart(0)
 , mLastLength(0)
 {
 }
 
 nsTextEditRules::~nsTextEditRules()
 {
    // do NOT delete mEditor here.  We do not hold a ref count to mEditor.  mEditor owns our lifespan.
@@ -140,17 +140,17 @@ nsTextEditRules::DetachEditor()
   if (mTimer)
     mTimer->Cancel();
 
   mEditor = nullptr;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsTextEditRules::BeforeEdit(OperationID action,
+nsTextEditRules::BeforeEdit(EditAction action,
                             nsIEditor::EDirection aDirection)
 {
   if (mLockRulesSniffing) return NS_OK;
   
   nsAutoLockRulesSniffing lockIt(this);
   mDidExplicitlySetInterline = false;
   if (!mActionNesting)
   {
@@ -167,17 +167,17 @@ nsTextEditRules::BeforeEdit(OperationID 
   selection->GetAnchorNode(getter_AddRefs(mCachedSelectionNode));
   selection->GetAnchorOffset(&mCachedSelectionOffset);
 
   return NS_OK;
 }
 
 
 NS_IMETHODIMP
-nsTextEditRules::AfterEdit(OperationID action,
+nsTextEditRules::AfterEdit(EditAction action,
                            nsIEditor::EDirection aDirection)
 {
   if (mLockRulesSniffing) return NS_OK;
   
   nsAutoLockRulesSniffing lockIt(this);
   
   NS_PRECONDITION(mActionNesting>0, "bad action nesting!");
   nsresult res = NS_OK;
@@ -223,37 +223,37 @@ nsTextEditRules::WillDoAction(Selection*
 
   *aCancel = false;
   *aHandled = false;
 
   // my kingdom for dynamic cast
   nsTextRulesInfo *info = static_cast<nsTextRulesInfo*>(aInfo);
 
   switch (info->action) {
-    case OperationID::insertBreak:
+    case EditAction::insertBreak:
       return WillInsertBreak(aSelection, aCancel, aHandled, info->maxLength);
-    case OperationID::insertText:
-    case OperationID::insertIMEText:
+    case EditAction::insertText:
+    case EditAction::insertIMEText:
       return WillInsertText(info->action, aSelection, aCancel, aHandled,
                             info->inString, info->outString, info->maxLength);
-    case OperationID::deleteSelection:
+    case EditAction::deleteSelection:
       return WillDeleteSelection(aSelection, info->collapsedAction,
                                  aCancel, aHandled);
-    case OperationID::undo:
+    case EditAction::undo:
       return WillUndo(aSelection, aCancel, aHandled);
-    case OperationID::redo:
+    case EditAction::redo:
       return WillRedo(aSelection, aCancel, aHandled);
-    case OperationID::setTextProperty:
+    case EditAction::setTextProperty:
       return WillSetTextProperty(aSelection, aCancel, aHandled);
-    case OperationID::removeTextProperty:
+    case EditAction::removeTextProperty:
       return WillRemoveTextProperty(aSelection, aCancel, aHandled);
-    case OperationID::outputText:
+    case EditAction::outputText:
       return WillOutputText(aSelection, info->outputFormat, info->outString,
                             aCancel, aHandled);
-    case OperationID::insertElement:
+    case EditAction::insertElement:
       // i had thought this would be html rules only.  but we put pre elements
       // into plaintext mail when doing quoting for reply!  doh!
       return WillInsert(aSelection, aCancel);
     default:
       return NS_ERROR_FAILURE;
   }
 }
 
@@ -267,32 +267,32 @@ nsTextEditRules::DidDoAction(nsISelectio
 
   NS_ENSURE_TRUE(aSelection && aInfo, NS_ERROR_NULL_POINTER);
     
   // my kingdom for dynamic cast
   nsTextRulesInfo *info = static_cast<nsTextRulesInfo*>(aInfo);
 
   switch (info->action)
   {
-    case OperationID::insertBreak:
+    case EditAction::insertBreak:
       return DidInsertBreak(aSelection, aResult);
-    case OperationID::insertText:
-    case OperationID::insertIMEText:
+    case EditAction::insertText:
+    case EditAction::insertIMEText:
       return DidInsertText(aSelection, aResult);
-    case OperationID::deleteSelection:
+    case EditAction::deleteSelection:
       return DidDeleteSelection(aSelection, info->collapsedAction, aResult);
-    case OperationID::undo:
+    case EditAction::undo:
       return DidUndo(aSelection, aResult);
-    case OperationID::redo:
+    case EditAction::redo:
       return DidRedo(aSelection, aResult);
-    case OperationID::setTextProperty:
+    case EditAction::setTextProperty:
       return DidSetTextProperty(aSelection, aResult);
-    case OperationID::removeTextProperty:
+    case EditAction::removeTextProperty:
       return DidRemoveTextProperty(aSelection, aResult);
-    case OperationID::outputText:
+    case EditAction::outputText:
       return DidOutputText(aSelection, aResult);
     default:
       // Don't fail on transactions we don't handle here!
       return NS_OK;
   }
 }
 
 
@@ -535,27 +535,27 @@ nsTextEditRules::HandleNewLines(nsString
   case nsIPlaintextEditor::eNewlinesPasteIntact:
     // even if we're pasting newlines, don't paste leading/trailing ones
     aString.Trim(CRLF, true, true);
     break;
   }
 }
 
 nsresult
-nsTextEditRules::WillInsertText(OperationID aAction,
+nsTextEditRules::WillInsertText(EditAction aAction,
                                 Selection* aSelection,
                                 bool            *aCancel,
                                 bool            *aHandled,
                                 const nsAString *inString,
                                 nsAString *outString,
                                 PRInt32          aMaxLength)
 {  
   if (!aSelection || !aCancel || !aHandled) { return NS_ERROR_NULL_POINTER; }
 
-  if (inString->IsEmpty() && aAction != OperationID::insertIMEText) {
+  if (inString->IsEmpty() && aAction != EditAction::insertIMEText) {
     // HACK: this is a fix for bug 19395
     // I can't outlaw all empty insertions
     // because IME transaction depend on them
     // There is more work to do to make the 
     // world safe for IME.
     *aCancel = true;
     *aHandled = false;
     return NS_OK;
@@ -569,17 +569,17 @@ nsTextEditRules::WillInsertText(Operatio
   // NOTE, this function copies inString into outString for us.
   bool truncated = false;
   nsresult res = TruncateInsertionIfNeeded(aSelection, inString, outString,
                                            aMaxLength, &truncated);
   NS_ENSURE_SUCCESS(res, res);
   // If we're exceeding the maxlength when composing IME, we need to clean up
   // the composing text, so we shouldn't return early.
   if (truncated && outString->IsEmpty() &&
-      aAction != OperationID::insertIMEText) {
+      aAction != EditAction::insertIMEText) {
     *aCancel = true;
     return NS_OK;
   }
   
   PRInt32 start = 0;
   PRInt32 end = 0;
 
   // handle password field docs
@@ -604,17 +604,17 @@ nsTextEditRules::WillInsertText(Operatio
   // we want to ignore result of WillInsert()
   *aCancel = false;
   
   // handle password field data
   // this has the side effect of changing all the characters in aOutString
   // to the replacement character
   if (IsPasswordEditor())
   {
-    if (aAction == OperationID::insertIMEText) {
+    if (aAction == EditAction::insertIMEText) {
       RemoveIMETextFromPWBuf(start, outString);
     }
   }
 
   // People have lots of different ideas about what text fields
   // should do with multiline pastes.  See bugs 21032, 23485, 23485, 50935.
   // The six possible options are:
   // 0. paste newlines intact
@@ -671,21 +671,21 @@ nsTextEditRules::WillInsertText(Operatio
       !mEditor->CanContainTag(selNode, nsGkAtoms::textTagName)) {
     return NS_ERROR_FAILURE;
   }
 
   // we need to get the doc
   nsCOMPtr<nsIDOMDocument> doc = mEditor->GetDOMDocument();
   NS_ENSURE_TRUE(doc, NS_ERROR_NOT_INITIALIZED);
     
-  if (aAction == OperationID::insertIMEText) {
+  if (aAction == EditAction::insertIMEText) {
     res = mEditor->InsertTextImpl(*outString, address_of(selNode), &selOffset, doc);
     NS_ENSURE_SUCCESS(res, res);
   } else {
-    // aAction == OperationID::insertText; find where we are
+    // aAction == EditAction::insertText; find where we are
     nsCOMPtr<nsIDOMNode> curNode = selNode;
     PRInt32 curOffset = selOffset;
 
     // don't spaz my selection in subtransactions
     nsAutoTxnsConserveSelection dontSpazMySelection(mEditor);
 
     res = mEditor->InsertTextImpl(*outString, address_of(curNode),
                                   &curOffset, doc);
@@ -1082,17 +1082,17 @@ nsTextEditRules::CreateBogusNodeIfNeeded
   NS_ENSURE_TRUE(mEditor, NS_ERROR_NULL_POINTER);
 
   if (mBogusNode) {
     // Let's not create more than one, ok?
     return NS_OK;
   }
 
   // tell rules system to not do any post-processing
-  nsAutoRules beginRulesSniffing(mEditor, OperationID::ignore, nsIEditor::eNone);
+  nsAutoRules beginRulesSniffing(mEditor, EditAction::ignore, nsIEditor::eNone);
 
   nsCOMPtr<dom::Element> body = mEditor->GetRoot();
   if (!body) {
     // We don't even have a body yet, don't insert any bogus nodes at
     // this point.
     return NS_OK;
   }
 
--- a/editor/libeditor/text/nsTextEditRules.h
+++ b/editor/libeditor/text/nsTextEditRules.h
@@ -44,19 +44,19 @@ public:
   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsTextEditRules, nsIEditRules)
   
               nsTextEditRules();
   virtual     ~nsTextEditRules();
 
   // nsIEditRules methods
   NS_IMETHOD Init(nsPlaintextEditor *aEditor);
   NS_IMETHOD DetachEditor();
-  NS_IMETHOD BeforeEdit(OperationID action,
+  NS_IMETHOD BeforeEdit(EditAction action,
                         nsIEditor::EDirection aDirection);
-  NS_IMETHOD AfterEdit(OperationID action,
+  NS_IMETHOD AfterEdit(EditAction action,
                        nsIEditor::EDirection aDirection);
   NS_IMETHOD WillDoAction(mozilla::Selection* aSelection, nsRulesInfo* aInfo,
                           bool* aCancel, bool* aHandled);
   NS_IMETHOD DidDoAction(nsISelection *aSelection, nsRulesInfo *aInfo, nsresult aResult);
   NS_IMETHOD DocumentIsEmpty(bool *aDocumentIsEmpty);
   NS_IMETHOD DocumentModified();
 
 public:
@@ -96,17 +96,17 @@ public:
    * @param aLength the number of password characters that aOutString should
    *        contain.
    */
   static void FillBufWithPWChars(nsAString *aOutString, PRInt32 aLength);
 
 protected:
 
   // nsTextEditRules implementation methods
-  nsresult WillInsertText(  OperationID aAction,
+  nsresult WillInsertText(  EditAction aAction,
                             mozilla::Selection* aSelection,
                             bool            *aCancel,
                             bool            *aHandled,
                             const nsAString *inString,
                             nsAString       *outString,
                             PRInt32          aMaxLength);
   nsresult DidInsertText(nsISelection *aSelection, nsresult aResult);
   nsresult GetTopEnclosingPre(nsIDOMNode *aNode, nsIDOMNode** aOutPreNode);
@@ -228,32 +228,32 @@ protected:
   PRInt32              mCachedSelectionOffset;  // cached selected offset
   PRUint32             mActionNesting;
   bool                 mLockRulesSniffing;
   bool                 mDidExplicitlySetInterline;
   bool                 mDeleteBidiImmediately; // in bidirectional text, delete
                                                // characters not visually 
                                                // adjacent to the caret without
                                                // moving the caret first.
-  OperationID mTheAction;     // the top level editor action
+  EditAction mTheAction;     // the top level editor action
   nsCOMPtr<nsITimer>   mTimer;
   PRUint32             mLastStart, mLastLength;
 
   // friends
   friend class nsAutoLockRulesSniffing;
 
 };
 
 
 
 class nsTextRulesInfo : public nsRulesInfo
 {
  public:
  
-  nsTextRulesInfo(OperationID aAction) :
+  nsTextRulesInfo(EditAction aAction) :
     nsRulesInfo(aAction),
     inString(0),
     outString(0),
     outputFormat(0),
     maxLength(-1),
     collapsedAction(nsIEditor::eNext),
     stripWrappers(nsIEditor::eStrip),
     bOrdered(false),
--- a/extensions/spellcheck/src/mozInlineSpellChecker.cpp
+++ b/extensions/spellcheck/src/mozInlineSpellChecker.cpp
@@ -98,34 +98,34 @@ mozInlineSpellStatus::mozInlineSpellStat
 //
 //    This is the most complicated case. For changes, we need to compute the
 //    range of stuff that changed based on the old and new caret positions,
 //    as well as use a range possibly provided by the editor (start and end,
 //    which are usually NULL) to get a range with the union of these.
 
 nsresult
 mozInlineSpellStatus::InitForEditorChange(
-    OperationID aAction,
+    EditAction aAction,
     nsIDOMNode* aAnchorNode, PRInt32 aAnchorOffset,
     nsIDOMNode* aPreviousNode, PRInt32 aPreviousOffset,
     nsIDOMNode* aStartNode, PRInt32 aStartOffset,
     nsIDOMNode* aEndNode, PRInt32 aEndOffset)
 {
   nsresult rv;
 
   nsCOMPtr<nsIDOMDocument> doc;
   rv = GetDocument(getter_AddRefs(doc));
   NS_ENSURE_SUCCESS(rv, rv);
 
   // save the anchor point as a range so we can find the current word later
   rv = PositionToCollapsedRange(doc, aAnchorNode, aAnchorOffset,
                                 getter_AddRefs(mAnchorRange));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  if (aAction == OperationID::deleteSelection) {
+  if (aAction == EditAction::deleteSelection) {
     // Deletes are easy, the range is just the current anchor. We set the range
     // to check to be empty, FinishInitOnEvent will fill in the range to be
     // the current word.
     mOp = eOpChangeDelete;
     mRange = nullptr;
     return NS_OK;
   }
 
@@ -148,17 +148,17 @@ mozInlineSpellStatus::InitForEditorChang
     rv = mRange->SetStart(aAnchorNode, aAnchorOffset);
     NS_ENSURE_SUCCESS(rv, rv);
     rv = mRange->SetEnd(aPreviousNode, aPreviousOffset);
   }
   NS_ENSURE_SUCCESS(rv, rv);
 
   // On insert save this range: DoSpellCheck optimizes things in this range.
   // Otherwise, just leave this NULL.
-  if (aAction == OperationID::insertText)
+  if (aAction == EditAction::insertText)
     mCreatedRange = mRange;
 
   // if we were given a range, we need to expand our range to encompass it
   if (aStartNode && aEndNode) {
     rv = mRange->ComparePoint(aStartNode, aStartOffset, &cmpResult);
     NS_ENSURE_SUCCESS(rv, rv);
     if (cmpResult < 0) { // given range starts before
       rv = mRange->SetStart(aStartNode, aStartOffset);
@@ -726,17 +726,17 @@ mozInlineSpellChecker::SpellCheckAfterEd
   nsCOMPtr<nsIDOMNode> anchorNode;
   rv = aSelection->GetAnchorNode(getter_AddRefs(anchorNode));
   NS_ENSURE_SUCCESS(rv, rv);
   PRInt32 anchorOffset;
   rv = aSelection->GetAnchorOffset(&anchorOffset);
   NS_ENSURE_SUCCESS(rv, rv);
 
   mozInlineSpellStatus status(this);
-  rv = status.InitForEditorChange((OperationID)aAction,
+  rv = status.InitForEditorChange((EditAction)aAction,
                                   anchorNode, anchorOffset,
                                   aPreviousSelectedNode, aPreviousSelectedOffset,
                                   aStartNode, aStartOffset,
                                   aEndNode, aEndOffset);
   NS_ENSURE_SUCCESS(rv, rv);
   rv = ScheduleSpellCheck(status);
   NS_ENSURE_SUCCESS(rv, rv);
 
--- a/extensions/spellcheck/src/mozInlineSpellChecker.h
+++ b/extensions/spellcheck/src/mozInlineSpellChecker.h
@@ -30,17 +30,17 @@ class mozInlineSpellWordUtil;
 class mozInlineSpellChecker;
 class mozInlineSpellResume;
 
 class mozInlineSpellStatus
 {
 public:
   mozInlineSpellStatus(mozInlineSpellChecker* aSpellChecker);
 
-  nsresult InitForEditorChange(OperationID aAction,
+  nsresult InitForEditorChange(EditAction aAction,
                                nsIDOMNode* aAnchorNode, PRInt32 aAnchorOffset,
                                nsIDOMNode* aPreviousNode, PRInt32 aPreviousOffset,
                                nsIDOMNode* aStartNode, PRInt32 aStartOffset,
                                nsIDOMNode* aEndNode, PRInt32 aEndOffset);
   nsresult InitForNavigation(bool aForceCheck, PRInt32 aNewPositionOffset,
                              nsIDOMNode* aOldAnchorNode, PRInt32 aOldAnchorOffset,
                              nsIDOMNode* aNewAnchorNode, PRInt32 aNewAnchorOffset,
                              bool* aContinue);