Bug 1117041 - Mark virtual overridden functions as MOZ_OVERRIDE in editor; r=roc
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 02 Jan 2015 01:14:13 -0500
changeset 247708 6274430b28ba6b42b7a68788880527b0d8e3fcd7
parent 247707 9e9d66cbad378585ab6cb68f0de8f0042cbc1492
child 247709 df15e57ae78d43f86271b9878d3c338a4ebb89be
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs1117041
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1117041 - Mark virtual overridden functions as MOZ_OVERRIDE in editor; r=roc This patch also devirtualizes some of the methods that were not overridden by any derived classes.
editor/libeditor/CreateElementTxn.h
editor/libeditor/DeleteNodeTxn.h
editor/libeditor/DeleteRangeTxn.h
editor/libeditor/DeleteTextTxn.h
editor/libeditor/EditAggregateTxn.h
editor/libeditor/EditTxn.h
editor/libeditor/JoinNodeTxn.h
editor/libeditor/PlaceholderTxn.cpp
editor/libeditor/PlaceholderTxn.h
editor/libeditor/SetDocTitleTxn.h
editor/libeditor/SplitNodeTxn.h
editor/libeditor/nsEditorCommands.h
editor/libeditor/nsHTMLDataTransfer.cpp
editor/libeditor/nsHTMLEditRules.h
editor/libeditor/nsHTMLEditor.cpp
editor/libeditor/nsHTMLEditor.h
editor/libeditor/nsHTMLEditorEventListener.h
editor/libeditor/nsPlaintextEditor.h
editor/libeditor/nsStyleSheetTxns.h
editor/libeditor/nsTableEditor.cpp
editor/libeditor/nsTextEditRules.h
editor/txtsvc/nsFilteredContentIterator.h
editor/txtsvc/nsTextServicesDocument.h
--- a/editor/libeditor/CreateElementTxn.h
+++ b/editor/libeditor/CreateElementTxn.h
@@ -39,17 +39,17 @@ public:
                    nsINode& aParent,
                    int32_t aOffsetInParent);
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(CreateElementTxn, EditTxn)
 
   NS_DECL_EDITTXN
 
-  NS_IMETHOD RedoTransaction();
+  NS_IMETHOD RedoTransaction() MOZ_OVERRIDE;
 
   already_AddRefed<Element> GetNewNode();
 
 protected:
   virtual ~CreateElementTxn();
 
   /** the document into which the new node will be inserted */
   nsEditor* mEditor;
--- a/editor/libeditor/DeleteNodeTxn.h
+++ b/editor/libeditor/DeleteNodeTxn.h
@@ -31,17 +31,17 @@ public:
 
   DeleteNodeTxn();
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(DeleteNodeTxn, EditTxn)
 
   NS_DECL_EDITTXN
 
-  NS_IMETHOD RedoTransaction();
+  NS_IMETHOD RedoTransaction() MOZ_OVERRIDE;
 
 protected:
   virtual ~DeleteNodeTxn();
 
   /** the element to delete */
   nsCOMPtr<nsINode> mNode;
 
   /** parent of node to delete */
--- a/editor/libeditor/DeleteRangeTxn.h
+++ b/editor/libeditor/DeleteRangeTxn.h
@@ -32,23 +32,23 @@ public:
     */
   nsresult Init(nsEditor* aEditor,
                 nsRange* aRange,
                 nsRangeUpdater* aRangeUpdater);
 
   DeleteRangeTxn();
 
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(DeleteRangeTxn, EditAggregateTxn)
-  NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
+  NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr) MOZ_OVERRIDE;
 
   NS_DECL_EDITTXN
 
-  NS_IMETHOD RedoTransaction();
+  NS_IMETHOD RedoTransaction() MOZ_OVERRIDE;
 
-  virtual void LastRelease()
+  virtual void LastRelease() MOZ_OVERRIDE
   {
     mRange = nullptr;
     EditAggregateTxn::LastRelease();
   }
 protected:
 
   nsresult CreateTxnsToDeleteBetween(nsINode* aNode,
                                      int32_t aStartOffset,
--- a/editor/libeditor/DeleteTextTxn.h
+++ b/editor/libeditor/DeleteTextTxn.h
@@ -36,17 +36,17 @@ public:
                 nsGenericDOMDataNode& aCharData,
                 uint32_t aOffset,
                 uint32_t aNumCharsToDelete,
                 nsRangeUpdater* aRangeUpdater);
 
   nsresult Init();
 
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(DeleteTextTxn, EditTxn)
-  NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
+  NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr) MOZ_OVERRIDE;
 
   NS_DECL_EDITTXN
 
   uint32_t GetOffset() { return mOffset; }
 
   uint32_t GetNumCharsToDelete() { return mNumCharsToDelete; }
 
 protected:
--- a/editor/libeditor/EditAggregateTxn.h
+++ b/editor/libeditor/EditAggregateTxn.h
@@ -26,18 +26,18 @@ class EditAggregateTxn : public EditTxn
 public:
   EditAggregateTxn();
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(EditAggregateTxn, EditTxn)
 
   NS_DECL_EDITTXN
 
-  NS_IMETHOD RedoTransaction();
-  NS_IMETHOD Merge(nsITransaction *aTransaction, bool *aDidMerge);
+  NS_IMETHOD RedoTransaction() MOZ_OVERRIDE;
+  NS_IMETHOD Merge(nsITransaction *aTransaction, bool *aDidMerge) MOZ_OVERRIDE;
 
   /** append a transaction to this aggregate */
   NS_IMETHOD AppendChild(EditTxn *aTxn);
 
   /** get the name assigned to this txn */
   NS_IMETHOD GetName(nsIAtom **aName);
 
 protected:
--- a/editor/libeditor/EditTxn.h
+++ b/editor/libeditor/EditTxn.h
@@ -19,22 +19,22 @@ class EditTxn : public nsITransaction,
                 public nsPIEditorTransaction
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(EditTxn, nsITransaction)
 
   virtual void LastRelease() {}
 
-  NS_IMETHOD RedoTransaction(void);
-  NS_IMETHOD GetIsTransient(bool *aIsTransient);
-  NS_IMETHOD Merge(nsITransaction *aTransaction, bool *aDidMerge);
+  NS_IMETHOD RedoTransaction(void) MOZ_OVERRIDE;
+  NS_IMETHOD GetIsTransient(bool *aIsTransient) MOZ_OVERRIDE;
+  NS_IMETHOD Merge(nsITransaction *aTransaction, bool *aDidMerge) MOZ_OVERRIDE;
 
 protected:
   virtual ~EditTxn();
 };
 
 #define NS_DECL_EDITTXN \
-  NS_IMETHOD DoTransaction(); \
-  NS_IMETHOD UndoTransaction(); \
-  NS_IMETHOD GetTxnDescription(nsAString& aTxnDescription);
+  NS_IMETHOD DoTransaction() MOZ_OVERRIDE; \
+  NS_IMETHOD UndoTransaction() MOZ_OVERRIDE; \
+  NS_IMETHOD GetTxnDescription(nsAString& aTxnDescription) MOZ_OVERRIDE;
 
 #endif
--- a/editor/libeditor/JoinNodeTxn.h
+++ b/editor/libeditor/JoinNodeTxn.h
@@ -32,17 +32,17 @@ public:
     * @param aRightNode the second of two nodes to join
     */
   JoinNodeTxn(nsEditor& aEditor, nsINode& aLeftNode, nsINode& aRightNode);
 
   /* Call this after constructing to ensure the inputs are correct */
   nsresult CheckValidity();
 
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(JoinNodeTxn, EditTxn)
-  NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
+  NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr) MOZ_OVERRIDE;
 
   NS_DECL_EDITTXN
 
 protected:
   nsEditor&  mEditor;
 
   /** The nodes to operate upon.  After the merge, mRightNode remains and
    * mLeftNode is removed from the content tree.
--- a/editor/libeditor/PlaceholderTxn.cpp
+++ b/editor/libeditor/PlaceholderTxn.cpp
@@ -246,16 +246,16 @@ NS_IMETHODIMP PlaceholderTxn::ForwardEnd
 }
 
 NS_IMETHODIMP PlaceholderTxn::Commit()
 {
   mCommitted = true;
   return NS_OK;
 }
 
-NS_IMETHODIMP PlaceholderTxn::RememberEndingSelection()
+nsresult PlaceholderTxn::RememberEndingSelection()
 {
   nsRefPtr<Selection> selection = mEditor->GetSelection();
   NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);
   mEndSel.SaveSelection(selection);
   return NS_OK;
 }
 
--- a/editor/libeditor/PlaceholderTxn.h
+++ b/editor/libeditor/PlaceholderTxn.h
@@ -39,35 +39,35 @@ public:
   
   PlaceholderTxn();
 
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(PlaceholderTxn, EditAggregateTxn)
 // ------------ EditAggregateTxn -----------------------
 
   NS_DECL_EDITTXN
 
-  NS_IMETHOD RedoTransaction();
-  NS_IMETHOD Merge(nsITransaction *aTransaction, bool *aDidMerge);
+  NS_IMETHOD RedoTransaction() MOZ_OVERRIDE;
+  NS_IMETHOD Merge(nsITransaction *aTransaction, bool *aDidMerge) MOZ_OVERRIDE;
 
 // ------------ nsIAbsorbingTransaction -----------------------
 
   NS_IMETHOD Init(nsIAtom* aName, nsSelectionState* aSelState,
-                  nsEditor* aEditor);
+                  nsEditor* aEditor) MOZ_OVERRIDE;
   
-  NS_IMETHOD GetTxnName(nsIAtom **aName);
+  NS_IMETHOD GetTxnName(nsIAtom **aName) MOZ_OVERRIDE;
   
-  NS_IMETHOD StartSelectionEquals(nsSelectionState *aSelState, bool *aResult);
+  NS_IMETHOD StartSelectionEquals(nsSelectionState *aSelState, bool *aResult) MOZ_OVERRIDE;
 
-  NS_IMETHOD EndPlaceHolderBatch();
+  NS_IMETHOD EndPlaceHolderBatch() MOZ_OVERRIDE;
 
-  NS_IMETHOD ForwardEndBatchTo(nsIAbsorbingTransaction *aForwardingAddress);
+  NS_IMETHOD ForwardEndBatchTo(nsIAbsorbingTransaction *aForwardingAddress) MOZ_OVERRIDE;
 
-  NS_IMETHOD Commit();
+  NS_IMETHOD Commit() MOZ_OVERRIDE;
 
-  NS_IMETHOD RememberEndingSelection();
+  nsresult RememberEndingSelection();
 
 protected:
   virtual ~PlaceholderTxn();
 
   /** the presentation shell, which we'll need to get the selection */
   bool        mAbsorb;          // do we auto absorb any and all transaction?
   nsWeakPtr   mForwarding;
   mozilla::dom::IMETextTxn *mIMETextTxn;      // first IME txn in this placeholder - used for IME merging
