Bug 1117044 - Mark virtual overridden functions as MOZ_OVERRIDE in widget; r=roc
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 02 Jan 2015 01:25:48 -0500
changeset 249405 47134f7bf549b5d079b239fb3c58886e5403069a
parent 249404 df15e57ae78d43f86271b9878d3c338a4ebb89be
child 249406 616160513dea78322030f3b1250adc6ee9e24c94
push id698
push userjlund@mozilla.com
push dateMon, 23 Mar 2015 22:08:11 +0000
treeherdermozilla-release@b0c0ae7b02a3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs1117044
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 1117044 - Mark virtual overridden functions as MOZ_OVERRIDE in widget; r=roc
widget/GfxInfoBase.cpp
widget/GfxInfoBase.h
widget/PuppetWidget.h
widget/cocoa/GfxInfo.h
widget/cocoa/nsAppShell.mm
widget/cocoa/nsChangeObserver.h
widget/cocoa/nsChildView.h
widget/cocoa/nsCocoaWindow.h
widget/cocoa/nsColorPicker.h
widget/cocoa/nsDeviceContextSpecX.h
widget/cocoa/nsFilePicker.h
widget/cocoa/nsIdleServiceX.h
widget/cocoa/nsMenuBarX.h
widget/cocoa/nsMenuItemX.h
widget/cocoa/nsMenuX.h
widget/cocoa/nsNativeThemeCocoa.h
widget/cocoa/nsPrintDialogX.h
widget/cocoa/nsPrintSettingsX.h
widget/cocoa/nsStandaloneNativeMenu.h
widget/nsBaseFilePicker.cpp
widget/nsBaseScreen.h
widget/nsBaseWidget.h
widget/nsFilePickerProxy.h
widget/tests/TestAppShellSteadyState.cpp
--- a/widget/GfxInfoBase.cpp
+++ b/widget/GfxInfoBase.cpp
@@ -46,17 +46,17 @@ class ShutdownObserver : public nsIObser
   virtual ~ShutdownObserver() {}
 
 public:
   ShutdownObserver() {}
 
   NS_DECL_ISUPPORTS
 
   NS_IMETHOD Observe(nsISupports *subject, const char *aTopic,
-                     const char16_t *aData)
+                     const char16_t *aData) MOZ_OVERRIDE
   {
     MOZ_ASSERT(strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID) == 0);
 
     delete GfxInfoBase::mDriverInfo;
     GfxInfoBase::mDriverInfo = nullptr;
 
     for (uint32_t i = 0; i < DeviceFamilyMax; i++)
       delete GfxDriverInfo::mDeviceFamilies[i];
--- a/widget/GfxInfoBase.h
+++ b/widget/GfxInfoBase.h
@@ -45,35 +45,35 @@ public:
 
   // We only declare a subset of the nsIGfxInfo interface. It's up to derived
   // classes to implement the rest of the interface.  
   // Derived classes need to use
   // using GfxInfoBase::GetFeatureStatus;
   // using GfxInfoBase::GetFeatureSuggestedDriverVersion;
   // using GfxInfoBase::GetWebGLParameter;
   // to import the relevant methods into their namespace.
-  NS_IMETHOD GetFeatureStatus(int32_t aFeature, int32_t *_retval);
-  NS_IMETHOD GetFeatureSuggestedDriverVersion(int32_t aFeature, nsAString & _retval);
-  NS_IMETHOD GetWebGLParameter(const nsAString & aParam, nsAString & _retval);
+  NS_IMETHOD GetFeatureStatus(int32_t aFeature, int32_t *_retval) MOZ_OVERRIDE;
+  NS_IMETHOD GetFeatureSuggestedDriverVersion(int32_t aFeature, nsAString & _retval) MOZ_OVERRIDE;
+  NS_IMETHOD GetWebGLParameter(const nsAString & aParam, nsAString & _retval) MOZ_OVERRIDE;
 
-  NS_IMETHOD GetFailures(uint32_t *failureCount, char ***failures);
-  NS_IMETHOD_(void) LogFailure(const nsACString &failure);
-  NS_IMETHOD GetInfo(JSContext*, JS::MutableHandle<JS::Value>);
+  NS_IMETHOD GetFailures(uint32_t *failureCount, char ***failures) MOZ_OVERRIDE;
+  NS_IMETHOD_(void) LogFailure(const nsACString &failure) MOZ_OVERRIDE;
+  NS_IMETHOD GetInfo(JSContext*, JS::MutableHandle<JS::Value>) MOZ_OVERRIDE;
 
   // Initialization function. If you override this, you must call this class's
   // version of Init first.
   // We need Init to be called separately from the constructor so we can
   // register as an observer after all derived classes have been constructed
   // and we know we have a non-zero refcount.
   // Ideally, Init() would be void-return, but the rules of
   // NS_GENERIC_FACTORY_CONSTRUCTOR_INIT require it be nsresult return.
   virtual nsresult Init();
   
   // only useful on X11
-  NS_IMETHOD_(void) GetData() { }
+  NS_IMETHOD_(void) GetData() MOZ_OVERRIDE { }
 
   static void AddCollector(GfxInfoCollectorBase* collector);
   static void RemoveCollector(GfxInfoCollectorBase* collector);
 
   static nsTArray<GfxDriverInfo>* mDriverInfo;
   static bool mDriverInfoObserverInitialized;
 
   virtual nsString Model() { return EmptyString(); }
--- a/widget/PuppetWidget.h
+++ b/widget/PuppetWidget.h
@@ -55,91 +55,91 @@ protected:
 
 public:
   NS_DECL_ISUPPORTS_INHERITED
 
   NS_IMETHOD Create(nsIWidget*        aParent,
                     nsNativeWidget    aNativeParent,
                     const nsIntRect&  aRect,
                     nsDeviceContext*  aContext,
-                    nsWidgetInitData* aInitData = nullptr);
+                    nsWidgetInitData* aInitData = nullptr) MOZ_OVERRIDE;
 
   void InitIMEState();
 
   virtual already_AddRefed<nsIWidget>
   CreateChild(const nsIntRect  &aRect,
               nsDeviceContext  *aContext,
               nsWidgetInitData *aInitData = nullptr,
-              bool             aForceUseIWidgetParent = false);
+              bool             aForceUseIWidgetParent = false) MOZ_OVERRIDE;
 
-  NS_IMETHOD Destroy();
+  NS_IMETHOD Destroy() MOZ_OVERRIDE;
 
-  NS_IMETHOD Show(bool aState);
+  NS_IMETHOD Show(bool aState) MOZ_OVERRIDE;
 
-  virtual bool IsVisible() const
+  virtual bool IsVisible() const MOZ_OVERRIDE
   { return mVisible; }
 
   NS_IMETHOD ConstrainPosition(bool     /*ignored aAllowSlop*/,
                                int32_t* aX,
-                               int32_t* aY)
+                               int32_t* aY) MOZ_OVERRIDE
   { *aX = kMaxDimension;  *aY = kMaxDimension;  return NS_OK; }
 
   // We're always at <0, 0>, and so ignore move requests.
-  NS_IMETHOD Move(double aX, double aY)
+  NS_IMETHOD Move(double aX, double aY) MOZ_OVERRIDE
   { return NS_OK; }
 
   NS_IMETHOD Resize(double aWidth,
                     double aHeight,
-                    bool   aRepaint);
+                    bool   aRepaint) MOZ_OVERRIDE;
   NS_IMETHOD Resize(double aX,
                     double aY,
                     double aWidth,
                     double aHeight,
-                    bool   aRepaint)
+                    bool   aRepaint) MOZ_OVERRIDE
   // (we're always at <0, 0>)
   { return Resize(aWidth, aHeight, aRepaint); }
 
   // XXX/cjones: copying gtk behavior here; unclear what disabling a
   // widget is supposed to entail
-  NS_IMETHOD Enable(bool aState)
+  NS_IMETHOD Enable(bool aState) MOZ_OVERRIDE
   { mEnabled = aState;  return NS_OK; }
-  virtual bool IsEnabled() const
+  virtual bool IsEnabled() const MOZ_OVERRIDE
   { return mEnabled; }
 
-  NS_IMETHOD SetFocus(bool aRaise = false);
+  NS_IMETHOD SetFocus(bool aRaise = false) MOZ_OVERRIDE;
 
-  virtual nsresult ConfigureChildren(const nsTArray<Configuration>& aConfigurations);
+  virtual nsresult ConfigureChildren(const nsTArray<Configuration>& aConfigurations) MOZ_OVERRIDE;
 
-  NS_IMETHOD Invalidate(const nsIntRect& aRect);
+  NS_IMETHOD Invalidate(const nsIntRect& aRect) MOZ_OVERRIDE;
 
   // This API is going away, steer clear.
   virtual void Scroll(const nsIntPoint& aDelta,
                       const nsTArray<nsIntRect>& aDestRects,
                       const nsTArray<Configuration>& aReconfigureChildren)
   { /* dead man walking */ }
 
   // PuppetWidgets don't have native data, as they're purely nonnative.
-  virtual void* GetNativeData(uint32_t aDataType);
-  NS_IMETHOD ReparentNativeWidget(nsIWidget* aNewParent)
+  virtual void* GetNativeData(uint32_t aDataType) MOZ_OVERRIDE;
+  NS_IMETHOD ReparentNativeWidget(nsIWidget* aNewParent) MOZ_OVERRIDE
   { return NS_ERROR_UNEXPECTED; }
 
   // PuppetWidgets don't have any concept of titles. 
-  NS_IMETHOD SetTitle(const nsAString& aTitle)
+  NS_IMETHOD SetTitle(const nsAString& aTitle) MOZ_OVERRIDE
   { return NS_ERROR_UNEXPECTED; }
   
   // PuppetWidgets are always at <0, 0>.
-  virtual nsIntPoint WidgetToScreenOffset()
+  virtual nsIntPoint WidgetToScreenOffset() MOZ_OVERRIDE
   { return nsIntPoint(0, 0); }
 
   void InitEvent(WidgetGUIEvent& aEvent, nsIntPoint* aPoint = nullptr);
 
-  NS_IMETHOD DispatchEvent(WidgetGUIEvent* aEvent, nsEventStatus& aStatus);
+  NS_IMETHOD DispatchEvent(WidgetGUIEvent* aEvent, nsEventStatus& aStatus) MOZ_OVERRIDE;
 
   NS_IMETHOD CaptureRollupEvents(nsIRollupListener* aListener,
-                                 bool aDoCapture)
+                                 bool aDoCapture) MOZ_OVERRIDE
   { return NS_ERROR_UNEXPECTED; }
 
   NS_IMETHOD_(bool)
   ExecuteNativeKeyBinding(NativeKeyBindingsType aType,
                           const mozilla::WidgetKeyboardEvent& aEvent,
                           DoCommandCallback aCallback,
                           void* aCallbackData) MOZ_OVERRIDE;
 
@@ -157,37 +157,37 @@ public:
   // backstop background color.
   virtual nsTransparencyMode GetTransparencyMode() MOZ_OVERRIDE
   { return eTransparencyTransparent; }
 
   virtual LayerManager*
   GetLayerManager(PLayerTransactionChild* aShadowManager = nullptr,
                   LayersBackend aBackendHint = mozilla::layers::LayersBackend::LAYERS_NONE,
                   LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
-                  bool* aAllowRetaining = nullptr);
+                  bool* aAllowRetaining = nullptr) MOZ_OVERRIDE;
 
   NS_IMETHOD NotifyIME(const IMENotification& aIMENotification) MOZ_OVERRIDE;
   NS_IMETHOD_(void) SetInputContext(const InputContext& aContext,
-                                    const InputContextAction& aAction);
-  NS_IMETHOD_(InputContext) GetInputContext();
+                                    const InputContextAction& aAction) MOZ_OVERRIDE;
+  NS_IMETHOD_(InputContext) GetInputContext() MOZ_OVERRIDE;
   virtual nsIMEUpdatePreference GetIMEUpdatePreference() MOZ_OVERRIDE;
 
