Bug 1118550 - Mark virtual overridden functions as MOZ_OVERRIDE in dom/xml; r=baku
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 06 Jan 2015 19:54:15 -0500
changeset 235477 f8eb397de371ac7814220b4ac6d0bc9ec13facc4
parent 235476 2dc5720003ee1a29e3775634e720611b10649a42
child 235478 11a89d944dd2f34181f7ef40f71de44dc874829d
push id366
push usercmanchester@mozilla.com
push dateThu, 08 Jan 2015 16:40:24 +0000
reviewersbaku
bugs1118550
milestone37.0a1
Bug 1118550 - Mark virtual overridden functions as MOZ_OVERRIDE in dom/xml; r=baku
dom/xml/CDATASection.h
dom/xml/ProcessingInstruction.h
dom/xml/nsXMLFragmentContentSink.cpp
--- a/dom/xml/CDATASection.h
+++ b/dom/xml/CDATASection.h
@@ -52,17 +52,17 @@ public:
 
   // nsIDOMText
   NS_FORWARD_NSIDOMTEXT(nsGenericDOMDataNode::)
 
   // nsIDOMCDATASection
   // Empty interface
 
   // nsINode
-  virtual bool IsNodeOfType(uint32_t aFlags) const;
+  virtual bool IsNodeOfType(uint32_t aFlags) const MOZ_OVERRIDE;
 
   virtual nsGenericDOMDataNode* CloneDataNode(mozilla::dom::NodeInfo *aNodeInfo,
                                               bool aCloneText) const MOZ_OVERRIDE;
 
   virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
 #ifdef DEBUG
   virtual void List(FILE* out, int32_t aIndent) const MOZ_OVERRIDE;
   virtual void DumpContent(FILE* out, int32_t aIndent,bool aDumpAll) const MOZ_OVERRIDE;
--- a/dom/xml/ProcessingInstruction.h
+++ b/dom/xml/ProcessingInstruction.h
@@ -30,17 +30,17 @@ public:
   // nsIDOMCharacterData
   NS_FORWARD_NSIDOMCHARACTERDATA(nsGenericDOMDataNode::)
   using nsGenericDOMDataNode::SetData; // Prevent hiding overloaded virtual function.
 
   // nsIDOMProcessingInstruction
   NS_DECL_NSIDOMPROCESSINGINSTRUCTION
 
   // nsINode
-  virtual bool IsNodeOfType(uint32_t aFlags) const;
+  virtual bool IsNodeOfType(uint32_t aFlags) const MOZ_OVERRIDE;
 
   virtual nsGenericDOMDataNode* CloneDataNode(mozilla::dom::NodeInfo *aNodeInfo,
                                               bool aCloneText) const MOZ_OVERRIDE;
 
 #ifdef DEBUG
   virtual void List(FILE* out, int32_t aIndent) const MOZ_OVERRIDE;
   virtual void DumpContent(FILE* out, int32_t aIndent, bool aDumpAll) const MOZ_OVERRIDE;
 #endif
--- a/dom/xml/nsXMLFragmentContentSink.cpp
+++ b/dom/xml/nsXMLFragmentContentSink.cpp
@@ -40,69 +40,69 @@ public:
   NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED_NO_UNLINK(nsXMLFragmentContentSink,
                                                      nsXMLContentSink)
 
   // nsIExpatSink
-  NS_IMETHOD HandleDoctypeDecl(const nsAString & aSubset, 
-                               const nsAString & aName, 
-                               const nsAString & aSystemId, 
-                               const nsAString & aPublicId,
-                               nsISupports* aCatalogData);
-  NS_IMETHOD HandleProcessingInstruction(const char16_t *aTarget, 
-                                         const char16_t *aData);
-  NS_IMETHOD HandleXMLDeclaration(const char16_t *aVersion,
-                                  const char16_t *aEncoding,
-                                  int32_t aStandalone);
-  NS_IMETHOD ReportError(const char16_t* aErrorText, 
+  NS_IMETHOD HandleDoctypeDecl(const nsAString& aSubset,
+                               const nsAString& aName,
+                               const nsAString& aSystemId,
+                               const nsAString& aPublicId,
+                               nsISupports* aCatalogData) MOZ_OVERRIDE;
+  NS_IMETHOD HandleProcessingInstruction(const char16_t* aTarget,
+                                         const char16_t* aData) MOZ_OVERRIDE;
+  NS_IMETHOD HandleXMLDeclaration(const char16_t* aVersion,
+                                  const char16_t* aEncoding,
+                                  int32_t aStandalone) MOZ_OVERRIDE;
+  NS_IMETHOD ReportError(const char16_t* aErrorText,
                          const char16_t* aSourceText,
-                         nsIScriptError *aError,
-                         bool *_retval);
+                         nsIScriptError* aError,
+                         bool* aRetval) MOZ_OVERRIDE;
 
   // nsIContentSink
