Bug 1118426 - Mark virtual overridden functions as MOZ_OVERRIDE in layout/style; r=dbaron
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 06 Jan 2015 15:15:07 -0500
changeset 248168 efb6031640b7bb3734bb94d704795bf29ecfdfa2
parent 248167 cdbe4d2202d7b7451398a92a2e73b9b341d89d27
child 248169 0cd58b83cbc90cd913a19220938085b9e5cabcfb
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)
reviewersdbaron
bugs1118426
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 1118426 - Mark virtual overridden functions as MOZ_OVERRIDE in layout/style; r=dbaron
layout/style/CounterStyleManager.h
layout/style/FontFace.cpp
layout/style/FontFaceSet.h
layout/style/GroupRule.h
layout/style/ImportRule.h
layout/style/NameSpaceRule.h
layout/style/Rule.h
layout/style/StyleRule.cpp
layout/style/StyleRule.h
layout/style/nsCSSRules.h
layout/style/nsDOMCSSAttrDeclaration.h
layout/style/nsICSSDeclaration.h
--- a/layout/style/CounterStyleManager.h
+++ b/layout/style/CounterStyleManager.h
@@ -126,17 +126,17 @@ public:
                                      nsSubstring& aResult,
                                      bool& aIsRTL) MOZ_OVERRIDE;
 
   virtual AnonymousCounterStyle* AsAnonymous() MOZ_OVERRIDE { return this; }
 
   uint8_t GetSystem() const { return mSystem; }
   const nsTArray<nsString>& GetSymbols() const { return mSymbols; }
 
-  NS_INLINE_DECL_REFCOUNTING(AnonymousCounterStyle)
+  NS_INLINE_DECL_REFCOUNTING(AnonymousCounterStyle, MOZ_OVERRIDE)
 
 private:
   ~AnonymousCounterStyle() {}
 
   uint8_t mSystem;
   nsTArray<nsString> mSymbols;
 };
 
--- a/layout/style/FontFace.cpp
+++ b/layout/style/FontFace.cpp
@@ -75,17 +75,17 @@ public:
     : mFontFace(aFontFace)
     , mSourceBuffer(nullptr)
     , mSourceBufferLength(0) {}
 
   void SetSource(const nsAString& aString);
   void SetSource(const ArrayBuffer& aArrayBuffer);
   void SetSource(const ArrayBufferView& aArrayBufferView);
 
-  NS_IMETHOD Run();
+  NS_IMETHOD Run() MOZ_OVERRIDE;
   void TakeBuffer(uint8_t*& aBuffer, uint32_t& aLength);
 
   nsRefPtr<FontFace> mFontFace;
   FontFace::SourceType mSourceType;
   nsString mSourceString;
   uint8_t* mSourceBuffer;  // allocated with NS_Alloc
   uint32_t mSourceBufferLength;
 
@@ -151,17 +151,17 @@ class FontFaceStatusSetter : public nsIR
 public:
   NS_DECL_ISUPPORTS
 
   FontFaceStatusSetter(FontFace* aFontFace,
                        FontFaceLoadStatus aStatus)
     : mFontFace(aFontFace)
     , mStatus(aStatus) {}
 
-  NS_IMETHOD Run();
+  NS_IMETHOD Run() MOZ_OVERRIDE;
 
 protected:
   virtual ~FontFaceStatusSetter() {}
 
 private:
   nsRefPtr<FontFace> mFontFace;
   FontFaceLoadStatus mStatus;
 };