--- a/editor/libeditor/SetDocTitleTxn.h
+++ b/editor/libeditor/SetDocTitleTxn.h
@@ -28,18 +28,18 @@ public:
                   const nsAString *aValue);
   SetDocTitleTxn();
 private:
   nsresult SetDomTitle(const nsAString& aTitle);
 
 public:
   NS_DECL_EDITTXN
 
-  NS_IMETHOD RedoTransaction();
-  NS_IMETHOD GetIsTransient(bool *aIsTransient);
+  NS_IMETHOD RedoTransaction() MOZ_OVERRIDE;
+  NS_IMETHOD GetIsTransient(bool *aIsTransient) MOZ_OVERRIDE;
 
 protected:
 
   /** the editor that created this transaction */
   nsIHTMLEditor*  mEditor;
   
   /** The new title string */
   nsString    mValue;
--- a/editor/libeditor/SplitNodeTxn.h
+++ b/editor/libeditor/SplitNodeTxn.h
@@ -34,17 +34,17 @@ public:
     */
   SplitNodeTxn(nsEditor& aEditor, nsIContent& aNode, int32_t aOffset);
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(SplitNodeTxn, EditTxn)
 
   NS_DECL_EDITTXN
 
-  NS_IMETHOD RedoTransaction();
+  NS_IMETHOD RedoTransaction() MOZ_OVERRIDE;
 
   nsIContent* GetNewNode();
 
 protected:
   virtual ~SplitNodeTxn();
 
   nsEditor& mEditor;
 
--- a/editor/libeditor/nsEditorCommands.h
+++ b/editor/libeditor/nsEditorCommands.h
@@ -18,32 +18,32 @@ class nsISupports;
 // MUST be stateless. Any state must be stored via the refCon (an nsIEditor).
 class nsBaseEditorCommand : public nsIControllerCommand
 {
 public:
   nsBaseEditorCommand();
     
   NS_DECL_ISUPPORTS
     
-  NS_IMETHOD  IsCommandEnabled(const char * aCommandName, nsISupports *aCommandRefCon, bool *_retval) = 0;
-  NS_IMETHOD  DoCommand(const char *aCommandName, nsISupports *aCommandRefCon) = 0;
+  NS_IMETHOD  IsCommandEnabled(const char * aCommandName, nsISupports *aCommandRefCon, bool *_retval) MOZ_OVERRIDE = 0;
+  NS_IMETHOD  DoCommand(const char *aCommandName, nsISupports *aCommandRefCon) MOZ_OVERRIDE = 0;
 
 protected:
   virtual ~nsBaseEditorCommand() {}
 };
 
 
 #define NS_DECL_EDITOR_COMMAND(_cmd)                    \
 class _cmd : public nsBaseEditorCommand                 \
 {                                                       \
 public:                                                 \
-  NS_IMETHOD IsCommandEnabled(const char * aCommandName, nsISupports *aCommandRefCon, bool *_retval); \
-  NS_IMETHOD DoCommand(const char *aCommandName, nsISupports *aCommandRefCon); \
-  NS_IMETHOD DoCommandParams(const char *aCommandName,nsICommandParams *aParams, nsISupports *aCommandRefCon); \
-  NS_IMETHOD GetCommandStateParams(const char *aCommandName,nsICommandParams *aParams, nsISupports *aCommandRefCon); \
+  NS_IMETHOD IsCommandEnabled(const char * aCommandName, nsISupports *aCommandRefCon, bool *_retval) MOZ_OVERRIDE; \
+  NS_IMETHOD DoCommand(const char *aCommandName, nsISupports *aCommandRefCon) MOZ_OVERRIDE; \
+  NS_IMETHOD DoCommandParams(const char *aCommandName,nsICommandParams *aParams, nsISupports *aCommandRefCon) MOZ_OVERRIDE; \
+  NS_IMETHOD GetCommandStateParams(const char *aCommandName,nsICommandParams *aParams, nsISupports *aCommandRefCon) MOZ_OVERRIDE; \
 };
 
 
 
 // basic editor commands
 NS_DECL_EDITOR_COMMAND(nsUndoCommand)
 NS_DECL_EDITOR_COMMAND(nsRedoCommand)
 NS_DECL_EDITOR_COMMAND(nsClearUndoCommand)
--- a/editor/libeditor/nsHTMLDataTransfer.cpp
+++ b/editor/libeditor/nsHTMLDataTransfer.cpp
@@ -130,17 +130,18 @@ static nsCOMPtr<nsIDOMNode> GetTablePare
     }
     parent->GetParentNode(getter_AddRefs(tmp));
     parent = tmp;
   }
   return nullptr;
 }
 
 
-NS_IMETHODIMP nsHTMLEditor::LoadHTML(const nsAString & aInputString)
+nsresult
+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, EditAction::loadHTML, nsIEditor::eNext);
 
@@ -831,18 +832,19 @@ nsHTMLEditor::StripFormattingNodes(nsIDO
   return NS_OK;
 }
 
 NS_IMETHODIMP nsHTMLEditor::PrepareTransferable(nsITransferable **transferable)
 {
   return NS_OK;
 }
 
-NS_IMETHODIMP nsHTMLEditor::PrepareHTMLTransferable(nsITransferable **aTransferable, 
-                                                    bool aHavePrivFlavor)
+nsresult
+nsHTMLEditor::PrepareHTMLTransferable(nsITransferable **aTransferable,
+                                      bool aHavePrivFlavor)
 {
   // Create generic Transferable for getting the data
   nsresult rv = CallCreateInstance("@mozilla.org/widget/transferable;1", aTransferable);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Get the nsITransferable interface for getting the data from the clipboard
   if (aTransferable)
   {
@@ -1117,23 +1119,24 @@ nsresult nsHTMLEditor::InsertObject(cons
                                  aDestinationNode, aDestOffset,
                                  aDoDeleteSelection,
                                  aIsSafe);
   }
 
   return NS_OK;
 }
 
-NS_IMETHODIMP nsHTMLEditor::InsertFromTransferable(nsITransferable *transferable, 
-                                                   nsIDOMDocument *aSourceDoc,
-                                                   const nsAString & aContextStr,
-                                                   const nsAString & aInfoStr,
-                                                   nsIDOMNode *aDestinationNode,
-                                                   int32_t aDestOffset,
-                                                   bool aDoDeleteSelection)
+nsresult
+nsHTMLEditor::InsertFromTransferable(nsITransferable *transferable,
+                                     nsIDOMDocument *aSourceDoc,
+                                     const nsAString & aContextStr,
+                                     const nsAString & aInfoStr,
+                                     nsIDOMNode *aDestinationNode,
+                                     int32_t aDestOffset,
+                                     bool aDoDeleteSelection)
 {
   nsresult rv = NS_OK;
   nsXPIDLCString bestFlavor;
   nsCOMPtr<nsISupports> genericDataObj;
   uint32_t len = 0;
   if (NS_SUCCEEDED(transferable->GetAnyTransferData(getter_Copies(bestFlavor), getter_AddRefs(genericDataObj), &len)))
   {
     nsAutoTxnsConserveSelection dontSpazMySelection(this);
--- a/editor/libeditor/nsHTMLEditRules.h
+++ b/editor/libeditor/nsHTMLEditRules.h
@@ -64,53 +64,53 @@ class nsHTMLEditRules : public nsTextEdi
 {
 public:
 
   NS_DECL_ISUPPORTS_INHERITED
 
   nsHTMLEditRules();
 
   // nsIEditRules methods
-  NS_IMETHOD Init(nsPlaintextEditor *aEditor);
-  NS_IMETHOD DetachEditor();
+  NS_IMETHOD Init(nsPlaintextEditor *aEditor) MOZ_OVERRIDE;
+  NS_IMETHOD DetachEditor() MOZ_OVERRIDE;
   NS_IMETHOD BeforeEdit(EditAction action,
-                        nsIEditor::EDirection aDirection);
+                        nsIEditor::EDirection aDirection) MOZ_OVERRIDE;
   NS_IMETHOD AfterEdit(EditAction action,
-                       nsIEditor::EDirection aDirection);
+                       nsIEditor::EDirection aDirection) MOZ_OVERRIDE;
   NS_IMETHOD WillDoAction(mozilla::dom::Selection* aSelection, nsRulesInfo* aInfo,
-                          bool* aCancel, bool* aHandled);
+                          bool* aCancel, bool* aHandled) MOZ_OVERRIDE;
   NS_IMETHOD DidDoAction(mozilla::dom::Selection* aSelection,
-                         nsRulesInfo* aInfo, nsresult aResult);
-  NS_IMETHOD DocumentModified();
+                         nsRulesInfo* aInfo, nsresult aResult) MOZ_OVERRIDE;
+  NS_IMETHOD DocumentModified() MOZ_OVERRIDE;
 
   nsresult GetListState(bool *aMixed, bool *aOL, bool *aUL, bool *aDL);
   nsresult GetListItemState(bool *aMixed, bool *aLI, bool *aDT, bool *aDD);
   nsresult GetIndentState(bool *aCanIndent, bool *aCanOutdent);
   nsresult GetAlignment(bool *aMixed, nsIHTMLEditor::EAlignment *aAlign);
   nsresult GetParagraphState(bool *aMixed, nsAString &outFormat);
   nsresult MakeSureElemStartsOrEndsOnCR(nsIDOMNode *aNode);
 
   // nsIEditActionListener methods
   