-  NS_IMETHOD WillBuildModel(nsDTDMode aDTDMode);
-  NS_IMETHOD DidBuildModel(bool aTerminated);
-  NS_IMETHOD SetDocumentCharset(nsACString& aCharset);
-  virtual nsISupports *GetTarget();
+  NS_IMETHOD WillBuildModel(nsDTDMode aDTDMode) MOZ_OVERRIDE;
+  NS_IMETHOD DidBuildModel(bool aTerminated) MOZ_OVERRIDE;
+  NS_IMETHOD SetDocumentCharset(nsACString& aCharset) MOZ_OVERRIDE;
+  virtual nsISupports* GetTarget() MOZ_OVERRIDE;
   NS_IMETHOD DidProcessATokenImpl();
 
   // nsIXMLContentSink
 
   // nsIFragmentContentSink
-  NS_IMETHOD FinishFragmentParsing(nsIDOMDocumentFragment** aFragment);
-  NS_IMETHOD SetTargetDocument(nsIDocument* aDocument);
-  NS_IMETHOD WillBuildContent();
-  NS_IMETHOD DidBuildContent();
-  NS_IMETHOD IgnoreFirstContainer();
-  NS_IMETHOD SetPreventScriptExecution(bool aPreventScriptExecution);
+  NS_IMETHOD FinishFragmentParsing(nsIDOMDocumentFragment** aFragment) MOZ_OVERRIDE;
+  NS_IMETHOD SetTargetDocument(nsIDocument* aDocument) MOZ_OVERRIDE;
+  NS_IMETHOD WillBuildContent() MOZ_OVERRIDE;
+  NS_IMETHOD DidBuildContent() MOZ_OVERRIDE;
+  NS_IMETHOD IgnoreFirstContainer() MOZ_OVERRIDE;
+  NS_IMETHOD SetPreventScriptExecution(bool aPreventScriptExecution) MOZ_OVERRIDE;
 
 protected:
   virtual ~nsXMLFragmentContentSink();
 
-  virtual bool SetDocElement(int32_t aNameSpaceID, 
-                               nsIAtom *aTagName,
-                               nsIContent *aContent);
+  virtual bool SetDocElement(int32_t aNameSpaceID,
+                               nsIAtom* aTagName,
+                               nsIContent* aContent) MOZ_OVERRIDE;
   virtual nsresult CreateElement(const char16_t** aAtts, uint32_t aAttsCount,
                                  mozilla::dom::NodeInfo* aNodeInfo, uint32_t aLineNumber,
                                  nsIContent** aResult, bool* aAppendContent,
-                                 mozilla::dom::FromParser aFromParser);
-  virtual nsresult CloseElement(nsIContent* aContent);
+                                 mozilla::dom::FromParser aFromParser) MOZ_OVERRIDE;
+  virtual nsresult CloseElement(nsIContent* aContent) MOZ_OVERRIDE;
 
-  virtual void MaybeStartLayout(bool aIgnorePendingSheets);
+  virtual void MaybeStartLayout(bool aIgnorePendingSheets) MOZ_OVERRIDE;
 
   // nsContentSink overrides
   virtual nsresult ProcessStyleLink(nsIContent* aElement,
                                     const nsSubstring& aHref,
                                     bool aAlternate,
                                     const nsSubstring& aTitle,
                                     const nsSubstring& aType,
-                                    const nsSubstring& aMedia);
+                                    const nsSubstring& aMedia) MOZ_OVERRIDE;
   nsresult LoadXSLStyleSheet(nsIURI* aUrl);
   void StartLayout();
 
   nsCOMPtr<nsIDocument> mTargetDocument;
   // the fragment
   nsCOMPtr<nsIContent>  mRoot;
   bool                  mParseError;
 };