--- a/layout/style/FontFaceSet.h
+++ b/layout/style/FontFaceSet.h
@@ -160,17 +160,17 @@ public:
   /**
    * Returns whether the "layout.css.font-loading-api.enabled" pref is true.
    */
   static bool PrefEnabled();
 
   // nsICSSLoaderObserver
   NS_IMETHOD StyleSheetLoaded(mozilla::CSSStyleSheet* aSheet,
                               bool aWasAlternate,
-                              nsresult aStatus);
+                              nsresult aStatus) MOZ_OVERRIDE;
 
   // -- Web IDL --------------------------------------------------------------
 
   IMPL_EVENT_HANDLER(loading)
   IMPL_EVENT_HANDLER(loadingdone)
   IMPL_EVENT_HANDLER(loadingerror)
   already_AddRefed<mozilla::dom::Promise> Load(const nsAString& aFont,
                                                const nsAString& aText,
--- a/layout/style/GroupRule.h
+++ b/layout/style/GroupRule.h
@@ -39,17 +39,17 @@ protected:
   virtual ~GroupRule();
 public:
 
   NS_DECL_CYCLE_COLLECTION_CLASS(GroupRule)
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
 
   // implement part of nsIStyleRule and Rule
   DECL_STYLE_RULE_INHERIT_NO_DOMRULE
-  virtual void SetStyleSheet(CSSStyleSheet* aSheet);
+  virtual void SetStyleSheet(CSSStyleSheet* aSheet) MOZ_OVERRIDE;
 
   // to help implement nsIStyleRule
 #ifdef DEBUG
   virtual void List(FILE* out = stdout, int32_t aIndent = 0) const MOZ_OVERRIDE;
 #endif
 
 public:
   void AppendStyleRule(Rule* aRule);
@@ -69,17 +69,17 @@ public:
   nsresult InsertStyleRuleAt(uint32_t aIndex, Rule* aRule);
   nsresult ReplaceStyleRule(Rule *aOld, Rule *aNew);
 
   virtual bool UseForPresentation(nsPresContext* aPresContext,
                                     nsMediaQueryResultCacheKey& aKey) = 0;
 
   // non-virtual -- it is only called by subclasses
   size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
-  virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const = 0;
+  virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE = 0;
 
   static bool
   CloneRuleInto(Rule* aRule, void* aArray)
   {
     nsRefPtr<Rule> clone = aRule->Clone();
     static_cast<nsCOMArray<Rule>*>(aArray)->AppendObject(clone);
     return true;
   }
--- a/layout/style/ImportRule.h
+++ b/layout/style/ImportRule.h
@@ -44,22 +44,22 @@ public:
 #endif
 
   // nsIStyleRule methods
 #ifdef DEBUG
   virtual void List(FILE* out = stdout, int32_t aIndent = 0) const MOZ_OVERRIDE;
 #endif
 
   // Rule methods
-  virtual int32_t GetType() const;
-  virtual already_AddRefed<Rule> Clone() const;
+  virtual int32_t GetType() const MOZ_OVERRIDE;
+  virtual already_AddRefed<Rule> Clone() const MOZ_OVERRIDE;
 
   void SetSheet(CSSStyleSheet*);
 
-  virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
+  virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
 
   // nsIDOMCSSRule interface
   NS_DECL_NSIDOMCSSRULE
 
   // nsIDOMCSSImportRule interface
   NS_DECL_NSIDOMCSSIMPORTRULE
 
 private:
--- a/layout/style/NameSpaceRule.h
+++ b/layout/style/NameSpaceRule.h
@@ -42,25 +42,25 @@ public:
   DECL_STYLE_RULE_INHERIT
 
   // nsIStyleRule methods
 #ifdef DEBUG
   virtual void List(FILE* out = stdout, int32_t aIndent = 0) const MOZ_OVERRIDE;
 #endif
 
   // Rule methods
-  virtual int32_t GetType() const;
-  virtual already_AddRefed<Rule> Clone() const;
+  virtual int32_t GetType() const MOZ_OVERRIDE;
+  virtual already_AddRefed<Rule> Clone() const MOZ_OVERRIDE;
 
   nsIAtom* GetPrefix() const { return mPrefix; }
 
   void GetURLSpec(nsString& aURLSpec) const { aURLSpec = mURLSpec; }
 
   virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
-    MOZ_MUST_OVERRIDE;
+    MOZ_OVERRIDE MOZ_MUST_OVERRIDE;
 
   // nsIDOMCSSRule interface
   NS_DECL_NSIDOMCSSRULE
 
 private:
   nsCOMPtr<nsIAtom> mPrefix;
   nsString          mURLSpec;
 };