-  NS_IMETHOD WillCreateNode(const nsAString& aTag, nsIDOMNode *aParent, int32_t aPosition);
-  NS_IMETHOD DidCreateNode(const nsAString& aTag, nsIDOMNode *aNode, nsIDOMNode *aParent, int32_t aPosition, nsresult aResult);
-  NS_IMETHOD WillInsertNode(nsIDOMNode *aNode, nsIDOMNode *aParent, int32_t aPosition);
-  NS_IMETHOD DidInsertNode(nsIDOMNode *aNode, nsIDOMNode *aParent, int32_t aPosition, nsresult aResult);
-  NS_IMETHOD WillDeleteNode(nsIDOMNode *aChild);
-  NS_IMETHOD DidDeleteNode(nsIDOMNode *aChild, nsresult aResult);
-  NS_IMETHOD WillSplitNode(nsIDOMNode *aExistingRightNode, int32_t aOffset);
-  NS_IMETHOD DidSplitNode(nsIDOMNode *aExistingRightNode, int32_t aOffset, nsIDOMNode *aNewLeftNode, nsresult aResult);
-  NS_IMETHOD WillJoinNodes(nsIDOMNode *aLeftNode, nsIDOMNode *aRightNode, nsIDOMNode *aParent);
-  NS_IMETHOD DidJoinNodes(nsIDOMNode  *aLeftNode, nsIDOMNode *aRightNode, nsIDOMNode *aParent, nsresult aResult);
-  NS_IMETHOD WillInsertText(nsIDOMCharacterData *aTextNode, int32_t aOffset, const nsAString &aString);
-  NS_IMETHOD DidInsertText(nsIDOMCharacterData *aTextNode, int32_t aOffset, const nsAString &aString, nsresult aResult);
-  NS_IMETHOD WillDeleteText(nsIDOMCharacterData *aTextNode, int32_t aOffset, int32_t aLength);
-  NS_IMETHOD DidDeleteText(nsIDOMCharacterData *aTextNode, int32_t aOffset, int32_t aLength, nsresult aResult);
-  NS_IMETHOD WillDeleteSelection(nsISelection *aSelection);
-  NS_IMETHOD DidDeleteSelection(nsISelection *aSelection);
+  NS_IMETHOD WillCreateNode(const nsAString& aTag, nsIDOMNode *aParent, int32_t aPosition) MOZ_OVERRIDE;
+  NS_IMETHOD DidCreateNode(const nsAString& aTag, nsIDOMNode *aNode, nsIDOMNode *aParent, int32_t aPosition, nsresult aResult) MOZ_OVERRIDE;
+  NS_IMETHOD WillInsertNode(nsIDOMNode *aNode, nsIDOMNode *aParent, int32_t aPosition) MOZ_OVERRIDE;
+  NS_IMETHOD DidInsertNode(nsIDOMNode *aNode, nsIDOMNode *aParent, int32_t aPosition, nsresult aResult) MOZ_OVERRIDE;
+  NS_IMETHOD WillDeleteNode(nsIDOMNode *aChild) MOZ_OVERRIDE;
+  NS_IMETHOD DidDeleteNode(nsIDOMNode *aChild, nsresult aResult) MOZ_OVERRIDE;
+  NS_IMETHOD WillSplitNode(nsIDOMNode *aExistingRightNode, int32_t aOffset) MOZ_OVERRIDE;
+  NS_IMETHOD DidSplitNode(nsIDOMNode *aExistingRightNode, int32_t aOffset, nsIDOMNode *aNewLeftNode, nsresult aResult) MOZ_OVERRIDE;
+  NS_IMETHOD WillJoinNodes(nsIDOMNode *aLeftNode, nsIDOMNode *aRightNode, nsIDOMNode *aParent) MOZ_OVERRIDE;
+  NS_IMETHOD DidJoinNodes(nsIDOMNode  *aLeftNode, nsIDOMNode *aRightNode, nsIDOMNode *aParent, nsresult aResult) MOZ_OVERRIDE;
+  NS_IMETHOD WillInsertText(nsIDOMCharacterData *aTextNode, int32_t aOffset, const nsAString &aString) MOZ_OVERRIDE;
+  NS_IMETHOD DidInsertText(nsIDOMCharacterData *aTextNode, int32_t aOffset, const nsAString &aString, nsresult aResult) MOZ_OVERRIDE;
+  NS_IMETHOD WillDeleteText(nsIDOMCharacterData *aTextNode, int32_t aOffset, int32_t aLength) MOZ_OVERRIDE;
+  NS_IMETHOD DidDeleteText(nsIDOMCharacterData *aTextNode, int32_t aOffset, int32_t aLength, nsresult aResult) MOZ_OVERRIDE;
+  NS_IMETHOD WillDeleteSelection(nsISelection *aSelection) MOZ_OVERRIDE;
+  NS_IMETHOD DidDeleteSelection(nsISelection *aSelection) MOZ_OVERRIDE;
 
 protected:
   virtual ~nsHTMLEditRules();
 
   enum RulesEndpoint
   {
     kStart,
     kEnd
--- a/editor/libeditor/nsHTMLEditor.cpp
+++ b/editor/libeditor/nsHTMLEditor.cpp
@@ -2658,17 +2658,17 @@ nsHTMLEditor::InsertLinkAroundSelection(
 
       res = SetInlineProperty(nsGkAtoms::a, name, value);
       NS_ENSURE_SUCCESS(res, res);
     }
   }
   return NS_OK;
 }
 
-NS_IMETHODIMP
+nsresult
 nsHTMLEditor::SetHTMLBackgroundColor(const nsAString& aColor)
 {
   NS_PRECONDITION(mDocWeak, "Missing Editor DOM Document");
   
   // Find a selected or enclosing table element to set background on
   nsCOMPtr<nsIDOMElement> element;
   int32_t selectedCount;
   nsAutoString tagName;
@@ -4528,17 +4528,17 @@ nsHTMLEditor::SetIsCSSEnabled(bool aIsCS
     // Turn on NoCSS, as we're disabling CSS.
     flags |= eEditorNoCSSMask;
   }
 
   return SetFlags(flags);
 }
 
 // Set the block background color
-NS_IMETHODIMP
+nsresult
 nsHTMLEditor::SetCSSBackgroundColor(const nsAString& aColor)
 {
   if (!mRules) { return NS_ERROR_NOT_INITIALIZED; }
   ForceCompositionEnd();
 
   // Protect the edit rules object from dying
   nsCOMPtr<nsIEditRules> kungFuDeathGrip(mRules);
 
@@ -4763,17 +4763,17 @@ nsHTMLEditor::AreNodesSameType(nsIConten
     return true;
   }
 
   // If CSS is enabled, we are stricter about span nodes.
   return mHTMLCSSUtils->ElementsSameStyle(aNode1->AsDOMNode(),
                                           aNode2->AsDOMNode());
 }
 
-NS_IMETHODIMP
+nsresult
 nsHTMLEditor::CopyLastEditableChildStyles(nsIDOMNode * aPreviousBlock, nsIDOMNode * aNewBlock,
                                           nsIDOMNode **aOutBrNode)
 {
   nsCOMPtr<nsINode> newBlock = do_QueryInterface(aNewBlock);
   NS_ENSURE_STATE(newBlock || !aNewBlock);
   *aOutBrNode = nullptr;
   nsCOMPtr<nsIDOMNode> child, tmp;
   nsresult res;
--- a/editor/libeditor/nsHTMLEditor.h
+++ b/editor/libeditor/nsHTMLEditor.h
@@ -95,37 +95,37 @@ public:
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsHTMLEditor, nsPlaintextEditor)
 
 
   nsHTMLEditor();
 
   bool GetReturnInParagraphCreatesNewParagraph();
 
   /* ------------ nsPlaintextEditor overrides -------------- */
-  NS_IMETHOD GetIsDocumentEditable(bool *aIsDocumentEditable);
-  NS_IMETHOD BeginningOfDocument();
-  virtual nsresult HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent);
-  virtual already_AddRefed<nsIContent> GetFocusedContent();
-  virtual already_AddRefed<nsIContent> GetFocusedContentForIME();
-  virtual bool IsActiveInDOMWindow();
-  virtual already_AddRefed<mozilla::dom::EventTarget> GetDOMEventTarget();
+  NS_IMETHOD GetIsDocumentEditable(bool *aIsDocumentEditable) MOZ_OVERRIDE;
+  NS_IMETHOD BeginningOfDocument() MOZ_OVERRIDE;
+  virtual nsresult HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent) MOZ_OVERRIDE;
+  virtual already_AddRefed<nsIContent> GetFocusedContent() MOZ_OVERRIDE;
+  virtual already_AddRefed<nsIContent> GetFocusedContentForIME() MOZ_OVERRIDE;
+  virtual bool IsActiveInDOMWindow() MOZ_OVERRIDE;
+  virtual already_AddRefed<mozilla::dom::EventTarget> GetDOMEventTarget() MOZ_OVERRIDE;
   virtual mozilla::dom::Element* GetEditorRoot() MOZ_OVERRIDE;