-  NS_IMETHOD SetCursor(nsCursor aCursor);
+  NS_IMETHOD SetCursor(nsCursor aCursor) MOZ_OVERRIDE;
   NS_IMETHOD SetCursor(imgIContainer* aCursor,
-                       uint32_t aHotspotX, uint32_t aHotspotY)
+                       uint32_t aHotspotX, uint32_t aHotspotY) MOZ_OVERRIDE
   {
     return nsBaseWidget::SetCursor(aCursor, aHotspotX, aHotspotY);
   }
 
   // Gets the DPI of the screen corresponding to this widget.
   // Contacts the parent process which gets the DPI from the
   // proper widget there. TODO: Handle DPI changes that happen
   // later on.
-  virtual float GetDPI();
-  virtual double GetDefaultScaleInternal();
+  virtual float GetDPI() MOZ_OVERRIDE;
+  virtual double GetDefaultScaleInternal() MOZ_OVERRIDE;
 
   virtual bool NeedsPaint() MOZ_OVERRIDE;
 
   virtual TabChild* GetOwningTabChild() MOZ_OVERRIDE { return mTabChild; }
   virtual void ClearBackingScaleCache()
   {
     mDPI = -1;
     mDefaultScale = -1;
--- a/widget/cocoa/GfxInfo.h
+++ b/widget/cocoa/GfxInfo.h
@@ -18,43 +18,43 @@ namespace widget {
 
 class GfxInfo : public GfxInfoBase
 {
 public:
 
   GfxInfo();
   // We only declare the subset of nsIGfxInfo that we actually implement. The
   // rest is brought forward from GfxInfoBase.
-  NS_IMETHOD GetD2DEnabled(bool *aD2DEnabled);
-  NS_IMETHOD GetDWriteEnabled(bool *aDWriteEnabled);
-  NS_IMETHOD GetDWriteVersion(nsAString & aDwriteVersion);
-  NS_IMETHOD GetCleartypeParameters(nsAString & aCleartypeParams);
-  NS_IMETHOD GetAdapterDescription(nsAString & aAdapterDescription);
-  NS_IMETHOD GetAdapterDriver(nsAString & aAdapterDriver);
-  NS_IMETHOD GetAdapterVendorID(nsAString & aAdapterVendorID);
-  NS_IMETHOD GetAdapterDeviceID(nsAString & aAdapterDeviceID);
-  NS_IMETHOD GetAdapterSubsysID(nsAString & aAdapterSubsysID);
-  NS_IMETHOD GetAdapterRAM(nsAString & aAdapterRAM);
-  NS_IMETHOD GetAdapterDriverVersion(nsAString & aAdapterDriverVersion);
-  NS_IMETHOD GetAdapterDriverDate(nsAString & aAdapterDriverDate);
-  NS_IMETHOD GetAdapterDescription2(nsAString & aAdapterDescription);
-  NS_IMETHOD GetAdapterDriver2(nsAString & aAdapterDriver);
-  NS_IMETHOD GetAdapterVendorID2(nsAString & aAdapterVendorID);
-  NS_IMETHOD GetAdapterDeviceID2(nsAString & aAdapterDeviceID);
-  NS_IMETHOD GetAdapterSubsysID2(nsAString & aAdapterSubsysID);
-  NS_IMETHOD GetAdapterRAM2(nsAString & aAdapterRAM);
-  NS_IMETHOD GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion);
-  NS_IMETHOD GetAdapterDriverDate2(nsAString & aAdapterDriverDate);
-  NS_IMETHOD GetIsGPU2Active(bool *aIsGPU2Active);
+  NS_IMETHOD GetD2DEnabled(bool *aD2DEnabled) MOZ_OVERRIDE;
+  NS_IMETHOD GetDWriteEnabled(bool *aDWriteEnabled) MOZ_OVERRIDE;
+  NS_IMETHOD GetDWriteVersion(nsAString & aDwriteVersion) MOZ_OVERRIDE;
+  NS_IMETHOD GetCleartypeParameters(nsAString & aCleartypeParams) MOZ_OVERRIDE;
+  NS_IMETHOD GetAdapterDescription(nsAString & aAdapterDescription) MOZ_OVERRIDE;
+  NS_IMETHOD GetAdapterDriver(nsAString & aAdapterDriver) MOZ_OVERRIDE;
+  NS_IMETHOD GetAdapterVendorID(nsAString & aAdapterVendorID) MOZ_OVERRIDE;
+  NS_IMETHOD GetAdapterDeviceID(nsAString & aAdapterDeviceID) MOZ_OVERRIDE;
+  NS_IMETHOD GetAdapterSubsysID(nsAString & aAdapterSubsysID) MOZ_OVERRIDE;
+  NS_IMETHOD GetAdapterRAM(nsAString & aAdapterRAM) MOZ_OVERRIDE;
+  NS_IMETHOD GetAdapterDriverVersion(nsAString & aAdapterDriverVersion) MOZ_OVERRIDE;
+  NS_IMETHOD GetAdapterDriverDate(nsAString & aAdapterDriverDate) MOZ_OVERRIDE;
+  NS_IMETHOD GetAdapterDescription2(nsAString & aAdapterDescription) MOZ_OVERRIDE;
+  NS_IMETHOD GetAdapterDriver2(nsAString & aAdapterDriver) MOZ_OVERRIDE;
+  NS_IMETHOD GetAdapterVendorID2(nsAString & aAdapterVendorID) MOZ_OVERRIDE;
+  NS_IMETHOD GetAdapterDeviceID2(nsAString & aAdapterDeviceID) MOZ_OVERRIDE;
+  NS_IMETHOD GetAdapterSubsysID2(nsAString & aAdapterSubsysID) MOZ_OVERRIDE;
+  NS_IMETHOD GetAdapterRAM2(nsAString & aAdapterRAM) MOZ_OVERRIDE;
+  NS_IMETHOD GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion) MOZ_OVERRIDE;
+  NS_IMETHOD GetAdapterDriverDate2(nsAString & aAdapterDriverDate) MOZ_OVERRIDE;
+  NS_IMETHOD GetIsGPU2Active(bool *aIsGPU2Active) MOZ_OVERRIDE;
 
   using GfxInfoBase::GetFeatureStatus;
   using GfxInfoBase::GetFeatureSuggestedDriverVersion;
   using GfxInfoBase::GetWebGLParameter;
 
-  virtual nsresult Init();
+  virtual nsresult Init() MOZ_OVERRIDE;
 
   NS_DECL_ISUPPORTS_INHERITED
 #ifdef DEBUG
   NS_DECL_NSIGFXINFODEBUG
 #endif
   NS_DECL_NSIGFXINFO2
 
   virtual uint32_t OperatingSystemVersion() MOZ_OVERRIDE { return mOSXVersion; }
@@ -62,18 +62,18 @@ public:
 protected:
 
   virtual ~GfxInfo() {}
 
   virtual nsresult GetFeatureStatusImpl(int32_t aFeature, 
                                         int32_t *aStatus, 
                                         nsAString & aSuggestedDriverVersion, 
                                         const nsTArray<GfxDriverInfo>& aDriverInfo,
-                                        OperatingSystem* aOS = nullptr);
-  virtual const nsTArray<GfxDriverInfo>& GetGfxDriverInfo();
+                                        OperatingSystem* aOS = nullptr) MOZ_OVERRIDE;
+  virtual const nsTArray<GfxDriverInfo>& GetGfxDriverInfo() MOZ_OVERRIDE;
 
 private:
 
   void GetDeviceInfo();
   void GetSelectedCityInfo();
   void AddCrashReportAnnotations();
 
   nsString mAdapterRAMString;
--- a/widget/cocoa/nsAppShell.mm
+++ b/widget/cocoa/nsAppShell.mm
@@ -48,17 +48,17 @@ class MacWakeLockListener MOZ_FINAL : pu
 public:
   NS_DECL_ISUPPORTS;
 
 private:
   ~MacWakeLockListener() {}
 
   IOPMAssertionID mAssertionID = kIOPMNullAssertionID;
 
-  NS_IMETHOD Callback(const nsAString& aTopic, const nsAString& aState) {
+  NS_IMETHOD Callback(const nsAString& aTopic, const nsAString& aState) MOZ_OVERRIDE {
     if (!aTopic.EqualsASCII("screen")) {
       return NS_OK;
     }
     // Note the wake lock code ensures that we're not sent duplicate
     // "locked-foreground" notifications when multiple wake locks are held.
     if (aState.EqualsASCII("locked-foreground")) {
       // Prevent screen saver.
       CFStringRef cf_topic =
--- a/widget/cocoa/nsChangeObserver.h
+++ b/widget/cocoa/nsChangeObserver.h
@@ -7,19 +7,19 @@
 #ifndef nsChangeObserver_h_
 #define nsChangeObserver_h_
 
 class nsIContent;
 class nsIDocument;
 class nsIAtom;
 
 #define NS_DECL_CHANGEOBSERVER \
-void ObserveAttributeChanged(nsIDocument *aDocument, nsIContent *aContent, nsIAtom *aAttribute); \
-void ObserveContentRemoved(nsIDocument *aDocument, nsIContent *aChild, int32_t aIndexInContainer); \
-void ObserveContentInserted(nsIDocument *aDocument, nsIContent* aContainer, nsIContent *aChild);
+void ObserveAttributeChanged(nsIDocument *aDocument, nsIContent *aContent, nsIAtom *aAttribute) MOZ_OVERRIDE; \
+void ObserveContentRemoved(nsIDocument *aDocument, nsIContent *aChild, int32_t aIndexInContainer) MOZ_OVERRIDE; \
+void ObserveContentInserted(nsIDocument *aDocument, nsIContent* aContainer, nsIContent *aChild) MOZ_OVERRIDE;
 
 // Something that wants to be alerted to changes in attributes or changes in
 // its corresponding content object.
 //
 // This interface is used by our menu code so we only have to have one
 // nsIDocumentObserver.
 //
 // Any class that implements this interface must take care to unregister itself
--- a/widget/cocoa/nsChildView.h
+++ b/widget/cocoa/nsChildView.h
@@ -351,156 +351,156 @@ private:
 public:
   nsChildView();
 
   // nsIWidget interface
   NS_IMETHOD              Create(nsIWidget *aParent,
                                  nsNativeWidget aNativeParent,
                                  const nsIntRect &aRect,
                                  nsDeviceContext *aContext,
-                                 nsWidgetInitData *aInitData = nullptr);
+                                 nsWidgetInitData *aInitData = nullptr) MOZ_OVERRIDE;
 
-  NS_IMETHOD              Destroy();
+  NS_IMETHOD              Destroy() MOZ_OVERRIDE;
 
-  NS_IMETHOD              Show(bool aState);
-  virtual bool            IsVisible() const;
+  NS_IMETHOD              Show(bool aState) MOZ_OVERRIDE;
+  virtual bool            IsVisible() const MOZ_OVERRIDE;
 
-  NS_IMETHOD              SetParent(nsIWidget* aNewParent);
-  virtual nsIWidget*      GetParent(void);
-  virtual float           GetDPI();
+  NS_IMETHOD              SetParent(nsIWidget* aNewParent) MOZ_OVERRIDE;
+  virtual nsIWidget*      GetParent(void) MOZ_OVERRIDE;
+  virtual float           GetDPI() MOZ_OVERRIDE;
 
   NS_IMETHOD              ConstrainPosition(bool aAllowSlop,
-                                            int32_t *aX, int32_t *aY);
-  NS_IMETHOD              Move(double aX, double aY);
-  NS_IMETHOD              Resize(double aWidth, double aHeight, bool aRepaint);
+                                            int32_t *aX, int32_t *aY) MOZ_OVERRIDE;
+  NS_IMETHOD              Move(double aX, double aY) MOZ_OVERRIDE;
+  NS_IMETHOD              Resize(double aWidth, double aHeight, bool aRepaint) MOZ_OVERRIDE;
   NS_IMETHOD              Resize(double aX, double aY,
-                                 double aWidth, double aHeight, bool aRepaint);
+                                 double aWidth, double aHeight, bool aRepaint) MOZ_OVERRIDE;
 