--- a/layout/style/Rule.h
+++ b/layout/style/Rule.h
@@ -19,22 +19,22 @@ struct nsRuleData;
 template<class T> struct already_AddRefed;
 class nsHTMLCSSStyleSheet;
 
 namespace mozilla {
 namespace css {
 class GroupRule;
 
 #define DECL_STYLE_RULE_INHERIT_NO_DOMRULE  \
-virtual void MapRuleInfoInto(nsRuleData* aRuleData);
+virtual void MapRuleInfoInto(nsRuleData* aRuleData) MOZ_OVERRIDE;
 
-#define DECL_STYLE_RULE_INHERIT                   \
-  DECL_STYLE_RULE_INHERIT_NO_DOMRULE              \
-  virtual nsIDOMCSSRule* GetDOMRule();            \
-  virtual nsIDOMCSSRule* GetExistingDOMRule();
+#define DECL_STYLE_RULE_INHERIT                            \
+  DECL_STYLE_RULE_INHERIT_NO_DOMRULE                       \
+  virtual nsIDOMCSSRule* GetDOMRule() MOZ_OVERRIDE;        \
+  virtual nsIDOMCSSRule* GetExistingDOMRule() MOZ_OVERRIDE;
 
 class Rule : public nsIStyleRule {
 protected:
   Rule(uint32_t aLineNumber, uint32_t aColumnNumber)
     : mSheet(0),
       mParentRule(nullptr),
       mLineNumber(aLineNumber),
       mColumnNumber(aColumnNumber),
--- a/layout/style/StyleRule.cpp
+++ b/layout/style/StyleRule.cpp
@@ -1049,17 +1049,17 @@ public:
   explicit DOMCSSStyleRule(StyleRule *aRule);
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMCSSStyleRule)
   NS_DECL_NSIDOMCSSRULE
   NS_DECL_NSIDOMCSSSTYLERULE
 
   // nsICSSStyleRuleDOMWrapper
-  NS_IMETHOD GetCSSStyleRule(StyleRule **aResult);
+  NS_IMETHOD GetCSSStyleRule(StyleRule **aResult) MOZ_OVERRIDE;
 
   DOMCSSDeclarationImpl* DOMDeclaration() { return &mDOMDeclaration; }
 
   friend class ::DOMCSSDeclarationImpl;
 
 protected:
   virtual ~DOMCSSStyleRule();
 
--- a/layout/style/StyleRule.h
+++ b/layout/style/StyleRule.h
@@ -348,32 +348,32 @@ public:
   void RuleMatched();
 
   // hooks for DOM rule
   void GetCssText(nsAString& aCssText);
   void SetCssText(const nsAString& aCssText);
   void GetSelectorText(nsAString& aSelectorText);
   void SetSelectorText(const nsAString& aSelectorText);
 
-  virtual int32_t GetType() const;
+  virtual int32_t GetType() const MOZ_OVERRIDE;
 
-  virtual already_AddRefed<Rule> Clone() const;
+  virtual already_AddRefed<Rule> Clone() const MOZ_OVERRIDE;
 
-  virtual nsIDOMCSSRule* GetDOMRule();
+  virtual nsIDOMCSSRule* GetDOMRule() MOZ_OVERRIDE;
 
-  virtual nsIDOMCSSRule* GetExistingDOMRule();
+  virtual nsIDOMCSSRule* GetExistingDOMRule() MOZ_OVERRIDE;
 
   // The new mapping function.
   virtual void MapRuleInfoInto(nsRuleData* aRuleData) MOZ_OVERRIDE;
 
 #ifdef DEBUG
   virtual void List(FILE* out = stdout, int32_t aIndent = 0) const MOZ_OVERRIDE;
 #endif
 
-  virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
+  virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
 
 private:
   ~StyleRule();
 
 private:
   nsCSSSelectorList*      mSelector; // null for style attribute
   Declaration*            mDeclaration;
   nsRefPtr<ImportantRule> mImportantRule; // initialized by RuleMatched
--- a/layout/style/nsCSSRules.h
+++ b/layout/style/nsCSSRules.h
@@ -57,24 +57,24 @@ public:
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIStyleRule methods
 #ifdef DEBUG
   virtual void List(FILE* out = stdout, int32_t aIndent = 0) const MOZ_OVERRIDE;
 #endif
 
   // Rule methods
-  virtual void SetStyleSheet(mozilla::CSSStyleSheet* aSheet); //override GroupRule
-  virtual int32_t GetType() const;
-  virtual already_AddRefed<Rule> Clone() const;
-  virtual nsIDOMCSSRule* GetDOMRule()
+  virtual void SetStyleSheet(mozilla::CSSStyleSheet* aSheet) MOZ_OVERRIDE; //override GroupRule
+  virtual int32_t GetType() const MOZ_OVERRIDE;
+  virtual already_AddRefed<Rule> Clone() const MOZ_OVERRIDE;
+  virtual nsIDOMCSSRule* GetDOMRule() MOZ_OVERRIDE
   {
     return this;
   }
-  virtual nsIDOMCSSRule* GetExistingDOMRule()
+  virtual nsIDOMCSSRule* GetExistingDOMRule() MOZ_OVERRIDE
   {
     return this;
   }
 
   // nsIDOMCSSRule interface
   NS_DECL_NSIDOMCSSRULE
 
   // nsIDOMCSSGroupingRule interface
@@ -83,23 +83,23 @@ public:
   // nsIDOMCSSConditionRule interface
   NS_DECL_NSIDOMCSSCONDITIONRULE
 
   // nsIDOMCSSMediaRule interface
   NS_DECL_NSIDOMCSSMEDIARULE
 
   // rest of GroupRule
   virtual bool UseForPresentation(nsPresContext* aPresContext,
-                                    nsMediaQueryResultCacheKey& aKey);
+                                    nsMediaQueryResultCacheKey& aKey) MOZ_OVERRIDE;
 
   // @media rule methods
   nsresult SetMedia(nsMediaList* aMedia);
   
   virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf)