-  virtual already_AddRefed<nsIContent> FindSelectionRoot(nsINode *aNode);
-  virtual bool IsAcceptableInputEvent(nsIDOMEvent* aEvent);
-  virtual already_AddRefed<nsIContent> GetInputEventTargetContent();
+  virtual already_AddRefed<nsIContent> FindSelectionRoot(nsINode *aNode) MOZ_OVERRIDE;
+  virtual bool IsAcceptableInputEvent(nsIDOMEvent* aEvent) MOZ_OVERRIDE;
+  virtual already_AddRefed<nsIContent> GetInputEventTargetContent() MOZ_OVERRIDE;
   virtual bool IsEditable(nsINode* aNode) MOZ_OVERRIDE;
   using nsEditor::IsEditable;
 
   /* ------------ nsStubMutationObserver overrides --------- */
   NS_DECL_NSIMUTATIONOBSERVER_CONTENTAPPENDED
   NS_DECL_NSIMUTATIONOBSERVER_CONTENTINSERTED
   NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED
 
   /* ------------ nsIEditorIMESupport overrides ------------ */
-  NS_IMETHOD GetPreferredIMEState(mozilla::widget::IMEState *aState);
+  NS_IMETHOD GetPreferredIMEState(mozilla::widget::IMEState *aState) MOZ_OVERRIDE;
 
   /* ------------ nsIHTMLEditor methods -------------- */
 
   NS_DECL_NSIHTMLEDITOR
 
   /* ------------ nsIHTMLObjectResizer methods -------------- */
   /* -------- Implemented in nsHTMLObjectResizer.cpp -------- */
   NS_DECL_NSIHTMLOBJECTRESIZER
@@ -134,104 +134,104 @@ public:
   /* -------- Implemented in nsHTMLAbsPosition.cpp --------- */
   NS_DECL_NSIHTMLABSPOSEDITOR
 
   /* ------------ nsIHTMLInlineTableEditor methods -------------- */
   /* ------- Implemented in nsHTMLInlineTableEditor.cpp --------- */
   NS_DECL_NSIHTMLINLINETABLEEDITOR
 
   /* ------------ nsIHTMLEditor methods -------------- */
-  NS_IMETHOD CopyLastEditableChildStyles(nsIDOMNode *aPreviousBlock, nsIDOMNode *aNewBlock,
+  nsresult CopyLastEditableChildStyles(nsIDOMNode *aPreviousBlock, nsIDOMNode *aNewBlock,
                                          nsIDOMNode **aOutBrNode);
 
-  NS_IMETHOD LoadHTML(const nsAString &aInputString);
+  nsresult LoadHTML(const nsAString &aInputString);
 
   nsresult GetCSSBackgroundColorState(bool *aMixed, nsAString &aOutColor,
                                       bool aBlockLevel);
   NS_IMETHOD GetHTMLBackgroundColorState(bool *aMixed, nsAString &outColor);
 
   /* ------------ nsIEditorStyleSheets methods -------------- */
 
-  NS_IMETHOD AddStyleSheet(const nsAString & aURL);
-  NS_IMETHOD ReplaceStyleSheet(const nsAString& aURL);
-  NS_IMETHOD RemoveStyleSheet(const nsAString &aURL);
+  NS_IMETHOD AddStyleSheet(const nsAString & aURL) MOZ_OVERRIDE;
+  NS_IMETHOD ReplaceStyleSheet(const nsAString& aURL) MOZ_OVERRIDE;
+  NS_IMETHOD RemoveStyleSheet(const nsAString &aURL) MOZ_OVERRIDE;
 
-  NS_IMETHOD AddOverrideStyleSheet(const nsAString & aURL);
-  NS_IMETHOD ReplaceOverrideStyleSheet(const nsAString& aURL);
-  NS_IMETHOD RemoveOverrideStyleSheet(const nsAString &aURL);
+  NS_IMETHOD AddOverrideStyleSheet(const nsAString & aURL) MOZ_OVERRIDE;
+  NS_IMETHOD ReplaceOverrideStyleSheet(const nsAString& aURL) MOZ_OVERRIDE;
+  NS_IMETHOD RemoveOverrideStyleSheet(const nsAString &aURL) MOZ_OVERRIDE;
 
-  NS_IMETHOD EnableStyleSheet(const nsAString& aURL, bool aEnable);
+  NS_IMETHOD EnableStyleSheet(const nsAString& aURL, bool aEnable) MOZ_OVERRIDE;
 
   /* ------------ nsIEditorMailSupport methods -------------- */
 
   NS_DECL_NSIEDITORMAILSUPPORT
 
   /* ------------ nsITableEditor methods -------------- */
 
-  NS_IMETHOD InsertTableCell(int32_t aNumber, bool aAfter);
-  NS_IMETHOD InsertTableColumn(int32_t aNumber, bool aAfter);
-  NS_IMETHOD InsertTableRow(int32_t aNumber, bool aAfter);
-  NS_IMETHOD DeleteTable();
-  NS_IMETHOD DeleteTableCell(int32_t aNumber);
-  NS_IMETHOD DeleteTableCellContents();
-  NS_IMETHOD DeleteTableColumn(int32_t aNumber);
-  NS_IMETHOD DeleteTableRow(int32_t aNumber);
-  NS_IMETHOD SelectTableCell();
-  NS_IMETHOD SelectBlockOfCells(nsIDOMElement *aStartCell, nsIDOMElement *aEndCell);
-  NS_IMETHOD SelectTableRow();
-  NS_IMETHOD SelectTableColumn();
-  NS_IMETHOD SelectTable();
-  NS_IMETHOD SelectAllTableCells();
-  NS_IMETHOD SwitchTableCellHeaderType(nsIDOMElement *aSourceCell, nsIDOMElement **aNewCell);
-  NS_IMETHOD JoinTableCells(bool aMergeNonContiguousContents);
-  NS_IMETHOD SplitTableCell();
-  NS_IMETHOD NormalizeTable(nsIDOMElement *aTable);
+  NS_IMETHOD InsertTableCell(int32_t aNumber, bool aAfter) MOZ_OVERRIDE;
+  NS_IMETHOD InsertTableColumn(int32_t aNumber, bool aAfter) MOZ_OVERRIDE;
+  NS_IMETHOD InsertTableRow(int32_t aNumber, bool aAfter) MOZ_OVERRIDE;
+  NS_IMETHOD DeleteTable() MOZ_OVERRIDE;
+  NS_IMETHOD DeleteTableCell(int32_t aNumber) MOZ_OVERRIDE;
+  NS_IMETHOD DeleteTableCellContents() MOZ_OVERRIDE;
+  NS_IMETHOD DeleteTableColumn(int32_t aNumber) MOZ_OVERRIDE;
+  NS_IMETHOD DeleteTableRow(int32_t aNumber) MOZ_OVERRIDE;
+  NS_IMETHOD SelectTableCell() MOZ_OVERRIDE;
+  NS_IMETHOD SelectBlockOfCells(nsIDOMElement *aStartCell, nsIDOMElement *aEndCell) MOZ_OVERRIDE;
+  NS_IMETHOD SelectTableRow() MOZ_OVERRIDE;
+  NS_IMETHOD SelectTableColumn() MOZ_OVERRIDE;
+  NS_IMETHOD SelectTable() MOZ_OVERRIDE;
+  NS_IMETHOD SelectAllTableCells() MOZ_OVERRIDE;
+  NS_IMETHOD SwitchTableCellHeaderType(nsIDOMElement *aSourceCell, nsIDOMElement **aNewCell) MOZ_OVERRIDE;
+  NS_IMETHOD JoinTableCells(bool aMergeNonContiguousContents) MOZ_OVERRIDE;
+  NS_IMETHOD SplitTableCell() MOZ_OVERRIDE;
+  NS_IMETHOD NormalizeTable(nsIDOMElement *aTable) MOZ_OVERRIDE;
   NS_IMETHOD GetCellIndexes(nsIDOMElement *aCell,
-                            int32_t* aRowIndex, int32_t* aColIndex);
+                            int32_t* aRowIndex, int32_t* aColIndex) MOZ_OVERRIDE;
   NS_IMETHOD GetTableSize(nsIDOMElement *aTable,
-                          int32_t* aRowCount, int32_t* aColCount);
-  NS_IMETHOD GetCellAt(nsIDOMElement* aTable, int32_t aRowIndex, int32_t aColIndex, nsIDOMElement **aCell);
+                          int32_t* aRowCount, int32_t* aColCount) MOZ_OVERRIDE;
+  NS_IMETHOD GetCellAt(nsIDOMElement* aTable, int32_t aRowIndex, int32_t aColIndex, nsIDOMElement **aCell) MOZ_OVERRIDE;
   NS_IMETHOD GetCellDataAt(nsIDOMElement* aTable,
                            int32_t aRowIndex, int32_t aColIndex,
                            nsIDOMElement **aCell,
                            int32_t* aStartRowIndex, int32_t* aStartColIndex,
                            int32_t* aRowSpan, int32_t* aColSpan, 
                            int32_t* aActualRowSpan, int32_t* aActualColSpan, 
-                           bool* aIsSelected);
-  NS_IMETHOD GetFirstRow(nsIDOMElement* aTableElement, nsIDOMNode** aRowNode);
-  NS_IMETHOD GetNextRow(nsIDOMNode* aCurrentRowNode, nsIDOMNode** aRowNode);
-  NS_IMETHOD GetLastCellInRow(nsIDOMNode* aRowNode, nsIDOMNode** aCellNode);
+                           bool* aIsSelected) MOZ_OVERRIDE;
+  NS_IMETHOD GetFirstRow(nsIDOMElement* aTableElement, nsIDOMNode** aRowNode) MOZ_OVERRIDE;
+  NS_IMETHOD GetNextRow(nsIDOMNode* aCurrentRowNode, nsIDOMNode** aRowNode) MOZ_OVERRIDE;
+  nsresult GetLastCellInRow(nsIDOMNode* aRowNode, nsIDOMNode** aCellNode);
 
   NS_IMETHOD SetSelectionAfterTableEdit(nsIDOMElement* aTable, int32_t aRow, int32_t aCol, 
-                                        int32_t aDirection, bool aSelected);
+                                        int32_t aDirection, bool aSelected) MOZ_OVERRIDE;
   NS_IMETHOD GetSelectedOrParentTableElement(nsAString& aTagName,
                                              int32_t *aSelectedCount,
-                                             nsIDOMElement** aTableElement);
-  NS_IMETHOD GetSelectedCellsType(nsIDOMElement *aElement, uint32_t *aSelectionType);
+                                             nsIDOMElement** aTableElement) MOZ_OVERRIDE;
+  NS_IMETHOD GetSelectedCellsType(nsIDOMElement *aElement, uint32_t *aSelectionType) MOZ_OVERRIDE;
 
   nsresult GetCellFromRange(nsRange* aRange, nsIDOMElement** aCell);
 
   // Finds the first selected cell in first range of selection
   // This is in the *order of selection*, not order in the table
   // (i.e., each cell added to selection is added in another range 
   //  in the selection's rangelist, independent of location in table)
   // aRange is optional: returns the range around the cell