-  NS_IMETHOD              Enable(bool aState);
-  virtual bool            IsEnabled() const;
-  NS_IMETHOD              SetFocus(bool aRaise);
-  NS_IMETHOD              GetBounds(nsIntRect &aRect);
-  NS_IMETHOD              GetClientBounds(nsIntRect &aRect);
-  NS_IMETHOD              GetScreenBounds(nsIntRect &aRect);
+  NS_IMETHOD              Enable(bool aState) MOZ_OVERRIDE;
+  virtual bool            IsEnabled() const MOZ_OVERRIDE;
+  NS_IMETHOD              SetFocus(bool aRaise) MOZ_OVERRIDE;
+  NS_IMETHOD              GetBounds(nsIntRect &aRect) MOZ_OVERRIDE;
+  NS_IMETHOD              GetClientBounds(nsIntRect &aRect) MOZ_OVERRIDE;
+  NS_IMETHOD              GetScreenBounds(nsIntRect &aRect) MOZ_OVERRIDE;
 
   // Returns the "backing scale factor" of the view's window, which is the
   // ratio of pixels in the window's backing store to Cocoa points. Prior to
   // HiDPI support in OS X 10.7, this was always 1.0, but in HiDPI mode it
   // will be 2.0 (and might potentially other values as screen resolutions
   // evolve). This gives the relationship between what Gecko calls "device
   // pixels" and the Cocoa "points" coordinate system.
   CGFloat                 BackingScaleFactor() const;
 
   // Call if the window's backing scale factor changes - i.e., it is moved
   // between HiDPI and non-HiDPI screens
   void                    BackingScaleFactorChanged();
 
-  virtual double          GetDefaultScaleInternal();
+  virtual double          GetDefaultScaleInternal() MOZ_OVERRIDE;
 
   virtual int32_t         RoundsWidgetCoordinatesTo() MOZ_OVERRIDE;
 
-  NS_IMETHOD              Invalidate(const nsIntRect &aRect);
+  NS_IMETHOD              Invalidate(const nsIntRect &aRect) MOZ_OVERRIDE;
 
-  virtual void*           GetNativeData(uint32_t aDataType);
-  virtual nsresult        ConfigureChildren(const nsTArray<Configuration>& aConfigurations);
-  virtual nsIntPoint      WidgetToScreenOffset();
-  virtual bool            ShowsResizeIndicator(nsIntRect* aResizerRect);
+  virtual void*           GetNativeData(uint32_t aDataType) MOZ_OVERRIDE;
+  virtual nsresult        ConfigureChildren(const nsTArray<Configuration>& aConfigurations) MOZ_OVERRIDE;
+  virtual nsIntPoint      WidgetToScreenOffset() MOZ_OVERRIDE;
+  virtual bool            ShowsResizeIndicator(nsIntRect* aResizerRect) MOZ_OVERRIDE;
 
   static  bool            ConvertStatus(nsEventStatus aStatus)
                           { return aStatus == nsEventStatus_eConsumeNoDefault; }
   NS_IMETHOD              DispatchEvent(mozilla::WidgetGUIEvent* aEvent,
-                                        nsEventStatus& aStatus);
+                                        nsEventStatus& aStatus) MOZ_OVERRIDE;
 
-  virtual bool            ComputeShouldAccelerate(bool aDefault);
+  virtual bool            ComputeShouldAccelerate(bool aDefault) MOZ_OVERRIDE;
   virtual bool            ShouldUseOffMainThreadCompositing() MOZ_OVERRIDE;
 
-  NS_IMETHOD        SetCursor(nsCursor aCursor);
-  NS_IMETHOD        SetCursor(imgIContainer* aCursor, uint32_t aHotspotX, uint32_t aHotspotY);
+  NS_IMETHOD        SetCursor(nsCursor aCursor) MOZ_OVERRIDE;
+  NS_IMETHOD        SetCursor(imgIContainer* aCursor, uint32_t aHotspotX, uint32_t aHotspotY) MOZ_OVERRIDE;
 
-  NS_IMETHOD        CaptureRollupEvents(nsIRollupListener * aListener, bool aDoCapture);
-  NS_IMETHOD        SetTitle(const nsAString& title);
+  NS_IMETHOD        CaptureRollupEvents(nsIRollupListener * aListener, bool aDoCapture) MOZ_OVERRIDE;
+  NS_IMETHOD        SetTitle(const nsAString& title) MOZ_OVERRIDE;
 
-  NS_IMETHOD        GetAttention(int32_t aCycleCount);
+  NS_IMETHOD        GetAttention(int32_t aCycleCount) MOZ_OVERRIDE;
 
-  virtual bool HasPendingInputEvent();
+  virtual bool HasPendingInputEvent() MOZ_OVERRIDE;
 
-  NS_IMETHOD        ActivateNativeMenuItemAt(const nsAString& indexString);
-  NS_IMETHOD        ForceUpdateNativeMenuAt(const nsAString& indexString);
+  NS_IMETHOD        ActivateNativeMenuItemAt(const nsAString& indexString) MOZ_OVERRIDE;
+  NS_IMETHOD        ForceUpdateNativeMenuAt(const nsAString& indexString) MOZ_OVERRIDE;
 
   NS_IMETHOD        NotifyIME(const IMENotification& aIMENotification) MOZ_OVERRIDE;
   NS_IMETHOD_(void) SetInputContext(const InputContext& aContext,
-                                    const InputContextAction& aAction);
-  NS_IMETHOD_(InputContext) GetInputContext();
-  NS_IMETHOD        AttachNativeKeyEvent(mozilla::WidgetKeyboardEvent& aEvent);
+                                    const InputContextAction& aAction) MOZ_OVERRIDE;
+  NS_IMETHOD_(InputContext) GetInputContext() MOZ_OVERRIDE;
+  NS_IMETHOD        AttachNativeKeyEvent(mozilla::WidgetKeyboardEvent& aEvent) MOZ_OVERRIDE;
   NS_IMETHOD_(bool) ExecuteNativeKeyBinding(
                       NativeKeyBindingsType aType,
                       const mozilla::WidgetKeyboardEvent& aEvent,
                       DoCommandCallback aCallback,
                       void* aCallbackData) MOZ_OVERRIDE;
   bool ExecuteNativeKeyBindingRemapped(
                       NativeKeyBindingsType aType,
                       const mozilla::WidgetKeyboardEvent& aEvent,
                       DoCommandCallback aCallback,
                       void* aCallbackData,
                       uint32_t aGeckoKeyCode,
                       uint32_t aCocoaKeyCode);
   virtual nsIMEUpdatePreference GetIMEUpdatePreference() MOZ_OVERRIDE;
   NS_IMETHOD        GetToggledKeyState(uint32_t aKeyCode,
-                                       bool* aLEDState);
+                                       bool* aLEDState) MOZ_OVERRIDE;
 
-  virtual nsTransparencyMode GetTransparencyMode();
-  virtual void                SetTransparencyMode(nsTransparencyMode aMode);
+  virtual nsTransparencyMode GetTransparencyMode() MOZ_OVERRIDE;
+  virtual void                SetTransparencyMode(nsTransparencyMode aMode) MOZ_OVERRIDE;
 
   virtual nsresult SynthesizeNativeKeyEvent(int32_t aNativeKeyboardLayout,
                                             int32_t aNativeKeyCode,
                                             uint32_t aModifierFlags,
                                             const nsAString& aCharacters,
-                                            const nsAString& aUnmodifiedCharacters);
+                                            const nsAString& aUnmodifiedCharacters) MOZ_OVERRIDE;
 
   virtual nsresult SynthesizeNativeMouseEvent(nsIntPoint aPoint,
                                               uint32_t aNativeMessage,
-                                              uint32_t aModifierFlags);
+                                              uint32_t aModifierFlags) MOZ_OVERRIDE;
 
-  virtual nsresult SynthesizeNativeMouseMove(nsIntPoint aPoint)
+  virtual nsresult SynthesizeNativeMouseMove(nsIntPoint aPoint) MOZ_OVERRIDE
   { return SynthesizeNativeMouseEvent(aPoint, NSMouseMoved, 0); }
 
   // Mac specific methods
   
   virtual bool      DispatchWindowEvent(mozilla::WidgetGUIEvent& event);
 
   void WillPaintWindow();
   bool PaintWindow(nsIntRegion aRegion);
 
 #ifdef ACCESSIBILITY
   already_AddRefed<mozilla::a11y::Accessible> GetDocumentAccessible();
 #endif
 
-  virtual void CreateCompositor();
+  virtual void CreateCompositor() MOZ_OVERRIDE;
   virtual void PrepareWindowEffects() MOZ_OVERRIDE;
   virtual void CleanupWindowEffects() MOZ_OVERRIDE;
   virtual bool PreRender(LayerManagerComposite* aManager) MOZ_OVERRIDE;
   virtual void PostRender(LayerManagerComposite* aManager) MOZ_OVERRIDE;
   virtual void DrawWindowOverlay(LayerManagerComposite* aManager, nsIntRect aRect) MOZ_OVERRIDE;
 
-  virtual void UpdateThemeGeometries(const nsTArray<ThemeGeometry>& aThemeGeometries);
+  virtual void UpdateThemeGeometries(const nsTArray<ThemeGeometry>& aThemeGeometries) MOZ_OVERRIDE;
 
   virtual void UpdateWindowDraggingRegion(const nsIntRegion& aRegion) MOZ_OVERRIDE;
   const nsIntRegion& GetDraggableRegion() { return mDraggableRegion; }
 
   void              ResetParent();
 
   static bool DoHasPendingInputEvent();
   static uint32_t GetCurrentInputEventCount();
   static void UpdateCurrentInputEventCount();
 
   NSView<mozView>* GetEditorView();
 
   nsCocoaWindow*    GetXULWindowWidget();
 
-  NS_IMETHOD        ReparentNativeWidget(nsIWidget* aNewParent);
+  NS_IMETHOD        ReparentNativeWidget(nsIWidget* aNewParent) MOZ_OVERRIDE;
 
   mozilla::widget::TextInputHandler* GetTextInputHandler()
   {
     return mTextInputHandler;
   }
 
   void              ClearVibrantAreas();
   NSColor*          VibrancyFillColorForWidgetType(uint8_t aWidgetType);
@@ -536,17 +536,17 @@ protected:
   void              ReportSizeEvent();
 
   // override to create different kinds of child views. Autoreleases, so
   // caller must retain.
   virtual NSView*   CreateCocoaView(NSRect inFrame);
   void              TearDownView();
 
   virtual already_AddRefed<nsIWidget>
-  AllocateChildPopupWidget()
+  AllocateChildPopupWidget() MOZ_OVERRIDE
   {
     static NS_DEFINE_IID(kCPopUpCID, NS_POPUP_CID);
     nsCOMPtr<nsIWidget> widget = do_CreateInstance(kCPopUpCID);
     return widget.forget();
   }
 
   void ConfigureAPZCTreeManager() MOZ_OVERRIDE;
 
--- a/widget/cocoa/nsCocoaWindow.h
+++ b/widget/cocoa/nsCocoaWindow.h
@@ -244,102 +244,102 @@ public:
 
     NS_DECL_ISUPPORTS_INHERITED
     NS_DECL_NSPIWIDGETCOCOA
       
     NS_IMETHOD              Create(nsIWidget* aParent,
                                    nsNativeWidget aNativeParent,
                                    const nsIntRect &aRect,
                                    nsDeviceContext *aContext,
-                                   nsWidgetInitData *aInitData = nullptr);
+                                   nsWidgetInitData *aInitData = nullptr) MOZ_OVERRIDE;
 
-    NS_IMETHOD              Destroy();
+    NS_IMETHOD              Destroy() MOZ_OVERRIDE;
 
-    NS_IMETHOD              Show(bool aState);
-    virtual nsIWidget*      GetSheetWindowParent(void);
-    NS_IMETHOD              Enable(bool aState);
-    virtual bool            IsEnabled() const;
-    NS_IMETHOD              SetModal(bool aState);
-    virtual bool            IsVisible() const;
-    NS_IMETHOD              SetFocus(bool aState=false);
-    virtual nsIntPoint WidgetToScreenOffset();
-    virtual nsIntPoint GetClientOffset();
-    virtual nsIntSize ClientToWindowSize(const nsIntSize& aClientSize);
+    NS_IMETHOD              Show(bool aState) MOZ_OVERRIDE;
+    virtual nsIWidget*      GetSheetWindowParent(void) MOZ_OVERRIDE;
+    NS_IMETHOD              Enable(bool aState) MOZ_OVERRIDE;
+    virtual bool            IsEnabled() const MOZ_OVERRIDE;
+    NS_IMETHOD              SetModal(bool aState) MOZ_OVERRIDE;
+    virtual bool            IsVisible() const MOZ_OVERRIDE;
+    NS_IMETHOD              SetFocus(bool aState=false) MOZ_OVERRIDE;
+    virtual nsIntPoint WidgetToScreenOffset() MOZ_OVERRIDE;
+    virtual nsIntPoint GetClientOffset() MOZ_OVERRIDE;
+    virtual nsIntSize ClientToWindowSize(const nsIntSize& aClientSize) MOZ_OVERRIDE;
 