-    const MOZ_MUST_OVERRIDE;
+    const MOZ_OVERRIDE MOZ_MUST_OVERRIDE;
 
 protected:
   void AppendConditionText(nsAString& aOutput);
 
   nsRefPtr<nsMediaList> mMedia;
 };
 
 class DocumentRule MOZ_FINAL : public GroupRule,
@@ -115,23 +115,23 @@ public:
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIStyleRule methods
 #ifdef DEBUG
   virtual void List(FILE* out = stdout, int32_t aIndent = 0) const MOZ_OVERRIDE;
 #endif
 
   // Rule methods
-  virtual int32_t GetType() const;
-  virtual already_AddRefed<Rule> Clone() const;
-  virtual nsIDOMCSSRule* GetDOMRule()
+  virtual int32_t GetType() const MOZ_OVERRIDE;
+  virtual already_AddRefed<Rule> Clone() const MOZ_OVERRIDE;
+  virtual nsIDOMCSSRule* GetDOMRule() MOZ_OVERRIDE
   {
     return this;
   }
-  virtual nsIDOMCSSRule* GetExistingDOMRule()
+  virtual nsIDOMCSSRule* GetExistingDOMRule() MOZ_OVERRIDE
   {
     return this;
   }
 
   // nsIDOMCSSRule interface
   NS_DECL_NSIDOMCSSRULE
 
   // nsIDOMCSSGroupingRule interface
@@ -140,17 +140,17 @@ public:
   // nsIDOMCSSConditionRule interface
   NS_DECL_NSIDOMCSSCONDITIONRULE
 
   // nsIDOMCSSMozDocumentRule interface
   NS_DECL_NSIDOMCSSMOZDOCUMENTRULE
 
   // rest of GroupRule
   virtual bool UseForPresentation(nsPresContext* aPresContext,
-                                    nsMediaQueryResultCacheKey& aKey);
+                                    nsMediaQueryResultCacheKey& aKey) MOZ_OVERRIDE;
 
   enum Function {
     eURL,
     eURLPrefix,
     eDomain,
     eRegExp
   };
 
