Bug 1118424 - Mark virtual overridden functions as MOZ_OVERRIDE in dom/html; r=baku
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 06 Jan 2015 15:13:36 -0500
changeset 222374 8c274aebb986b90687f7d6dab7944b38c6f1f171
parent 222373 d23b3009d77adbc23eef1278ea04fabb5c4ff962
child 222375 cdbe4d2202d7b7451398a92a2e73b9b341d89d27
push id10683
push usercbook@mozilla.com
push dateWed, 07 Jan 2015 13:30:50 +0000
treeherderfx-team@3a1103c584cb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1118424
milestone37.0a1
Bug 1118424 - Mark virtual overridden functions as MOZ_OVERRIDE in dom/html; r=baku
dom/html/HTMLAnchorElement.h
dom/html/HTMLButtonElement.h
dom/html/HTMLContentElement.cpp
dom/html/HTMLContentElement.h
dom/html/HTMLFieldSetElement.h
dom/html/HTMLFormControlsCollection.h
dom/html/HTMLFormElement.h
dom/html/HTMLImageElement.h
dom/html/HTMLInputElement.cpp
dom/html/HTMLInputElement.h
dom/html/HTMLLinkElement.h
dom/html/HTMLMediaElement.h
dom/html/HTMLOptionsCollection.h
dom/html/HTMLOutputElement.h
dom/html/HTMLPropertiesCollection.h
dom/html/HTMLScriptElement.h
dom/html/HTMLShadowElement.h
dom/html/HTMLTableElement.cpp
dom/html/HTMLVideoElement.h
dom/html/ImageDocument.h
dom/html/MediaDocument.h
dom/html/PluginDocument.cpp
dom/html/UndoManager.cpp
dom/html/nsGenericHTMLElement.cpp
dom/html/nsGenericHTMLElement.h
dom/html/nsHTMLContentSink.cpp
dom/html/nsHTMLDocument.h
dom/html/nsTextEditorState.cpp
--- a/dom/html/HTMLAnchorElement.h
+++ b/dom/html/HTMLAnchorElement.h
@@ -76,19 +76,19 @@ public:
                                 nsIAtom* aAttribute,
                                 const nsAString& aValue,
                                 nsAttrValue& aResult) MOZ_OVERRIDE;
 
   virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
 
   virtual EventStates IntrinsicState() const MOZ_OVERRIDE;
 
-  virtual void OnDNSPrefetchDeferred();
-  virtual void OnDNSPrefetchRequested();
-  virtual bool HasDeferredDNSPrefetchRequest();
+  virtual void OnDNSPrefetchDeferred() MOZ_OVERRIDE;
+  virtual void OnDNSPrefetchRequested() MOZ_OVERRIDE;
+  virtual bool HasDeferredDNSPrefetchRequest() MOZ_OVERRIDE;
 
   // WebIDL API
   void GetHref(nsAString& aValue, ErrorResult& rv)
   {
     GetHTMLURIAttr(nsGkAtoms::href, aValue);
   }
   void SetHref(const nsAString& aValue, mozilla::ErrorResult& rv)
   {
--- a/dom/html/HTMLButtonElement.h
+++ b/dom/html/HTMLButtonElement.h
@@ -35,24 +35,24 @@ public:
   virtual int32_t TabIndexDefault() MOZ_OVERRIDE;
 
   NS_IMPL_FROMCONTENT_HTML_WITH_TAG(HTMLButtonElement, button)
 
   // nsIDOMHTMLButtonElement
   NS_DECL_NSIDOMHTMLBUTTONELEMENT
 
   // overriden nsIFormControl methods
-  NS_IMETHOD_(uint32_t) GetType() const { return mType; }
+  NS_IMETHOD_(uint32_t) GetType() const MOZ_OVERRIDE { return mType; }
   NS_IMETHOD Reset() MOZ_OVERRIDE;
   NS_IMETHOD SubmitNamesValues(nsFormSubmission* aFormSubmission) MOZ_OVERRIDE;
   NS_IMETHOD SaveState() MOZ_OVERRIDE;
   bool RestoreState(nsPresState* aState) MOZ_OVERRIDE;
   virtual bool IsDisabledForEvents(uint32_t aMessage) MOZ_OVERRIDE;
 
-  virtual void FieldSetDisabledChanged(bool aNotify) MOZ_OVERRIDE; 
+  virtual void FieldSetDisabledChanged(bool aNotify) MOZ_OVERRIDE;
 
   // nsIDOMEventTarget
   virtual nsresult PreHandleEvent(EventChainPreVisitor& aVisitor) MOZ_OVERRIDE;
   virtual nsresult PostHandleEvent(
                      EventChainPostVisitor& aVisitor) MOZ_OVERRIDE;
 
   // nsINode
   virtual nsresult Clone(mozilla::dom::NodeInfo* aNodeInfo, nsINode** aResult) const MOZ_OVERRIDE;
--- a/dom/html/HTMLContentElement.cpp
+++ b/dom/html/HTMLContentElement.cpp
@@ -344,26 +344,20 @@ DistributedContentList::Item(uint32_t aI
   nsIContent* item = Item(aIndex);
   if (!item) {
     return NS_ERROR_FAILURE;
   }
 
   return CallQueryInterface(item, aReturn);
 }
 
-uint32_t
-DistributedContentList::Length() const
-{
-  return mDistributedNodes.Length();
-}
-
 NS_IMETHODIMP
 DistributedContentList::GetLength(uint32_t* aLength)
 {
-  *aLength = Length();
+  *aLength = mDistributedNodes.Length();
   return NS_OK;
 }
 
 int32_t
 DistributedContentList::IndexOf(nsIContent* aContent)
 {
   return mDistributedNodes.IndexOf(aContent);
 }
--- a/dom/html/HTMLContentElement.h
+++ b/dom/html/HTMLContentElement.h
@@ -24,45 +24,45 @@ public:
   NS_IMPL_FROMCONTENT_HTML_WITH_TAG(HTMLContentElement, content)
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(HTMLContentElement,
                                            nsGenericHTMLElement)
 
-  virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const;
+  virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
+  virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
 
   virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
                               nsIContent* aBindingParent,
-                              bool aCompileEventHandlers);
+                              bool aCompileEventHandlers) MOZ_OVERRIDE;
 
   virtual void UnbindFromTree(bool aDeep = true,
-                              bool aNullParent = true);
+                              bool aNullParent = true) MOZ_OVERRIDE;
 
   /**
    * Returns whether if the selector of this insertion point
    * matches the provided content.
    */
   bool Match(nsIContent* aContent);
   bool IsInsertionPoint() const { return mIsInsertionPoint; }
   nsCOMArray<nsIContent>& MatchedNodes() { return mMatchedNodes; }
   void AppendMatchedNode(nsIContent* aContent);
   void RemoveMatchedNode(nsIContent* aContent);
   void InsertMatchedNode(uint32_t aIndex, nsIContent* aContent);
   void ClearMatchedNodes();
 
   virtual nsresult SetAttr(int32_t aNameSpaceID, nsIAtom* aName,
                            nsIAtom* aPrefix, const nsAString& aValue,
-                           bool aNotify);
+                           bool aNotify) MOZ_OVERRIDE;
 
   virtual nsresult UnsetAttr(int32_t aNameSpaceID, nsIAtom* aAttribute,
-                             bool aNotify);
+                             bool aNotify) MOZ_OVERRIDE;
 
   // WebIDL methods.
   already_AddRefed<DistributedContentList> GetDistributedNodes();
   void GetSelect(nsAString& aSelect)
   {
     Element::GetAttr(kNameSpaceID_None, nsGkAtoms::select, aSelect);
   }
   void SetSelect(const nsAString& aSelect)