-    virtual void* GetNativeData(uint32_t aDataType) ;
+    virtual void* GetNativeData(uint32_t aDataType) MOZ_OVERRIDE;
 
     NS_IMETHOD              ConstrainPosition(bool aAllowSlop,
-                                              int32_t *aX, int32_t *aY);
-    virtual void            SetSizeConstraints(const SizeConstraints& aConstraints);
-    NS_IMETHOD              Move(double aX, double aY);
+                                              int32_t *aX, int32_t *aY) MOZ_OVERRIDE;
+    virtual void            SetSizeConstraints(const SizeConstraints& aConstraints) MOZ_OVERRIDE;
+    NS_IMETHOD              Move(double aX, double aY) MOZ_OVERRIDE;
     NS_IMETHOD              PlaceBehind(nsTopLevelWidgetZPlacement aPlacement,
-                                        nsIWidget *aWidget, bool aActivate);
-    NS_IMETHOD              SetSizeMode(int32_t aMode);
-    NS_IMETHOD              HideWindowChrome(bool aShouldHide);
+                                        nsIWidget *aWidget, bool aActivate) MOZ_OVERRIDE;
+    NS_IMETHOD              SetSizeMode(int32_t aMode) MOZ_OVERRIDE;
+    NS_IMETHOD              HideWindowChrome(bool aShouldHide) MOZ_OVERRIDE;
     void                    EnteredFullScreen(bool aFullScreen);
-    NS_IMETHOD              MakeFullScreen(bool aFullScreen, nsIScreen* aTargetScreen = nullptr);
-    NS_IMETHOD              Resize(double aWidth, double aHeight, bool aRepaint);
-    NS_IMETHOD              Resize(double aX, double aY, double aWidth, double aHeight, bool aRepaint);
-    NS_IMETHOD              GetClientBounds(nsIntRect &aRect);
-    NS_IMETHOD              GetScreenBounds(nsIntRect &aRect);
+    NS_IMETHOD              MakeFullScreen(bool aFullScreen, nsIScreen* aTargetScreen = nullptr) MOZ_OVERRIDE;
+    NS_IMETHOD              Resize(double aWidth, double aHeight, bool aRepaint) MOZ_OVERRIDE;
+    NS_IMETHOD              Resize(double aX, double aY, double aWidth, double aHeight, bool aRepaint) MOZ_OVERRIDE;
+    NS_IMETHOD              GetClientBounds(nsIntRect &aRect) MOZ_OVERRIDE;
+    NS_IMETHOD              GetScreenBounds(nsIntRect &aRect) MOZ_OVERRIDE;
     void                    ReportMoveEvent();
     void                    ReportSizeEvent();
-    NS_IMETHOD              SetCursor(nsCursor aCursor);
-    NS_IMETHOD              SetCursor(imgIContainer* aCursor, uint32_t aHotspotX, uint32_t aHotspotY);
+    NS_IMETHOD              SetCursor(nsCursor aCursor) MOZ_OVERRIDE;
+    NS_IMETHOD              SetCursor(imgIContainer* aCursor, uint32_t aHotspotX, uint32_t aHotspotY) MOZ_OVERRIDE;
 
     CGFloat                 BackingScaleFactor();
     void                    BackingScaleFactorChanged();
-    virtual double          GetDefaultScaleInternal();
+    virtual double          GetDefaultScaleInternal() MOZ_OVERRIDE;
     virtual int32_t         RoundsWidgetCoordinatesTo() MOZ_OVERRIDE;
 
-    NS_IMETHOD              SetTitle(const nsAString& aTitle);
+    NS_IMETHOD              SetTitle(const nsAString& aTitle) MOZ_OVERRIDE;
 
-    NS_IMETHOD Invalidate(const nsIntRect &aRect);
-    virtual nsresult ConfigureChildren(const nsTArray<Configuration>& aConfigurations);
+    NS_IMETHOD Invalidate(const nsIntRect &aRect) MOZ_OVERRIDE;
+    virtual nsresult ConfigureChildren(const nsTArray<Configuration>& aConfigurations) MOZ_OVERRIDE;
     virtual LayerManager* GetLayerManager(PLayerTransactionChild* aShadowManager = nullptr,
                                           LayersBackend aBackendHint = mozilla::layers::LayersBackend::LAYERS_NONE,
                                           LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
-                                          bool* aAllowRetaining = nullptr);
+                                          bool* aAllowRetaining = nullptr) MOZ_OVERRIDE;
     NS_IMETHOD DispatchEvent(mozilla::WidgetGUIEvent* aEvent,
-                             nsEventStatus& aStatus);
-    NS_IMETHOD CaptureRollupEvents(nsIRollupListener * aListener, bool aDoCapture);
-    NS_IMETHOD GetAttention(int32_t aCycleCount);
-    virtual bool HasPendingInputEvent();
-    virtual nsTransparencyMode GetTransparencyMode();
-    virtual void SetTransparencyMode(nsTransparencyMode aMode);
-    NS_IMETHOD SetWindowShadowStyle(int32_t aStyle);
-    virtual void SetShowsToolbarButton(bool aShow);
-    virtual void SetShowsFullScreenButton(bool aShow);
-    virtual void SetWindowAnimationType(WindowAnimationType aType);
-    virtual void SetDrawsTitle(bool aDrawTitle);
+                             nsEventStatus& aStatus) MOZ_OVERRIDE;
+    NS_IMETHOD CaptureRollupEvents(nsIRollupListener * aListener, bool aDoCapture) MOZ_OVERRIDE;
+    NS_IMETHOD GetAttention(int32_t aCycleCount) MOZ_OVERRIDE;
+    virtual bool HasPendingInputEvent() MOZ_OVERRIDE;
+    virtual nsTransparencyMode GetTransparencyMode() MOZ_OVERRIDE;
+    virtual void SetTransparencyMode(nsTransparencyMode aMode) MOZ_OVERRIDE;
+    NS_IMETHOD SetWindowShadowStyle(int32_t aStyle) MOZ_OVERRIDE;
+    virtual void SetShowsToolbarButton(bool aShow) MOZ_OVERRIDE;
+    virtual void SetShowsFullScreenButton(bool aShow) MOZ_OVERRIDE;
+    virtual void SetWindowAnimationType(WindowAnimationType aType) MOZ_OVERRIDE;
+    virtual void SetDrawsTitle(bool aDrawTitle) MOZ_OVERRIDE;
     virtual void SetUseBrightTitlebarForeground(bool aBrightForeground) MOZ_OVERRIDE;
-    NS_IMETHOD SetNonClientMargins(nsIntMargin &margins);
-    NS_IMETHOD SetWindowTitlebarColor(nscolor aColor, bool aActive);
-    virtual void SetDrawsInTitlebar(bool aState);
-    virtual void UpdateThemeGeometries(const nsTArray<ThemeGeometry>& aThemeGeometries);
+    NS_IMETHOD SetNonClientMargins(nsIntMargin &margins) MOZ_OVERRIDE;
+    NS_IMETHOD SetWindowTitlebarColor(nscolor aColor, bool aActive) MOZ_OVERRIDE;
+    virtual void SetDrawsInTitlebar(bool aState) MOZ_OVERRIDE;
+    virtual void UpdateThemeGeometries(const nsTArray<ThemeGeometry>& aThemeGeometries) MOZ_OVERRIDE;
     virtual nsresult SynthesizeNativeMouseEvent(nsIntPoint aPoint,
                                                 uint32_t aNativeMessage,
-                                                uint32_t aModifierFlags);
+                                                uint32_t aModifierFlags) MOZ_OVERRIDE;
 
     void DispatchSizeModeEvent();
 
     // be notified that a some form of drag event needs to go into Gecko
     virtual bool DragEvent(unsigned int aMessage, Point aMouseGlobal, UInt16 aKeyModifiers);
 
     bool HasModalDescendents() { return mNumModalDescendents > 0; }
     NSWindow *GetCocoaWindow() { return mWindow; }
 
     void SetMenuBar(nsMenuBarX* aMenuBar);
     nsMenuBarX *GetMenuBar();
 
     NS_IMETHOD NotifyIME(const IMENotification& aIMENotification) MOZ_OVERRIDE;
     NS_IMETHOD_(void) SetInputContext(
                         const InputContext& aContext,
                         const InputContextAction& aAction) MOZ_OVERRIDE;