-  NS_IMETHOD GetFirstSelectedCell(nsIDOMRange **aRange, nsIDOMElement **aCell);
+  NS_IMETHOD GetFirstSelectedCell(nsIDOMRange **aRange, nsIDOMElement **aCell) MOZ_OVERRIDE;
   // Get next cell until no more are found. Always use GetFirstSelected cell first
   // aRange is optional: returns the range around the cell
-  NS_IMETHOD GetNextSelectedCell(nsIDOMRange **aRange, nsIDOMElement **aCell);
+  NS_IMETHOD GetNextSelectedCell(nsIDOMRange **aRange, nsIDOMElement **aCell) MOZ_OVERRIDE;
 
   // Upper-left-most selected cell in table
-  NS_IMETHOD GetFirstSelectedCellInTable(int32_t *aRowIndex, int32_t *aColIndex, nsIDOMElement **aCell);
+  NS_IMETHOD GetFirstSelectedCellInTable(int32_t *aRowIndex, int32_t *aColIndex, nsIDOMElement **aCell) MOZ_OVERRIDE;
     
   /* miscellaneous */
   // This sets background on the appropriate container element (table, cell,)
   //   or calls into nsTextEditor to set the page background
-  NS_IMETHOD SetCSSBackgroundColor(const nsAString& aColor);
-  NS_IMETHOD SetHTMLBackgroundColor(const nsAString& aColor);
+  nsresult SetCSSBackgroundColor(const nsAString& aColor);
+  nsresult SetHTMLBackgroundColor(const nsAString& aColor);
 
   /* ------------ Block methods moved from nsEditor -------------- */
   static already_AddRefed<mozilla::dom::Element> GetBlockNodeParent(nsINode* aNode);
   static already_AddRefed<nsIDOMNode> GetBlockNodeParent(nsIDOMNode *aNode);
 
   void IsNextCharInNodeWhitespace(nsIContent* aContent,
                                   int32_t aOffset,
                                   bool* outIsSpace,
@@ -242,104 +242,104 @@ public:
                                   int32_t aOffset,
                                   bool* outIsSpace,
                                   bool* outIsNBSP,
                                   nsIContent** outNode = nullptr,
                                   int32_t* outOffset = 0);
 
   /* ------------ Overrides of nsEditor interface methods -------------- */
 
-  nsresult EndUpdateViewBatch();
+  nsresult EndUpdateViewBatch() MOZ_OVERRIDE;
 
   /** prepare the editor for use */
   NS_IMETHOD Init(nsIDOMDocument *aDoc, nsIContent *aRoot,
                   nsISelectionController *aSelCon, uint32_t aFlags,
-                  const nsAString& aValue);
-  NS_IMETHOD PreDestroy(bool aDestroyingFrames);
+                  const nsAString& aValue) MOZ_OVERRIDE;
+  NS_IMETHOD PreDestroy(bool aDestroyingFrames) MOZ_OVERRIDE;
 
   /** Internal, static version */
   // aElement must not be null.
   static bool NodeIsBlockStatic(const mozilla::dom::Element* aElement);
   static nsresult NodeIsBlockStatic(nsIDOMNode *aNode, bool *aIsBlock);
 protected:
   virtual ~nsHTMLEditor();
 
   using nsEditor::IsBlockNode;
-  virtual bool IsBlockNode(nsINode *aNode);
+  virtual bool IsBlockNode(nsINode *aNode) MOZ_OVERRIDE;
 
 public:
-  NS_IMETHOD SetFlags(uint32_t aFlags);
+  NS_IMETHOD SetFlags(uint32_t aFlags) MOZ_OVERRIDE;
 
-  NS_IMETHOD Paste(int32_t aSelectionType);
-  NS_IMETHOD CanPaste(int32_t aSelectionType, bool *aCanPaste);
+  NS_IMETHOD Paste(int32_t aSelectionType) MOZ_OVERRIDE;
+  NS_IMETHOD CanPaste(int32_t aSelectionType, bool *aCanPaste) MOZ_OVERRIDE;
 
-  NS_IMETHOD PasteTransferable(nsITransferable *aTransferable);
-  NS_IMETHOD CanPasteTransferable(nsITransferable *aTransferable, bool *aCanPaste);
+  NS_IMETHOD PasteTransferable(nsITransferable *aTransferable) MOZ_OVERRIDE;
+  NS_IMETHOD CanPasteTransferable(nsITransferable *aTransferable, bool *aCanPaste) MOZ_OVERRIDE;
 
-  NS_IMETHOD DebugUnitTests(int32_t *outNumTests, int32_t *outNumTestsFailed);
+  NS_IMETHOD DebugUnitTests(int32_t *outNumTests, int32_t *outNumTestsFailed) MOZ_OVERRIDE;
 
   /** All editor operations which alter the doc should be prefaced
    *  with a call to StartOperation, naming the action and direction */
   NS_IMETHOD StartOperation(EditAction opID,
-                            nsIEditor::EDirection aDirection);
+                            nsIEditor::EDirection aDirection) MOZ_OVERRIDE;
 
   /** All editor operations which alter the doc should be followed
    *  with a call to EndOperation */
-  NS_IMETHOD EndOperation();
+  NS_IMETHOD EndOperation() MOZ_OVERRIDE;
 
   /** returns true if aParentTag can contain a child of type aChildTag */
   virtual bool TagCanContainTag(nsIAtom& aParentTag, nsIAtom& aChildTag)
     MOZ_OVERRIDE;
   
   /** returns true if aNode is a container */
   virtual bool IsContainer(nsINode* aNode) MOZ_OVERRIDE;
   virtual bool IsContainer(nsIDOMNode* aNode) MOZ_OVERRIDE;
 
   /** make the given selection span the entire document */
-  virtual nsresult SelectEntireDocument(mozilla::dom::Selection* aSelection);
+  virtual nsresult SelectEntireDocument(mozilla::dom::Selection* aSelection) MOZ_OVERRIDE;
 
   NS_IMETHOD SetAttributeOrEquivalent(nsIDOMElement * aElement,
                                       const nsAString & aAttribute,
                                       const nsAString & aValue,
-                                      bool aSuppressTransaction);
+                                      bool aSuppressTransaction) MOZ_OVERRIDE;
   NS_IMETHOD RemoveAttributeOrEquivalent(nsIDOMElement * aElement,
                                          const nsAString & aAttribute,
-                                         bool aSuppressTransaction);
+                                         bool aSuppressTransaction) MOZ_OVERRIDE;
 
   /** join together any adjacent editable text nodes in the range */
   nsresult CollapseAdjacentTextNodes(nsRange* aRange);
 
   virtual bool AreNodesSameType(nsIContent* aNode1, nsIContent* aNode2)
     MOZ_OVERRIDE;
 
   NS_IMETHOD DeleteSelectionImpl(EDirection aAction,
-                                 EStripWrappers aStripWrappers);
+                                 EStripWrappers aStripWrappers) MOZ_OVERRIDE;
   nsresult DeleteNode(nsINode* aNode);
-  NS_IMETHODIMP DeleteNode(nsIDOMNode * aNode);
+  NS_IMETHOD DeleteNode(nsIDOMNode * aNode) MOZ_OVERRIDE;
   nsresult DeleteText(nsGenericDOMDataNode& aTextNode, uint32_t aOffset,
                       uint32_t aLength);
   virtual nsresult InsertTextImpl(const nsAString& aStringToInsert,
                                   nsCOMPtr<nsINode>* aInOutNode,
                                   int32_t* aInOutOffset,
                                   nsIDocument* aDoc) MOZ_OVERRIDE;
-  NS_IMETHOD_(bool) IsModifiableNode(nsIDOMNode *aNode);
-  virtual bool IsModifiableNode(nsINode *aNode);
+  NS_IMETHOD_(bool) IsModifiableNode(nsIDOMNode *aNode) MOZ_OVERRIDE;
+  virtual bool IsModifiableNode(nsINode *aNode) MOZ_OVERRIDE;
 
-  NS_IMETHOD GetIsSelectionEditable(bool* aIsSelectionEditable);
+  NS_IMETHOD GetIsSelectionEditable(bool* aIsSelectionEditable) MOZ_OVERRIDE;
 