@@ -102,20 +102,19 @@ public:
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS(DistributedContentList)
 
   // nsIDOMNodeList
   NS_DECL_NSIDOMNODELIST
 
   // nsINodeList
-  virtual nsIContent* Item(uint32_t aIndex);
-  virtual int32_t IndexOf(nsIContent* aContent);
-  virtual nsINode* GetParentObject() { return mParent; }
-  virtual uint32_t Length() const;
+  virtual nsIContent* Item(uint32_t aIndex) MOZ_OVERRIDE;
+  virtual int32_t IndexOf(nsIContent* aContent) MOZ_OVERRIDE;
+  virtual nsINode* GetParentObject() MOZ_OVERRIDE { return mParent; }
   virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
 protected:
   virtual ~DistributedContentList();
   nsRefPtr<HTMLContentElement> mParent;
   nsCOMArray<nsIContent> mDistributedNodes;
 };
 
 } // namespace dom
--- a/dom/html/HTMLFieldSetElement.h
+++ b/dom/html/HTMLFieldSetElement.h
@@ -88,17 +88,17 @@ public:
   // XPCOM Validity is OK for us
 
   // XPCOM GetValidationMessage is OK for us
 
   // XPCOM CheckValidity is OK for us
 
   // XPCOM SetCustomValidity is OK for us
 