@@ -167,17 +167,17 @@ public:
     {
     }
     ~URL();
   };
 
   void SetURLs(URL *aURLs) { mURLs = aURLs; }
 
   virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf)
-    const MOZ_MUST_OVERRIDE;
+    const MOZ_OVERRIDE MOZ_MUST_OVERRIDE;
 
 protected:
   void AppendConditionText(nsAString& aOutput);
 
   nsAutoPtr<URL> mURLs; // linked list of |struct URL| above.
 };
 
 } // namespace css
@@ -254,17 +254,17 @@ public:
 #ifdef DEBUG
   virtual void List(FILE* out = stdout, int32_t aIndent = 0) const MOZ_OVERRIDE;
 #endif
 
   // Rule methods
   DECL_STYLE_RULE_INHERIT
 
   virtual int32_t GetType() const MOZ_OVERRIDE;
-  virtual already_AddRefed<mozilla::css::Rule> Clone() const;
+  virtual already_AddRefed<mozilla::css::Rule> Clone() const MOZ_OVERRIDE;
 
   // nsIDOMCSSRule interface
   NS_DECL_NSIDOMCSSRULE
 
   // nsIDOMCSSFontFaceRule interface
   NS_DECL_NSIDOMCSSFONTFACERULE
 
   void SetDesc(nsCSSFontDesc aDescID, nsCSSValue const & aValue);
@@ -376,27 +376,27 @@ public:
   DECL_STYLE_RULE_INHERIT
 
   // nsIStyleRule methods
 #ifdef DEBUG
   virtual void List(FILE* out = stdout, int32_t aIndent = 0) const MOZ_OVERRIDE;
 #endif
 
   // Rule methods
-  virtual int32_t GetType() const;
-  virtual already_AddRefed<Rule> Clone() const;
+  virtual int32_t GetType() const MOZ_OVERRIDE;
+  virtual already_AddRefed<Rule> Clone() const MOZ_OVERRIDE;
 
   // nsIDOMCSSRule interface
   NS_DECL_NSIDOMCSSRULE
 
   // nsIDOMCSSCharsetRule methods
   NS_IMETHOD GetEncoding(nsAString& aEncoding) MOZ_OVERRIDE;
   NS_IMETHOD SetEncoding(const nsAString& aEncoding) MOZ_OVERRIDE;
 
-  virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
+  virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
 
 private:
   nsString  mEncoding;
 };
 
 } // namespace css
 } // namespace mozilla
 
@@ -451,17 +451,17 @@ public:
   // nsIStyleRule methods
 #ifdef DEBUG
   virtual void List(FILE* out = stdout, int32_t aIndent = 0) const MOZ_OVERRIDE;
 #endif
 
   // Rule methods
   DECL_STYLE_RULE_INHERIT
   virtual int32_t GetType() const MOZ_OVERRIDE;
-  virtual already_AddRefed<mozilla::css::Rule> Clone() const;
+  virtual already_AddRefed<mozilla::css::Rule> Clone() const MOZ_OVERRIDE;
 
   // nsIDOMCSSRule interface
   NS_DECL_NSIDOMCSSRULE
 
   // nsIDOMMozCSSKeyframeRule interface
   NS_DECL_NSIDOMMOZCSSKEYFRAMERULE
 
   const nsTArray<float>& GetKeys() const     { return mKeys; }
@@ -497,23 +497,23 @@ public:
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIStyleRule methods
 #ifdef DEBUG
   virtual void List(FILE* out = stdout, int32_t aIndent = 0) const MOZ_OVERRIDE;
 #endif
 
   // Rule methods
-  virtual int32_t GetType() const;
-  virtual already_AddRefed<mozilla::css::Rule> Clone() const;
-  virtual nsIDOMCSSRule* GetDOMRule()
+  virtual int32_t GetType() const MOZ_OVERRIDE;
+  virtual already_AddRefed<mozilla::css::Rule> Clone() const MOZ_OVERRIDE;
+  virtual nsIDOMCSSRule* GetDOMRule() MOZ_OVERRIDE
   {
     return this;
   }