-  NS_IMETHOD SelectAll();
+  NS_IMETHOD SelectAll() MOZ_OVERRIDE;
 
-  NS_IMETHOD GetRootElement(nsIDOMElement **aRootElement);
+  NS_IMETHOD GetRootElement(nsIDOMElement **aRootElement) MOZ_OVERRIDE;
 
   /* ------------ nsICSSLoaderObserver -------------- */
   NS_IMETHOD StyleSheetLoaded(mozilla::CSSStyleSheet* aSheet,
-                              bool aWasAlternate, nsresult aStatus);
+                              bool aWasAlternate, nsresult aStatus) MOZ_OVERRIDE;
 
   /* ------------ Utility Routines, not part of public API -------------- */
-  NS_IMETHOD TypedText(const nsAString& aString, ETypingAction aAction);
+  NS_IMETHOD TypedText(const nsAString& aString, ETypingAction aAction) MOZ_OVERRIDE;
   nsresult InsertNodeAtPoint( nsIDOMNode *aNode, 
                               nsCOMPtr<nsIDOMNode> *ioParent, 
                               int32_t *ioOffset, 
                               bool aNoEmptyNodes);
 
   // Use this to assure that selection is set after attribute nodes when 
   //  trying to collapse selection at begining of a block node
   //  e.g., when setting at beginning of a table cell
@@ -371,19 +371,19 @@ public:
                            bool aSafeToAskFrames,
                            bool *aSeenBR);
 
   // Returns TRUE if sheet was loaded, false if it wasn't
   bool     EnableExistingStyleSheet(const nsAString& aURL);
 
   // Dealing with the internal style sheet lists:
   NS_IMETHOD GetStyleSheetForURL(const nsAString &aURL,
-                                 mozilla::CSSStyleSheet** _retval);
+                                 mozilla::CSSStyleSheet** _retval) MOZ_OVERRIDE;
   NS_IMETHOD GetURLForStyleSheet(mozilla::CSSStyleSheet* aStyleSheet,
-                                 nsAString& aURL);
+                                 nsAString& aURL) MOZ_OVERRIDE;
 
   // Add a url + known style sheet to the internal lists:
   nsresult AddNewStyleSheetToList(const nsAString &aURL,
                                   mozilla::CSSStyleSheet* aStyleSheet);
 
   nsresult RemoveStyleSheetFromList(const nsAString &aURL);
 
   bool IsCSSEnabled()
@@ -397,23 +397,23 @@ public:
     MOZ_ASSERT(aElement);
     uint32_t attrCount = aElement->GetAttrCount();
     return attrCount > 1 ||
            (1 == attrCount && !aElement->GetAttrNameAt(0)->Equals(nsGkAtoms::mozdirty));
   }
 
 protected:
 
-  NS_IMETHOD  InitRules();
+  NS_IMETHOD  InitRules() MOZ_OVERRIDE;
 
   // Create the event listeners for the editor to install
-  virtual void CreateEventListeners();
+  virtual void CreateEventListeners() MOZ_OVERRIDE;
 
-  virtual nsresult InstallEventListeners();
-  virtual void RemoveEventListeners();
+  virtual nsresult InstallEventListeners() MOZ_OVERRIDE;
+  virtual void RemoveEventListeners() MOZ_OVERRIDE;
 
   bool ShouldReplaceRootElement();
   void ResetRootElementAndEventTarget();
   nsresult GetBodyElement(nsIDOMHTMLElement** aBody);
   // Get the focused node of this editor.
   // @return    If the editor has focus, this returns the focused node.
   //            Otherwise, returns null.
   already_AddRefed<nsINode> GetFocusedNode();
@@ -421,17 +421,17 @@ protected:
   // Return TRUE if aElement is a table-related elemet and caret was set
   bool SetCaretInTableCell(nsIDOMElement* aElement);
 
   // key event helpers
   NS_IMETHOD TabInTable(bool inIsShift, bool *outHandled);
   already_AddRefed<mozilla::dom::Element> CreateBR(nsINode* aNode,
       int32_t aOffset, EDirection aSelect = eNone);
   NS_IMETHOD CreateBR(nsIDOMNode *aNode, int32_t aOffset, 
-                      nsCOMPtr<nsIDOMNode> *outBRNode, nsIEditor::EDirection aSelect = nsIEditor::eNone);
+                      nsCOMPtr<nsIDOMNode> *outBRNode, nsIEditor::EDirection aSelect = nsIEditor::eNone) MOZ_OVERRIDE;
 
 // Table Editing (implemented in nsTableEditor.cpp)
 
   // Table utilities
 
   // Insert a new cell after or before supplied aCell. 
   //  Optional: If aNewCell supplied, returns the newly-created cell (addref'd, of course)
   // This doesn't change or use the current selection
@@ -544,31 +544,31 @@ protected:
 
   nsresult InsertObject(const char* aType, nsISupports* aObject, bool aIsSafe,
                         nsIDOMDocument *aSourceDoc,
                         nsIDOMNode *aDestinationNode,
                         int32_t aDestOffset,
                         bool aDoDeleteSelection);
 
   // factored methods for handling insertion of data from transferables (drag&drop or clipboard)
-  NS_IMETHOD PrepareTransferable(nsITransferable **transferable);
-  NS_IMETHOD PrepareHTMLTransferable(nsITransferable **transferable, bool havePrivFlavor);
-  NS_IMETHOD InsertFromTransferable(nsITransferable *transferable, 
+  NS_IMETHOD PrepareTransferable(nsITransferable **transferable) MOZ_OVERRIDE;
+  nsresult PrepareHTMLTransferable(nsITransferable **transferable, bool havePrivFlavor);
+  nsresult InsertFromTransferable(nsITransferable *transferable, 
                                     nsIDOMDocument *aSourceDoc,
                                     const nsAString & aContextStr,
                                     const nsAString & aInfoStr,
                                     nsIDOMNode *aDestinationNode,
                                     int32_t aDestinationOffset,
                                     bool aDoDeleteSelection);
   nsresult InsertFromDataTransfer(mozilla::dom::DataTransfer *aDataTransfer,
                                   int32_t aIndex,
                                   nsIDOMDocument *aSourceDoc,
                                   nsIDOMNode *aDestinationNode,
                                   int32_t aDestOffset,
-                                  bool aDoDeleteSelection);
+                                  bool aDoDeleteSelection) MOZ_OVERRIDE;
   bool HavePrivateHTMLFlavor( nsIClipboard *clipboard );
   nsresult   ParseCFHTML(nsCString & aCfhtml, char16_t **aStuffToPaste, char16_t **aCfcontext);
   nsresult   DoContentFilterCallback(const nsAString &aFlavor,
                                      nsIDOMDocument *aSourceDoc,
                                      bool aWillDeleteSelection,
                                      nsIDOMNode **aFragmentAsNode,      
                                      nsIDOMNode **aFragStartNode,
                                      int32_t *aFragStartOffset,
--- a/editor/libeditor/nsHTMLEditorEventListener.h
+++ b/editor/libeditor/nsHTMLEditorEventListener.h
@@ -22,17 +22,17 @@ public:
   }
 
   virtual ~nsHTMLEditorEventListener()
   {
   }
 
 #ifdef DEBUG
   // WARNING: You must be use nsHTMLEditor or its sub class for this class.
-  virtual nsresult Connect(nsEditor* aEditor);
+  virtual nsresult Connect(nsEditor* aEditor) MOZ_OVERRIDE;
 #endif
 
 protected:
   virtual nsresult MouseDown(nsIDOMMouseEvent* aMouseEvent) MOZ_OVERRIDE;
   virtual nsresult MouseUp(nsIDOMMouseEvent* aMouseEvent) MOZ_OVERRIDE;
   virtual nsresult MouseClick(nsIDOMMouseEvent* aMouseEvent) MOZ_OVERRIDE;
 
   inline nsHTMLEditor* GetHTMLEditor();
--- a/editor/libeditor/nsPlaintextEditor.h
+++ b/editor/libeditor/nsPlaintextEditor.h
@@ -66,93 +66,93 @@ public:
 
   /* ------------ nsIEditorMailSupport overrides -------------- */
   NS_DECL_NSIEDITORMAILSUPPORT
 
   /* ------------ Overrides of nsEditor interface methods -------------- */
   NS_IMETHOD SetAttributeOrEquivalent(nsIDOMElement * aElement,
                                       const nsAString & aAttribute,
                                       const nsAString & aValue,
-                                      bool aSuppressTransaction);
+                                      bool aSuppressTransaction) MOZ_OVERRIDE;
   NS_IMETHOD RemoveAttributeOrEquivalent(nsIDOMElement * aElement,
                                          const nsAString & aAttribute,
-                                         bool aSuppressTransaction);
+                                         bool aSuppressTransaction) MOZ_OVERRIDE;
 
   /** prepare the editor for use */
   NS_IMETHOD Init(nsIDOMDocument *aDoc, nsIContent *aRoot,
                   nsISelectionController *aSelCon, uint32_t aFlags,
-                  const nsAString& aValue);
+                  const nsAString& aValue) MOZ_OVERRIDE;
   
-  NS_IMETHOD GetDocumentIsEmpty(bool *aDocumentIsEmpty);
-  NS_IMETHOD GetIsDocumentEditable(bool *aIsDocumentEditable);
+  NS_IMETHOD GetDocumentIsEmpty(bool *aDocumentIsEmpty) MOZ_OVERRIDE;
+  NS_IMETHOD GetIsDocumentEditable(bool *aIsDocumentEditable) MOZ_OVERRIDE;
 
   NS_IMETHOD DeleteSelection(EDirection aAction,
-                             EStripWrappers aStripWrappers);
+                             EStripWrappers aStripWrappers) MOZ_OVERRIDE;
 