-  virtual EventStates IntrinsicState() const;
+  virtual EventStates IntrinsicState() const MOZ_OVERRIDE;
 
 
   /*
    * This method will update the fieldset's validity.  This method has to be
    * called by fieldset elements whenever their validity state or status regarding
    * constraint validation changes.
    *
    * @note If an element becomes barred from constraint validation, it has to
--- a/dom/html/HTMLFormControlsCollection.h
+++ b/dom/html/HTMLFormControlsCollection.h
@@ -31,17 +31,17 @@ public:
 
   void DropFormReference();
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
 
   // nsIDOMHTMLCollection interface
   NS_DECL_NSIDOMHTMLCOLLECTION
 
-  virtual Element* GetElementAt(uint32_t index);
+  virtual Element* GetElementAt(uint32_t index) MOZ_OVERRIDE;
   virtual nsINode* GetParentObject() MOZ_OVERRIDE;
 
   virtual Element*
   GetFirstNamedElement(const nsAString& aName, bool& aFound) MOZ_OVERRIDE;
 
   void
   NamedGetter(const nsAString& aName,
               bool& aFound,
--- a/dom/html/HTMLFormElement.h
+++ b/dom/html/HTMLFormElement.h
@@ -53,17 +53,17 @@ public:
 
   // nsIDOMHTMLFormElement
   NS_DECL_NSIDOMHTMLFORMELEMENT
 
   // nsIWebProgressListener
   NS_DECL_NSIWEBPROGRESSLISTENER
 
   // nsIForm
-  NS_IMETHOD_(nsIFormControl*) GetElementAt(int32_t aIndex) const;
+  NS_IMETHOD_(nsIFormControl*) GetElementAt(int32_t aIndex) const MOZ_OVERRIDE;
   NS_IMETHOD_(uint32_t) GetElementCount() const MOZ_OVERRIDE;
   NS_IMETHOD_(int32_t) IndexOfControl(nsIFormControl* aControl) MOZ_OVERRIDE;
   NS_IMETHOD_(nsIFormControl*) GetDefaultSubmitElement() const MOZ_OVERRIDE;
 
   // nsIRadioGroupContainer
   void SetCurrentRadioButton(const nsAString& aName,
                              HTMLInputElement* aRadio) MOZ_OVERRIDE;
   HTMLInputElement* GetCurrentRadioButton(const nsAString& aName) MOZ_OVERRIDE;
--- a/dom/html/HTMLImageElement.h
+++ b/dom/html/HTMLImageElement.h
@@ -47,17 +47,17 @@ public:
   virtual bool Draggable() const MOZ_OVERRIDE;
 
   // nsIDOMHTMLImageElement
   NS_DECL_NSIDOMHTMLIMAGEELEMENT
 
   NS_IMPL_FROMCONTENT_HTML_WITH_TAG(HTMLImageElement, img)
 
   // override from nsImageLoadingContent
-  CORSMode GetCORSMode();
+  CORSMode GetCORSMode() MOZ_OVERRIDE;
 
   // nsIContent
   virtual bool ParseAttribute(int32_t aNamespaceID,
                                 nsIAtom* aAttribute,
                                 const nsAString& aValue,
                                 nsAttrValue& aResult) MOZ_OVERRIDE;
   virtual nsChangeHint GetAttributeChangeHint(const nsIAtom* aAttribute,
                                               int32_t aModType) const MOZ_OVERRIDE;
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
@@ -362,17 +362,17 @@ public:
     if (NS_SUCCEEDED(mTopDir->GetDirectoryEntries(getter_AddRefs(entries))) &&
         entries) {
       mDirEnumeratorStack.AppendElement(entries);
       LookupAndCacheNext();
     }
   }
 
   NS_IMETHOD
-  GetNext(nsISupports** aResult)
+  GetNext(nsISupports** aResult) MOZ_OVERRIDE
   {
     MOZ_ASSERT(!NS_IsMainThread(),
                "Walking the directory tree involves I/O, so using this "
                "enumerator can block a thread for a long time!");
 
     if (!mNextFile) {
       return NS_ERROR_FAILURE;
     }
@@ -396,17 +396,17 @@ public:
       fileImpl->SetPath(Substring(path, 0, uint32_t(length)));
     }
     *aResult = domFile.forget().downcast<nsIDOMFile>().take();
     LookupAndCacheNext();
     return NS_OK;
   }
 
   NS_IMETHOD
-  HasMoreElements(bool* aResult)
+  HasMoreElements(bool* aResult) MOZ_OVERRIDE
   {
     *aResult = !!mNextFile;
     return NS_OK;
   }
 
 private:
 
   void
--- a/dom/html/HTMLInputElement.h
+++ b/dom/html/HTMLInputElement.h
@@ -172,18 +172,18 @@ public:
                               bool aNullParent = true) MOZ_OVERRIDE;
 
   virtual void DoneCreatingElement() MOZ_OVERRIDE;
 
   virtual EventStates IntrinsicState() const MOZ_OVERRIDE;
 
   // Element
 private:
-  virtual void AddStates(EventStates aStates);
-  virtual void RemoveStates(EventStates aStates);
+  virtual void AddStates(EventStates aStates) MOZ_OVERRIDE;
+  virtual void RemoveStates(EventStates aStates) MOZ_OVERRIDE;
 
 public:
 
   // nsITextControlElement
   NS_IMETHOD SetValueChanged(bool aValueChanged) MOZ_OVERRIDE;
   NS_IMETHOD_(bool) IsSingleLineTextControl() const MOZ_OVERRIDE;
   NS_IMETHOD_(bool) IsTextArea() const MOZ_OVERRIDE;
   NS_IMETHOD_(bool) IsPlainTextControl() const MOZ_OVERRIDE;
--- a/dom/html/HTMLLinkElement.h
+++ b/dom/html/HTMLLinkElement.h
@@ -153,17 +153,17 @@ protected:
 
   // nsStyleLinkElement
   virtual already_AddRefed<nsIURI> GetStyleSheetURL(bool* aIsInline) MOZ_OVERRIDE;
   virtual void GetStyleSheetInfo(nsAString& aTitle,
                                  nsAString& aType,
                                  nsAString& aMedia,
                                  bool* aIsScoped,
                                  bool* aIsAlternate) MOZ_OVERRIDE;
-  virtual CORSMode GetCORSMode() const;
+  virtual CORSMode GetCORSMode() const MOZ_OVERRIDE;
 protected:
   // nsGenericHTMLElement
   virtual void GetItemValueText(nsAString& text) MOZ_OVERRIDE;
   virtual void SetItemValueText(const nsAString& text) MOZ_OVERRIDE;
   nsRefPtr<nsDOMTokenList > mRelList;
 private:
   nsRefPtr<ImportLoader> mImportLoader;
 };
--- a/dom/html/HTMLMediaElement.h
+++ b/dom/html/HTMLMediaElement.h
@@ -532,17 +532,17 @@ public:
                                          ErrorResult& aRv);
 
   MediaWaitingFor WaitingFor() const;
 
   mozilla::dom::EventHandlerNonNull* GetOnencrypted();
   void SetOnencrypted(mozilla::dom::EventHandlerNonNull* listener);
 
   void DispatchEncrypted(const nsTArray<uint8_t>& aInitData,
-                         const nsAString& aInitDataType);
+                         const nsAString& aInitDataType) MOZ_OVERRIDE;
 
 
   bool IsEventAttributeName(nsIAtom* aName) MOZ_OVERRIDE;
 
   // Returns the principal of the "top level" document; the origin displayed
   // in the URL bar of the browser window.
   already_AddRefed<nsIPrincipal> GetTopLevelPrincipal();
 
--- a/dom/html/HTMLOptionsCollection.h
+++ b/dom/html/HTMLOptionsCollection.h
@@ -53,17 +53,17 @@ protected:
 public:
 
   // nsIDOMHTMLOptionsCollection interface
   NS_DECL_NSIDOMHTMLOPTIONSCOLLECTION
 
   // nsIDOMHTMLCollection interface, all its methods are defined in
   // nsIDOMHTMLOptionsCollection
 
-  virtual Element* GetElementAt(uint32_t aIndex);
+  virtual Element* GetElementAt(uint32_t aIndex) MOZ_OVERRIDE;
   virtual nsINode* GetParentObject() MOZ_OVERRIDE;
 
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(HTMLOptionsCollection,
                                                          nsIHTMLCollection)
 
   // Helpers for HTMLSelectElement
   /**
    * Insert an option
--- a/dom/html/HTMLOutputElement.h
+++ b/dom/html/HTMLOutputElement.h
@@ -23,17 +23,17 @@ public:
 
   explicit HTMLOutputElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo,
                              FromParser aFromParser = NOT_FROM_PARSER);
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIFormControl
-  NS_IMETHOD_(uint32_t) GetType() const { return NS_FORM_OUTPUT; }
+  NS_IMETHOD_(uint32_t) GetType() const MOZ_OVERRIDE { return NS_FORM_OUTPUT; }
   NS_IMETHOD Reset() MOZ_OVERRIDE;
   NS_IMETHOD SubmitNamesValues(nsFormSubmission* aFormSubmission) MOZ_OVERRIDE;
 
   virtual bool IsDisabled() const MOZ_OVERRIDE { return false; }
 
   nsresult Clone(mozilla::dom::NodeInfo* aNodeInfo, nsINode** aResult) const MOZ_OVERRIDE;
 
   bool ParseAttribute(int32_t aNamespaceID, nsIAtom* aAttribute,
--- a/dom/html/HTMLPropertiesCollection.h
+++ b/dom/html/HTMLPropertiesCollection.h
@@ -64,17 +64,17 @@ protected:
   virtual ~HTMLPropertiesCollection();
 
   virtual JSObject* GetWrapperPreserveColorInternal() MOZ_OVERRIDE
   {
     return nsWrapperCache::GetWrapperPreserveColor();
   }
 public:
 
-  virtual Element* GetElementAt(uint32_t aIndex);
+  virtual Element* GetElementAt(uint32_t aIndex) MOZ_OVERRIDE;
 
   void SetDocument(nsIDocument* aDocument);
   nsINode* GetParentObject() MOZ_OVERRIDE;
 
   virtual Element*
   GetFirstNamedElement(const nsAString& aName, bool& aFound) MOZ_OVERRIDE
   {
     // HTMLPropertiesCollection.namedItem and the named getter call the
--- a/dom/html/HTMLScriptElement.h
+++ b/dom/html/HTMLScriptElement.h
@@ -37,17 +37,17 @@ public:
   // nsIDOMHTMLScriptElement
   NS_DECL_NSIDOMHTMLSCRIPTELEMENT
 
   // nsIScriptElement
   virtual void GetScriptType(nsAString& type) MOZ_OVERRIDE;
   virtual void GetScriptText(nsAString& text) MOZ_OVERRIDE;
   virtual void GetScriptCharset(nsAString& charset) MOZ_OVERRIDE;
   virtual void FreezeUriAsyncDefer() MOZ_OVERRIDE;
-  virtual CORSMode GetCORSMode() const;
+  virtual CORSMode GetCORSMode() const MOZ_OVERRIDE;
 
   // nsIContent
   virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
                               nsIContent* aBindingParent,
                               bool aCompileEventHandlers) MOZ_OVERRIDE;
   virtual bool ParseAttribute(int32_t aNamespaceID,
                               nsIAtom* aAttribute,
                               const nsAString& aValue,
--- a/dom/html/HTMLShadowElement.h
+++ b/dom/html/HTMLShadowElement.h
@@ -28,20 +28,20 @@ public:
 
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(HTMLShadowElement,
                                            nsGenericHTMLElement)
 
   virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
 
   virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
                               nsIContent* aBindingParent,
-                              bool aCompileEventHandlers);
+                              bool aCompileEventHandlers) MOZ_OVERRIDE;
 
   virtual void UnbindFromTree(bool aDeep = true,
-                              bool aNullParent = true);
+                              bool aNullParent = true) MOZ_OVERRIDE;
 
   bool IsInsertionPoint() { return mIsInsertionPoint; }
 
   /**
    * Sets the ShadowRoot that will be rendered in place of
    * this shadow insertion point.
    */
   void SetProjectedShadow(ShadowRoot* aProjectedShadow);