-    NS_IMETHOD_(InputContext) GetInputContext()
+    NS_IMETHOD_(InputContext) GetInputContext() MOZ_OVERRIDE
     {
       NSView* view = mWindow ? [mWindow contentView] : nil;
       if (view) {
         mInputContext.mNativeIMEContext = [view inputContext];
       }
       // If inputContext isn't available on this window, returns this window's
       // pointer since nullptr means the platform has only one context per
       // process.
@@ -351,17 +351,17 @@ public:
     NS_IMETHOD_(bool) ExecuteNativeKeyBinding(
                         NativeKeyBindingsType aType,
                         const mozilla::WidgetKeyboardEvent& aEvent,
                         DoCommandCallback aCallback,
                         void* aCallbackData) MOZ_OVERRIDE;
 
     void SetPopupWindowLevel();
 
-    NS_IMETHOD         ReparentNativeWidget(nsIWidget* aNewParent);
+    NS_IMETHOD         ReparentNativeWidget(nsIWidget* aNewParent) MOZ_OVERRIDE;
 protected:
   virtual ~nsCocoaWindow();
 
   nsresult             CreateNativeWindow(const NSRect &aRect,
                                           nsBorderStyle aBorderStyle,
                                           bool aRectIsFrameRect);
   nsresult             CreatePopupContentView(const nsIntRect &aRect,
                                               nsDeviceContext *aContext);
@@ -369,17 +369,17 @@ protected:
   void                 AdjustWindowShadow();
   void                 SetWindowBackgroundBlur();
   void                 UpdateBounds();
 
   nsresult             DoResize(double aX, double aY, double aWidth, double aHeight,
                                 bool aRepaint, bool aConstrainToCurrentScreen);
 
   virtual already_AddRefed<nsIWidget>
-  AllocateChildPopupWidget()
+  AllocateChildPopupWidget() MOZ_OVERRIDE
   {
     static NS_DEFINE_IID(kCPopUpCID, NS_POPUP_CID);
     nsCOMPtr<nsIWidget> widget = do_CreateInstance(kCPopUpCID);
     return widget.forget();
   }
 
   nsIWidget*           mParent;         // if we're a popup, this is our parent [WEAK]
   BaseWindow*          mWindow;         // our cocoa window [STRONG]
--- a/widget/cocoa/nsColorPicker.h
+++ b/widget/cocoa/nsColorPicker.h
@@ -17,18 +17,18 @@ class nsIDOMWindow;
 @class NSColor;
 
 class nsColorPicker MOZ_FINAL : public nsIColorPicker
 {
 public:
   NS_DECL_ISUPPORTS
 
   NS_IMETHOD Init(nsIDOMWindow* aParent, const nsAString& aTitle,
-                  const nsAString& aInitialColor);
-  NS_IMETHOD Open(nsIColorPickerShownCallback* aCallback);
+                  const nsAString& aInitialColor) MOZ_OVERRIDE;
+  NS_IMETHOD Open(nsIColorPickerShownCallback* aCallback) MOZ_OVERRIDE;
 
   // For NSColorPanelWrapper.
   void Update(NSColor* aColor);
   // Call this method if you are done with this input, but the color picker needs to
   // stay open as it will be associated to another input
   void DoneWithRetarget();
   // Same as DoneWithRetarget + clean the static instance of sColorPanelWrapper,
   // as it is not needed anymore for now
--- a/widget/cocoa/nsDeviceContextSpecX.h
+++ b/widget/cocoa/nsDeviceContextSpecX.h
@@ -12,25 +12,25 @@
 
 class nsDeviceContextSpecX : public nsIDeviceContextSpec
 {
 public:
     NS_DECL_ISUPPORTS
 
     nsDeviceContextSpecX();
 
-    NS_IMETHOD Init(nsIWidget *aWidget, nsIPrintSettings* aPS, bool aIsPrintPreview);
-    NS_IMETHOD GetSurfaceForPrinter(gfxASurface **surface);
+    NS_IMETHOD Init(nsIWidget *aWidget, nsIPrintSettings* aPS, bool aIsPrintPreview) MOZ_OVERRIDE;
+    NS_IMETHOD GetSurfaceForPrinter(gfxASurface **surface) MOZ_OVERRIDE;
     NS_IMETHOD BeginDocument(const nsAString& aTitle,
                              char16_t*       aPrintToFileName,
                              int32_t          aStartPage,
-                             int32_t          aEndPage);
-    NS_IMETHOD EndDocument();
-    NS_IMETHOD BeginPage();
-    NS_IMETHOD EndPage();
+                             int32_t          aEndPage) MOZ_OVERRIDE;
+    NS_IMETHOD EndDocument() MOZ_OVERRIDE;
+    NS_IMETHOD BeginPage() MOZ_OVERRIDE;
+    NS_IMETHOD EndPage() MOZ_OVERRIDE;
 
     void GetPaperRect(double* aTop, double* aLeft, double* aBottom, double* aRight);
 
 protected:
     virtual ~nsDeviceContextSpecX();
 
 protected:
     PMPrintSession    mPrintSession;              // printing context.
--- a/widget/cocoa/nsFilePicker.h
+++ b/widget/cocoa/nsFilePicker.h
@@ -20,39 +20,39 @@ class nsILocalFileMac;
 class nsFilePicker : public nsBaseFilePicker
 {
 public:
   nsFilePicker(); 
 
   NS_DECL_ISUPPORTS
 
   // nsIFilePicker (less what's in nsBaseFilePicker)
-  NS_IMETHOD GetDefaultString(nsAString& aDefaultString);
-  NS_IMETHOD SetDefaultString(const nsAString& aDefaultString);
-  NS_IMETHOD GetDefaultExtension(nsAString& aDefaultExtension);
-  NS_IMETHOD GetFilterIndex(int32_t *aFilterIndex);
-  NS_IMETHOD SetFilterIndex(int32_t aFilterIndex);
-  NS_IMETHOD SetDefaultExtension(const nsAString& aDefaultExtension);
-  NS_IMETHOD GetFile(nsIFile * *aFile);
-  NS_IMETHOD GetFileURL(nsIURI * *aFileURL);
-  NS_IMETHOD GetFiles(nsISimpleEnumerator **aFiles);
-  NS_IMETHOD Show(int16_t *_retval); 
-  NS_IMETHOD AppendFilter(const nsAString& aTitle, const nsAString& aFilter);
+  NS_IMETHOD GetDefaultString(nsAString& aDefaultString) MOZ_OVERRIDE;
+  NS_IMETHOD SetDefaultString(const nsAString& aDefaultString) MOZ_OVERRIDE;
+  NS_IMETHOD GetDefaultExtension(nsAString& aDefaultExtension) MOZ_OVERRIDE;
+  NS_IMETHOD GetFilterIndex(int32_t *aFilterIndex) MOZ_OVERRIDE;
+  NS_IMETHOD SetFilterIndex(int32_t aFilterIndex) MOZ_OVERRIDE;
+  NS_IMETHOD SetDefaultExtension(const nsAString& aDefaultExtension) MOZ_OVERRIDE;
+  NS_IMETHOD GetFile(nsIFile * *aFile) MOZ_OVERRIDE;
+  NS_IMETHOD GetFileURL(nsIURI * *aFileURL) MOZ_OVERRIDE;
+  NS_IMETHOD GetFiles(nsISimpleEnumerator **aFiles) MOZ_OVERRIDE;
+  NS_IMETHOD Show(int16_t *_retval) MOZ_OVERRIDE; 
+  NS_IMETHOD AppendFilter(const nsAString& aTitle, const nsAString& aFilter) MOZ_OVERRIDE;
 
   /**
    * Returns the current filter list in the format used by Cocoa's NSSavePanel
    * and NSOpenPanel.
    * Returns nil if no filter currently apply.
    */
   NSArray* GetFilterList();
 
 protected:
   virtual ~nsFilePicker();
 
-  virtual void InitNative(nsIWidget *aParent, const nsAString& aTitle);
+  virtual void InitNative(nsIWidget *aParent, const nsAString& aTitle) MOZ_OVERRIDE;
 
   // actual implementations of get/put dialogs using NSOpenPanel & NSSavePanel
   // aFile is an existing but unspecified file. These functions must specify it.
   //
   // will return |returnCancel| or |returnOK| as result.
   int16_t GetLocalFiles(const nsString& inTitle, bool inAllowMultiple, nsCOMArray<nsIFile>& outFiles);
   int16_t GetLocalFolder(const nsString& inTitle, nsIFile** outFile);
   int16_t PutLocalFile(const nsString& inTitle, const nsString& inDefaultName, nsIFile** outFile);
--- a/widget/cocoa/nsIdleServiceX.h
+++ b/widget/cocoa/nsIdleServiceX.h
@@ -7,27 +7,27 @@
 
 #include "nsIdleService.h"
 
 class nsIdleServiceX : public nsIdleService
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
 
-  bool PollIdleTime(uint32_t* aIdleTime);
+  bool PollIdleTime(uint32_t* aIdleTime) MOZ_OVERRIDE;
 
   static already_AddRefed<nsIdleServiceX> GetInstance() 
   {
     nsRefPtr<nsIdleService> idleService = nsIdleService::GetInstance();
     if (!idleService) {
       idleService = new nsIdleServiceX();
     }
     
     return idleService.forget().downcast<nsIdleServiceX>();
   }
   
 protected:
     nsIdleServiceX() { }
     virtual ~nsIdleServiceX() { }
-    bool UsePollMode();
+    bool UsePollMode() MOZ_OVERRIDE;
 };
 
 #endif // nsIdleServiceX_h_
--- a/widget/cocoa/nsMenuBarX.h
+++ b/widget/cocoa/nsMenuBarX.h
@@ -24,17 +24,17 @@ class nsIContent;
 // The native menu service for creating native menu bars.
 class nsNativeMenuServiceX : public nsINativeMenuService
 {
 public:
   NS_DECL_ISUPPORTS
 
   nsNativeMenuServiceX() {}
 
-  NS_IMETHOD CreateNativeMenuBar(nsIWidget* aParent, nsIContent* aMenuBarNode);
+  NS_IMETHOD CreateNativeMenuBar(nsIWidget* aParent, nsIContent* aMenuBarNode) MOZ_OVERRIDE;
 
 protected:
   virtual ~nsNativeMenuServiceX() {}
 };
 
 @interface NSMenu (Undocumented)
 // Undocumented method, present unchanged since OS X 10.6, used to temporarily
 // highlight a top-level menu item when an appropriate Cmd+key combination is
@@ -105,18 +105,18 @@ public:
   nsCOMPtr<nsIContent> mAboutItemContent;
   nsCOMPtr<nsIContent> mPrefItemContent;
   nsCOMPtr<nsIContent> mQuitItemContent;
 
   // nsChangeObserver
   NS_DECL_CHANGEOBSERVER
 
   // nsMenuObjectX
-  void*             NativeData()     {return (void*)mNativeMenu;}
-  nsMenuObjectTypeX MenuObjectType() {return eMenuBarObjectType;}
+  void*             NativeData() MOZ_OVERRIDE {return (void*)mNativeMenu;}
+  nsMenuObjectTypeX MenuObjectType() MOZ_OVERRIDE {return eMenuBarObjectType;}
 
   // nsMenuBarX
   nsresult          Create(nsIWidget* aParent, nsIContent* aContent);
   void              SetParent(nsIWidget* aParent);
   uint32_t          GetMenuCount();
   bool              MenuContainsAppMenu();
   nsMenuX*          GetMenuAt(uint32_t aIndex);
   nsMenuX*          GetXULHelpMenu();
--- a/widget/cocoa/nsMenuItemX.h
+++ b/widget/cocoa/nsMenuItemX.h
@@ -40,18 +40,18 @@ class nsMenuItemX : public nsMenuObjectX
 {
 public:
   nsMenuItemX();
   virtual ~nsMenuItemX();
 
   NS_DECL_CHANGEOBSERVER
 
   // nsMenuObjectX
-  void*             NativeData()     {return (void*)mNativeMenuItem;}
-  nsMenuObjectTypeX MenuObjectType() {return eMenuItemObjectType;}
+  void*             NativeData() MOZ_OVERRIDE {return (void*)mNativeMenuItem;}
+  nsMenuObjectTypeX MenuObjectType() MOZ_OVERRIDE {return eMenuItemObjectType;}
 
   // nsMenuItemX
   nsresult      Create(nsMenuX* aParent, const nsString& aLabel, EMenuItemType aItemType,
                        nsMenuGroupOwnerX* aMenuGroupOwner, nsIContent* aNode);
   nsresult      SetChecked(bool aIsChecked);
   EMenuItemType GetMenuItemType();
   void          DoCommand();
   nsresult      DispatchDOMEvent(const nsString &eventName, bool* preventDefaultCalled);
--- a/widget/cocoa/nsMenuX.h
+++ b/widget/cocoa/nsMenuX.h
@@ -45,18 +45,18 @@ public:
   // If > 0, the OS is indexing all the app's menus (triggered by opening
   // Help menu on Leopard and higher).  There are some things that are
   // unsafe to do while this is happening.
   static int32_t sIndexingMenuLevel;
 
   NS_DECL_CHANGEOBSERVER
 
   // nsMenuObjectX
-  void*             NativeData()     {return (void*)mNativeMenu;}
-  nsMenuObjectTypeX MenuObjectType() {return eSubmenuObjectType;}
+  void*             NativeData() MOZ_OVERRIDE {return (void*)mNativeMenu;}
+  nsMenuObjectTypeX MenuObjectType() MOZ_OVERRIDE {return eSubmenuObjectType;}
   void              IconUpdated() MOZ_OVERRIDE { mParent->IconUpdated(); }
 
   // nsMenuX
   nsresult       Create(nsMenuObjectX* aParent, nsMenuGroupOwnerX* aMenuGroupOwner, nsIContent* aNode);
   uint32_t       GetItemCount();
   nsMenuObjectX* GetItemAt(uint32_t aPos);
   nsresult       GetVisibleItemCount(uint32_t &aCount);
   nsMenuObjectX* GetVisibleItemAt(uint32_t aPos);
--- a/widget/cocoa/nsNativeThemeCocoa.h
+++ b/widget/cocoa/nsNativeThemeCocoa.h
@@ -32,45 +32,45 @@ public:
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // The nsITheme interface.
   NS_IMETHOD DrawWidgetBackground(nsRenderingContext* aContext,
                                   nsIFrame* aFrame,
                                   uint8_t aWidgetType,
                                   const nsRect& aRect,
-                                  const nsRect& aDirtyRect);
+                                  const nsRect& aDirtyRect) MOZ_OVERRIDE;
   NS_IMETHOD GetWidgetBorder(nsDeviceContext* aContext, 
                              nsIFrame* aFrame,
                              uint8_t aWidgetType,
-                             nsIntMargin* aResult);
+                             nsIntMargin* aResult) MOZ_OVERRIDE;
 
   virtual bool GetWidgetPadding(nsDeviceContext* aContext,
                                   nsIFrame* aFrame,
                                   uint8_t aWidgetType,
-                                  nsIntMargin* aResult);
+                                  nsIntMargin* aResult) MOZ_OVERRIDE;
 
   virtual bool GetWidgetOverflow(nsDeviceContext* aContext, nsIFrame* aFrame,
-                                   uint8_t aWidgetType, nsRect* aOverflowRect);
+                                   uint8_t aWidgetType, nsRect* aOverflowRect) MOZ_OVERRIDE;
 
   NS_IMETHOD GetMinimumWidgetSize(nsPresContext* aPresContext, nsIFrame* aFrame,
                                   uint8_t aWidgetType,
-                                  nsIntSize* aResult, bool* aIsOverridable);
+                                  nsIntSize* aResult, bool* aIsOverridable) MOZ_OVERRIDE;
   NS_IMETHOD WidgetStateChanged(nsIFrame* aFrame, uint8_t aWidgetType, 
-                                nsIAtom* aAttribute, bool* aShouldRepaint);
-  NS_IMETHOD ThemeChanged();
-  bool ThemeSupportsWidget(nsPresContext* aPresContext, nsIFrame* aFrame, uint8_t aWidgetType);
-  bool WidgetIsContainer(uint8_t aWidgetType);
+                                nsIAtom* aAttribute, bool* aShouldRepaint) MOZ_OVERRIDE;
+  NS_IMETHOD ThemeChanged() MOZ_OVERRIDE;
+  bool ThemeSupportsWidget(nsPresContext* aPresContext, nsIFrame* aFrame, uint8_t aWidgetType) MOZ_OVERRIDE;
+  bool WidgetIsContainer(uint8_t aWidgetType) MOZ_OVERRIDE;
   bool ThemeDrawsFocusForWidget(uint8_t aWidgetType) MOZ_OVERRIDE;