-  NS_IMETHOD SetDocumentCharacterSet(const nsACString & characterSet);
+  NS_IMETHOD SetDocumentCharacterSet(const nsACString & characterSet) MOZ_OVERRIDE;
 
-  NS_IMETHOD Undo(uint32_t aCount);
-  NS_IMETHOD Redo(uint32_t aCount);
+  NS_IMETHOD Undo(uint32_t aCount) MOZ_OVERRIDE;
+  NS_IMETHOD Redo(uint32_t aCount) MOZ_OVERRIDE;
 
-  NS_IMETHOD Cut();
-  NS_IMETHOD CanCut(bool *aCanCut);
-  NS_IMETHOD Copy();
-  NS_IMETHOD CanCopy(bool *aCanCopy);
-  NS_IMETHOD Paste(int32_t aSelectionType);
-  NS_IMETHOD CanPaste(int32_t aSelectionType, bool *aCanPaste);
-  NS_IMETHOD PasteTransferable(nsITransferable *aTransferable);
-  NS_IMETHOD CanPasteTransferable(nsITransferable *aTransferable, bool *aCanPaste);
+  NS_IMETHOD Cut() MOZ_OVERRIDE;
+  NS_IMETHOD CanCut(bool *aCanCut) MOZ_OVERRIDE;
+  NS_IMETHOD Copy() MOZ_OVERRIDE;
+  NS_IMETHOD CanCopy(bool *aCanCopy) MOZ_OVERRIDE;
+  NS_IMETHOD Paste(int32_t aSelectionType) MOZ_OVERRIDE;
+  NS_IMETHOD CanPaste(int32_t aSelectionType, bool *aCanPaste) MOZ_OVERRIDE;
+  NS_IMETHOD PasteTransferable(nsITransferable *aTransferable) MOZ_OVERRIDE;
+  NS_IMETHOD CanPasteTransferable(nsITransferable *aTransferable, bool *aCanPaste) MOZ_OVERRIDE;
 
   NS_IMETHOD OutputToString(const nsAString& aFormatType,
                             uint32_t aFlags,
-                            nsAString& aOutputString);
+                            nsAString& aOutputString) MOZ_OVERRIDE;
                             
   NS_IMETHOD OutputToStream(nsIOutputStream* aOutputStream,
                             const nsAString& aFormatType,
                             const nsACString& aCharsetOverride,
-                            uint32_t aFlags);
+                            uint32_t aFlags) MOZ_OVERRIDE;
 
 
   /** All editor operations which alter the doc should be prefaced
    *  with a call to StartOperation, naming the action and direction */
   NS_IMETHOD StartOperation(EditAction opID,
-                            nsIEditor::EDirection aDirection);
+                            nsIEditor::EDirection aDirection) MOZ_OVERRIDE;
 
   /** All editor operations which alter the doc should be followed
    *  with a call to EndOperation */
-  NS_IMETHOD EndOperation();
+  NS_IMETHOD EndOperation() MOZ_OVERRIDE;
 
   /** make the given selection span the entire document */
-  virtual nsresult SelectEntireDocument(mozilla::dom::Selection* aSelection);
+  virtual nsresult SelectEntireDocument(mozilla::dom::Selection* aSelection) MOZ_OVERRIDE;
 
-  virtual nsresult HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent);
+  virtual nsresult HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent) MOZ_OVERRIDE;
 
-  virtual already_AddRefed<mozilla::dom::EventTarget> GetDOMEventTarget();
+  virtual already_AddRefed<mozilla::dom::EventTarget> GetDOMEventTarget() MOZ_OVERRIDE;
 
-  virtual nsresult BeginIMEComposition(mozilla::WidgetCompositionEvent* aEvent);
+  virtual nsresult BeginIMEComposition(mozilla::WidgetCompositionEvent* aEvent) MOZ_OVERRIDE;
   virtual nsresult UpdateIMEComposition(nsIDOMEvent* aTextEvent) MOZ_OVERRIDE;
 
-  virtual already_AddRefed<nsIContent> GetInputEventTargetContent();
+  virtual already_AddRefed<nsIContent> GetInputEventTargetContent() MOZ_OVERRIDE;
 
   /* ------------ Utility Routines, not part of public API -------------- */
   NS_IMETHOD TypedText(const nsAString& aString, ETypingAction aAction);
 
   nsresult InsertTextAt(const nsAString &aStringToInsert,
                         nsIDOMNode *aDestinationNode,
                         int32_t aDestOffset,
                         bool aDoDeleteSelection);
 
   virtual nsresult InsertFromDataTransfer(mozilla::dom::DataTransfer *aDataTransfer,
                                           int32_t aIndex,
                                           nsIDOMDocument *aSourceDoc,
                                           nsIDOMNode *aDestinationNode,
                                           int32_t aDestOffset,
-                                          bool aDoDeleteSelection);
+                                          bool aDoDeleteSelection) MOZ_OVERRIDE;
 
-  virtual nsresult InsertFromDrop(nsIDOMEvent* aDropEvent);
+  virtual nsresult InsertFromDrop(nsIDOMEvent* aDropEvent) MOZ_OVERRIDE;
 
   /**
    * Extends the selection for given deletion operation
    * If done, also update aAction to what's actually left to do after the
    * extension.
    */
   nsresult ExtendSelectionForDelete(mozilla::dom::Selection* aSelection,
                                     nsIEditor::EDirection *aAction);
--- a/editor/libeditor/nsStyleSheetTxns.h
+++ b/editor/libeditor/nsStyleSheetTxns.h
@@ -24,17 +24,17 @@ public:
     * @param aSheet   the stylesheet to add
     */
   NS_IMETHOD Init(nsIEditor* aEditor,
                   mozilla::CSSStyleSheet* aSheet);
 
   AddStyleSheetTxn();
 
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(AddStyleSheetTxn, EditTxn)
-  NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
+  NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr) MOZ_OVERRIDE;
 
   NS_DECL_EDITTXN
 
 protected:
 
   nsIEditor* mEditor;                      // the editor that created this transaction
   nsRefPtr<mozilla::CSSStyleSheet> mSheet; // the style sheet to add
 
@@ -49,17 +49,17 @@ public:
     * @param aSheet   the stylesheet to remove
     */
   NS_IMETHOD Init(nsIEditor* aEditor,
                   mozilla::CSSStyleSheet* aSheet);
 
   RemoveStyleSheetTxn();
 
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(RemoveStyleSheetTxn, EditTxn)
-  NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
+  NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr) MOZ_OVERRIDE;
 
   NS_DECL_EDITTXN
 
 protected:
 
   nsIEditor* mEditor;                      // the editor that created this transaction
   nsRefPtr<mozilla::CSSStyleSheet> mSheet; // the style sheet to remove
 
--- a/editor/libeditor/nsTableEditor.cpp
+++ b/editor/libeditor/nsTableEditor.cpp
@@ -353,17 +353,17 @@ nsHTMLEditor::GetNextRow(nsIDOMNode* aCu
     NS_ENSURE_SUCCESS(res, res);
 
     parentSibling = nextNode;
   }
   // If here, row was not found
   return NS_EDITOR_ELEMENT_NOT_FOUND;
 }
 
-NS_IMETHODIMP 
+nsresult
 nsHTMLEditor::GetLastCellInRow(nsIDOMNode* aRowNode, nsIDOMNode** aCellNode)
 {
   NS_ENSURE_TRUE(aCellNode, NS_ERROR_NULL_POINTER);
 
   *aCellNode = nullptr;
 
   NS_ENSURE_TRUE(aRowNode, NS_ERROR_NULL_POINTER);
 
--- a/editor/libeditor/nsTextEditRules.h
+++ b/editor/libeditor/nsTextEditRules.h
@@ -41,29 +41,29 @@ class nsTextEditRules : public nsIEditRu
 public:
   NS_DECL_NSITIMERCALLBACK
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsTextEditRules, nsIEditRules)
 
   nsTextEditRules();
 
   // nsIEditRules methods
-  NS_IMETHOD Init(nsPlaintextEditor *aEditor);
-  NS_IMETHOD SetInitialValue(const nsAString& aValue);
-  NS_IMETHOD DetachEditor();
+  NS_IMETHOD Init(nsPlaintextEditor *aEditor) MOZ_OVERRIDE;
+  NS_IMETHOD SetInitialValue(const nsAString& aValue) MOZ_OVERRIDE;
+  NS_IMETHOD DetachEditor() MOZ_OVERRIDE;
   NS_IMETHOD BeforeEdit(EditAction action,
-                        nsIEditor::EDirection aDirection);
+                        nsIEditor::EDirection aDirection) MOZ_OVERRIDE;
   NS_IMETHOD AfterEdit(EditAction action,
-                       nsIEditor::EDirection aDirection);
+                       nsIEditor::EDirection aDirection) MOZ_OVERRIDE;
   NS_IMETHOD WillDoAction(mozilla::dom::Selection* aSelection,
-                          nsRulesInfo* aInfo, bool* aCancel, bool* aHandled);
+                          nsRulesInfo* aInfo, bool* aCancel, bool* aHandled) MOZ_OVERRIDE;
   NS_IMETHOD DidDoAction(mozilla::dom::Selection* aSelection,
-                         nsRulesInfo* aInfo, nsresult aResult);
-  NS_IMETHOD DocumentIsEmpty(bool *aDocumentIsEmpty);
-  NS_IMETHOD DocumentModified();
+                         nsRulesInfo* aInfo, nsresult aResult) MOZ_OVERRIDE;
+  NS_IMETHOD DocumentIsEmpty(bool *aDocumentIsEmpty) MOZ_OVERRIDE;
+  NS_IMETHOD DocumentModified() MOZ_OVERRIDE;
 
 protected:
   virtual ~nsTextEditRules();
 
 public:
   void ResetIMETextPWBuf();
 
   /**
--- a/editor/txtsvc/nsFilteredContentIterator.h
+++ b/editor/txtsvc/nsFilteredContentIterator.h
@@ -25,25 +25,25 @@ public:
 
   // nsISupports interface...
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS(nsFilteredContentIterator)
 
   explicit nsFilteredContentIterator(nsITextServicesFilter* aFilter);
 
   /* nsIContentIterator */