--- a/dom/html/HTMLTableElement.cpp
+++ b/dom/html/HTMLTableElement.cpp
@@ -27,18 +27,18 @@ class TableRowsCollection : public nsIHT
                             public nsWrapperCache
 {
 public:
   explicit TableRowsCollection(HTMLTableElement* aParent);
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_NSIDOMHTMLCOLLECTION
 
-  virtual Element* GetElementAt(uint32_t aIndex);
-  virtual nsINode* GetParentObject()
+  virtual Element* GetElementAt(uint32_t aIndex) MOZ_OVERRIDE;
+  virtual nsINode* GetParentObject() MOZ_OVERRIDE
   {
     return mParent;
   }
 
   virtual Element*
   GetFirstNamedElement(const nsAString& aName, bool& aFound) MOZ_OVERRIDE;
   virtual void GetSupportedNames(unsigned aFlags,
                                  nsTArray<nsString>& aNames) MOZ_OVERRIDE;
--- a/dom/html/HTMLVideoElement.h
+++ b/dom/html/HTMLVideoElement.h
@@ -106,18 +106,18 @@ public:
 
   already_AddRefed<VideoPlaybackQuality> GetVideoPlaybackQuality();
 
 protected:
   virtual ~HTMLVideoElement();
 
   virtual JSObject* WrapNode(JSContext* aCx) MOZ_OVERRIDE;
 
-  virtual void WakeLockCreate();
-  virtual void WakeLockRelease();
+  virtual void WakeLockCreate() MOZ_OVERRIDE;
+  virtual void WakeLockRelease() MOZ_OVERRIDE;
   void UpdateScreenWakeLock();
 
   nsRefPtr<WakeLock> mScreenWakeLock;
 
 private:
   static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
                                     nsRuleData* aData);
 };
--- a/dom/html/ImageDocument.h
+++ b/dom/html/ImageDocument.h
@@ -74,17 +74,17 @@ public:
   {
     ScrollImageTo(aX, aY, true);
   }
   void ToggleImageSize();
 
 protected:
   virtual ~ImageDocument();
 