-  virtual nsIDOMCSSRule* GetExistingDOMRule()
+  virtual nsIDOMCSSRule* GetExistingDOMRule() MOZ_OVERRIDE
   {
     return this;
   }
 
   // nsIDOMCSSRule interface
   NS_DECL_NSIDOMCSSRULE
 
   // nsIDOMMozCSSKeyframesRule interface
@@ -583,17 +583,17 @@ public:
   // nsIStyleRule methods
 #ifdef DEBUG
   virtual void List(FILE* out = stdout, int32_t aIndent = 0) const MOZ_OVERRIDE;
 #endif
 
   // Rule methods
   DECL_STYLE_RULE_INHERIT
   virtual int32_t GetType() const MOZ_OVERRIDE;
-  virtual already_AddRefed<mozilla::css::Rule> Clone() const;
+  virtual already_AddRefed<mozilla::css::Rule> Clone() const MOZ_OVERRIDE;
 
   // nsIDOMCSSRule interface
   NS_DECL_NSIDOMCSSRULE
 
   // nsIDOMCSSPageRule interface
   NS_DECL_NSIDOMCSSPAGERULE
 
   mozilla::css::Declaration* Declaration()   { return mDeclaration; }
@@ -621,25 +621,25 @@ public:
   CSSSupportsRule(const CSSSupportsRule& aCopy);
 
   // nsIStyleRule methods
 #ifdef DEBUG
   virtual void List(FILE* out = stdout, int32_t aIndent = 0) const MOZ_OVERRIDE;
 #endif
 
   // Rule methods
-  virtual int32_t GetType() const;
-  virtual already_AddRefed<mozilla::css::Rule> Clone() const;
+  virtual int32_t GetType() const MOZ_OVERRIDE;
+  virtual already_AddRefed<mozilla::css::Rule> Clone() const MOZ_OVERRIDE;
   virtual bool UseForPresentation(nsPresContext* aPresContext,
-                                  nsMediaQueryResultCacheKey& aKey);
-  virtual nsIDOMCSSRule* GetDOMRule()
+                                  nsMediaQueryResultCacheKey& aKey) MOZ_OVERRIDE;
+  virtual nsIDOMCSSRule* GetDOMRule() MOZ_OVERRIDE
   {
     return this;
   }
-  virtual nsIDOMCSSRule* GetExistingDOMRule()
+  virtual nsIDOMCSSRule* GetExistingDOMRule() MOZ_OVERRIDE
   {
     return this;
   }
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMCSSRule interface
   NS_DECL_NSIDOMCSSRULE
@@ -648,17 +648,17 @@ public:
   NS_DECL_NSIDOMCSSGROUPINGRULE
 
   // nsIDOMCSSConditionRule interface
   NS_DECL_NSIDOMCSSCONDITIONRULE
 
   // nsIDOMCSSSupportsRule interface
   NS_DECL_NSIDOMCSSSUPPORTSRULE
 
-  virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
+  virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
 
 protected:
   virtual ~CSSSupportsRule();
 
   bool mUseGroup;
   nsString mCondition;
 };
 
@@ -686,17 +686,17 @@ public:
   // nsIStyleRule methods
 #ifdef DEBUG
   virtual void List(FILE* out = stdout, int32_t aIndent = 0) const MOZ_OVERRIDE;
 #endif
 
   // Rule methods
   DECL_STYLE_RULE_INHERIT
   virtual int32_t GetType() const MOZ_OVERRIDE;
-  virtual already_AddRefed<mozilla::css::Rule> Clone() const;
+  virtual already_AddRefed<mozilla::css::Rule> Clone() const MOZ_OVERRIDE;
 
   // nsIDOMCSSRule interface
   NS_DECL_NSIDOMCSSRULE
 
   // nsIDOMCSSCounterStyleRule
   NS_DECL_NSIDOMCSSCOUNTERSTYLERULE
 
   // This function is only used to check whether a non-empty value, which has