-  bool ThemeNeedsComboboxDropmarker();
+  bool ThemeNeedsComboboxDropmarker() MOZ_OVERRIDE;
   virtual bool WidgetAppearanceDependsOnWindowFocus(uint8_t aWidgetType) MOZ_OVERRIDE;
   virtual bool NeedToClearBackgroundBehindWidget(uint8_t aWidgetType) MOZ_OVERRIDE;
   virtual bool WidgetProvidesFontSmoothingBackgroundColor(nsIFrame* aFrame, uint8_t aWidgetType,
-                                                          nscolor* aColor);
-  virtual Transparency GetWidgetTransparency(nsIFrame* aFrame, uint8_t aWidgetType);
+                                                          nscolor* aColor) MOZ_OVERRIDE;
+  virtual Transparency GetWidgetTransparency(nsIFrame* aFrame, uint8_t aWidgetType) MOZ_OVERRIDE;
 
   void DrawProgress(CGContextRef context, const HIRect& inBoxRect,
                     bool inIsIndeterminate, bool inIsHorizontal,
                     double inValue, double inMaxValue, nsIFrame* aFrame);
 
   static void DrawNativeTitlebar(CGContextRef aContext, CGRect aTitlebarRect,
                                  CGFloat aUnifiedHeight, BOOL aIsMain, BOOL aIsFlipped);
 
--- a/widget/cocoa/nsPrintDialogX.h
+++ b/widget/cocoa/nsPrintDialogX.h
@@ -17,21 +17,21 @@ class nsIStringBundle;
 
 class nsPrintDialogServiceX : public nsIPrintDialogService
 {
 public:
   nsPrintDialogServiceX();
 
   NS_DECL_ISUPPORTS
 
-  NS_IMETHODIMP Init();
+  NS_IMETHODIMP Init() MOZ_OVERRIDE;
   NS_IMETHODIMP Show(nsIDOMWindow *aParent, nsIPrintSettings *aSettings,
-                     nsIWebBrowserPrint *aWebBrowserPrint);
+                     nsIWebBrowserPrint *aWebBrowserPrint) MOZ_OVERRIDE;
   NS_IMETHODIMP ShowPageSetup(nsIDOMWindow *aParent,
-                              nsIPrintSettings *aSettings);
+                              nsIPrintSettings *aSettings) MOZ_OVERRIDE;
 
 protected:
   virtual ~nsPrintDialogServiceX();
 };
 
 @interface PrintPanelAccessoryView : NSView
 {
   nsIPrintSettings* mSettings;
--- a/widget/cocoa/nsPrintSettingsX.h
+++ b/widget/cocoa/nsPrintSettingsX.h
@@ -32,18 +32,18 @@ public:
   void SetPMPageFormat(PMPageFormat aPageFormat);
 
 protected:
   virtual ~nsPrintSettingsX();
 
   nsPrintSettingsX(const nsPrintSettingsX& src);
   nsPrintSettingsX& operator=(const nsPrintSettingsX& rhs);
 
-  nsresult _Clone(nsIPrintSettings **_retval);
-  nsresult _Assign(nsIPrintSettings *aPS);
+  nsresult _Clone(nsIPrintSettings **_retval) MOZ_OVERRIDE;
+  nsresult _Assign(nsIPrintSettings *aPS) MOZ_OVERRIDE;
 
   // Re-initialize mUnwriteableMargin with values from mPageFormat.
   // Should be called whenever mPageFormat is initialized or overwritten.
   nsresult InitUnwriteableMargin();
 
   // The out param has a ref count of 1 on return so caller needs to PMRelase() when done.
   OSStatus CreateDefaultPageFormat(PMPrintSession aSession, PMPageFormat& outFormat);
   OSStatus CreateDefaultPrintSettings(PMPrintSession aSession, PMPrintSettings& outSettings);
--- a/widget/cocoa/nsStandaloneNativeMenu.h
+++ b/widget/cocoa/nsStandaloneNativeMenu.h
@@ -14,18 +14,18 @@ class nsStandaloneNativeMenu : public ns
 {
 public:
   nsStandaloneNativeMenu();
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSISTANDALONENATIVEMENU
 
   // nsMenuObjectX
-  nsMenuObjectTypeX MenuObjectType() { return eStandaloneNativeMenuObjectType; }
-  void * NativeData() { return mMenu != nullptr ? mMenu->NativeData() : nullptr; }
+  nsMenuObjectTypeX MenuObjectType() MOZ_OVERRIDE { return eStandaloneNativeMenuObjectType; }
+  void * NativeData() MOZ_OVERRIDE { return mMenu != nullptr ? mMenu->NativeData() : nullptr; }
   virtual void IconUpdated() MOZ_OVERRIDE;
 
   nsMenuX * GetMenuXObject() { return mMenu; }
 
   // If this menu is the menu of a system status bar item (NSStatusItem),
   // let the menu know about the status item so that it can propagate
   // any icon changes to the status item.
   void SetContainerStatusBarItem(NSStatusItem* aItem);
--- a/widget/nsBaseFilePicker.cpp
+++ b/widget/nsBaseFilePicker.cpp
@@ -76,17 +76,17 @@ public:
 
   explicit nsBaseFilePickerEnumerator(nsPIDOMWindow* aParent,
                                       nsISimpleEnumerator* iterator)
     : mIterator(iterator)
     , mParent(aParent)
   {}
 
   NS_IMETHOD
-  GetNext(nsISupports** aResult)
+  GetNext(nsISupports** aResult) MOZ_OVERRIDE
   {
     nsCOMPtr<nsISupports> tmp;
     nsresult rv = mIterator->GetNext(getter_AddRefs(tmp));
     NS_ENSURE_SUCCESS(rv, rv);
 
     if (!tmp) {
       return NS_OK;
     }
@@ -97,17 +97,17 @@ public:
     }
 
     nsCOMPtr<nsIDOMFile> domFile = File::CreateFromFile(mParent, localFile);
     domFile.forget(aResult);
     return NS_OK;
   }
 
   NS_IMETHOD
-  HasMoreElements(bool* aResult)
+  HasMoreElements(bool* aResult) MOZ_OVERRIDE
   {
     return mIterator->HasMoreElements(aResult);
   }
 
 protected:
   virtual ~nsBaseFilePickerEnumerator()
   {}
 
--- a/widget/nsBaseScreen.h
+++ b/widget/nsBaseScreen.h
@@ -19,34 +19,34 @@ public:
   NS_DECL_ISUPPORTS
 
   // nsIScreen interface
 
   // These simply forward to the device-pixel versions;
   // implementations where global display pixels may not correspond
   // to per-screen device pixels must override.
   NS_IMETHOD GetRectDisplayPix(int32_t *outLeft,  int32_t *outTop,
-                               int32_t *outWidth, int32_t *outHeight);
+                               int32_t *outWidth, int32_t *outHeight) MOZ_OVERRIDE;
   NS_IMETHOD GetAvailRectDisplayPix(int32_t *outLeft,  int32_t *outTop,
-                                    int32_t *outWidth, int32_t *outHeight);
+                                    int32_t *outWidth, int32_t *outHeight) MOZ_OVERRIDE;
 
   /**
    * Simple management of screen brightness locks. This abstract base class
    * allows all widget implementations to share brightness locking code.
    */
-  NS_IMETHOD LockMinimumBrightness(uint32_t aBrightness);
-  NS_IMETHOD UnlockMinimumBrightness(uint32_t aBrightness);
+  NS_IMETHOD LockMinimumBrightness(uint32_t aBrightness) MOZ_OVERRIDE;
+  NS_IMETHOD UnlockMinimumBrightness(uint32_t aBrightness) MOZ_OVERRIDE;
 