-  virtual nsresult CreateSyntheticDocument();
+  virtual nsresult CreateSyntheticDocument() MOZ_OVERRIDE;
 
   nsresult CheckOverflowing(bool changeState);
 
   void UpdateTitleAndCharset();
 
   void ScrollImageTo(int32_t aX, int32_t aY, bool restoreImage);
 
   float GetRatio() {
--- a/dom/html/MediaDocument.h
+++ b/dom/html/MediaDocument.h
@@ -30,17 +30,17 @@ public:
                                      nsILoadGroup*       aLoadGroup,
                                      nsISupports*        aContainer,
                                      nsIStreamListener** aDocListener,
                                      bool                aReset = true,
                                      nsIContentSink*     aSink = nullptr) MOZ_OVERRIDE;
 
   virtual void SetScriptGlobalObject(nsIScriptGlobalObject* aGlobalObject) MOZ_OVERRIDE;
 
-  virtual bool WillIgnoreCharsetOverride()
+  virtual bool WillIgnoreCharsetOverride() MOZ_OVERRIDE
   {
     return true;
   }
 
 protected:
   void BecomeInteractive();
 
   virtual nsresult CreateSyntheticDocument();
--- a/dom/html/PluginDocument.cpp
+++ b/dom/html/PluginDocument.cpp
@@ -32,20 +32,20 @@ public:
   NS_DECL_NSIPLUGINDOCUMENT
 
   virtual nsresult StartDocumentLoad(const char*         aCommand,
                                      nsIChannel*         aChannel,
                                      nsILoadGroup*       aLoadGroup,
                                      nsISupports*        aContainer,
                                      nsIStreamListener** aDocListener,
                                      bool                aReset = true,
-                                     nsIContentSink*     aSink = nullptr);
+                                     nsIContentSink*     aSink = nullptr) MOZ_OVERRIDE;
 
-  virtual void SetScriptGlobalObject(nsIScriptGlobalObject* aScriptGlobalObject);
-  virtual bool CanSavePresentation(nsIRequest *aNewRequest);
+  virtual void SetScriptGlobalObject(nsIScriptGlobalObject* aScriptGlobalObject) MOZ_OVERRIDE;
+  virtual bool CanSavePresentation(nsIRequest *aNewRequest) MOZ_OVERRIDE;
 
   const nsCString& GetType() const { return mMimeType; }
   Element*         GetPluginContent() { return mPluginContent; }
 
   void StartLayout() { MediaDocument::StartLayout(); }
 
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(PluginDocument, MediaDocument)
 protected:
--- a/dom/html/UndoManager.cpp
+++ b/dom/html/UndoManager.cpp
@@ -100,18 +100,18 @@ UndoTxn::Merge(nsITransaction* aTransact
 /////////////////////////////////////////////////
 
 /**
  * Transaction to handle an attribute change to a nsIContent.
  */
 class UndoAttrChanged : public UndoTxn {
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS(UndoAttrChanged)
-  NS_IMETHOD RedoTransaction();
-  NS_IMETHOD UndoTransaction();
+  NS_IMETHOD RedoTransaction() MOZ_OVERRIDE;
+  NS_IMETHOD UndoTransaction() MOZ_OVERRIDE;
   nsresult Init();
   UndoAttrChanged(mozilla::dom::Element* aElement, int32_t aNameSpaceID,
                   nsIAtom* aAttribute, int32_t aModType);
 protected:
   ~UndoAttrChanged() {}
 
   nsresult SaveRedoState();
   nsCOMPtr<nsIContent> mElement;
@@ -211,18 +211,18 @@ struct UndoCharacterChangedData {
 };
 
 /**
  * Transaction to handle a text change to a nsIContent.
  */
 class UndoTextChanged : public UndoTxn {
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS(UndoTextChanged)
-  NS_IMETHOD RedoTransaction();
-  NS_IMETHOD UndoTransaction();
+  NS_IMETHOD RedoTransaction() MOZ_OVERRIDE;
+  NS_IMETHOD UndoTransaction() MOZ_OVERRIDE;
   UndoTextChanged(nsIContent* aContent,
                   CharacterDataChangeInfo* aChange);
 protected:
   ~UndoTextChanged() {}
 
   void SaveRedoState();
   nsCOMPtr<nsIContent> mContent;
   UndoCharacterChangedData mChange;
@@ -326,18 +326,18 @@ UndoTextChanged::SaveRedoState()
 
 /**
  * Transaction to handle appending content to a nsIContent.
  */
 class UndoContentAppend : public UndoTxn {
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS(UndoContentAppend)
   nsresult Init(int32_t aFirstIndex);
-  NS_IMETHOD RedoTransaction();
-  NS_IMETHOD UndoTransaction();
+  NS_IMETHOD RedoTransaction() MOZ_OVERRIDE;
+  NS_IMETHOD UndoTransaction() MOZ_OVERRIDE;
   explicit UndoContentAppend(nsIContent* aContent);
 protected:
   ~UndoContentAppend() {}
   nsCOMPtr<nsIContent> mContent;
   nsCOMArray<nsIContent> mChildren;
 };
 
 NS_IMPL_CYCLE_COLLECTION(UndoContentAppend, mContent, mChildren)
@@ -396,18 +396,18 @@ UndoContentAppend::UndoTransaction()
 /////////////////////////////////////////////////
 
 /**
  * Transaction to handle inserting content into a nsIContent.
  */
 class UndoContentInsert : public UndoTxn {
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS(UndoContentInsert)
-  NS_IMETHOD UndoTransaction();
-  NS_IMETHOD RedoTransaction();
+  NS_IMETHOD UndoTransaction() MOZ_OVERRIDE;
+  NS_IMETHOD RedoTransaction() MOZ_OVERRIDE;
   UndoContentInsert(nsIContent* aContent, nsIContent* aChild,
                     int32_t aInsertIndex);
 protected:
   ~UndoContentInsert() {}
   nsCOMPtr<nsIContent> mContent;
   nsCOMPtr<nsIContent> mChild;
   nsCOMPtr<nsIContent> mNextNode;
 };
@@ -484,18 +484,18 @@ UndoContentInsert::UndoTransaction()
 /////////////////////////////////////////////////
 
 /**
  * Transaction to handle removing content from an nsIContent.
  */
 class UndoContentRemove : public UndoTxn {
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS(UndoContentRemove)
-  NS_IMETHOD UndoTransaction();
-  NS_IMETHOD RedoTransaction();
+  NS_IMETHOD UndoTransaction() MOZ_OVERRIDE;
+  NS_IMETHOD RedoTransaction() MOZ_OVERRIDE;
   nsresult Init(int32_t aInsertIndex);
   UndoContentRemove(nsIContent* aContent, nsIContent* aChild,
                     int32_t aInsertIndex);
 protected:
   ~UndoContentRemove() {}
   nsCOMPtr<nsIContent> mContent;
   nsCOMPtr<nsIContent> mChild;
   nsCOMPtr<nsIContent> mNextNode;
@@ -732,18 +732,18 @@ UndoMutationObserver::ContentRemoved(nsI
 class FunctionCallTxn : public UndoTxn {
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS(FunctionCallTxn)
 
   // Flags
   static const uint32_t CALL_ON_REDO = 1;
   static const uint32_t CALL_ON_UNDO = 2;
 
-  NS_IMETHOD RedoTransaction();
-  NS_IMETHOD UndoTransaction();
+  NS_IMETHOD RedoTransaction() MOZ_OVERRIDE;
+  NS_IMETHOD UndoTransaction() MOZ_OVERRIDE;
   FunctionCallTxn(DOMTransaction* aTransaction, uint32_t aFlags);
 protected:
   ~FunctionCallTxn() {}
   /**
    * Call a function member on the transaction object with the
    * specified function name.
    */
   nsRefPtr<DOMTransaction> mTransaction;
--- a/dom/html/nsGenericHTMLElement.cpp
+++ b/dom/html/nsGenericHTMLElement.cpp
@@ -172,17 +172,17 @@ class nsGenericHTMLElementTearoff : publ
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
 
   explicit nsGenericHTMLElementTearoff(nsGenericHTMLElement* aElement)
     : mElement(aElement)
   {
   }
 
-  NS_IMETHOD GetStyle(nsIDOMCSSStyleDeclaration** aStyle)
+  NS_IMETHOD GetStyle(nsIDOMCSSStyleDeclaration** aStyle) MOZ_OVERRIDE
   {
     NS_ADDREF(*aStyle = mElement->Style());
     return NS_OK;
   }
 
   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsGenericHTMLElementTearoff,
                                            nsIDOMElementCSSInlineStyle)
 
--- a/dom/html/nsGenericHTMLElement.h
+++ b/dom/html/nsGenericHTMLElement.h
@@ -67,26 +67,26 @@ public:
 
   // From Element
   nsresult CopyInnerTo(mozilla::dom::Element* aDest);
 
   void GetTitle(nsString& aTitle)
   {
     GetHTMLAttr(nsGkAtoms::title, aTitle);
   }
-  NS_IMETHODIMP SetTitle(const nsAString& aTitle)
+  NS_IMETHODIMP SetTitle(const nsAString& aTitle) MOZ_OVERRIDE
   {
     SetHTMLAttr(nsGkAtoms::title, aTitle);
     return NS_OK;
   }
   void GetLang(nsString& aLang)
   {
     GetHTMLAttr(nsGkAtoms::lang, aLang);
   }
-  NS_IMETHODIMP SetLang(const nsAString& aLang)
+  NS_IMETHODIMP SetLang(const nsAString& aLang) MOZ_OVERRIDE
   {
     SetHTMLAttr(nsGkAtoms::lang, aLang);
     return NS_OK;
   }
   void GetDir(nsString& aDir)
   {
     GetHTMLEnumAttr(nsGkAtoms::dir, aDir);
   }
@@ -294,17 +294,17 @@ public:
 protected:
   virtual ~nsGenericHTMLElement() {}
 
   // These methods are used to implement element-specific behavior of Get/SetItemValue
   // when an element has @itemprop but no @itemscope.
   virtual void GetItemValueText(nsAString& text);
   virtual void SetItemValueText(const nsAString& text);
 public:
-  virtual already_AddRefed<mozilla::dom::UndoManager> GetUndoManager();
+  virtual already_AddRefed<mozilla::dom::UndoManager> GetUndoManager() MOZ_OVERRIDE;
   virtual bool UndoScope() MOZ_OVERRIDE;
   virtual void SetUndoScope(bool aUndoScope, mozilla::ErrorResult& aError) MOZ_OVERRIDE;
   // Callback for destructor of of dataset to ensure to null out weak pointer.
   nsresult ClearDataset();
 
   /**
    * Get width and height, using given image request if attributes are unset.
    * Pass a reference to the image request, since the method may change the
@@ -1246,17 +1246,17 @@ public:
   NS_DECL_ISUPPORTS_INHERITED
 
   nsINode* GetScopeChainParent() const MOZ_OVERRIDE;
 
   virtual bool IsNodeOfType(uint32_t aFlags) const MOZ_OVERRIDE;
   virtual void SaveSubtreeState() MOZ_OVERRIDE;
 
   // nsIFormControl
-  virtual mozilla::dom::HTMLFieldSetElement* GetFieldSet();
+  virtual mozilla::dom::HTMLFieldSetElement* GetFieldSet() MOZ_OVERRIDE;
   virtual mozilla::dom::Element* GetFormElement() MOZ_OVERRIDE;
   mozilla::dom::HTMLFormElement* GetForm() const
   {
     return mForm;
   }
   virtual void SetForm(nsIDOMHTMLFormElement* aForm) MOZ_OVERRIDE;
   virtual void ClearForm(bool aRemoveFromForm) MOZ_OVERRIDE;
 
--- a/dom/html/nsHTMLContentSink.cpp
+++ b/dom/html/nsHTMLContentSink.cpp
@@ -129,30 +129,30 @@ public:
   nsresult Init(nsIDocument* aDoc, nsIURI* aURI, nsISupports* aContainer,
                 nsIChannel* aChannel);
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(HTMLContentSink, nsContentSink)
 
   // nsIContentSink
-  NS_IMETHOD WillParse(void);
-  NS_IMETHOD WillBuildModel(nsDTDMode aDTDMode);
-  NS_IMETHOD DidBuildModel(bool aTerminated);
-  NS_IMETHOD WillInterrupt(void);
-  NS_IMETHOD WillResume(void);
-  NS_IMETHOD SetParser(nsParserBase* aParser);
-  virtual void FlushPendingNotifications(mozFlushType aType);
-  NS_IMETHOD SetDocumentCharset(nsACString& aCharset);
-  virtual nsISupports *GetTarget();
-  virtual bool IsScriptExecuting();
+  NS_IMETHOD WillParse(void) MOZ_OVERRIDE;
+  NS_IMETHOD WillBuildModel(nsDTDMode aDTDMode) MOZ_OVERRIDE;
+  NS_IMETHOD DidBuildModel(bool aTerminated) MOZ_OVERRIDE;
+  NS_IMETHOD WillInterrupt(void) MOZ_OVERRIDE;
+  NS_IMETHOD WillResume(void) MOZ_OVERRIDE;
+  NS_IMETHOD SetParser(nsParserBase* aParser) MOZ_OVERRIDE;
+  virtual void FlushPendingNotifications(mozFlushType aType) MOZ_OVERRIDE;
+  NS_IMETHOD SetDocumentCharset(nsACString& aCharset) MOZ_OVERRIDE;
+  virtual nsISupports *GetTarget() MOZ_OVERRIDE;
+  virtual bool IsScriptExecuting() MOZ_OVERRIDE;
 
   // nsIHTMLContentSink
-  NS_IMETHOD OpenContainer(ElementType aNodeType);
-  NS_IMETHOD CloseContainer(ElementType aTag);
+  NS_IMETHOD OpenContainer(ElementType aNodeType) MOZ_OVERRIDE;
+  NS_IMETHOD CloseContainer(ElementType aTag) MOZ_OVERRIDE;
 
 protected:
   virtual ~HTMLContentSink();
 
   nsCOMPtr<nsIHTMLDocument> mHTMLDocument;
 
   // The maximum length of a text run
   int32_t mMaxTextRun;
@@ -170,27 +170,27 @@ protected:
   bool mHaveSeenHead;
 
   // Boolean indicating whether we've notified insertion of our root content
   // yet.  We want to make sure to only do this once.
   bool mNotifiedRootInsertion;
 
   mozilla::dom::NodeInfo* mNodeInfoCache[NS_HTML_TAG_MAX + 1];
 
-  nsresult FlushTags();
+  nsresult FlushTags() MOZ_OVERRIDE;
 
   // Routines for tags that require special handling
   nsresult CloseHTML();
   nsresult OpenBody();
   nsresult CloseBody();
 
   void CloseHeadContext();
 
   // nsContentSink overrides
-  void UpdateChildCounts();
+  void UpdateChildCounts() MOZ_OVERRIDE;
 
   void NotifyInsert(nsIContent* aContent,
                     nsIContent* aChildContent,
                     int32_t aIndexInContainer);
   void NotifyRootInsertion();
 };
 
 class SinkContext
--- a/dom/html/nsHTMLDocument.h
+++ b/dom/html/nsHTMLDocument.h
@@ -73,20 +73,20 @@ public:
   // nsIHTMLDocument
   virtual void SetCompatibilityMode(nsCompatibility aMode) MOZ_OVERRIDE;
 
   virtual bool IsWriting() MOZ_OVERRIDE
   {
     return mWriteLevel != uint32_t(0);
   }
 
-  virtual nsContentList* GetForms();
- 
-  virtual nsContentList* GetFormControls();
- 
+  virtual nsContentList* GetForms() MOZ_OVERRIDE;
+
+  virtual nsContentList* GetFormControls() MOZ_OVERRIDE;
+
   // nsIDOMDocument interface
   using nsDocument::CreateElement;
   using nsDocument::CreateElementNS;
   NS_FORWARD_NSIDOMDOCUMENT(nsDocument::)
 
   // And explicitly import the things from nsDocument that we just shadowed
   using nsDocument::GetImplementation;
   using nsDocument::GetTitle;
@@ -150,17 +150,17 @@ public:
   void EndUpdate(nsUpdateType aUpdateType) MOZ_OVERRIDE;
 
   virtual nsresult SetEditingState(EditingState aState) MOZ_OVERRIDE;
 
   virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
 
   virtual void RemovedFromDocShell() MOZ_OVERRIDE;
 
-  virtual mozilla::dom::Element *GetElementById(const nsAString& aElementId)
+  virtual mozilla::dom::Element *GetElementById(const nsAString& aElementId) MOZ_OVERRIDE
   {
     return nsDocument::GetElementById(aElementId);
   }
 
   virtual void DocAddSizeOfExcludingThis(nsWindowSizes* aWindowSizes) const MOZ_OVERRIDE;
   // DocAddSizeOfIncludingThis is inherited from nsIDocument.
 
   virtual bool WillIgnoreCharsetOverride() MOZ_OVERRIDE;
--- a/dom/html/nsTextEditorState.cpp
+++ b/dom/html/nsTextEditorState.cpp
@@ -209,46 +209,46 @@ public:
 
   nsTextInputSelectionImpl(nsFrameSelection *aSel, nsIPresShell *aShell, nsIContent *aLimiter);
 
   void SetScrollableFrame(nsIScrollableFrame *aScrollableFrame);
   nsFrameSelection* GetConstFrameSelection()
     { return mFrameSelection; }
 
   //NSISELECTIONCONTROLLER INTERFACES
-  NS_IMETHOD SetDisplaySelection(int16_t toggle);
-  NS_IMETHOD GetDisplaySelection(int16_t *_retval);
-  NS_IMETHOD SetSelectionFlags(int16_t aInEnable);
-  NS_IMETHOD GetSelectionFlags(int16_t *aOutEnable);
-  NS_IMETHOD GetSelection(int16_t type, nsISelection **_retval);
-  NS_IMETHOD ScrollSelectionIntoView(int16_t aType, int16_t aRegion, int16_t aFlags);
-  NS_IMETHOD RepaintSelection(int16_t type);
+  NS_IMETHOD SetDisplaySelection(int16_t toggle) MOZ_OVERRIDE;
+  NS_IMETHOD GetDisplaySelection(int16_t* _retval) MOZ_OVERRIDE;
+  NS_IMETHOD SetSelectionFlags(int16_t aInEnable) MOZ_OVERRIDE;
+  NS_IMETHOD GetSelectionFlags(int16_t *aOutEnable) MOZ_OVERRIDE;
+  NS_IMETHOD GetSelection(int16_t type, nsISelection** _retval) MOZ_OVERRIDE;
+  NS_IMETHOD ScrollSelectionIntoView(int16_t aType, int16_t aRegion, int16_t aFlags) MOZ_OVERRIDE;
+  NS_IMETHOD RepaintSelection(int16_t type) MOZ_OVERRIDE;
   NS_IMETHOD RepaintSelection(nsPresContext* aPresContext, SelectionType aSelectionType);
-  NS_IMETHOD SetCaretEnabled(bool enabled);
-  NS_IMETHOD SetCaretReadOnly(bool aReadOnly);
-  NS_IMETHOD GetCaretEnabled(bool *_retval);
-  NS_IMETHOD GetCaretVisible(bool *_retval);
-  NS_IMETHOD SetCaretVisibilityDuringSelection(bool aVisibility);
+  NS_IMETHOD SetCaretEnabled(bool enabled) MOZ_OVERRIDE;
+  NS_IMETHOD SetCaretReadOnly(bool aReadOnly) MOZ_OVERRIDE;
+  NS_IMETHOD GetCaretEnabled(bool* _retval) MOZ_OVERRIDE;
+  NS_IMETHOD GetCaretVisible(bool* _retval) MOZ_OVERRIDE;
+  NS_IMETHOD SetCaretVisibilityDuringSelection(bool aVisibility) MOZ_OVERRIDE;
   NS_IMETHOD PhysicalMove(int16_t aDirection, int16_t aAmount, bool aExtend) MOZ_OVERRIDE;
-  NS_IMETHOD CharacterMove(bool aForward, bool aExtend);
-  NS_IMETHOD CharacterExtendForDelete();
-  NS_IMETHOD CharacterExtendForBackspace();
-  NS_IMETHOD WordMove(bool aForward, bool aExtend);
-  NS_IMETHOD WordExtendForDelete(bool aForward);
-  NS_IMETHOD LineMove(bool aForward, bool aExtend);
-  NS_IMETHOD IntraLineMove(bool aForward, bool aExtend);
-  NS_IMETHOD PageMove(bool aForward, bool aExtend);
-  NS_IMETHOD CompleteScroll(bool aForward);
-  NS_IMETHOD CompleteMove(bool aForward, bool aExtend);
-  NS_IMETHOD ScrollPage(bool aForward);
-  NS_IMETHOD ScrollLine(bool aForward);
-  NS_IMETHOD ScrollCharacter(bool aRight);
-  NS_IMETHOD SelectAll(void);
-  NS_IMETHOD CheckVisibility(nsIDOMNode *node, int16_t startOffset, int16_t EndOffset, bool *_retval);
-  virtual nsresult CheckVisibilityContent(nsIContent* aNode, int16_t aStartOffset, int16_t aEndOffset, bool* aRetval);
+  NS_IMETHOD CharacterMove(bool aForward, bool aExtend) MOZ_OVERRIDE;
+  NS_IMETHOD CharacterExtendForDelete() MOZ_OVERRIDE;
+  NS_IMETHOD CharacterExtendForBackspace() MOZ_OVERRIDE;
+  NS_IMETHOD WordMove(bool aForward, bool aExtend) MOZ_OVERRIDE;
+  NS_IMETHOD WordExtendForDelete(bool aForward) MOZ_OVERRIDE;
+  NS_IMETHOD LineMove(bool aForward, bool aExtend) MOZ_OVERRIDE;
+  NS_IMETHOD IntraLineMove(bool aForward, bool aExtend) MOZ_OVERRIDE;
+  NS_IMETHOD PageMove(bool aForward, bool aExtend) MOZ_OVERRIDE;
+  NS_IMETHOD CompleteScroll(bool aForward) MOZ_OVERRIDE;
+  NS_IMETHOD CompleteMove(bool aForward, bool aExtend) MOZ_OVERRIDE;
+  NS_IMETHOD ScrollPage(bool aForward) MOZ_OVERRIDE;
+  NS_IMETHOD ScrollLine(bool aForward) MOZ_OVERRIDE;
+  NS_IMETHOD ScrollCharacter(bool aRight) MOZ_OVERRIDE;
+  NS_IMETHOD SelectAll(void) MOZ_OVERRIDE;
+  NS_IMETHOD CheckVisibility(nsIDOMNode *node, int16_t startOffset, int16_t EndOffset, bool* _retval) MOZ_OVERRIDE;
+  virtual nsresult CheckVisibilityContent(nsIContent* aNode, int16_t aStartOffset, int16_t aEndOffset, bool* aRetval) MOZ_OVERRIDE;
 
 private:
   nsRefPtr<nsFrameSelection> mFrameSelection;
   nsCOMPtr<nsIContent>       mLimiter;
   nsIScrollableFrame        *mScrollFrame;
   nsWeakPtr mPresShellWeak;
 };