--- a/layout/style/nsDOMCSSAttrDeclaration.h
+++ b/layout/style/nsDOMCSSAttrDeclaration.h
@@ -26,17 +26,17 @@ public:
   nsDOMCSSAttributeDeclaration(Element* aContent, bool aIsSMILOverride);
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_AMBIGUOUS(nsDOMCSSAttributeDeclaration,
                                                                    nsICSSDeclaration)
 
   // If GetCSSDeclaration returns non-null, then the decl it returns
   // is owned by our current style rule.
-  virtual mozilla::css::Declaration* GetCSSDeclaration(bool aAllocate);
+  virtual mozilla::css::Declaration* GetCSSDeclaration(bool aAllocate) MOZ_OVERRIDE;
   virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv) MOZ_OVERRIDE;
   NS_IMETHOD GetParentRule(nsIDOMCSSRule **aParent) MOZ_OVERRIDE;
 
   virtual nsINode* GetParentObject() MOZ_OVERRIDE;
 
   NS_IMETHOD SetPropertyValue(const nsCSSProperty aPropID,
                               const nsAString& aValue) MOZ_OVERRIDE;
 
--- a/layout/style/nsICSSDeclaration.h
+++ b/layout/style/nsICSSDeclaration.h
@@ -150,26 +150,26 @@ public:
     return rule.forget();
   }
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(nsICSSDeclaration, NS_ICSSDECLARATION_IID)
 
 #define NS_DECL_NSICSSDECLARATION                                   \
   NS_IMETHOD GetPropertyValue(const nsCSSProperty aPropID,          \
-                              nsAString& aValue);                   \
+                              nsAString& aValue) MOZ_OVERRIDE;      \
   NS_IMETHOD GetAuthoredPropertyValue(const nsAString& aPropName,   \
-                                      nsAString& aValue);           \
+                                      nsAString& aValue) MOZ_OVERRIDE; \
   NS_IMETHOD SetPropertyValue(const nsCSSProperty aPropID,          \
-                              const nsAString& aValue);
+                              const nsAString& aValue) MOZ_OVERRIDE;
 
 #define NS_DECL_NSIDOMCSSSTYLEDECLARATION_HELPER \
-  NS_IMETHOD GetCssText(nsAString & aCssText); \
-  NS_IMETHOD SetCssText(const nsAString & aCssText); \
-  NS_IMETHOD GetPropertyValue(const nsAString & propertyName, nsAString & _retval); \
-  NS_IMETHOD RemoveProperty(const nsAString & propertyName, nsAString & _retval); \
-  NS_IMETHOD GetPropertyPriority(const nsAString & propertyName, nsAString & _retval); \
-  NS_IMETHOD SetProperty(const nsAString & propertyName, const nsAString & value, const nsAString & priority); \
-  NS_IMETHOD GetLength(uint32_t *aLength); \
-  NS_IMETHOD Item(uint32_t index, nsAString & _retval); \
-  NS_IMETHOD GetParentRule(nsIDOMCSSRule * *aParentRule);
+  NS_IMETHOD GetCssText(nsAString & aCssText) MOZ_OVERRIDE; \
+  NS_IMETHOD SetCssText(const nsAString & aCssText) MOZ_OVERRIDE; \
+  NS_IMETHOD GetPropertyValue(const nsAString & propertyName, nsAString & _retval) MOZ_OVERRIDE; \
+  NS_IMETHOD RemoveProperty(const nsAString & propertyName, nsAString & _retval) MOZ_OVERRIDE; \
+  NS_IMETHOD GetPropertyPriority(const nsAString & propertyName, nsAString & _retval) MOZ_OVERRIDE; \
+  NS_IMETHOD SetProperty(const nsAString & propertyName, const nsAString & value, const nsAString & priority) MOZ_OVERRIDE; \
+  NS_IMETHOD GetLength(uint32_t *aLength) MOZ_OVERRIDE; \
+  NS_IMETHOD Item(uint32_t index, nsAString & _retval) MOZ_OVERRIDE; \
+  NS_IMETHOD GetParentRule(nsIDOMCSSRule * *aParentRule) MOZ_OVERRIDE;
 
 #endif // nsICSSDeclaration_h__