-  NS_IMETHOD GetRotation(uint32_t* aRotation) {
+  NS_IMETHOD GetRotation(uint32_t* aRotation) MOZ_OVERRIDE {
     *aRotation = nsIScreen::ROTATION_0_DEG;
     return NS_OK;
   }
-  NS_IMETHOD SetRotation(uint32_t aRotation) { return NS_ERROR_NOT_AVAILABLE; }
+  NS_IMETHOD SetRotation(uint32_t aRotation) MOZ_OVERRIDE { return NS_ERROR_NOT_AVAILABLE; }
 
-  NS_IMETHOD GetContentsScaleFactor(double* aContentsScaleFactor);
+  NS_IMETHOD GetContentsScaleFactor(double* aContentsScaleFactor) MOZ_OVERRIDE;
 
 protected:
   virtual ~nsBaseScreen();
 
   /**
    * Manually set the current level of brightness locking. This is called after
    * we determine, based on the current active locks, what the strongest
    * lock is. You should normally not call this function - it will be
--- a/widget/nsBaseWidget.h
+++ b/widget/nsBaseWidget.h
@@ -95,138 +95,137 @@ protected:
   virtual ~nsBaseWidget();
 
 public:
   nsBaseWidget();
 
   NS_DECL_ISUPPORTS
 
   // nsIWidget interface
-  NS_IMETHOD              CaptureMouse(bool aCapture);
-  virtual nsIWidgetListener*  GetWidgetListener();
-  virtual void            SetWidgetListener(nsIWidgetListener* alistener);
-  NS_IMETHOD              Destroy();
-  NS_IMETHOD              SetParent(nsIWidget* aNewParent);
-  virtual nsIWidget*      GetParent(void);
-  virtual nsIWidget*      GetTopLevelWidget();
-  virtual nsIWidget*      GetSheetWindowParent(void);
-  virtual float           GetDPI();
-  virtual void            AddChild(nsIWidget* aChild);
-  virtual void            RemoveChild(nsIWidget* aChild);
+  NS_IMETHOD              CaptureMouse(bool aCapture) MOZ_OVERRIDE;
+  virtual nsIWidgetListener*  GetWidgetListener() MOZ_OVERRIDE;
+  virtual void            SetWidgetListener(nsIWidgetListener* alistener) MOZ_OVERRIDE;
+  NS_IMETHOD              Destroy() MOZ_OVERRIDE;
+  NS_IMETHOD              SetParent(nsIWidget* aNewParent) MOZ_OVERRIDE;
+  virtual nsIWidget*      GetParent(void) MOZ_OVERRIDE;
+  virtual nsIWidget*      GetTopLevelWidget() MOZ_OVERRIDE;
+  virtual nsIWidget*      GetSheetWindowParent(void) MOZ_OVERRIDE;
+  virtual float           GetDPI() MOZ_OVERRIDE;
+  virtual void            AddChild(nsIWidget* aChild) MOZ_OVERRIDE;
+  virtual void            RemoveChild(nsIWidget* aChild) MOZ_OVERRIDE;
 
-  void                    SetZIndex(int32_t aZIndex);
+  void                    SetZIndex(int32_t aZIndex) MOZ_OVERRIDE;
   NS_IMETHOD              PlaceBehind(nsTopLevelWidgetZPlacement aPlacement,
-                                      nsIWidget *aWidget, bool aActivate);
+                                      nsIWidget *aWidget, bool aActivate) MOZ_OVERRIDE;
 
-  NS_IMETHOD              SetSizeMode(int32_t aMode);
+  NS_IMETHOD              SetSizeMode(int32_t aMode) MOZ_OVERRIDE;
   virtual int32_t         SizeMode() MOZ_OVERRIDE
   {
     return mSizeMode;
   }
 
-  virtual nsCursor        GetCursor();
-  NS_IMETHOD              SetCursor(nsCursor aCursor);
+  virtual nsCursor        GetCursor() MOZ_OVERRIDE;
+  NS_IMETHOD              SetCursor(nsCursor aCursor) MOZ_OVERRIDE;
   NS_IMETHOD              SetCursor(imgIContainer* aCursor,
-                                    uint32_t aHotspotX, uint32_t aHotspotY);
-  virtual void            ClearCachedCursor() { mUpdateCursor = true; }
-  virtual void            SetTransparencyMode(nsTransparencyMode aMode);
-  virtual nsTransparencyMode GetTransparencyMode();
-  virtual void            GetWindowClipRegion(nsTArray<nsIntRect>* aRects);
-  NS_IMETHOD              SetWindowShadowStyle(int32_t aStyle);
-  virtual void            SetShowsToolbarButton(bool aShow) {}
-  virtual void            SetShowsFullScreenButton(bool aShow) {}
-  virtual void            SetWindowAnimationType(WindowAnimationType aType) {}
-  NS_IMETHOD              HideWindowChrome(bool aShouldHide);
-  NS_IMETHOD              MakeFullScreen(bool aFullScreen, nsIScreen* aScreen = nullptr);
-  virtual nsDeviceContext* GetDeviceContext();
+                                    uint32_t aHotspotX, uint32_t aHotspotY) MOZ_OVERRIDE;
+  virtual void            ClearCachedCursor() MOZ_OVERRIDE { mUpdateCursor = true; }
+  virtual void            SetTransparencyMode(nsTransparencyMode aMode) MOZ_OVERRIDE;
+  virtual nsTransparencyMode GetTransparencyMode() MOZ_OVERRIDE;
+  virtual void            GetWindowClipRegion(nsTArray<nsIntRect>* aRects) MOZ_OVERRIDE;
+  NS_IMETHOD              SetWindowShadowStyle(int32_t aStyle) MOZ_OVERRIDE;
+  virtual void            SetShowsToolbarButton(bool aShow) MOZ_OVERRIDE {}
+  virtual void            SetShowsFullScreenButton(bool aShow) MOZ_OVERRIDE {}
+  virtual void            SetWindowAnimationType(WindowAnimationType aType) MOZ_OVERRIDE {}
+  NS_IMETHOD              HideWindowChrome(bool aShouldHide) MOZ_OVERRIDE;
+  NS_IMETHOD              MakeFullScreen(bool aFullScreen, nsIScreen* aScreen = nullptr) MOZ_OVERRIDE;
+  virtual nsDeviceContext* GetDeviceContext() MOZ_OVERRIDE;
   virtual LayerManager*   GetLayerManager(PLayerTransactionChild* aShadowManager = nullptr,
                                           LayersBackend aBackendHint = mozilla::layers::LayersBackend::LAYERS_NONE,
                                           LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
-                                          bool* aAllowRetaining = nullptr);
+                                          bool* aAllowRetaining = nullptr) MOZ_OVERRIDE;
 
   CompositorVsyncDispatcher* GetCompositorVsyncDispatcher() MOZ_OVERRIDE;
-  virtual void            CreateCompositorVsyncDispatcher();
+  void            CreateCompositorVsyncDispatcher();
   virtual CompositorParent* NewCompositorParent(int aSurfaceWidth, int aSurfaceHeight);
   virtual void            CreateCompositor();
   virtual void            CreateCompositor(int aWidth, int aHeight);
-  virtual void            PrepareWindowEffects() {}
-  virtual void            CleanupWindowEffects() {}
-  virtual bool            PreRender(LayerManagerComposite* aManager) { return true; }
-  virtual void            PostRender(LayerManagerComposite* aManager) {}
-  virtual void            DrawWindowUnderlay(LayerManagerComposite* aManager, nsIntRect aRect) {}
-  virtual void            DrawWindowOverlay(LayerManagerComposite* aManager, nsIntRect aRect) {}
-  virtual mozilla::TemporaryRef<mozilla::gfx::DrawTarget> StartRemoteDrawing();
-  virtual void            EndRemoteDrawing() { };
-  virtual void            CleanupRemoteDrawing() { };
-  virtual void            UpdateThemeGeometries(const nsTArray<ThemeGeometry>& aThemeGeometries) {}
-  NS_IMETHOD              SetModal(bool aModal);
-  virtual uint32_t        GetMaxTouchPoints() const;
-  NS_IMETHOD              SetWindowClass(const nsAString& xulWinType);
-  virtual nsresult        SetWindowClipRegion(const nsTArray<nsIntRect>& aRects, bool aIntersectWithExisting);
+  virtual void            PrepareWindowEffects() MOZ_OVERRIDE {}
+  virtual void            CleanupWindowEffects() MOZ_OVERRIDE {}
+  virtual bool            PreRender(LayerManagerComposite* aManager) MOZ_OVERRIDE { return true; }
+  virtual void            PostRender(LayerManagerComposite* aManager) MOZ_OVERRIDE {}
+  virtual void            DrawWindowUnderlay(LayerManagerComposite* aManager, nsIntRect aRect) MOZ_OVERRIDE {}
+  virtual void            DrawWindowOverlay(LayerManagerComposite* aManager, nsIntRect aRect) MOZ_OVERRIDE {}
+  virtual mozilla::TemporaryRef<mozilla::gfx::DrawTarget> StartRemoteDrawing() MOZ_OVERRIDE;
+  virtual void            EndRemoteDrawing() MOZ_OVERRIDE { };
+  virtual void            CleanupRemoteDrawing() MOZ_OVERRIDE { };
+  virtual void            UpdateThemeGeometries(const nsTArray<ThemeGeometry>& aThemeGeometries) MOZ_OVERRIDE {}
+  NS_IMETHOD              SetModal(bool aModal) MOZ_OVERRIDE;
+  virtual uint32_t        GetMaxTouchPoints() const MOZ_OVERRIDE;
+  NS_IMETHOD              SetWindowClass(const nsAString& xulWinType) MOZ_OVERRIDE;
+  virtual nsresult        SetWindowClipRegion(const nsTArray<nsIntRect>& aRects, bool aIntersectWithExisting) MOZ_OVERRIDE;
   // Return whether this widget interprets parameters to Move and Resize APIs
   // as "global display pixels" rather than "device pixels", and therefore
   // applies its GetDefaultScale() value to them before using them as mBounds
   // etc (which are always stored in device pixels).
   // Note that APIs that -get- the widget's position/size/bounds, rather than
   // -setting- them (i.e. moving or resizing the widget) will always return
   // values in the widget's device pixels.
   bool                    BoundsUseDisplayPixels() const {
     return mWindowType <= eWindowType_popup;
   }
-  NS_IMETHOD              MoveClient(double aX, double aY);
-  NS_IMETHOD              ResizeClient(double aWidth, double aHeight, bool aRepaint);
-  NS_IMETHOD              ResizeClient(double aX, double aY, double aWidth, double aHeight, bool aRepaint);
-  NS_IMETHOD              GetBounds(nsIntRect &aRect);
-  NS_IMETHOD              GetClientBounds(nsIntRect &aRect);
-  NS_IMETHOD              GetScreenBounds(nsIntRect &aRect);
+  NS_IMETHOD              MoveClient(double aX, double aY) MOZ_OVERRIDE;
+  NS_IMETHOD              ResizeClient(double aWidth, double aHeight, bool aRepaint) MOZ_OVERRIDE;
+  NS_IMETHOD              ResizeClient(double aX, double aY, double aWidth, double aHeight, bool aRepaint) MOZ_OVERRIDE;
+  NS_IMETHOD              GetBounds(nsIntRect &aRect) MOZ_OVERRIDE;
+  NS_IMETHOD              GetClientBounds(nsIntRect &aRect) MOZ_OVERRIDE;
+  NS_IMETHOD              GetScreenBounds(nsIntRect &aRect) MOZ_OVERRIDE;
   NS_IMETHOD              GetRestoredBounds(nsIntRect &aRect) MOZ_OVERRIDE;
-  NS_IMETHOD              GetNonClientMargins(nsIntMargin &margins);
-  NS_IMETHOD              SetNonClientMargins(nsIntMargin &margins);
-  virtual nsIntPoint      GetClientOffset();
-  NS_IMETHOD              EnableDragDrop(bool aEnable);
-  NS_IMETHOD              GetAttention(int32_t aCycleCount);
-  virtual bool            HasPendingInputEvent();
-  NS_IMETHOD              SetIcon(const nsAString &anIconSpec);
-  NS_IMETHOD              SetWindowTitlebarColor(nscolor aColor, bool aActive);
-  virtual void            SetDrawsInTitlebar(bool aState) {}
-  virtual bool            ShowsResizeIndicator(nsIntRect* aResizerRect);
-  virtual void            FreeNativeData(void * data, uint32_t aDataType) {}
+  NS_IMETHOD              GetNonClientMargins(nsIntMargin &margins) MOZ_OVERRIDE;
+  NS_IMETHOD              SetNonClientMargins(nsIntMargin &margins) MOZ_OVERRIDE;
+  virtual nsIntPoint      GetClientOffset() MOZ_OVERRIDE;
+  NS_IMETHOD              EnableDragDrop(bool aEnable) MOZ_OVERRIDE;
+  NS_IMETHOD              GetAttention(int32_t aCycleCount) MOZ_OVERRIDE;
+  virtual bool            HasPendingInputEvent() MOZ_OVERRIDE;
+  NS_IMETHOD              SetIcon(const nsAString &anIconSpec) MOZ_OVERRIDE;
+  NS_IMETHOD              SetWindowTitlebarColor(nscolor aColor, bool aActive) MOZ_OVERRIDE;
+  virtual void            SetDrawsInTitlebar(bool aState) MOZ_OVERRIDE {}
+  virtual bool            ShowsResizeIndicator(nsIntRect* aResizerRect) MOZ_OVERRIDE;
+  virtual void            FreeNativeData(void * data, uint32_t aDataType) MOZ_OVERRIDE {}
   NS_IMETHOD              BeginResizeDrag(mozilla::WidgetGUIEvent* aEvent,
                                           int32_t aHorizontal,
-                                          int32_t aVertical);
-  NS_IMETHOD              BeginMoveDrag(mozilla::WidgetMouseEvent* aEvent);
-  virtual nsresult        ActivateNativeMenuItemAt(const nsAString& indexString) { return NS_ERROR_NOT_IMPLEMENTED; }
-  virtual nsresult        ForceUpdateNativeMenuAt(const nsAString& indexString) { return NS_ERROR_NOT_IMPLEMENTED; }
+                                          int32_t aVertical) MOZ_OVERRIDE;
+  NS_IMETHOD              BeginMoveDrag(mozilla::WidgetMouseEvent* aEvent) MOZ_OVERRIDE;
+  virtual nsresult        ActivateNativeMenuItemAt(const nsAString& indexString) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; }
+  virtual nsresult        ForceUpdateNativeMenuAt(const nsAString& indexString) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; }
   NS_IMETHOD              NotifyIME(const IMENotification& aIMENotification) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; }
   NS_IMETHOD              AttachNativeKeyEvent(mozilla::WidgetKeyboardEvent& aEvent) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; }
   NS_IMETHOD_(bool)       ExecuteNativeKeyBinding(
                             NativeKeyBindingsType aType,
                             const mozilla::WidgetKeyboardEvent& aEvent,
                             DoCommandCallback aCallback,
                             void* aCallbackData) MOZ_OVERRIDE { return false; }
-  NS_IMETHOD              SetLayersAcceleration(bool aEnabled);
-  virtual bool            GetLayersAcceleration() { return mUseLayersAcceleration; }
+  NS_IMETHOD              SetLayersAcceleration(bool aEnabled) MOZ_OVERRIDE;
   virtual bool            ComputeShouldAccelerate(bool aDefault);
-  NS_IMETHOD              GetToggledKeyState(uint32_t aKeyCode, bool* aLEDState) { return NS_ERROR_NOT_IMPLEMENTED; }
+  NS_IMETHOD              GetToggledKeyState(uint32_t aKeyCode, bool* aLEDState) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; }
   virtual nsIMEUpdatePreference GetIMEUpdatePreference() MOZ_OVERRIDE { return nsIMEUpdatePreference(); }
-  NS_IMETHOD              OnDefaultButtonLoaded(const nsIntRect &aButtonRect) { return NS_ERROR_NOT_IMPLEMENTED; }
+  NS_IMETHOD              OnDefaultButtonLoaded(const nsIntRect &aButtonRect) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; }
   NS_IMETHOD              OverrideSystemMouseScrollSpeed(double aOriginalDeltaX,
                                                          double aOriginalDeltaY,
                                                          double& aOverriddenDeltaX,
-                                                         double& aOverriddenDeltaY);
+                                                         double& aOverriddenDeltaY) MOZ_OVERRIDE;
   virtual already_AddRefed<nsIWidget>
   CreateChild(const nsIntRect  &aRect,
               nsDeviceContext *aContext,
               nsWidgetInitData *aInitData = nullptr,
-              bool             aForceUseIWidgetParent = false);
-  NS_IMETHOD              AttachViewToTopLevel(bool aUseAttachedEvents, nsDeviceContext *aContext);
-  virtual nsIWidgetListener* GetAttachedWidgetListener();
-  virtual void               SetAttachedWidgetListener(nsIWidgetListener* aListener);
-  NS_IMETHOD              RegisterTouchWindow();
-  NS_IMETHOD              UnregisterTouchWindow();
+              bool             aForceUseIWidgetParent = false) MOZ_OVERRIDE;
+  NS_IMETHOD              AttachViewToTopLevel(bool aUseAttachedEvents, nsDeviceContext *aContext) MOZ_OVERRIDE;
+  virtual nsIWidgetListener* GetAttachedWidgetListener() MOZ_OVERRIDE;
+  virtual void               SetAttachedWidgetListener(nsIWidgetListener* aListener) MOZ_OVERRIDE;
+  NS_IMETHOD              RegisterTouchWindow() MOZ_OVERRIDE;
+  NS_IMETHOD              UnregisterTouchWindow() MOZ_OVERRIDE;
 
   void NotifyWindowDestroyed();
   void NotifySizeMoveDone();
   void NotifyWindowMoved(int32_t aX, int32_t aY);
 
   // Should be called by derived implementations to notify on system color and
   // theme changes.
   void NotifySysColorChanged();
@@ -236,35 +235,35 @@ public:
 
 #ifdef ACCESSIBILITY
   // Get the accessible for the window.
   mozilla::a11y::Accessible* GetRootAccessible();
 #endif
 
   nsPopupLevel PopupLevel() { return mPopupLevel; }
 
-  virtual nsIntSize       ClientToWindowSize(const nsIntSize& aClientSize)
+  virtual nsIntSize       ClientToWindowSize(const nsIntSize& aClientSize) MOZ_OVERRIDE
   {
     return aClientSize;
   }
 
   // return true if this is a popup widget with a native titlebar
   bool IsPopupWithTitleBar() const
   {
     return (mWindowType == eWindowType_popup && 
             mBorderStyle != eBorderStyle_default &&
             mBorderStyle & eBorderStyle_title);
   }
 
-  NS_IMETHOD              ReparentNativeWidget(nsIWidget* aNewParent) = 0;
+  NS_IMETHOD              ReparentNativeWidget(nsIWidget* aNewParent) MOZ_OVERRIDE = 0;
 
   virtual uint32_t GetGLFrameBufferFormat() MOZ_OVERRIDE;
 
-  virtual const SizeConstraints& GetSizeConstraints() const;
-  virtual void SetSizeConstraints(const SizeConstraints& aConstraints);
+  virtual const SizeConstraints& GetSizeConstraints() const MOZ_OVERRIDE;
+  virtual void SetSizeConstraints(const SizeConstraints& aConstraints) MOZ_OVERRIDE;
 
   /**
    * Use this when GetLayerManager() returns a BasicLayerManager
    * (nsBaseWidget::GetLayerManager() does). This sets up the widget's
    * layer manager to temporarily render into aTarget.
    *
    * |aNaturalWidgetBounds| is the un-rotated bounds of |aWidget|.
    * |aRotation| is the "virtual rotation" to apply when rendering to
@@ -296,19 +295,19 @@ public:
   virtual bool            ShouldUseOffMainThreadCompositing();
 
   static nsIRollupListener* GetActiveRollupListener();
 
   void Shutdown();
 
 protected:
 
-  virtual void            ResolveIconName(const nsAString &aIconName,
-                                          const nsAString &aIconSuffix,
-                                          nsIFile **aResult);
+  void            ResolveIconName(const nsAString &aIconName,
+                                  const nsAString &aIconSuffix,
+                                  nsIFile **aResult);
   virtual void            OnDestroy();
   virtual void            BaseCreate(nsIWidget *aParent,
                                      const nsIntRect &aRect,
                                      nsDeviceContext *aContext,
                                      nsWidgetInitData *aInitData);
 
   virtual void ConfigureAPZCTreeManager();
   virtual already_AddRefed<GeckoContentController> CreateRootContentController();
@@ -317,50 +316,50 @@ protected:
   // widget.
   nsEventStatus DispatchEventForAPZ(mozilla::WidgetGUIEvent* aEvent,
                                     const ScrollableLayerGuid& aGuid,
                                     uint64_t aInputBlockId);
 
   const nsIntRegion RegionFromArray(const nsTArray<nsIntRect>& aRects);
   void ArrayFromRegion(const nsIntRegion& aRegion, nsTArray<nsIntRect>& aRects);
 
-  virtual nsIContent* GetLastRollup()
+  virtual nsIContent* GetLastRollup() MOZ_OVERRIDE
   {
     return mLastRollup;
   }
 
   virtual nsresult SynthesizeNativeKeyEvent(int32_t aNativeKeyboardLayout,
                                             int32_t aNativeKeyCode,
                                             uint32_t aModifierFlags,
                                             const nsAString& aCharacters,
-                                            const nsAString& aUnmodifiedCharacters)
+                                            const nsAString& aUnmodifiedCharacters) MOZ_OVERRIDE
   { return NS_ERROR_UNEXPECTED; }
 
   virtual nsresult SynthesizeNativeMouseEvent(nsIntPoint aPoint,
                                               uint32_t aNativeMessage,
-                                              uint32_t aModifierFlags)
+                                              uint32_t aModifierFlags) MOZ_OVERRIDE
   { return NS_ERROR_UNEXPECTED; }
 
-  virtual nsresult SynthesizeNativeMouseMove(nsIntPoint aPoint)
+  virtual nsresult SynthesizeNativeMouseMove(nsIntPoint aPoint) MOZ_OVERRIDE
   { return NS_ERROR_UNEXPECTED; }
 
   virtual nsresult SynthesizeNativeMouseScrollEvent(nsIntPoint aPoint,
                                                     uint32_t aNativeMessage,
                                                     double aDeltaX,
                                                     double aDeltaY,
                                                     double aDeltaZ,
                                                     uint32_t aModifierFlags,
-                                                    uint32_t aAdditionalFlags)
+                                                    uint32_t aAdditionalFlags) MOZ_OVERRIDE
   { return NS_ERROR_UNEXPECTED; }
 
   virtual nsresult SynthesizeNativeTouchPoint(uint32_t aPointerId,
                                               TouchPointerState aPointerState,
                                               nsIntPoint aPointerScreenPoint,
                                               double aPointerPressure,
-                                              uint32_t aPointerOrientation)
+                                              uint32_t aPointerOrientation) MOZ_OVERRIDE
   { return NS_ERROR_UNEXPECTED; }
 
 protected:
   // Stores the clip rectangles in aRects into mClipRects. Returns true
   // if the new rectangles are different from the old rectangles.
   bool StoreWindowClipRegion(const nsTArray<nsIntRect>& aRects);
 
   virtual already_AddRefed<nsIWidget>
--- a/widget/nsFilePickerProxy.h
+++ b/widget/nsFilePickerProxy.h
@@ -28,41 +28,41 @@ class nsFilePickerProxy : public nsBaseF
                           public mozilla::dom::PFilePickerChild
 {
 public:
     nsFilePickerProxy();
 
     NS_DECL_ISUPPORTS
 
     // nsIFilePicker (less what's in nsBaseFilePicker)
-    NS_IMETHODIMP Init(nsIDOMWindow* aParent, const nsAString& aTitle, int16_t aMode);
-    NS_IMETHODIMP AppendFilter(const nsAString& aTitle, const nsAString& aFilter);
-    NS_IMETHODIMP GetDefaultString(nsAString& aDefaultString);
-    NS_IMETHODIMP SetDefaultString(const nsAString& aDefaultString);
-    NS_IMETHODIMP GetDefaultExtension(nsAString& aDefaultExtension);
-    NS_IMETHODIMP SetDefaultExtension(const nsAString& aDefaultExtension);
-    NS_IMETHODIMP GetFilterIndex(int32_t* aFilterIndex);
-    NS_IMETHODIMP SetFilterIndex(int32_t aFilterIndex);
-    NS_IMETHODIMP GetFile(nsIFile** aFile);
-    NS_IMETHODIMP GetFileURL(nsIURI** aFileURL);
-    NS_IMETHODIMP GetFiles(nsISimpleEnumerator** aFiles);
+    NS_IMETHODIMP Init(nsIDOMWindow* aParent, const nsAString& aTitle, int16_t aMode) MOZ_OVERRIDE;
+    NS_IMETHODIMP AppendFilter(const nsAString& aTitle, const nsAString& aFilter) MOZ_OVERRIDE;
+    NS_IMETHODIMP GetDefaultString(nsAString& aDefaultString) MOZ_OVERRIDE;
+    NS_IMETHODIMP SetDefaultString(const nsAString& aDefaultString) MOZ_OVERRIDE;
+    NS_IMETHODIMP GetDefaultExtension(nsAString& aDefaultExtension) MOZ_OVERRIDE;
+    NS_IMETHODIMP SetDefaultExtension(const nsAString& aDefaultExtension) MOZ_OVERRIDE;
+    NS_IMETHODIMP GetFilterIndex(int32_t* aFilterIndex) MOZ_OVERRIDE;
+    NS_IMETHODIMP SetFilterIndex(int32_t aFilterIndex) MOZ_OVERRIDE;
+    NS_IMETHODIMP GetFile(nsIFile** aFile) MOZ_OVERRIDE;
+    NS_IMETHODIMP GetFileURL(nsIURI** aFileURL) MOZ_OVERRIDE;
+    NS_IMETHODIMP GetFiles(nsISimpleEnumerator** aFiles) MOZ_OVERRIDE;
 
-    NS_IMETHODIMP GetDomfile(nsIDOMFile** aFile);
-    NS_IMETHODIMP GetDomfiles(nsISimpleEnumerator** aFiles);
+    NS_IMETHODIMP GetDomfile(nsIDOMFile** aFile) MOZ_OVERRIDE;
+    NS_IMETHODIMP GetDomfiles(nsISimpleEnumerator** aFiles) MOZ_OVERRIDE;
 
-    NS_IMETHODIMP Show(int16_t* aReturn);
-    NS_IMETHODIMP Open(nsIFilePickerShownCallback* aCallback);
+    NS_IMETHODIMP Show(int16_t* aReturn) MOZ_OVERRIDE;
+    NS_IMETHODIMP Open(nsIFilePickerShownCallback* aCallback) MOZ_OVERRIDE;
 
     // PFilePickerChild
     virtual bool
-    Recv__delete__(const MaybeInputFiles& aFiles, const int16_t& aResult);
+    Recv__delete__(const MaybeInputFiles& aFiles, const int16_t& aResult) MOZ_OVERRIDE;
 
 private:
     ~nsFilePickerProxy();
-    void InitNative(nsIWidget*, const nsAString&);
+    void InitNative(nsIWidget*, const nsAString&) MOZ_OVERRIDE;
 
     // This is an innerWindow.
     nsCOMPtr<nsPIDOMWindow> mParent;
     nsCOMArray<nsIDOMFile> mDomfiles;
     nsCOMPtr<nsIFilePickerShownCallback> mCallback;
 
     int16_t   mSelectedType;
     nsString  mFile;
--- a/widget/tests/TestAppShellSteadyState.cpp
+++ b/widget/tests/TestAppShellSteadyState.cpp
@@ -171,17 +171,17 @@ class EventListener MOZ_FINAL : public n
 public:
   NS_DECL_ISUPPORTS
 
   explicit EventListener(nsIAppShell* aAppShell)
   : mAppShell(aAppShell)
   { }
 
   NS_IMETHOD
-  HandleEvent(nsIDOMEvent* aEvent)
+  HandleEvent(nsIDOMEvent* aEvent) MOZ_OVERRIDE
   {
     nsString type;
     if (NS_FAILED(aEvent->GetType(type))) {
       fail("Failed to get event type");
       return NS_ERROR_FAILURE;
     }
 
     if (type.EqualsLiteral("load")) {