-  virtual nsresult Init(nsINode* aRoot);
-  virtual nsresult Init(nsIDOMRange* aRange);
-  virtual void First();
-  virtual void Last();
-  virtual void Next();
-  virtual void Prev();
-  virtual nsINode *GetCurrentNode();
-  virtual bool IsDone();
-  virtual nsresult PositionAt(nsINode* aCurNode);
+  virtual nsresult Init(nsINode* aRoot) MOZ_OVERRIDE;
+  virtual nsresult Init(nsIDOMRange* aRange) MOZ_OVERRIDE;
+  virtual void First() MOZ_OVERRIDE;
+  virtual void Last() MOZ_OVERRIDE;
+  virtual void Next() MOZ_OVERRIDE;
+  virtual void Prev() MOZ_OVERRIDE;
+  virtual nsINode *GetCurrentNode() MOZ_OVERRIDE;
+  virtual bool IsDone() MOZ_OVERRIDE;
+  virtual nsresult PositionAt(nsINode* aCurNode) MOZ_OVERRIDE;
 
   /* Helpers */
   bool DidSkip()      { return mDidSkip; }
   void         ClearDidSkip() {  mDidSkip = false; }
 
 protected:
   nsFilteredContentIterator() { }
 
--- a/editor/txtsvc/nsTextServicesDocument.h
+++ b/editor/txtsvc/nsTextServicesDocument.h
@@ -102,67 +102,67 @@ public:
    */
   static void RegisterAtoms();
 
   /* Macro for AddRef(), Release(), and QueryInterface() */
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsTextServicesDocument, nsITextServicesDocument)
 
   /* nsITextServicesDocument method implementations. */
-  NS_IMETHOD InitWithEditor(nsIEditor *aEditor);
-  NS_IMETHOD GetDocument(nsIDOMDocument **aDoc);
-  NS_IMETHOD SetExtent(nsIDOMRange* aDOMRange);
-  NS_IMETHOD ExpandRangeToWordBoundaries(nsIDOMRange *aRange);
-  NS_IMETHOD SetFilter(nsITextServicesFilter *aFilter);
-  NS_IMETHOD GetCurrentTextBlock(nsString *aStr);
-  NS_IMETHOD FirstBlock();
-  NS_IMETHOD LastSelectedBlock(TSDBlockSelectionStatus *aSelStatus, int32_t *aSelOffset, int32_t *aSelLength);
-  NS_IMETHOD PrevBlock();
-  NS_IMETHOD NextBlock();
-  NS_IMETHOD IsDone(bool *aIsDone);
-  NS_IMETHOD SetSelection(int32_t aOffset, int32_t aLength);
-  NS_IMETHOD ScrollSelectionIntoView();
-  NS_IMETHOD DeleteSelection();
-  NS_IMETHOD InsertText(const nsString *aText);
+  NS_IMETHOD InitWithEditor(nsIEditor *aEditor) MOZ_OVERRIDE;
+  NS_IMETHOD GetDocument(nsIDOMDocument **aDoc) MOZ_OVERRIDE;
+  NS_IMETHOD SetExtent(nsIDOMRange* aDOMRange) MOZ_OVERRIDE;
+  NS_IMETHOD ExpandRangeToWordBoundaries(nsIDOMRange *aRange) MOZ_OVERRIDE;
+  NS_IMETHOD SetFilter(nsITextServicesFilter *aFilter) MOZ_OVERRIDE;
+  NS_IMETHOD GetCurrentTextBlock(nsString *aStr) MOZ_OVERRIDE;
+  NS_IMETHOD FirstBlock() MOZ_OVERRIDE;
+  NS_IMETHOD LastSelectedBlock(TSDBlockSelectionStatus *aSelStatus, int32_t *aSelOffset, int32_t *aSelLength) MOZ_OVERRIDE;
+  NS_IMETHOD PrevBlock() MOZ_OVERRIDE;
+  NS_IMETHOD NextBlock() MOZ_OVERRIDE;
+  NS_IMETHOD IsDone(bool *aIsDone) MOZ_OVERRIDE;
+  NS_IMETHOD SetSelection(int32_t aOffset, int32_t aLength) MOZ_OVERRIDE;
+  NS_IMETHOD ScrollSelectionIntoView() MOZ_OVERRIDE;
+  NS_IMETHOD DeleteSelection() MOZ_OVERRIDE;
+  NS_IMETHOD InsertText(const nsString *aText) MOZ_OVERRIDE;
 
   /* nsIEditActionListener method implementations. */
   NS_IMETHOD WillInsertNode(nsIDOMNode *aNode,
                             nsIDOMNode *aParent,
-                            int32_t      aPosition);
+                            int32_t      aPosition) MOZ_OVERRIDE;
   NS_IMETHOD DidInsertNode(nsIDOMNode *aNode,
                            nsIDOMNode *aParent,
                            int32_t     aPosition,
-                           nsresult    aResult);
+                           nsresult    aResult) MOZ_OVERRIDE;
 
-  NS_IMETHOD WillDeleteNode(nsIDOMNode *aChild);
-  NS_IMETHOD DidDeleteNode(nsIDOMNode *aChild, nsresult aResult);
+  NS_IMETHOD WillDeleteNode(nsIDOMNode *aChild) MOZ_OVERRIDE;
+  NS_IMETHOD DidDeleteNode(nsIDOMNode *aChild, nsresult aResult) MOZ_OVERRIDE;
 
   NS_IMETHOD WillSplitNode(nsIDOMNode * aExistingRightNode,
-                           int32_t      aOffset);
+                           int32_t      aOffset) MOZ_OVERRIDE;
   NS_IMETHOD DidSplitNode(nsIDOMNode *aExistingRightNode,
                           int32_t     aOffset,
                           nsIDOMNode *aNewLeftNode,
-                          nsresult    aResult);
+                          nsresult    aResult) MOZ_OVERRIDE;
 
   NS_IMETHOD WillJoinNodes(nsIDOMNode  *aLeftNode,
                            nsIDOMNode  *aRightNode,
-                           nsIDOMNode  *aParent);
+                           nsIDOMNode  *aParent) MOZ_OVERRIDE;
   NS_IMETHOD DidJoinNodes(nsIDOMNode  *aLeftNode,
                           nsIDOMNode  *aRightNode,
                           nsIDOMNode  *aParent,
-                          nsresult     aResult);
+                          nsresult     aResult) MOZ_OVERRIDE;
   // these listen methods are unused:
-  NS_IMETHOD WillCreateNode(const nsAString& aTag, nsIDOMNode *aParent, int32_t aPosition);
-  NS_IMETHOD DidCreateNode(const nsAString& aTag, nsIDOMNode *aNode, nsIDOMNode *aParent, int32_t aPosition, nsresult aResult);
-  NS_IMETHOD WillInsertText(nsIDOMCharacterData *aTextNode, int32_t aOffset, const nsAString &aString);
-  NS_IMETHOD DidInsertText(nsIDOMCharacterData *aTextNode, int32_t aOffset, const nsAString &aString, nsresult aResult);
-  NS_IMETHOD WillDeleteText(nsIDOMCharacterData *aTextNode, int32_t aOffset, int32_t aLength);
-  NS_IMETHOD DidDeleteText(nsIDOMCharacterData *aTextNode, int32_t aOffset, int32_t aLength, nsresult aResult);
-  NS_IMETHOD WillDeleteSelection(nsISelection *aSelection);
-  NS_IMETHOD DidDeleteSelection(nsISelection *aSelection);
+  NS_IMETHOD WillCreateNode(const nsAString& aTag, nsIDOMNode *aParent, int32_t aPosition) MOZ_OVERRIDE;
+  NS_IMETHOD DidCreateNode(const nsAString& aTag, nsIDOMNode *aNode, nsIDOMNode *aParent, int32_t aPosition, nsresult aResult) MOZ_OVERRIDE;
+  NS_IMETHOD WillInsertText(nsIDOMCharacterData *aTextNode, int32_t aOffset, const nsAString &aString) MOZ_OVERRIDE;
+  NS_IMETHOD DidInsertText(nsIDOMCharacterData *aTextNode, int32_t aOffset, const nsAString &aString, nsresult aResult) MOZ_OVERRIDE;
+  NS_IMETHOD WillDeleteText(nsIDOMCharacterData *aTextNode, int32_t aOffset, int32_t aLength) MOZ_OVERRIDE;
+  NS_IMETHOD DidDeleteText(nsIDOMCharacterData *aTextNode, int32_t aOffset, int32_t aLength, nsresult aResult) MOZ_OVERRIDE;
+  NS_IMETHOD WillDeleteSelection(nsISelection *aSelection) MOZ_OVERRIDE;
+  NS_IMETHOD DidDeleteSelection(nsISelection *aSelection) MOZ_OVERRIDE;
 
   /* Helper functions */
   static nsresult GetRangeEndPoints(nsRange* aRange, nsIDOMNode** aParent1,
                                     int32_t* aOffset1, nsIDOMNode** aParent2,
                                     int32_t* aOffset2);
   static nsresult CreateRange(nsIDOMNode* aStartParent, int32_t aStartOffset,
                               nsIDOMNode* aEndParent, int32_t aEndOffset,
                               nsRange** aRange);