Merge m-i to m-c, a=merge
authorPhil Ringnalda <philringnalda@gmail.com>
Sun, 22 Mar 2015 13:56:19 -0700
changeset 265266 99865532c12f15675a60031057d720f9656afb0a
parent 265218 ef342f3b67694d3c4cb8b6999c072279e961d62b (current diff)
parent 265265 45366e6959e2949aa30e7357960662c8287c300a (diff)
child 265271 e730012260a437b2aa0a018f99f70de682d58f66
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone39.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
Merge m-i to m-c, a=merge
configure.in
layout/base/tests/bidi_numeral_test.js
layout/base/tests/bug441782-1-ref.html
layout/base/tests/bug441782-1.html
layout/base/tests/bug441782-2-ref.html
layout/base/tests/bug441782-2.html
layout/base/tests/bug441782-3-ref.html
layout/base/tests/bug441782-3.html
layout/base/tests/bug441782-4-ref.html
layout/base/tests/bug441782-4.html
layout/base/tests/bug441782-5-ref.html
layout/base/tests/bug441782-5.html
layout/base/tests/bug467672-1-ref.html
layout/base/tests/bug467672-1.html
layout/base/tests/bug467672-2-ref.html
layout/base/tests/bug467672-2.html
layout/base/tests/bug467672-3-ref.html
layout/base/tests/bug467672-3.html
layout/base/tests/bug467672-4-ref.html
layout/base/tests/bug467672-4.html
layout/base/tests/bug467672-5-ref.html
layout/base/tests/bug467672-5.html
layout/base/tests/bug570378-arabic-1-ref.html
layout/base/tests/bug570378-arabic-1.html
layout/base/tests/bug570378-arabic-2-ref.html
layout/base/tests/bug570378-arabic-2.html
layout/base/tests/bug570378-arabic-3-ref.html
layout/base/tests/bug570378-arabic-3.html
layout/base/tests/bug570378-arabic-4-ref.html
layout/base/tests/bug570378-arabic-4.html
layout/base/tests/bug570378-arabic-5-ref.html
layout/base/tests/bug570378-arabic-5.html
layout/base/tests/bug570378-persian-1-ref.html
layout/base/tests/bug570378-persian-1.html
layout/base/tests/bug570378-persian-2-ref.html
layout/base/tests/bug570378-persian-2.html
layout/base/tests/bug570378-persian-3-ref.html
layout/base/tests/bug570378-persian-3.html
layout/base/tests/bug570378-persian-4-ref.html
layout/base/tests/bug570378-persian-4.html
layout/base/tests/bug570378-persian-5-ref.html
layout/base/tests/bug570378-persian-5.html
layout/base/tests/test_bug441782-1a.html
layout/base/tests/test_bug441782-1b.html
layout/base/tests/test_bug441782-1c.html
layout/base/tests/test_bug441782-1d.html
layout/base/tests/test_bug441782-1e.html
layout/base/tests/test_bug441782-2a.html
layout/base/tests/test_bug441782-2b.html
layout/base/tests/test_bug441782-2c.html
layout/base/tests/test_bug441782-2d.html
layout/base/tests/test_bug441782-2e.html
layout/base/tests/test_bug441782-3a.html
layout/base/tests/test_bug441782-3b.html
layout/base/tests/test_bug441782-3c.html
layout/base/tests/test_bug441782-3d.html
layout/base/tests/test_bug441782-3e.html
layout/base/tests/test_bug441782-4a.html
layout/base/tests/test_bug441782-4b.html
layout/base/tests/test_bug441782-4c.html
layout/base/tests/test_bug441782-4d.html
layout/base/tests/test_bug441782-4e.html
layout/base/tests/test_bug441782-5a.html
layout/base/tests/test_bug441782-5b.html
layout/base/tests/test_bug441782-5c.html
layout/base/tests/test_bug441782-5d.html
layout/base/tests/test_bug441782-5e.html
layout/base/tests/test_bug467672-1a.html
layout/base/tests/test_bug467672-1b.html
layout/base/tests/test_bug467672-1c.html
layout/base/tests/test_bug467672-1d.html
layout/base/tests/test_bug467672-1e.html
layout/base/tests/test_bug467672-1f.html
layout/base/tests/test_bug467672-1g.html
layout/base/tests/test_bug467672-2a.html
layout/base/tests/test_bug467672-2b.html
layout/base/tests/test_bug467672-2c.html
layout/base/tests/test_bug467672-2d.html
layout/base/tests/test_bug467672-2e.html
layout/base/tests/test_bug467672-2f.html
layout/base/tests/test_bug467672-2g.html
layout/base/tests/test_bug467672-3a.html
layout/base/tests/test_bug467672-3b.html
layout/base/tests/test_bug467672-3c.html
layout/base/tests/test_bug467672-3d.html
layout/base/tests/test_bug467672-3e.html
layout/base/tests/test_bug467672-3f.html
layout/base/tests/test_bug467672-3g.html
layout/base/tests/test_bug467672-4a.html
layout/base/tests/test_bug467672-4b.html
layout/base/tests/test_bug467672-4c.html
layout/base/tests/test_bug467672-4d.html
layout/base/tests/test_bug467672-4e.html
layout/base/tests/test_bug467672-4f.html
layout/base/tests/test_bug467672-4g.html
layout/base/tests/test_bug467672-5a.html
layout/base/tests/test_bug467672-5b.html
layout/base/tests/test_bug467672-5c.html
layout/base/tests/test_bug467672-5d.html
layout/base/tests/test_bug467672-5e.html
layout/base/tests/test_bug467672-5f.html
layout/base/tests/test_bug467672-5g.html
layout/base/tests/test_bug570378-arabic-1a.html
layout/base/tests/test_bug570378-arabic-1b.html
layout/base/tests/test_bug570378-arabic-1c.html
layout/base/tests/test_bug570378-arabic-1d.html
layout/base/tests/test_bug570378-arabic-1e.html
layout/base/tests/test_bug570378-arabic-2a.html
layout/base/tests/test_bug570378-arabic-2b.html
layout/base/tests/test_bug570378-arabic-2c.html
layout/base/tests/test_bug570378-arabic-2d.html
layout/base/tests/test_bug570378-arabic-2e.html
layout/base/tests/test_bug570378-arabic-3a.html
layout/base/tests/test_bug570378-arabic-3b.html
layout/base/tests/test_bug570378-arabic-3c.html
layout/base/tests/test_bug570378-arabic-3d.html
layout/base/tests/test_bug570378-arabic-3e.html
layout/base/tests/test_bug570378-arabic-4a.html
layout/base/tests/test_bug570378-arabic-4b.html
layout/base/tests/test_bug570378-arabic-4c.html
layout/base/tests/test_bug570378-arabic-4d.html
layout/base/tests/test_bug570378-arabic-4e.html
layout/base/tests/test_bug570378-arabic-5a.html
layout/base/tests/test_bug570378-arabic-5b.html
layout/base/tests/test_bug570378-arabic-5c.html
layout/base/tests/test_bug570378-arabic-5d.html
layout/base/tests/test_bug570378-arabic-5e.html
layout/base/tests/test_bug570378-persian-1a.html
layout/base/tests/test_bug570378-persian-1b.html
layout/base/tests/test_bug570378-persian-1c.html
layout/base/tests/test_bug570378-persian-1d.html
layout/base/tests/test_bug570378-persian-1e.html
layout/base/tests/test_bug570378-persian-1f.html
layout/base/tests/test_bug570378-persian-1g.html
layout/base/tests/test_bug570378-persian-2a.html
layout/base/tests/test_bug570378-persian-2b.html
layout/base/tests/test_bug570378-persian-2c.html
layout/base/tests/test_bug570378-persian-2d.html
layout/base/tests/test_bug570378-persian-2e.html
layout/base/tests/test_bug570378-persian-2f.html
layout/base/tests/test_bug570378-persian-2g.html
layout/base/tests/test_bug570378-persian-3a.html
layout/base/tests/test_bug570378-persian-3b.html
layout/base/tests/test_bug570378-persian-3c.html
layout/base/tests/test_bug570378-persian-3d.html
layout/base/tests/test_bug570378-persian-3e.html
layout/base/tests/test_bug570378-persian-3f.html
layout/base/tests/test_bug570378-persian-3g.html
layout/base/tests/test_bug570378-persian-4a.html
layout/base/tests/test_bug570378-persian-4b.html
layout/base/tests/test_bug570378-persian-4c.html
layout/base/tests/test_bug570378-persian-4d.html
layout/base/tests/test_bug570378-persian-4e.html
layout/base/tests/test_bug570378-persian-4f.html
layout/base/tests/test_bug570378-persian-4g.html
layout/base/tests/test_bug570378-persian-5a.html
layout/base/tests/test_bug570378-persian-5b.html
layout/base/tests/test_bug570378-persian-5c.html
layout/base/tests/test_bug570378-persian-5d.html
layout/base/tests/test_bug570378-persian-5e.html
layout/base/tests/test_bug570378-persian-5f.html
layout/base/tests/test_bug570378-persian-5g.html
--- a/accessible/atk/AccessibleWrap.h
+++ b/accessible/atk/AccessibleWrap.h
@@ -47,21 +47,21 @@ class MaiHyperlink;
  */
 class AccessibleWrap : public Accessible
 {
 public:
   AccessibleWrap(nsIContent* aContent, DocAccessible* aDoc);
   virtual ~AccessibleWrap();
   void ShutdownAtkObject();
 
-  virtual void Shutdown() MOZ_OVERRIDE;
+  virtual void Shutdown() override;
 
   // return the atk object for this AccessibleWrap
-  virtual void GetNativeInterface(void** aOutAccessible) MOZ_OVERRIDE;
-  virtual nsresult HandleAccEvent(AccEvent* aEvent) MOZ_OVERRIDE;
+  virtual void GetNativeInterface(void** aOutAccessible) override;
+  virtual nsresult HandleAccEvent(AccEvent* aEvent) override;
 
   AtkObject * GetAtkObject(void);
   static AtkObject* GetAtkObject(Accessible* aAccessible);
 
   bool IsValidObject();
 
   // get/set the MaiHyperlink object for this AccessibleWrap
   MaiHyperlink* GetMaiHyperlink(bool aCreate = true);
--- a/accessible/atk/ApplicationAccessibleWrap.h
+++ b/accessible/atk/ApplicationAccessibleWrap.h
@@ -14,22 +14,22 @@ namespace a11y {
 
 class ApplicationAccessibleWrap: public ApplicationAccessible
 {
 public:
   ApplicationAccessibleWrap();
   virtual ~ApplicationAccessibleWrap();
 
   // Accessible
-  virtual mozilla::a11y::ENameValueFlag Name(nsString& aName) MOZ_OVERRIDE;
-  virtual bool InsertChildAt(uint32_t aIdx, Accessible* aChild) MOZ_OVERRIDE;
-  virtual bool RemoveChild(Accessible* aChild) MOZ_OVERRIDE;
+  virtual mozilla::a11y::ENameValueFlag Name(nsString& aName) override;
+  virtual bool InsertChildAt(uint32_t aIdx, Accessible* aChild) override;
+  virtual bool RemoveChild(Accessible* aChild) override;
 
   /**
    * Return the atk object for app root accessible.
    */
-  virtual void GetNativeInterface(void** aOutAccessible) MOZ_OVERRIDE;
+  virtual void GetNativeInterface(void** aOutAccessible) override;
 };
 
 } // namespace a11y
 } // namespace mozilla
 
 #endif   /* __NS_APP_ROOT_ACCESSIBLE_H__ */
--- a/accessible/atk/AtkSocketAccessible.h
+++ b/accessible/atk/AtkSocketAccessible.h
@@ -40,17 +40,17 @@ public:
    * True if the current Atk version supports AtkSocket and it was correctly
    * loaded.
    */
   static bool gCanEmbed;
 
   AtkSocketAccessible(nsIContent* aContent, DocAccessible* aDoc,
                       const nsCString& aPlugId);
 
-  virtual void Shutdown() MOZ_OVERRIDE;
+  virtual void Shutdown() override;
 
-  virtual void GetNativeInterface(void** aOutAccessible) MOZ_OVERRIDE;
+  virtual void GetNativeInterface(void** aOutAccessible) override;
 };
 
 } // namespace a11y
 } // namespace mozilla
 
 #endif
--- a/accessible/atk/RootAccessibleWrap.h
+++ b/accessible/atk/RootAccessibleWrap.h
@@ -15,17 +15,17 @@ namespace a11y {
 
 typedef RootAccessible RootAccessibleWrap;
 
 /* GtkWindowAccessible is the accessible class for gtk+ native window.
  * The instance of GtkWindowAccessible is a child of MaiAppRoot instance.
  * It is added into root when the toplevel window is created, and removed
  * from root when the toplevel window is destroyed.
  */
-class GtkWindowAccessible MOZ_FINAL : public DummyAccessible
+class GtkWindowAccessible final : public DummyAccessible
 {
 public:
   explicit GtkWindowAccessible(AtkObject* aAccessible);
   virtual ~GtkWindowAccessible();
 };
 
 } // namespace a11y
 } // namespace mozilla
--- a/accessible/base/AccCollector.h
+++ b/accessible/base/AccCollector.h
@@ -66,30 +66,30 @@ private:
   AccCollector(const AccCollector&);
   AccCollector& operator =(const AccCollector&);
 };
 
 /**
  * Collect embedded objects. Provide quick access to accessible by index and
  * vice versa.
  */
-class EmbeddedObjCollector MOZ_FINAL : public AccCollector
+class EmbeddedObjCollector final : public AccCollector
 {
 public:
   virtual ~EmbeddedObjCollector() { }
 
 public:
-  virtual int32_t GetIndexAt(Accessible* aAccessible) MOZ_OVERRIDE;
+  virtual int32_t GetIndexAt(Accessible* aAccessible) override;
 
 protected:
   // Make sure it's used by Accessible class only.
   explicit EmbeddedObjCollector(Accessible* aRoot) :
     AccCollector(aRoot, filters::GetEmbeddedObject) { }
 
-  virtual void AppendObject(Accessible* aAccessible) MOZ_OVERRIDE;
+  virtual void AppendObject(Accessible* aAccessible) override;
 
   friend class Accessible;
 };
 
 } // namespace a11y
 } // namespace mozilla
 
 #endif
--- a/accessible/base/AccEvent.h
+++ b/accessible/base/AccEvent.h
@@ -149,17 +149,17 @@ public:
 
   AccStateChangeEvent(Accessible* aAccessible, uint64_t aState) :
     AccEvent(::nsIAccessibleEvent::EVENT_STATE_CHANGE, aAccessible,
              eAutoDetect, eCoalesceStateChange), mState(aState)
     { mIsEnabled = (mAccessible->State() & mState) != 0; }
 
   // AccEvent
   static const EventGroup kEventGroup = eStateChangeEvent;
-  virtual unsigned int GetEventGroups() const MOZ_OVERRIDE
+  virtual unsigned int GetEventGroups() const override
   {
     return AccEvent::GetEventGroups() | (1U << eStateChangeEvent);
   }
 
   // AccStateChangeEvent
   uint64_t GetState() const { return mState; }
   bool IsStateEnabled() const { return mIsEnabled; }
 
@@ -178,17 +178,17 @@ class AccTextChangeEvent: public AccEven
 {
 public:
   AccTextChangeEvent(Accessible* aAccessible, int32_t aStart,
                      const nsAString& aModifiedText, bool aIsInserted,
                      EIsFromUserInput aIsFromUserInput = eAutoDetect);
 
   // AccEvent
   static const EventGroup kEventGroup = eTextChangeEvent;
-  virtual unsigned int GetEventGroups() const MOZ_OVERRIDE
+  virtual unsigned int GetEventGroups() const override
   {
     return AccEvent::GetEventGroups() | (1U << eTextChangeEvent);
   }
 
   // AccTextChangeEvent
   int32_t GetStartOffset() const { return mStart; }
   uint32_t GetLength() const { return mModifiedText.Length(); }
   bool IsTextInserted() const { return mIsInserted; }
@@ -218,17 +218,17 @@ public:
     // Don't coalesce these since they are coalesced by reorder event. Coalesce
     // contained text change events.
     mParent = mAccessible->Parent();
   }
   virtual ~AccMutationEvent() { }
 
   // Event
   static const EventGroup kEventGroup = eMutationEvent;
-  virtual unsigned int GetEventGroups() const MOZ_OVERRIDE
+  virtual unsigned int GetEventGroups() const override
   {
     return AccEvent::GetEventGroups() | (1U << eMutationEvent);
   }
 
   // MutationEvent
   bool IsShow() const { return mEventType == nsIAccessibleEvent::EVENT_SHOW; }
   bool IsHide() const { return mEventType == nsIAccessibleEvent::EVENT_HIDE; }
 
@@ -248,17 +248,17 @@ protected:
  */
 class AccHideEvent: public AccMutationEvent
 {
 public:
   AccHideEvent(Accessible* aTarget, nsINode* aTargetNode);
 
   // Event
   static const EventGroup kEventGroup = eHideEvent;
-  virtual unsigned int GetEventGroups() const MOZ_OVERRIDE
+  virtual unsigned int GetEventGroups() const override
   {
     return AccMutationEvent::GetEventGroups() | (1U << eHideEvent);
   }
 
   // AccHideEvent
   Accessible* TargetParent() const { return mParent; }
   Accessible* TargetNextSibling() const { return mNextSibling; }
   Accessible* TargetPrevSibling() const { return mPrevSibling; }
@@ -276,17 +276,17 @@ protected:
  */
 class AccShowEvent: public AccMutationEvent
 {
 public:
   AccShowEvent(Accessible* aTarget, nsINode* aTargetNode);
 
   // Event
   static const EventGroup kEventGroup = eShowEvent;
-  virtual unsigned int GetEventGroups() const MOZ_OVERRIDE
+  virtual unsigned int GetEventGroups() const override
   {
     return AccMutationEvent::GetEventGroups() | (1U << eShowEvent);
   }
 };
 
 
 /**
  * Class for reorder accessible event. Takes care about
@@ -296,17 +296,17 @@ class AccReorderEvent : public AccEvent
 public:
   explicit AccReorderEvent(Accessible* aTarget) :
     AccEvent(::nsIAccessibleEvent::EVENT_REORDER, aTarget,
              eAutoDetect, eCoalesceReorder) { }
   virtual ~AccReorderEvent() { }
 
   // Event
   static const EventGroup kEventGroup = eReorderEvent;
-  virtual unsigned int GetEventGroups() const MOZ_OVERRIDE
+  virtual unsigned int GetEventGroups() const override
   {
     return AccEvent::GetEventGroups() | (1U << eReorderEvent);
   }
 
   /**
    * Get connected with mutation event.
    */
   void AddSubMutationEvent(AccMutationEvent* aEvent)
@@ -349,17 +349,17 @@ public:
                     EIsFromUserInput aIsFromUserInput = eAutoDetect) :
     AccEvent(::nsIAccessibleEvent::EVENT_TEXT_CARET_MOVED, aAccessible,
              aIsFromUserInput),
     mCaretOffset(aCaretOffset) { }
   virtual ~AccCaretMoveEvent() { }
 
   // AccEvent
   static const EventGroup kEventGroup = eCaretMoveEvent;
-  virtual unsigned int GetEventGroups() const MOZ_OVERRIDE
+  virtual unsigned int GetEventGroups() const override
   {
     return AccEvent::GetEventGroups() | (1U << eCaretMoveEvent);
   }
 
   // AccCaretMoveEvent
   int32_t GetCaretOffset() const { return mCaretOffset; }
 
 private:
@@ -375,17 +375,17 @@ class AccTextSelChangeEvent : public Acc
 public:
   AccTextSelChangeEvent(HyperTextAccessible* aTarget,
                         dom::Selection* aSelection,
                         int32_t aReason);
   virtual ~AccTextSelChangeEvent();
 
   // AccEvent
   static const EventGroup kEventGroup = eTextSelChangeEvent;
-  virtual unsigned int GetEventGroups() const MOZ_OVERRIDE
+  virtual unsigned int GetEventGroups() const override
   {
     return AccEvent::GetEventGroups() | (1U << eTextSelChangeEvent);
   }
 
   // AccTextSelChangeEvent
 
   /**
    * Return true if the text selection change wasn't caused by pure caret move.
@@ -414,17 +414,17 @@ public:
 
   AccSelChangeEvent(Accessible* aWidget, Accessible* aItem,
                     SelChangeType aSelChangeType);
 
   virtual ~AccSelChangeEvent() { }
 
   // AccEvent
   static const EventGroup kEventGroup = eSelectionChangeEvent;
-  virtual unsigned int GetEventGroups() const MOZ_OVERRIDE
+  virtual unsigned int GetEventGroups() const override
   {
     return AccEvent::GetEventGroups() | (1U << eSelectionChangeEvent);
   }
 
   // AccSelChangeEvent
   Accessible* Widget() const { return mWidget; }
 
 private:
@@ -444,17 +444,17 @@ private:
 class AccTableChangeEvent : public AccEvent
 {
 public:
   AccTableChangeEvent(Accessible* aAccessible, uint32_t aEventType,
                       int32_t aRowOrColIndex, int32_t aNumRowsOrCols);
 
   // AccEvent
   static const EventGroup kEventGroup = eTableChangeEvent;
-  virtual unsigned int GetEventGroups() const MOZ_OVERRIDE
+  virtual unsigned int GetEventGroups() const override
   {
     return AccEvent::GetEventGroups() | (1U << eTableChangeEvent);
   }
 
   // AccTableChangeEvent
   uint32_t GetIndex() const { return mRowOrColIndex; }
   uint32_t GetCount() const { return mNumRowsOrCols; }
 
@@ -474,17 +474,17 @@ public:
                    int32_t aOldStart, int32_t aOldEnd,
                    int16_t aReason,
                    EIsFromUserInput aIsFromUserInput = eFromUserInput);
 
   virtual ~AccVCChangeEvent() { }
 
   // AccEvent
   static const EventGroup kEventGroup = eVirtualCursorChangeEvent;
-  virtual unsigned int GetEventGroups() const MOZ_OVERRIDE
+  virtual unsigned int GetEventGroups() const override
   {
     return AccEvent::GetEventGroups() | (1U << eVirtualCursorChangeEvent);
   }
 
   // AccTableChangeEvent
   Accessible* OldAccessible() const { return mOldAccessible; }
   int32_t OldStartOffset() const { return mOldStart; }
   int32_t OldEndOffset() const { return mOldEnd; }
@@ -504,17 +504,17 @@ class AccObjectAttrChangedEvent: public 
 {
 public:
   AccObjectAttrChangedEvent(Accessible* aAccessible, nsIAtom* aAttribute) :
     AccEvent(::nsIAccessibleEvent::EVENT_OBJECT_ATTRIBUTE_CHANGED, aAccessible),
     mAttribute(aAttribute) { }
 
   // AccEvent
   static const EventGroup kEventGroup = eObjectAttrChangedEvent;
-  virtual unsigned int GetEventGroups() const MOZ_OVERRIDE
+  virtual unsigned int GetEventGroups() const override
   {
     return AccEvent::GetEventGroups() | (1U << eObjectAttrChangedEvent);
   }
 
   // AccObjectAttrChangedEvent
   nsIAtom* GetAttribute() const { return mAttribute; }
 
 private:
--- a/accessible/base/AccIterator.h
+++ b/accessible/base/AccIterator.h
@@ -38,17 +38,17 @@ class AccIterator : public AccIterable
 public:
   AccIterator(Accessible* aRoot, filters::FilterFuncPtr aFilterFunc);
   virtual ~AccIterator();
 
   /**
    * Return next accessible complying with filter function. Return the first
    * accessible for the first time.
    */
-  virtual Accessible* Next() MOZ_OVERRIDE;
+  virtual Accessible* Next() override;
 
 private:
   AccIterator();
   AccIterator(const AccIterator&);
   AccIterator& operator =(const AccIterator&);
 
   struct IteratorState
   {
@@ -84,17 +84,17 @@ public:
   RelatedAccIterator(DocAccessible* aDocument, nsIContent* aDependentContent,
                      nsIAtom* aRelAttr);
 
   virtual ~RelatedAccIterator() { }
 
   /**
    * Return next related accessible for the given dependent accessible.
    */
-  virtual Accessible* Next() MOZ_OVERRIDE;
+  virtual Accessible* Next() override;
 
 private:
   RelatedAccIterator();
   RelatedAccIterator(const RelatedAccIterator&);
   RelatedAccIterator& operator = (const RelatedAccIterator&);
 
   DocAccessible* mDocument;
   nsIAtom* mRelAttr;
@@ -118,17 +118,17 @@ public:
   HTMLLabelIterator(DocAccessible* aDocument, const Accessible* aAccessible,
                     LabelFilter aFilter = eAllLabels);
 
   virtual ~HTMLLabelIterator() { }
 
   /**
    * Return next label accessible associated with the given element.
    */
-  virtual Accessible* Next() MOZ_OVERRIDE;
+  virtual Accessible* Next() override;
 
 private:
   HTMLLabelIterator();
   HTMLLabelIterator(const HTMLLabelIterator&);
   HTMLLabelIterator& operator = (const HTMLLabelIterator&);
 
   RelatedAccIterator mRelIter;
   // XXX: replace it on weak reference (bug 678429), it's safe to use raw
@@ -145,17 +145,17 @@ class HTMLOutputIterator : public AccIte
 {
 public:
   HTMLOutputIterator(DocAccessible* aDocument, nsIContent* aElement);
   virtual ~HTMLOutputIterator() { }
 
   /**
    * Return next output accessible associated with the given element.
    */
-  virtual Accessible* Next() MOZ_OVERRIDE;
+  virtual Accessible* Next() override;
 
 private:
   HTMLOutputIterator();
   HTMLOutputIterator(const HTMLOutputIterator&);
   HTMLOutputIterator& operator = (const HTMLOutputIterator&);
 
   RelatedAccIterator mRelIter;
 };
@@ -168,17 +168,17 @@ class XULLabelIterator : public AccItera
 {
 public:
   XULLabelIterator(DocAccessible* aDocument, nsIContent* aElement);
   virtual ~XULLabelIterator() { }
 
   /**
    * Return next label accessible associated with the given element.
    */
-  virtual Accessible* Next() MOZ_OVERRIDE;
+  virtual Accessible* Next() override;
 
 private:
   XULLabelIterator();
   XULLabelIterator(const XULLabelIterator&);
   XULLabelIterator& operator = (const XULLabelIterator&);
 
   RelatedAccIterator mRelIter;
 };
@@ -191,17 +191,17 @@ class XULDescriptionIterator : public Ac
 {
 public:
   XULDescriptionIterator(DocAccessible* aDocument, nsIContent* aElement);
   virtual ~XULDescriptionIterator() { }
 
   /**
    * Return next description accessible associated with the given element.
    */
-  virtual Accessible* Next() MOZ_OVERRIDE;
+  virtual Accessible* Next() override;
 
 private:
   XULDescriptionIterator();
   XULDescriptionIterator(const XULDescriptionIterator&);
   XULDescriptionIterator& operator = (const XULDescriptionIterator&);
 
   RelatedAccIterator mRelIter;
 };
@@ -229,60 +229,60 @@ public:
   nsIContent* NextElem();
 
   /**
    * Return the element with the given ID.
    */
   nsIContent* GetElem(const nsDependentSubstring& aID);
 
   // AccIterable
-  virtual Accessible* Next() MOZ_OVERRIDE;
+  virtual Accessible* Next() override;
 
 private:
   IDRefsIterator();
   IDRefsIterator(const IDRefsIterator&);
   IDRefsIterator operator = (const IDRefsIterator&);
 
   nsString mIDs;
   nsIContent* mContent;
   DocAccessible* mDoc;
   nsAString::index_type mCurrIdx;
 };
 
 
 /**
  * Iterates over related accessible referred by aria-owns.
  */
-class ARIAOwnedByIterator MOZ_FINAL : public RelatedAccIterator
+class ARIAOwnedByIterator final : public RelatedAccIterator
 {
 public:
   explicit ARIAOwnedByIterator(const Accessible* aDependent);
   virtual ~ARIAOwnedByIterator() { }
 
-  virtual Accessible* Next() MOZ_OVERRIDE;
+  virtual Accessible* Next() override;
 
 private:
   ARIAOwnedByIterator() = delete;
   ARIAOwnedByIterator(const ARIAOwnedByIterator&) = delete;
   ARIAOwnedByIterator& operator = (const ARIAOwnedByIterator&) = delete;
 
   const Accessible* mDependent;
 };
 
 
 /**
  * Iterates over related accessible referred by aria-owns.
  */
-class ARIAOwnsIterator MOZ_FINAL : public AccIterable
+class ARIAOwnsIterator final : public AccIterable
 {
 public:
   explicit ARIAOwnsIterator(const Accessible* aOwner);
   virtual ~ARIAOwnsIterator() { }
 
-  virtual Accessible* Next() MOZ_OVERRIDE;
+  virtual Accessible* Next() override;
 
 private:
   ARIAOwnsIterator() = delete;
   ARIAOwnsIterator(const ARIAOwnsIterator&) = delete;
   ARIAOwnsIterator& operator = (const ARIAOwnsIterator&) = delete;
 
   IDRefsIterator mIter;
   const Accessible* mOwner;
@@ -294,17 +294,17 @@ private:
  * to Next().
  */
 class SingleAccIterator : public AccIterable
 {
 public:
   explicit SingleAccIterator(Accessible* aTarget): mAcc(aTarget) { }
   virtual ~SingleAccIterator() { }
 
-  virtual Accessible* Next() MOZ_OVERRIDE;
+  virtual Accessible* Next() override;
 
 private:
   SingleAccIterator();
   SingleAccIterator(const SingleAccIterator&);
   SingleAccIterator& operator = (const SingleAccIterator&);
 
   nsRefPtr<Accessible> mAcc;
 };
@@ -315,17 +315,17 @@ private:
  */
 class ItemIterator : public AccIterable
 {
 public:
   explicit ItemIterator(Accessible* aItemContainer) :
     mContainer(aItemContainer), mAnchor(nullptr) { }
   virtual ~ItemIterator() { }
 
-  virtual Accessible* Next() MOZ_OVERRIDE;
+  virtual Accessible* Next() override;
 
 private:
   ItemIterator() = delete;
   ItemIterator(const ItemIterator&) = delete;
   ItemIterator& operator = (const ItemIterator&) = delete;
 
   Accessible* mContainer;
   Accessible* mAnchor;
@@ -337,17 +337,17 @@ private:
  */
 class XULTreeItemIterator : public AccIterable
 {
 public:
   XULTreeItemIterator(XULTreeAccessible* aXULTree, nsITreeView* aTreeView,
                       int32_t aRowIdx);
   virtual ~XULTreeItemIterator() { }
 
-  virtual Accessible* Next() MOZ_OVERRIDE;
+  virtual Accessible* Next() override;
 
 private:
   XULTreeItemIterator() = delete;
   XULTreeItemIterator(const XULTreeItemIterator&) = delete;
   XULTreeItemIterator& operator = (const XULTreeItemIterator&) = delete;
 
   XULTreeAccessible* mXULTree;
   nsITreeView* mTreeView;
--- a/accessible/base/NotificationController.h
+++ b/accessible/base/NotificationController.h
@@ -59,17 +59,17 @@ class TNotification : public Notificatio
 {
 public:
   typedef void (Class::*Callback)(Arg*);
 
   TNotification(Class* aInstance, Callback aCallback, Arg* aArg) :
     mInstance(aInstance), mCallback(aCallback), mArg(aArg) { }
   virtual ~TNotification() { mInstance = nullptr; }
 
-  virtual void Process() MOZ_OVERRIDE
+  virtual void Process() override
   {
     (mInstance->*mCallback)(mArg);
 
     mInstance = nullptr;
     mCallback = nullptr;
     mArg = nullptr;
   }
 
@@ -80,24 +80,24 @@ private:
   Class* mInstance;
   Callback mCallback;
   nsRefPtr<Arg> mArg;
 };
 
 /**
  * Used to process notifications from core for the document accessible.
  */
-class NotificationController MOZ_FINAL : public EventQueue,
+class NotificationController final : public EventQueue,
                                          public nsARefreshObserver
 {
 public:
   NotificationController(DocAccessible* aDocument, nsIPresShell* aPresShell);
 
-  NS_IMETHOD_(MozExternalRefCountType) AddRef(void) MOZ_OVERRIDE;
-  NS_IMETHOD_(MozExternalRefCountType) Release(void) MOZ_OVERRIDE;
+  NS_IMETHOD_(MozExternalRefCountType) AddRef(void) override;
+  NS_IMETHOD_(MozExternalRefCountType) Release(void) override;
 
   NS_DECL_CYCLE_COLLECTION_NATIVE_CLASS(NotificationController)
 
   /**
    * Shutdown the notification controller.
    */
   void Shutdown();
 
@@ -198,17 +198,17 @@ protected:
    */
   bool IsUpdatePending();
 
 private:
   NotificationController(const NotificationController&);
   NotificationController& operator = (const NotificationController&);
 
   // nsARefreshObserver
-  virtual void WillRefresh(mozilla::TimeStamp aTime) MOZ_OVERRIDE;
+  virtual void WillRefresh(mozilla::TimeStamp aTime) override;
 
 private:
   /**
    * Indicates whether we're waiting on an event queue processing from our
    * notification controller to flush events.
    */
   enum eObservingState {
     eNotObservingRefresh,
--- a/accessible/base/SelectionManager.cpp
+++ b/accessible/base/SelectionManager.cpp
@@ -19,17 +19,17 @@
 #include "nsIPresShell.h"
 #include "mozilla/dom/Selection.h"
 #include "mozilla/dom/Element.h"
 
 using namespace mozilla;
 using namespace mozilla::a11y;
 using mozilla::dom::Selection;
 
-struct mozilla::a11y::SelData MOZ_FINAL
+struct mozilla::a11y::SelData final
 {
   SelData(Selection* aSel, int32_t aReason) :
     mSel(aSel), mReason(aReason) {}
 
   nsRefPtr<Selection> mSel;
   int16_t mReason;
 
   NS_INLINE_DECL_REFCOUNTING(SelData)
--- a/accessible/base/TextAttrs.h
+++ b/accessible/base/TextAttrs.h
@@ -125,17 +125,17 @@ protected:
   template<class T>
   class TTextAttr : public TextAttr
   {
   public:
     explicit TTextAttr(bool aGetRootValue) : mGetRootValue(aGetRootValue) {}
 
     // TextAttr
     virtual void Expose(nsIPersistentProperties* aAttributes,
-                        bool aIncludeDefAttrValue) MOZ_OVERRIDE
+                        bool aIncludeDefAttrValue) override
     {
       if (mGetRootValue) {
         if (mIsRootDefined)
           ExposeValue(aAttributes, mRootNativeValue);
         return;
       }
 
       if (mIsDefined) {
@@ -143,17 +143,17 @@ protected:
           ExposeValue(aAttributes, mNativeValue);
         return;
       }
 
       if (aIncludeDefAttrValue && mIsRootDefined)
         ExposeValue(aAttributes, mRootNativeValue);
     }
 
-    virtual bool Equal(Accessible* aAccessible) MOZ_OVERRIDE
+    virtual bool Equal(Accessible* aAccessible) override
     {
       T nativeValue;
       bool isDefined = GetValueFor(aAccessible, &nativeValue);
 
       if (!mIsDefined && !isDefined)
         return true;
 
       if (mIsDefined && isDefined)
@@ -198,19 +198,19 @@ protected:
   public:
     LangTextAttr(HyperTextAccessible* aRoot, nsIContent* aRootElm,
                  nsIContent* aElm);
     virtual ~LangTextAttr();
 
   protected:
 
     // TextAttr
-    virtual bool GetValueFor(Accessible* aAccessible, nsString* aValue) MOZ_OVERRIDE;
+    virtual bool GetValueFor(Accessible* aAccessible, nsString* aValue) override;
     virtual void ExposeValue(nsIPersistentProperties* aAttributes,
-                             const nsString& aValue) MOZ_OVERRIDE;
+                             const nsString& aValue) override;
 
   private:
     nsCOMPtr<nsIContent> mRootContent;
   };
 
 
   /**
    * Class is used for the 'invalid' text attribute. Note, it calculated
@@ -229,19 +229,19 @@ protected:
     enum {
       eFalse,
       eGrammar,
       eSpelling,
       eTrue
     };
 
     // TextAttr
-    virtual bool GetValueFor(Accessible* aAccessible, uint32_t* aValue) MOZ_OVERRIDE;
+    virtual bool GetValueFor(Accessible* aAccessible, uint32_t* aValue) override;
     virtual void ExposeValue(nsIPersistentProperties* aAttributes,
-                             const uint32_t& aValue) MOZ_OVERRIDE;
+                             const uint32_t& aValue) override;
 
   private:
     bool GetValue(nsIContent* aElm, uint32_t* aValue);
     nsIContent* mRootElm;
   };
 
 
   /**
@@ -252,19 +252,19 @@ protected:
   public:
     BGColorTextAttr(nsIFrame* aRootFrame, nsIFrame* aFrame);
     virtual ~BGColorTextAttr() { }
 
   protected:
 
     // TextAttr
     virtual bool GetValueFor(Accessible* aAccessible, nscolor* aValue)
-      MOZ_OVERRIDE;
+      override;
     virtual void ExposeValue(nsIPersistentProperties* aAttributes,
-                             const nscolor& aValue) MOZ_OVERRIDE;
+                             const nscolor& aValue) override;
 
   private:
     bool GetColor(nsIFrame* aFrame, nscolor* aColor);
     nsIFrame* mRootFrame;
   };
 
 
   /**
@@ -275,38 +275,38 @@ protected:
   public:
     ColorTextAttr(nsIFrame* aRootFrame, nsIFrame* aFrame);
     virtual ~ColorTextAttr() { }
 
   protected:
 
     // TTextAttr
     virtual bool GetValueFor(Accessible* aAccessible, nscolor* aValue)
-      MOZ_OVERRIDE;
+      override;
     virtual void ExposeValue(nsIPersistentProperties* aAttributes,
-                             const nscolor& aValue) MOZ_OVERRIDE;
+                             const nscolor& aValue) override;
   };
 
 
   /**
    * Class is used for the work with "font-family" text attribute.
    */
   class FontFamilyTextAttr : public TTextAttr<nsString>
   {
   public:
     FontFamilyTextAttr(nsIFrame* aRootFrame, nsIFrame* aFrame);
     virtual ~FontFamilyTextAttr() { }
 
   protected:
 
     // TTextAttr
     virtual bool GetValueFor(Accessible* aAccessible, nsString* aValue)
-      MOZ_OVERRIDE;
+      override;
     virtual void ExposeValue(nsIPersistentProperties* aAttributes,
-                             const nsString& aValue) MOZ_OVERRIDE;
+                             const nsString& aValue) override;
 
   private:
 
     bool GetFontFamily(nsIFrame* aFrame, nsString& aFamily);
   };
 
 
   /**
@@ -317,19 +317,19 @@ protected:
   public:
     FontSizeTextAttr(nsIFrame* aRootFrame, nsIFrame* aFrame);
     virtual ~FontSizeTextAttr() { }
 
   protected:
 
     // TTextAttr
     virtual bool GetValueFor(Accessible* aAccessible, nscoord* aValue)
-      MOZ_OVERRIDE;
+      override;
     virtual void ExposeValue(nsIPersistentProperties* aAttributes,
-                             const nscoord& aValue) MOZ_OVERRIDE;
+                             const nscoord& aValue) override;
 
   private:
     nsDeviceContext* mDC;
   };
 
 
   /**
    * Class is used for the work with "font-style" text attribute.
@@ -339,38 +339,38 @@ protected:
   public:
     FontStyleTextAttr(nsIFrame* aRootFrame, nsIFrame* aFrame);
     virtual ~FontStyleTextAttr() { }
 
   protected:
 
     // TTextAttr
     virtual bool GetValueFor(Accessible* aContent, nscoord* aValue)
-      MOZ_OVERRIDE;
+      override;
     virtual void ExposeValue(nsIPersistentProperties* aAttributes,
-                             const nscoord& aValue) MOZ_OVERRIDE;
+                             const nscoord& aValue) override;
   };
 
 
   /**
    * Class is used for the work with "font-weight" text attribute.
    */
   class FontWeightTextAttr : public TTextAttr<int32_t>
   {
   public:
     FontWeightTextAttr(nsIFrame* aRootFrame, nsIFrame* aFrame);
     virtual ~FontWeightTextAttr() { }
 
   protected:
 
     // TTextAttr
     virtual bool GetValueFor(Accessible* aAccessible, int32_t* aValue)
-      MOZ_OVERRIDE;
+      override;
     virtual void ExposeValue(nsIPersistentProperties* aAttributes,
-                             const int32_t& aValue) MOZ_OVERRIDE;
+                             const int32_t& aValue) override;
 
   private:
     int32_t GetFontWeight(nsIFrame* aFrame);
   };
 
   /**
    * Class is used for the work with 'auto-generated' text attribute.
    */
@@ -379,19 +379,19 @@ protected:
   public:
     AutoGeneratedTextAttr(HyperTextAccessible* aHyperTextAcc,
                           Accessible* aAccessible);
     virtual ~AutoGeneratedTextAttr() { }
 
   protected:
     // TextAttr
     virtual bool GetValueFor(Accessible* aAccessible, bool* aValue)
-      MOZ_OVERRIDE;
+      override;
     virtual void ExposeValue(nsIPersistentProperties* aAttributes,
-                             const bool& aValue) MOZ_OVERRIDE;
+                             const bool& aValue) override;
   };
 
 
   /**
    * TextDecorTextAttr class is used for the work with
    * "text-line-through-style", "text-line-through-color",
    * "text-underline-style" and "text-underline-color" text attributes.
    */
@@ -431,19 +431,19 @@ protected:
   public:
     TextDecorTextAttr(nsIFrame* aRootFrame, nsIFrame* aFrame);
     virtual ~TextDecorTextAttr() { }
 
   protected:
 
     // TextAttr
     virtual bool GetValueFor(Accessible* aAccessible, TextDecorValue* aValue)
-      MOZ_OVERRIDE;
+      override;
     virtual void ExposeValue(nsIPersistentProperties* aAttributes,
-                             const TextDecorValue& aValue) MOZ_OVERRIDE;
+                             const TextDecorValue& aValue) override;
   };
 
   /**
    * Class is used for the work with "text-position" text attribute.
    */
 
   enum TextPosValue {
     eTextPosNone = 0,
@@ -457,19 +457,19 @@ protected:
   public:
     TextPosTextAttr(nsIFrame* aRootFrame, nsIFrame* aFrame);
     virtual ~TextPosTextAttr() { }
 
   protected:
 
     // TextAttr
     virtual bool GetValueFor(Accessible* aAccessible, TextPosValue* aValue)
-      MOZ_OVERRIDE;
+      override;
     virtual void ExposeValue(nsIPersistentProperties* aAttributes,
-                             const TextPosValue& aValue) MOZ_OVERRIDE;
+                             const TextPosValue& aValue) override;
 
   private:
     TextPosValue GetTextPosValue(nsIFrame* aFrame) const;
   };
 
 }; // TextAttrMgr
 
 } // namespace a11y
--- a/accessible/base/TextRange.h
+++ b/accessible/base/TextRange.h
@@ -19,17 +19,17 @@ namespace mozilla {
 namespace a11y {
 
 class Accessible;
 class HyperTextAccessible;
 
 /**
  * A text point (hyper text + offset), represents a boundary of text range.
  */
-struct TextPoint MOZ_FINAL
+struct TextPoint final
 {
   TextPoint(HyperTextAccessible* aContainer, int32_t aOffset) :
     mContainer(aContainer), mOffset(aOffset) { }
   TextPoint(const TextPoint& aPoint) :
     mContainer(aPoint.mContainer), mOffset(aPoint.mOffset) { }
 
   HyperTextAccessible* mContainer;
   int32_t mOffset;
@@ -37,17 +37,17 @@ struct TextPoint MOZ_FINAL
   bool operator ==(const TextPoint& aPoint) const
     { return mContainer == aPoint.mContainer && mOffset == aPoint.mOffset; }
   bool operator <(const TextPoint& aPoint) const;
 };
 
 /**
  * Represents a text range within the text control or document.
  */
-class TextRange MOZ_FINAL
+class TextRange final
 {
 public:
   TextRange(HyperTextAccessible* aRoot,
             HyperTextAccessible* aStartContainer, int32_t aStartOffset,
             HyperTextAccessible* aEndContainer, int32_t aEndOffset);
   TextRange() {}
   TextRange(TextRange&& aRange) :
     mRoot(mozilla::Move(aRange.mRoot)),
--- a/accessible/base/TreeWalker.h
+++ b/accessible/base/TreeWalker.h
@@ -17,17 +17,17 @@ namespace mozilla {
 namespace a11y {
 
 class Accessible;
 class DocAccessible;
 
 /**
  * This class is used to walk the DOM tree to create accessible tree.
  */
-class TreeWalker MOZ_FINAL
+class TreeWalker final
 {
 public:
   enum {
     // used to walk the existing tree of the given node
     eWalkCache = 1,
     // used to walk the context tree starting from given node
     eWalkContextTree = 2 | eWalkCache
   };
--- a/accessible/base/nsAccessibilityService.cpp
+++ b/accessible/base/nsAccessibilityService.cpp
@@ -340,26 +340,26 @@ nsAccessibilityService::GetRootDocumentA
   }
   return nullptr;
 }
 
 #ifdef XP_WIN
 static StaticAutoPtr<nsTArray<nsCOMPtr<nsIContent> > > sPendingPlugins;
 static StaticAutoPtr<nsTArray<nsCOMPtr<nsITimer> > > sPluginTimers;
 
-class PluginTimerCallBack MOZ_FINAL : public nsITimerCallback
+class PluginTimerCallBack final : public nsITimerCallback
 {
   ~PluginTimerCallBack() {}
 
 public:
   PluginTimerCallBack(nsIContent* aContent) : mContent(aContent) {}
 
   NS_DECL_ISUPPORTS
 
-  NS_IMETHODIMP Notify(nsITimer* aTimer) MOZ_FINAL
+  NS_IMETHODIMP Notify(nsITimer* aTimer) final
   {
     if (!mContent->IsInDoc())
       return NS_OK;
 
     nsIPresShell* ps = mContent->OwnerDoc()->GetShell();
     if (ps) {
       DocAccessible* doc = ps->GetDocAccessible();
       if (doc) {
--- a/accessible/base/nsAccessibilityService.h
+++ b/accessible/base/nsAccessibilityService.h
@@ -58,17 +58,17 @@ struct MarkupMapInfo {
   New_Accessible* new_func;
   a11y::role role;
   MarkupAttrInfo attrs[4];
 };
 
 } // namespace a11y
 } // namespace mozilla
 
-class nsAccessibilityService MOZ_FINAL : public mozilla::a11y::DocManager,
+class nsAccessibilityService final : public mozilla::a11y::DocManager,
                                          public mozilla::a11y::FocusManager,
                                          public mozilla::a11y::SelectionManager,
                                          public nsIAccessibilityService,
                                          public nsIObserver
 {
 public:
   typedef mozilla::a11y::Accessible Accessible;
   typedef mozilla::a11y::DocAccessible DocAccessible;
@@ -78,29 +78,29 @@ protected:
 
 public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIACCESSIBLERETRIEVAL
   NS_DECL_NSIOBSERVER
 
   // nsIAccessibilityService
   virtual Accessible* GetRootDocumentAccessible(nsIPresShell* aPresShell,
-                                                bool aCanCreate) MOZ_OVERRIDE;
+                                                bool aCanCreate) override;
   already_AddRefed<Accessible>
     CreatePluginAccessible(nsPluginFrame* aFrame, nsIContent* aContent,
                            Accessible* aContext);
 
   /**
    * Adds/remove ATK root accessible for gtk+ native window to/from children
    * of the application accessible.
    */
-  virtual Accessible* AddNativeRootAccessible(void* aAtkAccessible) MOZ_OVERRIDE;
-  virtual void RemoveNativeRootAccessible(Accessible* aRootAccessible) MOZ_OVERRIDE;
+  virtual Accessible* AddNativeRootAccessible(void* aAtkAccessible) override;
+  virtual void RemoveNativeRootAccessible(Accessible* aRootAccessible) override;
 
-  virtual bool HasAccessible(nsIDOMNode* aDOMNode) MOZ_OVERRIDE;
+  virtual bool HasAccessible(nsIDOMNode* aDOMNode) override;
 
   // nsAccesibilityService
   /**
    * Notification used to update the accessible tree when deck panel is
    * switched.
    */
   void DeckPanelSwitched(nsIPresShell* aPresShell, nsIContent* aDeckNode,
                          nsIFrame* aPrevBoxFrame, nsIFrame* aCurrentBoxFrame);
@@ -159,17 +159,17 @@ public:
    */
   virtual void PresShellActivated(nsIPresShell* aPresShell);
 
   /**
    * Recreate an accessible for the given content node in the presshell.
    */
   void RecreateAccessible(nsIPresShell* aPresShell, nsIContent* aContent);
 
-  virtual void FireAccessibleEvent(uint32_t aEvent, Accessible* aTarget) MOZ_OVERRIDE;
+  virtual void FireAccessibleEvent(uint32_t aEvent, Accessible* aTarget) override;
 
   // nsAccessibiltiyService
 
   /**
    * Return true if accessibility service has been shutdown.
    */
   static bool IsShutdown() { return gIsShutdown; }
 
--- a/accessible/base/nsAccessiblePivot.h
+++ b/accessible/base/nsAccessiblePivot.h
@@ -15,17 +15,17 @@
 #include "nsCycleCollectionParticipant.h"
 #include "mozilla/Attributes.h"
 
 class RuleCache;
 
 /**
  * Class represents an accessible pivot.
  */
-class nsAccessiblePivot MOZ_FINAL : public nsIAccessiblePivot
+class nsAccessiblePivot final : public nsIAccessiblePivot
 {
 public:
   typedef mozilla::a11y::Accessible Accessible;
 
   explicit nsAccessiblePivot(Accessible* aRoot);
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsAccessiblePivot, nsIAccessiblePivot)
--- a/accessible/generic/ARIAGridAccessible.h
+++ b/accessible/generic/ARIAGridAccessible.h
@@ -20,37 +20,37 @@ class ARIAGridAccessible : public Access
                            public TableAccessible
 {
 public:
   ARIAGridAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // Accessible
-  virtual TableAccessible* AsTable() MOZ_OVERRIDE { return this; }
+  virtual TableAccessible* AsTable() override { return this; }
 
   // TableAccessible
-  virtual uint32_t ColCount() MOZ_OVERRIDE;
-  virtual uint32_t RowCount() MOZ_OVERRIDE;
-  virtual Accessible* CellAt(uint32_t aRowIndex, uint32_t aColumnIndex) MOZ_OVERRIDE;
-  virtual bool IsColSelected(uint32_t aColIdx) MOZ_OVERRIDE;
-  virtual bool IsRowSelected(uint32_t aRowIdx) MOZ_OVERRIDE;
-  virtual bool IsCellSelected(uint32_t aRowIdx, uint32_t aColIdx) MOZ_OVERRIDE;
-  virtual uint32_t SelectedCellCount() MOZ_OVERRIDE;
-  virtual uint32_t SelectedColCount() MOZ_OVERRIDE;
-  virtual uint32_t SelectedRowCount() MOZ_OVERRIDE;
-  virtual void SelectedCells(nsTArray<Accessible*>* aCells) MOZ_OVERRIDE;
-  virtual void SelectedCellIndices(nsTArray<uint32_t>* aCells) MOZ_OVERRIDE;
-  virtual void SelectedColIndices(nsTArray<uint32_t>* aCols) MOZ_OVERRIDE;
-  virtual void SelectedRowIndices(nsTArray<uint32_t>* aRows) MOZ_OVERRIDE;
-  virtual void SelectCol(uint32_t aColIdx) MOZ_OVERRIDE;
-  virtual void SelectRow(uint32_t aRowIdx) MOZ_OVERRIDE;
-  virtual void UnselectCol(uint32_t aColIdx) MOZ_OVERRIDE;
-  virtual void UnselectRow(uint32_t aRowIdx) MOZ_OVERRIDE;
-  virtual Accessible* AsAccessible() MOZ_OVERRIDE { return this; }
+  virtual uint32_t ColCount() override;
+  virtual uint32_t RowCount() override;
+  virtual Accessible* CellAt(uint32_t aRowIndex, uint32_t aColumnIndex) override;
+  virtual bool IsColSelected(uint32_t aColIdx) override;
+  virtual bool IsRowSelected(uint32_t aRowIdx) override;
+  virtual bool IsCellSelected(uint32_t aRowIdx, uint32_t aColIdx) override;
+  virtual uint32_t SelectedCellCount() override;
+  virtual uint32_t SelectedColCount() override;
+  virtual uint32_t SelectedRowCount() override;
+  virtual void SelectedCells(nsTArray<Accessible*>* aCells) override;
+  virtual void SelectedCellIndices(nsTArray<uint32_t>* aCells) override;
+  virtual void SelectedColIndices(nsTArray<uint32_t>* aCols) override;
+  virtual void SelectedRowIndices(nsTArray<uint32_t>* aRows) override;
+  virtual void SelectCol(uint32_t aColIdx) override;
+  virtual void SelectRow(uint32_t aRowIdx) override;
+  virtual void UnselectCol(uint32_t aColIdx) override;
+  virtual void UnselectRow(uint32_t aRowIdx) override;
+  virtual Accessible* AsAccessible() override { return this; }
 
 protected:
   virtual ~ARIAGridAccessible() {}
 
   /**
    * Return row accessible at the given row index.
    */
   Accessible* GetRowAt(int32_t aRow);
@@ -80,19 +80,19 @@ class ARIAGridCellAccessible : public Hy
                                public TableCellAccessible
 {
 public:
   ARIAGridCellAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // Accessible
-  virtual TableCellAccessible* AsTableCell() MOZ_OVERRIDE { return this; }
-  virtual void ApplyARIAState(uint64_t* aState) const MOZ_OVERRIDE;
-  virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() MOZ_OVERRIDE;
+  virtual TableCellAccessible* AsTableCell() override { return this; }
+  virtual void ApplyARIAState(uint64_t* aState) const override;
+  virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() override;
 
 protected:
   virtual ~ARIAGridCellAccessible() {}
 
   /**
    * Return a containing row.
    */
   Accessible* Row() const
@@ -107,18 +107,18 @@ protected:
   Accessible* TableFor(Accessible* aRow) const;
 
   /**
    * Return index of the given row.
    */
   int32_t RowIndexFor(Accessible* aRow) const;
 
   // TableCellAccessible
-  virtual TableAccessible* Table() const MOZ_OVERRIDE;
-  virtual uint32_t ColIdx() const MOZ_OVERRIDE;
-  virtual uint32_t RowIdx() const MOZ_OVERRIDE;
-  virtual bool Selected() MOZ_OVERRIDE;
+  virtual TableAccessible* Table() const override;
+  virtual uint32_t ColIdx() const override;
+  virtual uint32_t RowIdx() const override;
+  virtual bool Selected() override;
 };
 
 } // namespace a11y
 } // namespace mozilla
 
 #endif
--- a/accessible/generic/Accessible.cpp
+++ b/accessible/generic/Accessible.cpp
@@ -1718,23 +1718,23 @@ Accessible::RelationByType(RelationType 
 void
 Accessible::GetNativeInterface(void** aNativeAccessible)
 {
 }
 
 void
 Accessible::DoCommand(nsIContent *aContent, uint32_t aActionIndex)
 {
-  class Runnable MOZ_FINAL : public nsRunnable
+  class Runnable final : public nsRunnable
   {
   public:
     Runnable(Accessible* aAcc, nsIContent* aContent, uint32_t aIdx) :
       mAcc(aAcc), mContent(aContent), mIdx(aIdx) { }
 
-    NS_IMETHOD Run() MOZ_OVERRIDE
+    NS_IMETHOD Run() override
     {
       if (mAcc)
         mAcc->DispatchClickEvent(mContent, mIdx);
 
       return NS_OK;
     }
 
     void Revoke()
--- a/accessible/generic/ApplicationAccessible.h
+++ b/accessible/generic/ApplicationAccessible.h
@@ -30,37 +30,37 @@ class ApplicationAccessible : public Acc
 {
 public:
 
   ApplicationAccessible();
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // Accessible
-  virtual void Shutdown() MOZ_OVERRIDE;
-  virtual nsIntRect Bounds() const MOZ_OVERRIDE;
-  virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() MOZ_OVERRIDE;
-  virtual GroupPos GroupPosition() MOZ_OVERRIDE;
-  virtual ENameValueFlag Name(nsString& aName) MOZ_OVERRIDE;
-  virtual void ApplyARIAState(uint64_t* aState) const MOZ_OVERRIDE;
-  virtual void Description(nsString& aDescription) MOZ_OVERRIDE;
-  virtual void Value(nsString& aValue) MOZ_OVERRIDE;
-  virtual mozilla::a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t State() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
-  virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE;
+  virtual void Shutdown() override;
+  virtual nsIntRect Bounds() const override;
+  virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() override;
+  virtual GroupPos GroupPosition() override;
+  virtual ENameValueFlag Name(nsString& aName) override;
+  virtual void ApplyARIAState(uint64_t* aState) const override;
+  virtual void Description(nsString& aDescription) override;
+  virtual void Value(nsString& aValue) override;
+  virtual mozilla::a11y::role NativeRole() override;
+  virtual uint64_t State() override;
+  virtual uint64_t NativeState() override;
+  virtual Relation RelationByType(RelationType aType) override;
 
   virtual Accessible* ChildAtPoint(int32_t aX, int32_t aY,
-                                   EWhichChildAtPoint aWhichChild) MOZ_OVERRIDE;
-  virtual Accessible* FocusedChild() MOZ_OVERRIDE;
+                                   EWhichChildAtPoint aWhichChild) override;
+  virtual Accessible* FocusedChild() override;
 
-  virtual void InvalidateChildren() MOZ_OVERRIDE;
+  virtual void InvalidateChildren() override;
 
   // ActionAccessible
-  virtual KeyBinding AccessKey() const MOZ_OVERRIDE;
+  virtual KeyBinding AccessKey() const override;
 
   // ApplicationAccessible
   void AppName(nsAString& aName) const
   {
     nsAutoCString cname;
     mAppInfo->GetName(cname);
     AppendUTF8toUTF16(cname, aName);
   }
@@ -83,19 +83,19 @@ public:
     mAppInfo->GetPlatformVersion(cversion);
     AppendUTF8toUTF16(cversion, aVersion);
   }
 
 protected:
   virtual ~ApplicationAccessible() {}
 
   // Accessible
-  virtual void CacheChildren() MOZ_OVERRIDE;
+  virtual void CacheChildren() override;
   virtual Accessible* GetSiblingAtOffset(int32_t aOffset,
-                                         nsresult *aError = nullptr) const MOZ_OVERRIDE;
+                                         nsresult *aError = nullptr) const override;
 
 private:
   nsCOMPtr<nsIXULAppInfo> mAppInfo;
 };
 
 inline ApplicationAccessible*
 Accessible::AsApplication()
 {
--- a/accessible/generic/BaseAccessibles.h
+++ b/accessible/generic/BaseAccessibles.h
@@ -29,25 +29,25 @@ public:
 
   LeafAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // Accessible
   virtual Accessible* ChildAtPoint(int32_t aX, int32_t aY,
-                                   EWhichChildAtPoint aWhichChild) MOZ_OVERRIDE;
-  virtual bool InsertChildAt(uint32_t aIndex, Accessible* aChild) MOZ_OVERRIDE MOZ_FINAL;
-  virtual bool RemoveChild(Accessible* aChild) MOZ_OVERRIDE MOZ_FINAL;
+                                   EWhichChildAtPoint aWhichChild) override;
+  virtual bool InsertChildAt(uint32_t aIndex, Accessible* aChild) override final;
+  virtual bool RemoveChild(Accessible* aChild) override final;
 
 protected:
   virtual ~LeafAccessible() {}
 
   // Accessible
-  virtual void CacheChildren() MOZ_OVERRIDE;
+  virtual void CacheChildren() override;
 };
 
 /**
  * Used for text or image accessible nodes contained by link accessibles or
  * accessibles for nodes with registered click event handler. It knows how to
  * report the state of the host link (traveled or not) and can activate (click)
  * the host accessible programmatically.
  */
@@ -56,36 +56,36 @@ class LinkableAccessible : public Access
 public:
   enum { eAction_Jump = 0 };
 
   LinkableAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // Accessible
-  virtual void Shutdown() MOZ_OVERRIDE;
-  virtual void Value(nsString& aValue) MOZ_OVERRIDE;
-  virtual uint64_t NativeLinkState() const MOZ_OVERRIDE;
-  virtual void TakeFocus() MOZ_OVERRIDE;
+  virtual void Shutdown() override;
+  virtual void Value(nsString& aValue) override;
+  virtual uint64_t NativeLinkState() const override;
+  virtual void TakeFocus() override;
 
   // ActionAccessible
-  virtual uint8_t ActionCount() MOZ_OVERRIDE;
-  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) MOZ_OVERRIDE;
-  virtual bool DoAction(uint8_t index) MOZ_OVERRIDE;
-  virtual KeyBinding AccessKey() const MOZ_OVERRIDE;
+  virtual uint8_t ActionCount() override;
+  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
+  virtual bool DoAction(uint8_t index) override;
+  virtual KeyBinding AccessKey() const override;
 
   // HyperLinkAccessible
-  virtual already_AddRefed<nsIURI> AnchorURIAt(uint32_t aAnchorIndex) MOZ_OVERRIDE;
+  virtual already_AddRefed<nsIURI> AnchorURIAt(uint32_t aAnchorIndex) override;
 
 protected:
   virtual ~LinkableAccessible() {}
 
   // Accessible
-  virtual void BindToParent(Accessible* aParent, uint32_t aIndexInParent) MOZ_OVERRIDE;
-  virtual void UnbindFromParent() MOZ_OVERRIDE;
+  virtual void BindToParent(Accessible* aParent, uint32_t aIndexInParent) override;
+  virtual void UnbindFromParent() override;
 
   /**
    * Parent accessible that provides an action for this linkable accessible.
    */
   Accessible* mActionAcc;
   bool mIsLink;
   bool mIsOnclick;
 };
@@ -95,42 +95,42 @@ protected:
  */
 template<a11y::role R>
 class EnumRoleAccessible : public AccessibleWrap
 {
 public:
   EnumRoleAccessible(nsIContent* aContent, DocAccessible* aDoc) :
     AccessibleWrap(aContent, aDoc) { }
 
-  NS_IMETHOD QueryInterface(REFNSIID aIID, void** aPtr) MOZ_OVERRIDE
+  NS_IMETHOD QueryInterface(REFNSIID aIID, void** aPtr) override
     { return Accessible::QueryInterface(aIID, aPtr); }
 
   // Accessible
-  virtual a11y::role NativeRole() MOZ_OVERRIDE { return R; }
+  virtual a11y::role NativeRole() override { return R; }
 
 protected:
   virtual ~EnumRoleAccessible() { }
 };
 
 
 /**
  * A wrapper accessible around native accessible to connect it with
  * crossplatform accessible tree.
  */
 class DummyAccessible : public AccessibleWrap
 {
 public:
   explicit DummyAccessible(DocAccessible* aDocument = nullptr) :
     AccessibleWrap(nullptr, aDocument) { }
 
-  virtual uint64_t NativeState() MOZ_OVERRIDE MOZ_FINAL;
-  virtual uint64_t NativeInteractiveState() const MOZ_OVERRIDE MOZ_FINAL;
-  virtual uint64_t NativeLinkState() const MOZ_OVERRIDE MOZ_FINAL;
-  virtual bool NativelyUnavailable() const MOZ_OVERRIDE MOZ_FINAL;
-  virtual void ApplyARIAState(uint64_t* aState) const MOZ_OVERRIDE MOZ_FINAL;
+  virtual uint64_t NativeState() override final;
+  virtual uint64_t NativeInteractiveState() const override final;
+  virtual uint64_t NativeLinkState() const override final;
+  virtual bool NativelyUnavailable() const override final;
+  virtual void ApplyARIAState(uint64_t* aState) const override final;
 
 protected:
   virtual ~DummyAccessible() { }
 };
 
 } // namespace a11y
 } // namespace mozilla
 
--- a/accessible/generic/DocAccessible.h
+++ b/accessible/generic/DocAccessible.h
@@ -51,49 +51,49 @@ class DocAccessible : public HyperTextAc
   NS_DECL_NSIACCESSIBLEPIVOTOBSERVER
 
 public:
 
   DocAccessible(nsIDocument* aDocument, nsIContent* aRootContent,
                 nsIPresShell* aPresShell);
 
   // nsIScrollPositionListener
-  virtual void ScrollPositionWillChange(nscoord aX, nscoord aY) MOZ_OVERRIDE {}
-  virtual void ScrollPositionDidChange(nscoord aX, nscoord aY) MOZ_OVERRIDE;
+  virtual void ScrollPositionWillChange(nscoord aX, nscoord aY) override {}
+  virtual void ScrollPositionDidChange(nscoord aX, nscoord aY) override;
 
   // nsIDocumentObserver
   NS_DECL_NSIDOCUMENTOBSERVER
 
   // Accessible
   virtual void Init();
-  virtual void Shutdown() MOZ_OVERRIDE;
-  virtual nsIFrame* GetFrame() const MOZ_OVERRIDE;
-  virtual nsINode* GetNode() const MOZ_OVERRIDE { return mDocumentNode; }
+  virtual void Shutdown() override;
+  virtual nsIFrame* GetFrame() const override;
+  virtual nsINode* GetNode() const override { return mDocumentNode; }
   nsIDocument* DocumentNode() const { return mDocumentNode; }
 
-  virtual mozilla::a11y::ENameValueFlag Name(nsString& aName) MOZ_OVERRIDE;
-  virtual void Description(nsString& aDescription) MOZ_OVERRIDE;
-  virtual Accessible* FocusedChild() MOZ_OVERRIDE;
-  virtual mozilla::a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
-  virtual uint64_t NativeInteractiveState() const MOZ_OVERRIDE;
-  virtual bool NativelyUnavailable() const MOZ_OVERRIDE;
-  virtual void ApplyARIAState(uint64_t* aState) const MOZ_OVERRIDE;
-  virtual already_AddRefed<nsIPersistentProperties> Attributes() MOZ_OVERRIDE;
+  virtual mozilla::a11y::ENameValueFlag Name(nsString& aName) override;
+  virtual void Description(nsString& aDescription) override;
+  virtual Accessible* FocusedChild() override;
+  virtual mozilla::a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
+  virtual uint64_t NativeInteractiveState() const override;
+  virtual bool NativelyUnavailable() const override;
+  virtual void ApplyARIAState(uint64_t* aState) const override;
+  virtual already_AddRefed<nsIPersistentProperties> Attributes() override;
 
-  virtual void TakeFocus() MOZ_OVERRIDE;
+  virtual void TakeFocus() override;
 
 #ifdef A11Y_LOG
-  virtual nsresult HandleAccEvent(AccEvent* aEvent) MOZ_OVERRIDE;
+  virtual nsresult HandleAccEvent(AccEvent* aEvent) override;
 #endif
 
-  virtual nsRect RelativeBounds(nsIFrame** aRelativeFrame) const MOZ_OVERRIDE;
+  virtual nsRect RelativeBounds(nsIFrame** aRelativeFrame) const override;
 
   // HyperTextAccessible
-  virtual already_AddRefed<nsIEditor> GetEditor() const MOZ_OVERRIDE;
+  virtual already_AddRefed<nsIEditor> GetEditor() const override;
 
   // DocAccessible
 
   /**
    * Return document URL.
    */
   void URL(nsAString& aURL) const;
 
@@ -339,17 +339,17 @@ public:
   void RecreateAccessible(nsIContent* aContent);
 
 protected:
   virtual ~DocAccessible();
 
   void LastRelease();
 
   // Accessible
-  virtual void CacheChildren() MOZ_OVERRIDE;
+  virtual void CacheChildren() override;
 
   // DocAccessible
   virtual nsresult AddEventListeners();
   virtual nsresult RemoveEventListeners();
 
   /**
    * Marks this document as loaded or loading.
    */
--- a/accessible/generic/FormControlAccessible.h
+++ b/accessible/generic/FormControlAccessible.h
@@ -23,54 +23,54 @@ public:
   {
     // Ignore 'ValueChange' DOM event in lieu of @value attribute change
     // notifications.
     mStateFlags |= eHasNumericValue | eIgnoreDOMUIEvent;
     mType = eProgressType;
   }
 
   // Accessible
-  virtual void Value(nsString& aValue) MOZ_OVERRIDE;
-  virtual mozilla::a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
+  virtual void Value(nsString& aValue) override;
+  virtual mozilla::a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
 
   // Value
-  virtual double MaxValue() const MOZ_OVERRIDE;
-  virtual double MinValue() const MOZ_OVERRIDE;
-  virtual double CurValue() const MOZ_OVERRIDE;
-  virtual double Step() const MOZ_OVERRIDE;
-  virtual bool SetCurValue(double aValue) MOZ_OVERRIDE;
+  virtual double MaxValue() const override;
+  virtual double MinValue() const override;
+  virtual double CurValue() const override;
+  virtual double Step() const override;
+  virtual bool SetCurValue(double aValue) override;
 
   // Widgets
-  virtual bool IsWidget() const MOZ_OVERRIDE;
+  virtual bool IsWidget() const override;
 
 protected:
   virtual ~ProgressMeterAccessible() {}
 };
 
 /**
   * Generic class used for radio buttons.
   */
 class RadioButtonAccessible : public LeafAccessible
 {
 
 public:
   RadioButtonAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual mozilla::a11y::role NativeRole() MOZ_OVERRIDE;
+  virtual mozilla::a11y::role NativeRole() override;
 
   // ActionAccessible
-  virtual uint8_t ActionCount() MOZ_OVERRIDE;
-  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) MOZ_OVERRIDE;
-  virtual bool DoAction(uint8_t aIndex) MOZ_OVERRIDE;
+  virtual uint8_t ActionCount() override;
+  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
+  virtual bool DoAction(uint8_t aIndex) override;
 
   enum { eAction_Click = 0 };
 
   // Widgets
-  virtual bool IsWidget() const MOZ_OVERRIDE;
+  virtual bool IsWidget() const override;
 };
 
 } // namespace a11y
 } // namespace mozilla
 
 #endif
 
--- a/accessible/generic/HyperTextAccessible.h
+++ b/accessible/generic/HyperTextAccessible.h
@@ -49,24 +49,24 @@ const char16_t kForcedNewLineChar = '\n'
 class HyperTextAccessible : public AccessibleWrap
 {
 public:
   HyperTextAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // Accessible
-  virtual nsIAtom* LandmarkRole() const MOZ_OVERRIDE;
-  virtual int32_t GetLevelInternal() MOZ_OVERRIDE;
-  virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() MOZ_OVERRIDE;
-  virtual mozilla::a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
+  virtual nsIAtom* LandmarkRole() const override;
+  virtual int32_t GetLevelInternal() override;
+  virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() override;
+  virtual mozilla::a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
 
-  virtual void InvalidateChildren() MOZ_OVERRIDE;
-  virtual bool RemoveChild(Accessible* aAccessible) MOZ_OVERRIDE;
+  virtual void InvalidateChildren() override;
+  virtual bool RemoveChild(Accessible* aAccessible) override;
 
   // HyperTextAccessible (static helper method)
 
   // Convert content offset to rendered text offset
   nsresult ContentToRenderedOffset(nsIFrame *aFrame, int32_t aContentOffset,
                                    uint32_t *aRenderedOffset) const;
 
   // Convert rendered text offset to content offset
@@ -427,18 +427,18 @@ public:
    * Return DOM selection object for the accessible.
    */
   dom::Selection* DOMSelection() const;
 
 protected:
   virtual ~HyperTextAccessible() { }
 
   // Accessible
-  virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE;
-  virtual void CacheChildren() MOZ_OVERRIDE;
+  virtual ENameValueFlag NativeName(nsString& aName) override;
+  virtual void CacheChildren() override;
 
   // HyperTextAccessible
 
   /**
    * Transform magic offset into text offset.
    */
   index_t ConvertMagicOffset(int32_t aOffset) const;
 
--- a/accessible/generic/ImageAccessible.h
+++ b/accessible/generic/ImageAccessible.h
@@ -19,34 +19,34 @@ namespace a11y {
  * - support basic state
  */
 class ImageAccessible : public LinkableAccessible
 {
 public:
   ImageAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
-  virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() MOZ_OVERRIDE;
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
+  virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() override;
 
   // ActionAccessible
-  virtual uint8_t ActionCount() MOZ_OVERRIDE;
-  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) MOZ_OVERRIDE;
-  virtual bool DoAction(uint8_t aIndex) MOZ_OVERRIDE;
+  virtual uint8_t ActionCount() override;
+  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
+  virtual bool DoAction(uint8_t aIndex) override;
 
   // ImageAccessible
   nsIntPoint Position(uint32_t aCoordType);
   nsIntSize Size();
 
 protected:
   virtual ~ImageAccessible();
 
   // Accessible
-  virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE;
+  virtual ENameValueFlag NativeName(nsString& aName) override;
 
 private:
   /**
    * Return whether the element has a longdesc URI.
    */
   bool HasLongDesc() const
   {
     nsCOMPtr<nsIURI> uri = GetLongDescURI();
--- a/accessible/generic/OuterDocAccessible.h
+++ b/accessible/generic/OuterDocAccessible.h
@@ -15,36 +15,36 @@ namespace a11y {
  * Used for <browser>, <frame>, <iframe>, <page> or editor> elements.
  * 
  * In these variable names, "outer" relates to the OuterDocAccessible as
  * opposed to the DocAccessibleWrap which is "inner". The outer node is
  * a something like tags listed above, whereas the inner node corresponds to
  * the inner document root.
  */
 
-class OuterDocAccessible MOZ_FINAL : public AccessibleWrap
+class OuterDocAccessible final : public AccessibleWrap
 {
 public:
   OuterDocAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // Accessible
-  virtual void Shutdown() MOZ_OVERRIDE;
-  virtual mozilla::a11y::role NativeRole() MOZ_OVERRIDE;
+  virtual void Shutdown() override;
+  virtual mozilla::a11y::role NativeRole() override;
   virtual Accessible* ChildAtPoint(int32_t aX, int32_t aY,
-                                   EWhichChildAtPoint aWhichChild) MOZ_OVERRIDE;
+                                   EWhichChildAtPoint aWhichChild) override;
 
-  virtual void InvalidateChildren() MOZ_OVERRIDE;
-  virtual bool InsertChildAt(uint32_t aIdx, Accessible* aChild) MOZ_OVERRIDE;
-  virtual bool RemoveChild(Accessible* aAccessible) MOZ_OVERRIDE;
+  virtual void InvalidateChildren() override;
+  virtual bool InsertChildAt(uint32_t aIdx, Accessible* aChild) override;
+  virtual bool RemoveChild(Accessible* aAccessible) override;
 
 protected:
-  virtual ~OuterDocAccessible() MOZ_OVERRIDE;
+  virtual ~OuterDocAccessible() override;
 
   // Accessible
-  virtual void CacheChildren() MOZ_OVERRIDE;
+  virtual void CacheChildren() override;
 };
 
 } // namespace a11y
 } // namespace mozilla
 
 #endif  
--- a/accessible/generic/RootAccessible.h
+++ b/accessible/generic/RootAccessible.h
@@ -21,40 +21,40 @@ class RootAccessible : public DocAccessi
 {
   NS_DECL_ISUPPORTS_INHERITED
 
 public:
   RootAccessible(nsIDocument* aDocument, nsIContent* aRootContent,
                  nsIPresShell* aPresShell);
 
   // nsIDOMEventListener
-  NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) MOZ_OVERRIDE;
+  NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) override;
 
   // Accessible
-  virtual void Shutdown() MOZ_OVERRIDE;
-  virtual mozilla::a11y::ENameValueFlag Name(nsString& aName) MOZ_OVERRIDE;
-  virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE;
-  virtual mozilla::a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
+  virtual void Shutdown() override;
+  virtual mozilla::a11y::ENameValueFlag Name(nsString& aName) override;
+  virtual Relation RelationByType(RelationType aType) override;
+  virtual mozilla::a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
 
   // RootAccessible
 
   /**
    * Notify that the sub document presshell was activated.
    */
   virtual void DocumentActivated(DocAccessible* aDocument);
 
 protected:
   virtual ~RootAccessible();
 
   /**
    * Add/remove DOM event listeners.
    */
-  virtual nsresult AddEventListeners() MOZ_OVERRIDE;
-  virtual nsresult RemoveEventListeners() MOZ_OVERRIDE;
+  virtual nsresult AddEventListeners() override;
+  virtual nsresult RemoveEventListeners() override;
 
   /**
    * Process the DOM event.
    */
   void ProcessDOMEvent(nsIDOMEvent* aEvent);
 
   /**
    * Process "popupshown" event. Used by HandleEvent().
--- a/accessible/generic/TextLeafAccessible.h
+++ b/accessible/generic/TextLeafAccessible.h
@@ -16,28 +16,28 @@ namespace a11y {
  */
 class TextLeafAccessible : public LinkableAccessible
 {
 public:
   TextLeafAccessible(nsIContent* aContent, DocAccessible* aDoc);
   virtual ~TextLeafAccessible();
 
   // Accessible
-  virtual mozilla::a11y::role NativeRole() MOZ_OVERRIDE;
+  virtual mozilla::a11y::role NativeRole() override;
   virtual void AppendTextTo(nsAString& aText, uint32_t aStartOffset = 0,
-                            uint32_t aLength = UINT32_MAX) MOZ_OVERRIDE;
-  virtual ENameValueFlag Name(nsString& aName) MOZ_OVERRIDE;
+                            uint32_t aLength = UINT32_MAX) override;
+  virtual ENameValueFlag Name(nsString& aName) override;
 
   // TextLeafAccessible
   void SetText(const nsAString& aText) { mText = aText; }
   const nsString& Text() const { return mText; }
 
 protected:
   // Accessible
-  virtual void CacheChildren() MOZ_OVERRIDE;
+  virtual void CacheChildren() override;
 
 protected:
   nsString mText;
 };
 
 
 ////////////////////////////////////////////////////////////////////////////////
 // Accessible downcast method
--- a/accessible/html/HTMLCanvasAccessible.h
+++ b/accessible/html/HTMLCanvasAccessible.h
@@ -18,17 +18,17 @@ class HTMLCanvasAccessible : public Hype
 {
 public:
   HTMLCanvasAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // Accessible
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
+  virtual a11y::role NativeRole() override;
 
 protected:
   virtual ~HTMLCanvasAccessible() { }
 };
 
 } // namespace a11y
 } // namespace mozilla
 
--- a/accessible/html/HTMLElementAccessibles.h
+++ b/accessible/html/HTMLElementAccessibles.h
@@ -18,74 +18,74 @@ namespace a11y {
 class HTMLHRAccessible : public LeafAccessible
 {
 public:
 
   HTMLHRAccessible(nsIContent* aContent, DocAccessible* aDoc) :
     LeafAccessible(aContent, aDoc) {}
 
   // Accessible
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
+  virtual a11y::role NativeRole() override;
 };
 
 /**
  * Used for HTML br element.
  */
 class HTMLBRAccessible : public LeafAccessible
 {
 public:
   HTMLBRAccessible(nsIContent* aContent, DocAccessible* aDoc) :
     LeafAccessible(aContent, aDoc)
   {
     mType = eHTMLBRType;
   }
 
   // Accessible
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
 
 protected:
   // Accessible
-  virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE;
+  virtual ENameValueFlag NativeName(nsString& aName) override;
 };
 
 /**
  * Used for HTML label element.
  */
 class HTMLLabelAccessible : public HyperTextAccessibleWrap
 {
 public:
 
   HTMLLabelAccessible(nsIContent* aContent, DocAccessible* aDoc) :
     HyperTextAccessibleWrap(aContent, aDoc) {}
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // Accessible
-  virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE;
+  virtual Relation RelationByType(RelationType aType) override;
 
 protected:
   virtual ~HTMLLabelAccessible() {}
-  virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE;
+  virtual ENameValueFlag NativeName(nsString& aName) override;
 };
 
 /**
  * Used for HTML output element.
  */
 class HTMLOutputAccessible : public HyperTextAccessibleWrap
 {
 public:
 
   HTMLOutputAccessible(nsIContent* aContent, DocAccessible* aDoc) :
     HyperTextAccessibleWrap(aContent, aDoc) {}
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // Accessible
-  virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE;
+  virtual Relation RelationByType(RelationType aType) override;
 
 protected:
   virtual ~HTMLOutputAccessible() {}
 };
 
 } // namespace a11y
 } // namespace mozilla
 
--- a/accessible/html/HTMLFormControlAccessible.h
+++ b/accessible/html/HTMLFormControlAccessible.h
@@ -30,26 +30,26 @@ public:
     LeafAccessible(aContent, aDoc)
   {
     // Ignore "CheckboxStateChange" DOM event in lieu of document observer
     // state change notification.
     mStateFlags |= eIgnoreDOMUIEvent;
   }
 
   // Accessible
-  virtual mozilla::a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
+  virtual mozilla::a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
 
   // ActionAccessible
-  virtual uint8_t ActionCount() MOZ_OVERRIDE;
-  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) MOZ_OVERRIDE;
-  virtual bool DoAction(uint8_t aIndex) MOZ_OVERRIDE;
+  virtual uint8_t ActionCount() override;
+  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
+  virtual bool DoAction(uint8_t aIndex) override;
 
   // Widgets
-  virtual bool IsWidget() const MOZ_OVERRIDE;
+  virtual bool IsWidget() const override;
 };
 
 
 /**
  * Accessible for HTML input@type="radio" element.
  */
 class HTMLRadioButtonAccessible : public RadioButtonAccessible
 {
@@ -59,91 +59,91 @@ public:
     RadioButtonAccessible(aContent, aDoc)
   {
     // Ignore "RadioStateChange" DOM event in lieu of document observer
     // state change notification.
     mStateFlags |= eIgnoreDOMUIEvent;
   }
 
   // Accessible
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
+  virtual uint64_t NativeState() override;
   virtual void GetPositionAndSizeInternal(int32_t *aPosInSet,
-                                          int32_t *aSetSize) MOZ_OVERRIDE;
+                                          int32_t *aSetSize) override;
 };
 
 
 /**
  * Accessible for HTML input@type="button", @type="submit", @type="image"
  * and HTML button elements.
  */
 class HTMLButtonAccessible : public HyperTextAccessibleWrap
 {
 
 public:
   enum { eAction_Click = 0 };
 
   HTMLButtonAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual mozilla::a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t State() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
+  virtual mozilla::a11y::role NativeRole() override;
+  virtual uint64_t State() override;
+  virtual uint64_t NativeState() override;
 
   // ActionAccessible
-  virtual uint8_t ActionCount() MOZ_OVERRIDE;
-  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) MOZ_OVERRIDE;
-  virtual bool DoAction(uint8_t aIndex) MOZ_OVERRIDE;
+  virtual uint8_t ActionCount() override;
+  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
+  virtual bool DoAction(uint8_t aIndex) override;
 
   // Widgets
-  virtual bool IsWidget() const MOZ_OVERRIDE;
+  virtual bool IsWidget() const override;
 
 protected:
   // Accessible
-  virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE;
+  virtual ENameValueFlag NativeName(nsString& aName) override;
 };
 
 
 /**
  * Accessible for HTML input@type="text", input@type="password", textarea and
  * other HTML text controls.
  */
-class HTMLTextFieldAccessible MOZ_FINAL : public HyperTextAccessibleWrap
+class HTMLTextFieldAccessible final : public HyperTextAccessibleWrap
 {
 
 public:
   enum { eAction_Click = 0 };
 
   HTMLTextFieldAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // HyperTextAccessible
-  virtual already_AddRefed<nsIEditor> GetEditor() const MOZ_OVERRIDE;
+  virtual already_AddRefed<nsIEditor> GetEditor() const override;
 
   // Accessible
-  virtual void Value(nsString& aValue) MOZ_OVERRIDE;
-  virtual void ApplyARIAState(uint64_t* aState) const MOZ_OVERRIDE;
-  virtual mozilla::a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
-  virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() MOZ_OVERRIDE;
+  virtual void Value(nsString& aValue) override;
+  virtual void ApplyARIAState(uint64_t* aState) const override;
+  virtual mozilla::a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
+  virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() override;
 
   // ActionAccessible
-  virtual uint8_t ActionCount() MOZ_OVERRIDE;
-  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) MOZ_OVERRIDE;
-  virtual bool DoAction(uint8_t aIndex) MOZ_OVERRIDE;
+  virtual uint8_t ActionCount() override;
+  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
+  virtual bool DoAction(uint8_t aIndex) override;
 
   // Widgets
-  virtual bool IsWidget() const MOZ_OVERRIDE;
-  virtual Accessible* ContainerWidget() const MOZ_OVERRIDE;
+  virtual bool IsWidget() const override;
+  virtual Accessible* ContainerWidget() const override;
 
 protected:
   virtual ~HTMLTextFieldAccessible() {}
 
   // Accessible
-  virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE;
+  virtual ENameValueFlag NativeName(nsString& aName) override;
 
   /**
    * Return a XUL widget element this input is part of.
    */
   nsIContent* XULWidgetElm() const { return mContent->GetBindingParent(); }
 };
 
 
@@ -151,134 +151,134 @@ protected:
  * Accessible for input@type="file" element.
  */
 class HTMLFileInputAccessible : public HyperTextAccessibleWrap
 {
 public:
   HTMLFileInputAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual mozilla::a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual nsresult HandleAccEvent(AccEvent* aAccEvent) MOZ_OVERRIDE;
+  virtual mozilla::a11y::role NativeRole() override;
+  virtual nsresult HandleAccEvent(AccEvent* aAccEvent) override;
 };
 
 
 /**
  * Used for HTML input@type="number".
  */
 class HTMLSpinnerAccessible : public AccessibleWrap
 {
 public:
   HTMLSpinnerAccessible(nsIContent* aContent, DocAccessible* aDoc) :
     AccessibleWrap(aContent, aDoc)
   {
     mStateFlags |= eHasNumericValue;
 }
 
   // Accessible
-  virtual mozilla::a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual void Value(nsString& aValue) MOZ_OVERRIDE;
+  virtual mozilla::a11y::role NativeRole() override;
+  virtual void Value(nsString& aValue) override;
 
-  virtual double MaxValue() const MOZ_OVERRIDE;
-  virtual double MinValue() const MOZ_OVERRIDE;
-  virtual double CurValue() const MOZ_OVERRIDE;
-  virtual double Step() const MOZ_OVERRIDE;
-  virtual bool SetCurValue(double aValue) MOZ_OVERRIDE;
+  virtual double MaxValue() const override;
+  virtual double MinValue() const override;
+  virtual double CurValue() const override;
+  virtual double Step() const override;
+  virtual bool SetCurValue(double aValue) override;
 };
 
 
 /**
   * Used for input@type="range" element.
   */
 class HTMLRangeAccessible : public LeafAccessible
 {
 public:
   HTMLRangeAccessible(nsIContent* aContent, DocAccessible* aDoc) :
     LeafAccessible(aContent, aDoc)
   {
     mStateFlags |= eHasNumericValue;
   }
 
   // Accessible
-  virtual void Value(nsString& aValue) MOZ_OVERRIDE;
-  virtual mozilla::a11y::role NativeRole() MOZ_OVERRIDE;
+  virtual void Value(nsString& aValue) override;
+  virtual mozilla::a11y::role NativeRole() override;
 
   // Value
-  virtual double MaxValue() const MOZ_OVERRIDE;
-  virtual double MinValue() const MOZ_OVERRIDE;
-  virtual double CurValue() const MOZ_OVERRIDE;
-  virtual double Step() const MOZ_OVERRIDE;
-  virtual bool SetCurValue(double aValue) MOZ_OVERRIDE;
+  virtual double MaxValue() const override;
+  virtual double MinValue() const override;
+  virtual double CurValue() const override;
+  virtual double Step() const override;
+  virtual bool SetCurValue(double aValue) override;
 
   // Widgets
-  virtual bool IsWidget() const MOZ_OVERRIDE;
+  virtual bool IsWidget() const override;
 };
 
 
 /**
  * Accessible for HTML fieldset element.
  */
 class HTMLGroupboxAccessible : public HyperTextAccessibleWrap
 {
 public:
   HTMLGroupboxAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual mozilla::a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE;
+  virtual mozilla::a11y::role NativeRole() override;
+  virtual Relation RelationByType(RelationType aType) override;
 
 protected:
   // Accessible
-  virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE;
+  virtual ENameValueFlag NativeName(nsString& aName) override;
 
   // HTMLGroupboxAccessible
   nsIContent* GetLegend() const;
 };
 
 
 /**
  * Accessible for HTML legend element.
  */
 class HTMLLegendAccessible : public HyperTextAccessibleWrap
 {
 public:
   HTMLLegendAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE;
+  virtual Relation RelationByType(RelationType aType) override;
 };
 
 /**
  * Accessible for HTML5 figure element.
  */
 class HTMLFigureAccessible : public HyperTextAccessibleWrap
 {
 public:
   HTMLFigureAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE;
+  virtual Relation RelationByType(RelationType aType) override;
 
 protected:
   // Accessible
-  virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE;
+  virtual ENameValueFlag NativeName(nsString& aName) override;
 
   // HTMLLegendAccessible
   nsIContent* Caption() const;
 };
 
 
 /**
  * Accessible for HTML5 figcaption element.
  */
 class HTMLFigcaptionAccessible : public HyperTextAccessibleWrap
 {
 public:
   HTMLFigcaptionAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE;
+  virtual Relation RelationByType(RelationType aType) override;
 };
 
 } // namespace a11y
 } // namespace mozilla
 
 #endif
--- a/accessible/html/HTMLImageMapAccessible.h
+++ b/accessible/html/HTMLImageMapAccessible.h
@@ -11,72 +11,72 @@
 #include "nsIDOMHTMLMapElement.h"
 
 namespace mozilla {
 namespace a11y {
 
 /**
  * Used for HTML image maps.
  */
-class HTMLImageMapAccessible MOZ_FINAL : public ImageAccessibleWrap
+class HTMLImageMapAccessible final : public ImageAccessibleWrap
 {
 public:
   HTMLImageMapAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // nsISupports and cycle collector
   NS_DECL_ISUPPORTS_INHERITED
 
   // Accessible
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
+  virtual a11y::role NativeRole() override;
 
   // HyperLinkAccessible
-  virtual uint32_t AnchorCount() MOZ_OVERRIDE;
-  virtual Accessible* AnchorAt(uint32_t aAnchorIndex) MOZ_OVERRIDE;
-  virtual already_AddRefed<nsIURI> AnchorURIAt(uint32_t aAnchorIndex) MOZ_OVERRIDE;
+  virtual uint32_t AnchorCount() override;
+  virtual Accessible* AnchorAt(uint32_t aAnchorIndex) override;
+  virtual already_AddRefed<nsIURI> AnchorURIAt(uint32_t aAnchorIndex) override;
 
   /**
    * Update area children of the image map.
    */
   void UpdateChildAreas(bool aDoFireEvents = true);
 
   /**
    * Return accessible of child node.
    */
   Accessible* GetChildAccessibleFor(const nsINode* aNode) const;
 
 protected:
   virtual ~HTMLImageMapAccessible() { }
 
   // Accessible
-  virtual void CacheChildren() MOZ_OVERRIDE;
+  virtual void CacheChildren() override;
 };
 
 /**
  * Accessible for image map areas - must be child of image.
  */
-class HTMLAreaAccessible MOZ_FINAL : public HTMLLinkAccessible
+class HTMLAreaAccessible final : public HTMLLinkAccessible
 {
 public:
 
   HTMLAreaAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual void Description(nsString& aDescription) MOZ_OVERRIDE;
+  virtual void Description(nsString& aDescription) override;
   virtual Accessible* ChildAtPoint(int32_t aX, int32_t aY,
-                                   EWhichChildAtPoint aWhichChild) MOZ_OVERRIDE;
-  virtual nsRect RelativeBounds(nsIFrame** aBoundingFrame) const MOZ_OVERRIDE;
+                                   EWhichChildAtPoint aWhichChild) override;
+  virtual nsRect RelativeBounds(nsIFrame** aBoundingFrame) const override;
 
   // HyperLinkAccessible
-  virtual uint32_t StartOffset() MOZ_OVERRIDE;
-  virtual uint32_t EndOffset() MOZ_OVERRIDE;
+  virtual uint32_t StartOffset() override;
+  virtual uint32_t EndOffset() override;
 
 protected:
   // Accessible
-  virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE;
-  virtual void CacheChildren() MOZ_OVERRIDE;
+  virtual ENameValueFlag NativeName(nsString& aName) override;
+  virtual void CacheChildren() override;
 };
 
 
 ////////////////////////////////////////////////////////////////////////////////
 // Accessible downcasting method
 
 inline HTMLImageMapAccessible*
 Accessible::AsImageMap()
--- a/accessible/html/HTMLLinkAccessible.h
+++ b/accessible/html/HTMLLinkAccessible.h
@@ -14,30 +14,30 @@ namespace a11y {
 class HTMLLinkAccessible : public HyperTextAccessibleWrap
 {
 public:
   HTMLLinkAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // Accessible
-  virtual void Value(nsString& aValue) MOZ_OVERRIDE;
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
-  virtual uint64_t NativeLinkState() const MOZ_OVERRIDE;
-  virtual uint64_t NativeInteractiveState() const MOZ_OVERRIDE;
+  virtual void Value(nsString& aValue) override;
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
+  virtual uint64_t NativeLinkState() const override;
+  virtual uint64_t NativeInteractiveState() const override;
 
   // ActionAccessible
-  virtual uint8_t ActionCount() MOZ_OVERRIDE;
-  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) MOZ_OVERRIDE;
-  virtual bool DoAction(uint8_t aIndex) MOZ_OVERRIDE;
+  virtual uint8_t ActionCount() override;
+  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
+  virtual bool DoAction(uint8_t aIndex) override;
 
   // HyperLinkAccessible
-  virtual bool IsLink() MOZ_OVERRIDE;
-  virtual already_AddRefed<nsIURI> AnchorURIAt(uint32_t aAnchorIndex) MOZ_OVERRIDE;
+  virtual bool IsLink() override;
+  virtual already_AddRefed<nsIURI> AnchorURIAt(uint32_t aAnchorIndex) override;
 
 protected:
   virtual ~HTMLLinkAccessible() {}
 
   enum { eAction_Jump = 0 };
 
   /**
    * Returns true if the link has href attribute.
--- a/accessible/html/HTMLListAccessible.h
+++ b/accessible/html/HTMLListAccessible.h
@@ -23,18 +23,18 @@ class HTMLListAccessible : public HyperT
 public:
   HTMLListAccessible(nsIContent* aContent, DocAccessible* aDoc) :
     HyperTextAccessibleWrap(aContent, aDoc) { mGenericTypes |= eList; }
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // Accessible
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
 
 protected:
   virtual ~HTMLListAccessible() { }
 };
 
 
 /**
  * Used for HTML list item (e.g. HTML li).
@@ -43,52 +43,52 @@ class HTMLLIAccessible : public HyperTex
 {
 public:
   HTMLLIAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // Accessible
-  virtual void Shutdown() MOZ_OVERRIDE;
-  virtual nsIntRect Bounds() const MOZ_OVERRIDE;
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
+  virtual void Shutdown() override;
+  virtual nsIntRect Bounds() const override;
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
 
   // HTMLLIAccessible
   HTMLListBulletAccessible* Bullet() const { return mBullet; }
   void UpdateBullet(bool aHasBullet);
 
 protected:
   virtual ~HTMLLIAccessible() { }
 
   // Accessible
-  virtual void CacheChildren() MOZ_OVERRIDE;
+  virtual void CacheChildren() override;
 
 private:
   nsRefPtr<HTMLListBulletAccessible> mBullet;
 };
 
 
 /**
  * Used for bullet of HTML list item element (for example, HTML li).
  */
 class HTMLListBulletAccessible : public LeafAccessible
 {
 public:
   HTMLListBulletAccessible(nsIContent* aContent, DocAccessible* aDoc);
   virtual ~HTMLListBulletAccessible() { }
 
   // Accessible
-  virtual nsIFrame* GetFrame() const MOZ_OVERRIDE;
-  virtual ENameValueFlag Name(nsString& aName) MOZ_OVERRIDE;
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
+  virtual nsIFrame* GetFrame() const override;
+  virtual ENameValueFlag Name(nsString& aName) override;
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
   virtual void AppendTextTo(nsAString& aText, uint32_t aStartOffset = 0,
-                            uint32_t aLength = UINT32_MAX) MOZ_OVERRIDE;
+                            uint32_t aLength = UINT32_MAX) override;
 
   // HTMLListBulletAccessible
 
   /**
    * Return true if the bullet is inside of list item element boundaries.
    */
   bool IsInside() const;
 };
--- a/accessible/html/HTMLSelectAccessible.h
+++ b/accessible/html/HTMLSelectAccessible.h
@@ -34,67 +34,67 @@ namespace a11y {
 class HTMLSelectListAccessible : public AccessibleWrap
 {
 public:
 
   HTMLSelectListAccessible(nsIContent* aContent, DocAccessible* aDoc);
   virtual ~HTMLSelectListAccessible() {}
 
   // Accessible
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
 
   // SelectAccessible
-  virtual bool SelectAll() MOZ_OVERRIDE;
-  virtual bool UnselectAll() MOZ_OVERRIDE;
+  virtual bool SelectAll() override;
+  virtual bool UnselectAll() override;
 
   // Widgets
-  virtual bool IsWidget() const MOZ_OVERRIDE;
-  virtual bool IsActiveWidget() const MOZ_OVERRIDE;
-  virtual bool AreItemsOperable() const MOZ_OVERRIDE;
-  virtual Accessible* CurrentItem() MOZ_OVERRIDE;
-  virtual void SetCurrentItem(Accessible* aItem) MOZ_OVERRIDE;
+  virtual bool IsWidget() const override;
+  virtual bool IsActiveWidget() const override;
+  virtual bool AreItemsOperable() const override;
+  virtual Accessible* CurrentItem() override;
+  virtual void SetCurrentItem(Accessible* aItem) override;
 
 protected:
 
   // Accessible
-  virtual void CacheChildren() MOZ_OVERRIDE;
+  virtual void CacheChildren() override;
 };
 
 /*
  * Options inside the select, contained within the list
  */
 class HTMLSelectOptionAccessible : public HyperTextAccessibleWrap
 {
 public:
   enum { eAction_Select = 0 };
 
   HTMLSelectOptionAccessible(nsIContent* aContent, DocAccessible* aDoc);
   virtual ~HTMLSelectOptionAccessible() {}
 
   // Accessible
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
-  virtual uint64_t NativeInteractiveState() const MOZ_OVERRIDE;
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
+  virtual uint64_t NativeInteractiveState() const override;
 
-  virtual int32_t GetLevelInternal() MOZ_OVERRIDE;
-  virtual nsRect RelativeBounds(nsIFrame** aBoundingFrame) const MOZ_OVERRIDE;
-  virtual void SetSelected(bool aSelect) MOZ_OVERRIDE;
+  virtual int32_t GetLevelInternal() override;
+  virtual nsRect RelativeBounds(nsIFrame** aBoundingFrame) const override;
+  virtual void SetSelected(bool aSelect) override;
 
   // ActionAccessible
-  virtual uint8_t ActionCount() MOZ_OVERRIDE;
-  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) MOZ_OVERRIDE;
-  virtual bool DoAction(uint8_t aIndex) MOZ_OVERRIDE;
+  virtual uint8_t ActionCount() override;
+  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
+  virtual bool DoAction(uint8_t aIndex) override;
 
   // Widgets
-  virtual Accessible* ContainerWidget() const MOZ_OVERRIDE;
+  virtual Accessible* ContainerWidget() const override;
 
 protected:
   // Accessible
-  virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE;
+  virtual ENameValueFlag NativeName(nsString& aName) override;
 
 private:
 
   /**
    * Return a select accessible the option belongs to if any.
    */
   Accessible* GetSelect() const
   {
@@ -136,66 +136,66 @@ class HTMLSelectOptGroupAccessible : pub
 public:
 
   HTMLSelectOptGroupAccessible(nsIContent* aContent, DocAccessible* aDoc) :
     HTMLSelectOptionAccessible(aContent, aDoc)
     { mType = eHTMLOptGroupType; }
   virtual ~HTMLSelectOptGroupAccessible() {}
 
   // Accessible
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeInteractiveState() const MOZ_OVERRIDE;
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeInteractiveState() const override;
 
   // ActionAccessible
-  virtual uint8_t ActionCount() MOZ_OVERRIDE;
-  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) MOZ_OVERRIDE;
-  virtual bool DoAction(uint8_t aIndex) MOZ_OVERRIDE;
+  virtual uint8_t ActionCount() override;
+  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
+  virtual bool DoAction(uint8_t aIndex) override;
 };
 
 /** ------------------------------------------------------ */
 /**  Finally, the Combobox widgets                         */
 /** ------------------------------------------------------ */
 
 class HTMLComboboxListAccessible;
 
 /*
  * A class the represents the HTML Combobox widget.
  */
-class HTMLComboboxAccessible MOZ_FINAL : public AccessibleWrap
+class HTMLComboboxAccessible final : public AccessibleWrap
 {
 public:
   enum { eAction_Click = 0 };
 
   HTMLComboboxAccessible(nsIContent* aContent, DocAccessible* aDoc);
   virtual ~HTMLComboboxAccessible() {}
 
   // Accessible
-  virtual void Shutdown() MOZ_OVERRIDE;
-  virtual void Description(nsString& aDescription) MOZ_OVERRIDE;
-  virtual void Value(nsString& aValue) MOZ_OVERRIDE;
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
-  virtual void InvalidateChildren() MOZ_OVERRIDE;
-  virtual bool RemoveChild(Accessible* aChild) MOZ_OVERRIDE;
+  virtual void Shutdown() override;
+  virtual void Description(nsString& aDescription) override;
+  virtual void Value(nsString& aValue) override;
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
+  virtual void InvalidateChildren() override;
+  virtual bool RemoveChild(Accessible* aChild) override;
 
   // ActionAccessible
-  virtual uint8_t ActionCount() MOZ_OVERRIDE;
-  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) MOZ_OVERRIDE;
-  virtual bool DoAction(uint8_t aIndex) MOZ_OVERRIDE;
+  virtual uint8_t ActionCount() override;
+  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
+  virtual bool DoAction(uint8_t aIndex) override;
 
   // Widgets
-  virtual bool IsWidget() const MOZ_OVERRIDE;
-  virtual bool IsActiveWidget() const MOZ_OVERRIDE;
-  virtual bool AreItemsOperable() const MOZ_OVERRIDE;
-  virtual Accessible* CurrentItem() MOZ_OVERRIDE;
-  virtual void SetCurrentItem(Accessible* aItem) MOZ_OVERRIDE;
+  virtual bool IsWidget() const override;
+  virtual bool IsActiveWidget() const override;
+  virtual bool AreItemsOperable() const override;
+  virtual Accessible* CurrentItem() override;
+  virtual void SetCurrentItem(Accessible* aItem) override;
 
 protected:
   // Accessible
-  virtual void CacheChildren() MOZ_OVERRIDE;
+  virtual void CacheChildren() override;
 
   /**
    * Return selected option.
    */
   Accessible* SelectedOption() const;
 
 private:
   nsRefPtr<HTMLComboboxListAccessible> mListAccessible;
@@ -210,22 +210,22 @@ class HTMLComboboxListAccessible : publi
 {
 public:
 
   HTMLComboboxListAccessible(Accessible* aParent, nsIContent* aContent,
                              DocAccessible* aDoc);
   virtual ~HTMLComboboxListAccessible() {}
 
   // Accessible
-  virtual nsIFrame* GetFrame() const MOZ_OVERRIDE;
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
-  virtual nsRect RelativeBounds(nsIFrame** aBoundingFrame) const MOZ_OVERRIDE;
+  virtual nsIFrame* GetFrame() const override;
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
+  virtual nsRect RelativeBounds(nsIFrame** aBoundingFrame) const override;
 
   // Widgets
-  virtual bool IsActiveWidget() const MOZ_OVERRIDE;
-  virtual bool AreItemsOperable() const MOZ_OVERRIDE;
+  virtual bool IsActiveWidget() const override;
+  virtual bool AreItemsOperable() const override;
 };
 
 } // namespace a11y
 } // namespace mozilla
 
 #endif
--- a/accessible/html/HTMLTableAccessible.h
+++ b/accessible/html/HTMLTableAccessible.h
@@ -24,31 +24,31 @@ class HTMLTableCellAccessible : public H
 {
 public:
   HTMLTableCellAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // Accessible
-  virtual TableCellAccessible* AsTableCell() MOZ_OVERRIDE { return this; }
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
-  virtual uint64_t NativeInteractiveState() const MOZ_OVERRIDE;
-  virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() MOZ_OVERRIDE;
+  virtual TableCellAccessible* AsTableCell() override { return this; }
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
+  virtual uint64_t NativeInteractiveState() const override;
+  virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() override;
 
   // TableCellAccessible
-  virtual TableAccessible* Table() const MOZ_OVERRIDE;
-  virtual uint32_t ColIdx() const MOZ_OVERRIDE;
-  virtual uint32_t RowIdx() const MOZ_OVERRIDE;
-  virtual uint32_t ColExtent() const MOZ_OVERRIDE;
-  virtual uint32_t RowExtent() const MOZ_OVERRIDE;
-  virtual void ColHeaderCells(nsTArray<Accessible*>* aCells) MOZ_OVERRIDE;
-  virtual void RowHeaderCells(nsTArray<Accessible*>* aCells) MOZ_OVERRIDE;
-  virtual bool Selected() MOZ_OVERRIDE;
+  virtual TableAccessible* Table() const override;
+  virtual uint32_t ColIdx() const override;
+  virtual uint32_t RowIdx() const override;
+  virtual uint32_t ColExtent() const override;
+  virtual uint32_t RowExtent() const override;
+  virtual void ColHeaderCells(nsTArray<Accessible*>* aCells) override;
+  virtual void RowHeaderCells(nsTArray<Accessible*>* aCells) override;
+  virtual bool Selected() override;
 
 protected:
   virtual ~HTMLTableCellAccessible() {}
 
   /**
    * Return nsITableCellLayout of the table cell frame.
    */
   nsITableCellLayout* GetCellLayout() const;
@@ -64,17 +64,17 @@ protected:
  * HTML table row/column header accessible (html:th or html:td@scope).
  */
 class HTMLTableHeaderCellAccessible : public HTMLTableCellAccessible
 {
 public:
   HTMLTableHeaderCellAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
+  virtual a11y::role NativeRole() override;
 };
 
 
 /**
  * HTML table row accessible (html:tr).
  */
 class HTMLTableRowAccessible : public AccessibleWrap
 {
@@ -84,17 +84,17 @@ public:
   {
     mType = eHTMLTableRowType;
     mGenericTypes |= eTableRow;
   }
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // Accessible
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
+  virtual a11y::role NativeRole() override;
 
 protected:
   virtual ~HTMLTableRowAccessible() { }
 };
 
 
 /**
  * HTML table accessible (html:table).
@@ -114,59 +114,59 @@ public:
   {
     mType = eHTMLTableType;
     mGenericTypes |= eTable;
   }
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // TableAccessible
-  virtual Accessible* Caption() const MOZ_OVERRIDE;
-  virtual void Summary(nsString& aSummary) MOZ_OVERRIDE;
-  virtual uint32_t ColCount() MOZ_OVERRIDE;
-  virtual uint32_t RowCount() MOZ_OVERRIDE;
-  virtual Accessible* CellAt(uint32_t aRowIndex, uint32_t aColumnIndex) MOZ_OVERRIDE;
-  virtual int32_t CellIndexAt(uint32_t aRowIdx, uint32_t aColIdx) MOZ_OVERRIDE;
-  virtual int32_t ColIndexAt(uint32_t aCellIdx) MOZ_OVERRIDE;
-  virtual int32_t RowIndexAt(uint32_t aCellIdx) MOZ_OVERRIDE;
+  virtual Accessible* Caption() const override;
+  virtual void Summary(nsString& aSummary) override;
+  virtual uint32_t ColCount() override;
+  virtual uint32_t RowCount() override;
+  virtual Accessible* CellAt(uint32_t aRowIndex, uint32_t aColumnIndex) override;
+  virtual int32_t CellIndexAt(uint32_t aRowIdx, uint32_t aColIdx) override;
+  virtual int32_t ColIndexAt(uint32_t aCellIdx) override;
+  virtual int32_t RowIndexAt(uint32_t aCellIdx) override;
   virtual void RowAndColIndicesAt(uint32_t aCellIdx, int32_t* aRowIdx,
-                                  int32_t* aColIdx) MOZ_OVERRIDE;
-  virtual uint32_t ColExtentAt(uint32_t aRowIdx, uint32_t aColIdx) MOZ_OVERRIDE;
-  virtual uint32_t RowExtentAt(uint32_t aRowIdx, uint32_t aColIdx) MOZ_OVERRIDE;
-  virtual bool IsColSelected(uint32_t aColIdx) MOZ_OVERRIDE;
-  virtual bool IsRowSelected(uint32_t aRowIdx) MOZ_OVERRIDE;
-  virtual bool IsCellSelected(uint32_t aRowIdx, uint32_t aColIdx) MOZ_OVERRIDE;
-  virtual uint32_t SelectedCellCount() MOZ_OVERRIDE;
-  virtual uint32_t SelectedColCount() MOZ_OVERRIDE;
-  virtual uint32_t SelectedRowCount() MOZ_OVERRIDE;
-  virtual void SelectedCells(nsTArray<Accessible*>* aCells) MOZ_OVERRIDE;
-  virtual void SelectedCellIndices(nsTArray<uint32_t>* aCells) MOZ_OVERRIDE;
-  virtual void SelectedColIndices(nsTArray<uint32_t>* aCols) MOZ_OVERRIDE;
-  virtual void SelectedRowIndices(nsTArray<uint32_t>* aRows) MOZ_OVERRIDE;
-  virtual void SelectCol(uint32_t aColIdx) MOZ_OVERRIDE;
-  virtual void SelectRow(uint32_t aRowIdx) MOZ_OVERRIDE;
-  virtual void UnselectCol(uint32_t aColIdx) MOZ_OVERRIDE;
-  virtual void UnselectRow(uint32_t aRowIdx) MOZ_OVERRIDE;
-  virtual bool IsProbablyLayoutTable() MOZ_OVERRIDE;
-  virtual Accessible* AsAccessible() MOZ_OVERRIDE { return this; }
+                                  int32_t* aColIdx) override;
+  virtual uint32_t ColExtentAt(uint32_t aRowIdx, uint32_t aColIdx) override;
+  virtual uint32_t RowExtentAt(uint32_t aRowIdx, uint32_t aColIdx) override;
+  virtual bool IsColSelected(uint32_t aColIdx) override;
+  virtual bool IsRowSelected(uint32_t aRowIdx) override;
+  virtual bool IsCellSelected(uint32_t aRowIdx, uint32_t aColIdx) override;
+  virtual uint32_t SelectedCellCount() override;
+  virtual uint32_t SelectedColCount() override;
+  virtual uint32_t SelectedRowCount() override;
+  virtual void SelectedCells(nsTArray<Accessible*>* aCells) override;
+  virtual void SelectedCellIndices(nsTArray<uint32_t>* aCells) override;
+  virtual void SelectedColIndices(nsTArray<uint32_t>* aCols) override;
+  virtual void SelectedRowIndices(nsTArray<uint32_t>* aRows) override;
+  virtual void SelectCol(uint32_t aColIdx) override;
+  virtual void SelectRow(uint32_t aRowIdx) override;
+  virtual void UnselectCol(uint32_t aColIdx) override;
+  virtual void UnselectRow(uint32_t aRowIdx) override;
+  virtual bool IsProbablyLayoutTable() override;
+  virtual Accessible* AsAccessible() override { return this; }
 
   // Accessible
-  virtual TableAccessible* AsTable() MOZ_OVERRIDE { return this; }
-  virtual void Description(nsString& aDescription) MOZ_OVERRIDE;
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
-  virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() MOZ_OVERRIDE;
-  virtual Relation RelationByType(RelationType aRelationType) MOZ_OVERRIDE;
+  virtual TableAccessible* AsTable() override { return this; }
+  virtual void Description(nsString& aDescription) override;
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
+  virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() override;
+  virtual Relation RelationByType(RelationType aRelationType) override;
 
 protected:
   virtual ~HTMLTableAccessible() {}
 
   // Accessible
-  virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE;
-  virtual void CacheChildren() MOZ_OVERRIDE;
+  virtual ENameValueFlag NativeName(nsString& aName) override;
+  virtual void CacheChildren() override;
 
   // HTMLTableAccessible
 
   /**
    * Add row or column to selection.
    *
    * @param aIndex   [in] index of row or column to be selected
    * @param aTarget  [in] indicates what should be selected, either row or column
@@ -206,18 +206,18 @@ protected:
  */
 class HTMLCaptionAccessible : public HyperTextAccessibleWrap
 {
 public:
   HTMLCaptionAccessible(nsIContent* aContent, DocAccessible* aDoc) :
     HyperTextAccessibleWrap(aContent, aDoc) { }
 
   // Accessible
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual Relation RelationByType(RelationType aRelationType) MOZ_OVERRIDE;
+  virtual a11y::role NativeRole() override;
+  virtual Relation RelationByType(RelationType aRelationType) override;
 
 protected:
   virtual ~HTMLCaptionAccessible() { }
 };
 
 } // namespace a11y
 } // namespace mozilla
 
--- a/accessible/ipc/DocAccessibleChild.h
+++ b/accessible/ipc/DocAccessibleChild.h
@@ -37,157 +37,157 @@ public:
   Accessible* IdToAccessible(const uint64_t& aID);
   HyperTextAccessible* IdToHyperTextAccessible(const uint64_t& aID);
 
   void ShowEvent(AccShowEvent* aShowEvent);
 
   /*
    * Return the state for the accessible with given ID.
    */
-  virtual bool RecvState(const uint64_t& aID, uint64_t* aState) MOZ_OVERRIDE;
+  virtual bool RecvState(const uint64_t& aID, uint64_t* aState) override;
 
   /*
    * Get the name for the accessible with given id.
    */
-  virtual bool RecvName(const uint64_t& aID, nsString* aName) MOZ_OVERRIDE;
+  virtual bool RecvName(const uint64_t& aID, nsString* aName) override;
 
-  virtual bool RecvValue(const uint64_t& aID, nsString* aValue) MOZ_OVERRIDE;
+  virtual bool RecvValue(const uint64_t& aID, nsString* aValue) override;
   
   /*
    * Get the description for the accessible with given id.
    */
-  virtual bool RecvDescription(const uint64_t& aID, nsString* aDesc) MOZ_OVERRIDE;
+  virtual bool RecvDescription(const uint64_t& aID, nsString* aDesc) override;
   virtual bool RecvRelationByType(const uint64_t& aID, const uint32_t& aType,
-                                  nsTArray<uint64_t>* aTargets) MOZ_OVERRIDE;
+                                  nsTArray<uint64_t>* aTargets) override;
   virtual bool RecvRelations(const uint64_t& aID,
                              nsTArray<RelationTargets>* aRelations)
-    MOZ_OVERRIDE;
+    override;
 
   virtual bool RecvAttributes(const uint64_t& aID,
-                              nsTArray<Attribute> *aAttributes) MOZ_OVERRIDE;
+                              nsTArray<Attribute> *aAttributes) override;
 
   virtual bool RecvCaretOffset(const uint64_t& aID, int32_t* aOffset)
-    MOZ_OVERRIDE;
+    override;
   virtual bool RecvSetCaretOffset(const uint64_t& aID, const int32_t& aOffset,
-                                  bool* aValid) MOZ_OVERRIDE;
+                                  bool* aValid) override;
 
   virtual bool RecvCharacterCount(const uint64_t& aID, int32_t* aCount)
-     MOZ_OVERRIDE;
+     override;
   virtual bool RecvSelectionCount(const uint64_t& aID, int32_t* aCount)
-     MOZ_OVERRIDE;
+     override;
 
   virtual bool RecvTextSubstring(const uint64_t& aID,
                                  const int32_t& aStartOffset,
                                  const int32_t& aEndOffset, nsString* aText)
-    MOZ_OVERRIDE;
+    override;
 
   virtual bool RecvGetTextAfterOffset(const uint64_t& aID,
                                       const int32_t& aOffset,
                                       const int32_t& aBoundaryType,
                                       nsString* aText, int32_t* aStartOffset,
-                                      int32_t* aEndOffset) MOZ_OVERRIDE;
+                                      int32_t* aEndOffset) override;
   virtual bool RecvGetTextAtOffset(const uint64_t& aID,
                                    const int32_t& aOffset,
                                    const int32_t& aBoundaryType,
                                    nsString* aText, int32_t* aStartOffset,
-                                   int32_t* aEndOffset) MOZ_OVERRIDE;
+                                   int32_t* aEndOffset) override;
   virtual bool RecvGetTextBeforeOffset(const uint64_t& aID,
                                        const int32_t& aOffset,
                                        const int32_t& aBoundaryType,
                                        nsString* aText, int32_t* aStartOffset,
-                                       int32_t* aEndOffset) MOZ_OVERRIDE;
+                                       int32_t* aEndOffset) override;
 
   virtual bool RecvCharAt(const uint64_t& aID,
                           const int32_t& aOffset,
-                          uint16_t* aChar) MOZ_OVERRIDE;
+                          uint16_t* aChar) override;
 
   virtual bool RecvTextAttributes(const uint64_t& aID,
                                   const bool& aIncludeDefAttrs,
                                   const int32_t& aOffset,
                                   nsTArray<Attribute>* aAttributes,
                                   int32_t* aStartOffset,
                                   int32_t* aEndOffset)
-    MOZ_OVERRIDE;
+    override;
 
   virtual bool RecvDefaultTextAttributes(const uint64_t& aID,
                                          nsTArray<Attribute>* aAttributes)
-    MOZ_OVERRIDE;
+    override;
 
   virtual bool RecvTextBounds(const uint64_t& aID,
                               const int32_t& aStartOffset,
                               const int32_t& aEndOffset,
                               const uint32_t& aCoordType,
-                              nsIntRect* aRetVal) MOZ_OVERRIDE;
+                              nsIntRect* aRetVal) override;
 
   virtual bool RecvCharBounds(const uint64_t& aID,
                               const int32_t& aOffset,
                               const uint32_t& aCoordType,
-                              nsIntRect* aRetVal) MOZ_OVERRIDE;
+                              nsIntRect* aRetVal) override;
 
   virtual bool RecvOffsetAtPoint(const uint64_t& aID,
                                  const int32_t& aX,
                                  const int32_t& aY,
                                  const uint32_t& aCoordType,
-                                 int32_t* aRetVal) MOZ_OVERRIDE;
+                                 int32_t* aRetVal) override;
 
   virtual bool RecvSelectionBoundsAt(const uint64_t& aID,
                                      const int32_t& aSelectionNum,
                                      bool* aSucceeded,
                                      nsString* aData,
                                      int32_t* aStartOffset,
-                                     int32_t* aEndOffset) MOZ_OVERRIDE;
+                                     int32_t* aEndOffset) override;
 
   virtual bool RecvSetSelectionBoundsAt(const uint64_t& aID,
                                         const int32_t& aSelectionNum,
                                         const int32_t& aStartOffset,
                                         const int32_t& aEndOffset,
-                                        bool* aSucceeded) MOZ_OVERRIDE;
+                                        bool* aSucceeded) override;
 
   virtual bool RecvAddToSelection(const uint64_t& aID,
                                   const int32_t& aStartOffset,
                                   const int32_t& aEndOffset,
-                                  bool* aSucceeded) MOZ_OVERRIDE;
+                                  bool* aSucceeded) override;
 
   virtual bool RecvRemoveFromSelection(const uint64_t& aID,
                                        const int32_t& aSelectionNum,
-                                       bool* aSucceeded) MOZ_OVERRIDE;
+                                       bool* aSucceeded) override;
 
   virtual bool RecvScrollSubstringTo(const uint64_t& aID,
                                      const int32_t& aStartOffset,
                                      const int32_t& aEndOffset,
-                                     const uint32_t& aScrollType) MOZ_OVERRIDE;
+                                     const uint32_t& aScrollType) override;
 
   virtual bool RecvScrollSubstringToPoint(const uint64_t& aID,
                                           const int32_t& aStartOffset,
                                           const int32_t& aEndOffset,
                                           const uint32_t& aCoordinateType,
                                           const int32_t& aX,
-                                          const int32_t& aY) MOZ_OVERRIDE;
+                                          const int32_t& aY) override;
 
   virtual bool RecvReplaceText(const uint64_t& aID,
-                               const nsString& aText) MOZ_OVERRIDE;
+                               const nsString& aText) override;
 
   virtual bool RecvInsertText(const uint64_t& aID,
                               const nsString& aText,
-                              const int32_t& aPosition) MOZ_OVERRIDE;
+                              const int32_t& aPosition) override;
 
   virtual bool RecvCopyText(const uint64_t& aID,
                             const int32_t& aStartPos,
-                            const int32_t& aEndPos) MOZ_OVERRIDE;
+                            const int32_t& aEndPos) override;
 
   virtual bool RecvCutText(const uint64_t& aID,
                            const int32_t& aStartPos,
-                           const int32_t& aEndPos) MOZ_OVERRIDE;
+                           const int32_t& aEndPos) override;
 
   virtual bool RecvDeleteText(const uint64_t& aID,
                               const int32_t& aStartPos,
-                              const int32_t& aEndPos) MOZ_OVERRIDE;
+                              const int32_t& aEndPos) override;
 
   virtual bool RecvPasteText(const uint64_t& aID,
-                             const int32_t& aPosition) MOZ_OVERRIDE;
+                             const int32_t& aPosition) override;
 
 private:
   bool PersistentPropertiesToArray(nsIPersistentProperties* aProps,
                                    nsTArray<Attribute>* aAttributes);
 
   DocAccessible* mDoc;
 };
 
--- a/accessible/ipc/DocAccessibleParent.h
+++ b/accessible/ipc/DocAccessibleParent.h
@@ -35,23 +35,23 @@ public:
     MOZ_ASSERT(!mParentDoc);
   }
 
   /*
    * Called when a message from a document in a child process notifies the main
    * process it is firing an event.
    */
   virtual bool RecvEvent(const uint64_t& aID, const uint32_t& aType)
-    MOZ_OVERRIDE;
+    override;
 
-  virtual bool RecvShowEvent(const ShowEventData& aData) MOZ_OVERRIDE;
-  virtual bool RecvHideEvent(const uint64_t& aRootID) MOZ_OVERRIDE;
+  virtual bool RecvShowEvent(const ShowEventData& aData) override;
+  virtual bool RecvHideEvent(const uint64_t& aRootID) override;
 
   void Destroy();
-  virtual void ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE
+  virtual void ActorDestroy(ActorDestroyReason aWhy) override
   {
     if (!mShutdown)
       Destroy();
   }
 
   /*
    * Return the main processes representation of the parent document (if any)
    * of the document this object represents.
--- a/accessible/mac/AccessibleWrap.h
+++ b/accessible/mac/AccessibleWrap.h
@@ -31,32 +31,32 @@ class AccessibleWrap : public Accessible
 {
 public: // construction, destruction
   AccessibleWrap(nsIContent* aContent, DocAccessible* aDoc);
   virtual ~AccessibleWrap();
 
   /**
    * Get the native Obj-C object (mozAccessible).
    */
-  virtual void GetNativeInterface(void** aOutAccessible) MOZ_OVERRIDE;
+  virtual void GetNativeInterface(void** aOutAccessible) override;
 
   /**
    * The objective-c |Class| type that this accessible's native object
    * should be instantied with.   used on runtime to determine the
    * right type for this accessible's associated native object.
    */
   virtual Class GetNativeType ();
 
-  virtual void Shutdown () MOZ_OVERRIDE;
-  virtual void InvalidateChildren() MOZ_OVERRIDE;
+  virtual void Shutdown () override;
+  virtual void InvalidateChildren() override;
 
-  virtual bool InsertChildAt(uint32_t aIdx, Accessible* aChild) MOZ_OVERRIDE;
-  virtual bool RemoveChild(Accessible* aAccessible) MOZ_OVERRIDE;
+  virtual bool InsertChildAt(uint32_t aIdx, Accessible* aChild) override;
+  virtual bool RemoveChild(Accessible* aAccessible) override;
 
-  virtual nsresult HandleAccEvent(AccEvent* aEvent) MOZ_OVERRIDE;
+  virtual nsresult HandleAccEvent(AccEvent* aEvent) override;
 
   /**
    * Ignored means that the accessible might still have children, but is not
    * displayed to the user. it also has no native accessible object represented
    * for it.
    */
   bool IsIgnored();
   
--- a/accessible/windows/ia2/ia2AccessibleRelation.h
+++ b/accessible/windows/ia2/ia2AccessibleRelation.h
@@ -14,17 +14,17 @@
 #include <utility>
 #include "nsTArray.h"
 
 #include "AccessibleRelation.h"
 
 namespace mozilla {
 namespace a11y {
 
-class ia2AccessibleRelation MOZ_FINAL : public IAccessibleRelation
+class ia2AccessibleRelation final : public IAccessibleRelation
 {
 public:
   ia2AccessibleRelation(RelationType aType, Relation* aRel);
 
   ia2AccessibleRelation(RelationType aType,
                         nsTArray<nsRefPtr<Accessible>>&& aTargets) :
     mType(aType), mTargets(Move(aTargets)) {}
 
--- a/accessible/windows/msaa/ARIAGridAccessibleWrap.h
+++ b/accessible/windows/msaa/ARIAGridAccessibleWrap.h
@@ -29,17 +29,17 @@ public:
     ARIAGridAccessible(aContent, aDoc), ia2AccessibleTable(this) {}
 
   // IUnknown
   DECL_IUNKNOWN_INHERITED
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
-  virtual void Shutdown() MOZ_OVERRIDE;
+  virtual void Shutdown() override;
 };
 
 /**
  * IA2 wrapper class for ARIAGridCellAccessible implementing
  * IAccessibleTableCell interface.
  */
 class ARIAGridCellAccessibleWrap : public ARIAGridCellAccessible,
                                    public ia2AccessibleTableCell
@@ -51,15 +51,15 @@ public:
     ARIAGridCellAccessible(aContent, aDoc), ia2AccessibleTableCell(this) {}
 
   // IUnknown
   DECL_IUNKNOWN_INHERITED
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
-  virtual void Shutdown() MOZ_OVERRIDE;
+  virtual void Shutdown() override;
 };
 
 } // namespace a11y
 } // namespace mozilla
 
 #endif
--- a/accessible/windows/msaa/AccessibleWrap.cpp
+++ b/accessible/windows/msaa/AccessibleWrap.cpp
@@ -652,17 +652,17 @@ AccessibleWrap::get_accFocus(
 
   A11Y_TRYBLOCK_END
 }
 
 /**
  * This helper class implements IEnumVARIANT for a nsTArray containing
  * accessible objects.
  */
-class AccessibleEnumerator MOZ_FINAL : public IEnumVARIANT
+class AccessibleEnumerator final : public IEnumVARIANT
 {
 public:
   AccessibleEnumerator(const nsTArray<Accessible*>& aArray) :
     mArray(aArray), mCurIndex(0) { }
   AccessibleEnumerator(const AccessibleEnumerator& toCopy) :
     mArray(toCopy.mArray), mCurIndex(toCopy.mCurIndex) { }
   ~AccessibleEnumerator() { }
 
--- a/accessible/windows/msaa/AccessibleWrap.h
+++ b/accessible/windows/msaa/AccessibleWrap.h
@@ -166,17 +166,17 @@ public: // construction, destruction
    */
   void UpdateSystemCaretFor(Accessible* aAccessible);
 
   /**
    * Find an accessible by the given child ID in cached documents.
    */
   Accessible* GetXPAccessibleFor(const VARIANT& aVarChild);
 
-  virtual void GetNativeInterface(void **aOutAccessible) MOZ_OVERRIDE;
+  virtual void GetNativeInterface(void **aOutAccessible) override;
 
   static IDispatch* NativeAccessible(Accessible* aAccessible);
 
 protected:
   virtual ~AccessibleWrap() { }
 
   /**
    * Creates ITypeInfo for LIBID_Accessibility if it's needed and returns it.
--- a/accessible/windows/msaa/ApplicationAccessibleWrap.h
+++ b/accessible/windows/msaa/ApplicationAccessibleWrap.h
@@ -20,17 +20,17 @@ class ApplicationAccessibleWrap: public 
 {
   ~ApplicationAccessibleWrap() {}
 
 public:
   // nsISupporst
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsAccessible
-  virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() MOZ_OVERRIDE;
+  virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() override;
 
   // IUnknown
   STDMETHODIMP QueryInterface(REFIID, void**);
 
   // IAccessibleApplication
   virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_appName(
             /* [retval][out] */ BSTR *name);
 
--- a/accessible/windows/msaa/EnumVariant.h
+++ b/accessible/windows/msaa/EnumVariant.h
@@ -11,17 +11,17 @@
 #include "IUnknownImpl.h"
 
 namespace mozilla {
 namespace a11y {
 
 /**
  * Used to fetch accessible children.
  */
-class ChildrenEnumVariant MOZ_FINAL : public IEnumVARIANT
+class ChildrenEnumVariant final : public IEnumVARIANT
 {
 public:
   ChildrenEnumVariant(AccessibleWrap* aAnchor) : mAnchorAcc(aAnchor),
     mCurAcc(mAnchorAcc->GetChildAt(0)), mCurIndex(0) { }
 
   // IUnknown
   DECL_IUNKNOWN
 
--- a/accessible/windows/msaa/HTMLTableAccessibleWrap.h
+++ b/accessible/windows/msaa/HTMLTableAccessibleWrap.h
@@ -30,17 +30,17 @@ public:
     HTMLTableAccessible(aContent, aDoc), ia2AccessibleTable(this)  {}
 
   // IUnknown
   DECL_IUNKNOWN_INHERITED
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
-  virtual void Shutdown() MOZ_OVERRIDE;
+  virtual void Shutdown() override;
 };
 
 
 /**
  * IA2 wrapper class for HTMLTableCellAccessible implementing
  * IAccessibleTableCell interface.
  */
 class HTMLTableCellAccessibleWrap : public HTMLTableCellAccessible,
@@ -53,17 +53,17 @@ public:
     HTMLTableCellAccessible(aContent, aDoc), ia2AccessibleTableCell(this) {}
 
   // IUnknown
   DECL_IUNKNOWN_INHERITED
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
-  virtual void Shutdown() MOZ_OVERRIDE;
+  virtual void Shutdown() override;
 };
 
 
 /**
  * IA2 wrapper class for HTMLTableHeaderCellAccessible implementing
  * IAccessibleTableCell interface.
  */
 class HTMLTableHeaderCellAccessibleWrap : public HTMLTableHeaderCellAccessible,
@@ -78,16 +78,16 @@ public:
   {}
 
   // IUnknown
   DECL_IUNKNOWN_INHERITED
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
-  virtual void Shutdown() MOZ_OVERRIDE;
+  virtual void Shutdown() override;
 };
 
 } // namespace a11y
 } // namespace mozilla
 
 #endif
 
--- a/accessible/windows/msaa/HTMLWin32ObjectAccessible.h
+++ b/accessible/windows/msaa/HTMLWin32ObjectAccessible.h
@@ -50,17 +50,17 @@ protected:
   *   from the windows system from the window handle.
   */
 class HTMLWin32ObjectAccessible : public DummyAccessible
 {
 public:
   HTMLWin32ObjectAccessible(void* aHwnd, DocAccessible* aDoc);
   virtual ~HTMLWin32ObjectAccessible() {}
 
-  virtual void GetNativeInterface(void** aNativeAccessible) MOZ_OVERRIDE;
+  virtual void GetNativeInterface(void** aNativeAccessible) override;
 
 protected:
   void* mHwnd;
 };
 
 } // namespace a11y
 } // namespace mozilla
 
--- a/accessible/windows/msaa/IUnknownImpl.h
+++ b/accessible/windows/msaa/IUnknownImpl.h
@@ -46,23 +46,23 @@ private:
 };
 
 } // namespace a11y
 } // namespace mozilla
 
 #define DECL_IUNKNOWN                                                          \
 public:                                                                        \
   virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID, void**);            \
-  virtual ULONG STDMETHODCALLTYPE AddRef() MOZ_FINAL                           \
+  virtual ULONG STDMETHODCALLTYPE AddRef() final                           \
   {                                                                            \
     MOZ_ASSERT(int32_t(mRefCnt) >= 0, "illegal refcnt");                       \
     ++mRefCnt;                                                                 \
     return mRefCnt;                                                            \
   }                                                                            \
-  virtual ULONG STDMETHODCALLTYPE Release() MOZ_FINAL                          \
+  virtual ULONG STDMETHODCALLTYPE Release() final                          \
   {                                                                            \
      MOZ_ASSERT(int32_t(mRefCnt) > 0, "dup release");                          \
      --mRefCnt;                                                                \
      if (mRefCnt)                                                              \
        return mRefCnt;                                                         \
                                                                                \
      delete this;                                                              \
      return 0;                                                                 \
--- a/accessible/windows/msaa/Platform.cpp
+++ b/accessible/windows/msaa/Platform.cpp
@@ -40,17 +40,17 @@ class ProxyAccessibleWrap : public Acces
   public:
   ProxyAccessibleWrap(ProxyAccessible* aProxy) :
     AccessibleWrap(nullptr, nullptr)
   {
     mType = eProxyType;
     mBits.proxy = aProxy;
   }
 
-  virtual void Shutdown() MOZ_OVERRIDE
+  virtual void Shutdown() override
   {
     mBits.proxy = nullptr;
   }
 };
 
 void
 a11y::ProxyCreated(ProxyAccessible* aProxy, uint32_t)
 {
--- a/accessible/windows/msaa/ServiceProvider.h
+++ b/accessible/windows/msaa/ServiceProvider.h
@@ -10,17 +10,17 @@
 #include <servprov.h>
 
 #include "AccessibleWrap.h"
 #include "IUnknownImpl.h"
 
 namespace mozilla {
 namespace a11y {
 
-class ServiceProvider MOZ_FINAL : public IServiceProvider
+class ServiceProvider final : public IServiceProvider
 {
 public:
   ServiceProvider(AccessibleWrap* aAcc) : mAccessible(aAcc) {}
   ~ServiceProvider() {}
 
   DECL_IUNKNOWN
 
   // IServiceProvider
--- a/accessible/windows/msaa/XULListboxAccessibleWrap.h
+++ b/accessible/windows/msaa/XULListboxAccessibleWrap.h
@@ -28,17 +28,17 @@ public:
     XULListboxAccessible(aContent, aDoc), ia2AccessibleTable(this) {}
 
   // IUnknown
   DECL_IUNKNOWN_INHERITED
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
-  virtual void Shutdown() MOZ_OVERRIDE;
+  virtual void Shutdown() override;
 };
 
 /**
  * IA2 wrapper class for XULListCellAccessible class, implements
  * IAccessibleTableCell interface.
  */
 class XULListCellAccessibleWrap : public XULListCellAccessible,
                                   public ia2AccessibleTableCell
@@ -50,15 +50,15 @@ public:
     XULListCellAccessible(aContent, aDoc), ia2AccessibleTableCell(this) {}
 
   // IUnknown
   DECL_IUNKNOWN_INHERITED
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
-  virtual void Shutdown() MOZ_OVERRIDE;
+  virtual void Shutdown() override;
 };
 
 } // namespace a11y
 } // namespace mozilla
 
 #endif
--- a/accessible/windows/msaa/XULTreeGridAccessibleWrap.h
+++ b/accessible/windows/msaa/XULTreeGridAccessibleWrap.h
@@ -29,17 +29,17 @@ public:
     XULTreeGridAccessible(aContent, aDoc, aTree), ia2AccessibleTable(this) {}
 
   // IUnknown
   DECL_IUNKNOWN_INHERITED
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
-  virtual void Shutdown() MOZ_OVERRIDE;
+  virtual void Shutdown() override;
 };
 
 /**
  * IA2 wrapper class for XULTreeGridCellAccessible class, implements
  * IAccessibleTableCell interface.
  */
 class XULTreeGridCellAccessibleWrap : public XULTreeGridCellAccessible,
                                       public ia2AccessibleTableCell
@@ -57,15 +57,15 @@ public:
                               aColumn), ia2AccessibleTableCell(this) {}
 
   // IUnknown
   DECL_IUNKNOWN_INHERITED
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
-  virtual void Shutdown() MOZ_OVERRIDE;
+  virtual void Shutdown() override;
 };
 
 } // namespace a11y
 } // namespace mozilla
 
 #endif
--- a/accessible/windows/sdn/sdnAccessible.h
+++ b/accessible/windows/sdn/sdnAccessible.h
@@ -11,17 +11,17 @@
 #include "AccessibleWrap.h"
 #include "IUnknownImpl.h"
 
 #include "mozilla/Attributes.h"
 
 namespace mozilla {
 namespace a11y {
 
-class sdnAccessible MOZ_FINAL : public ISimpleDOMNode
+class sdnAccessible final : public ISimpleDOMNode
 {
 public:
   sdnAccessible(nsINode* aNode) :
     mNode(aNode)
   {
     if (!mNode)
       MOZ_CRASH();
   }
--- a/accessible/windows/sdn/sdnDocAccessible.h
+++ b/accessible/windows/sdn/sdnDocAccessible.h
@@ -10,17 +10,17 @@
 #include "ISimpleDOMDocument.h"
 #include "IUnknownImpl.h"
 
 #include "DocAccessibleWrap.h"
 
 namespace mozilla {
 namespace a11y {
 
-class sdnDocAccessible MOZ_FINAL : public ISimpleDOMDocument
+class sdnDocAccessible final : public ISimpleDOMDocument
 {
 public:
   sdnDocAccessible(DocAccessibleWrap* aAccessible) : mAccessible(aAccessible) {};
   ~sdnDocAccessible() { };
 
   DECL_IUNKNOWN
 
   // ISimpleDOMDocument
--- a/accessible/windows/sdn/sdnTextAccessible.h
+++ b/accessible/windows/sdn/sdnTextAccessible.h
@@ -13,17 +13,17 @@
 #include "AccessibleWrap.h"
 
 class nsIFrame;
 struct nsPoint;
 
 namespace mozilla {
 namespace a11y {
  
-class sdnTextAccessible MOZ_FINAL : public ISimpleDOMText
+class sdnTextAccessible final : public ISimpleDOMText
 {
 public:
   sdnTextAccessible(AccessibleWrap* aAccessible) : mAccessible(aAccessible) {};
   ~sdnTextAccessible() {}
 
   DECL_IUNKNOWN
 
   // ISimpleDOMText
--- a/accessible/windows/uia/uiaRawElmProvider.h
+++ b/accessible/windows/uia/uiaRawElmProvider.h
@@ -15,17 +15,17 @@
 namespace mozilla {
 namespace a11y {
 
 class AccessibleWrap;
 
 /**
  * IRawElementProviderSimple implementation (maintains IAccessibleEx approach).
  */
-class uiaRawElmProvider MOZ_FINAL : public IAccessibleEx,
+class uiaRawElmProvider final : public IAccessibleEx,
                                     public IRawElementProviderSimple
 {
 public:
   uiaRawElmProvider(AccessibleWrap* aAcc) : mAcc(aAcc) { }
 
   // IUnknown
   DECL_IUNKNOWN
 
--- a/accessible/xpcom/AccEventGen.py
+++ b/accessible/xpcom/AccEventGen.py
@@ -56,17 +56,17 @@ def print_header_file(fd, conf):
         fd.write("#include \"nsIAccessible%s.h\"\n" % e)
     for e in conf.simple_events:
         idl, idl_path = loadEventIDL(p, options.incdirs, e)
         idl_paths.add(idl_path)
         for iface in filter(lambda p: p.kind == "interface", idl.productions):
             classname = ("xpcAcc%s" % e)
             baseinterfaces = interfaces(iface)
 
-            fd.write("\nclass %s MOZ_FINAL : public %s\n" % (classname, iface.name))
+            fd.write("\nclass %s final : public %s\n" % (classname, iface.name))
             fd.write("{\n")
             fd.write("public:\n")
 
             attributes = allAttributes(iface)
             args = map(writeAttributeParams, attributes)
             fd.write("  %s(%s) :\n" % (classname, ", ".join(args)))
 
             initializers = []
--- a/accessible/xpcom/nsAccessibleRelation.h
+++ b/accessible/xpcom/nsAccessibleRelation.h
@@ -15,17 +15,17 @@
 namespace mozilla {
 namespace a11y {
 
 class Relation;
 
 /**
  * Class represents an accessible relation.
  */
-class nsAccessibleRelation MOZ_FINAL : public nsIAccessibleRelation
+class nsAccessibleRelation final : public nsIAccessibleRelation
 {
 public:
   nsAccessibleRelation(uint32_t aType, Relation* aRel);
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIACCESSIBLERELATION
 
 private:
--- a/accessible/xpcom/xpcAccessible.h
+++ b/accessible/xpcom/xpcAccessible.h
@@ -19,78 +19,78 @@ class Accessible;
 /**
  * XPCOM nsIAccessible interface implementation, used by xpcAccessibleGeneric
  * class.
  */
 class xpcAccessible : public nsIAccessible
 {
 public:
   // nsIAccessible
-  NS_IMETHOD GetParent(nsIAccessible** aParent) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetNextSibling(nsIAccessible** aNextSibling) MOZ_FINAL MOZ_OVERRIDE;
+  NS_IMETHOD GetParent(nsIAccessible** aParent) final override;
+  NS_IMETHOD GetNextSibling(nsIAccessible** aNextSibling) final override;
   NS_IMETHOD GetPreviousSibling(nsIAccessible** aPreviousSibling)
-    MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetFirstChild(nsIAccessible** aFirstChild) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetLastChild(nsIAccessible** aLastChild) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetChildCount(int32_t* aChildCount) MOZ_FINAL MOZ_OVERRIDE;
+    final override;
+  NS_IMETHOD GetFirstChild(nsIAccessible** aFirstChild) final override;
+  NS_IMETHOD GetLastChild(nsIAccessible** aLastChild) final override;
+  NS_IMETHOD GetChildCount(int32_t* aChildCount) final override;
   NS_IMETHOD GetChildAt(int32_t aChildIndex, nsIAccessible** aChild)
-    MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetChildren(nsIArray** aChildren) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetIndexInParent(int32_t* aIndexInParent) MOZ_FINAL MOZ_OVERRIDE;
+    final override;
+  NS_IMETHOD GetChildren(nsIArray** aChildren) final override;
+  NS_IMETHOD GetIndexInParent(int32_t* aIndexInParent) final override;
 
-  NS_IMETHOD GetDOMNode(nsIDOMNode** aDOMNode) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetDocument(nsIAccessibleDocument** aDocument) MOZ_FINAL MOZ_OVERRIDE;
+  NS_IMETHOD GetDOMNode(nsIDOMNode** aDOMNode) final override;
+  NS_IMETHOD GetDocument(nsIAccessibleDocument** aDocument) final override;
   NS_IMETHOD GetRootDocument(nsIAccessibleDocument** aRootDocument)
-    MOZ_FINAL MOZ_OVERRIDE;
+    final override;
 
-  NS_IMETHOD GetRole(uint32_t* aRole) MOZ_FINAL MOZ_OVERRIDE;
+  NS_IMETHOD GetRole(uint32_t* aRole) final override;
   NS_IMETHOD GetState(uint32_t* aState, uint32_t* aExtraState)
-    MOZ_FINAL MOZ_OVERRIDE;
+    final override;
 
-  NS_IMETHOD GetDescription(nsAString& aDescription) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetName(nsAString& aName) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetLanguage(nsAString& aLanguage) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetValue(nsAString& aValue) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetHelp(nsAString& aHelp) MOZ_FINAL MOZ_OVERRIDE;
+  NS_IMETHOD GetDescription(nsAString& aDescription) final override;
+  NS_IMETHOD GetName(nsAString& aName) final override;
+  NS_IMETHOD GetLanguage(nsAString& aLanguage) final override;
+  NS_IMETHOD GetValue(nsAString& aValue) final override;
+  NS_IMETHOD GetHelp(nsAString& aHelp) final override;
 
-  NS_IMETHOD GetAccessKey(nsAString& aAccessKey) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetKeyboardShortcut(nsAString& aKeyBinding) MOZ_FINAL MOZ_OVERRIDE;
+  NS_IMETHOD GetAccessKey(nsAString& aAccessKey) final override;
+  NS_IMETHOD GetKeyboardShortcut(nsAString& aKeyBinding) final override;
 
   NS_IMETHOD GetAttributes(nsIPersistentProperties** aAttributes)
-    MOZ_FINAL MOZ_OVERRIDE;
+    final override;
   NS_IMETHOD GetBounds(int32_t* aX, int32_t* aY,
-                       int32_t* aWidth, int32_t* aHeight) MOZ_FINAL MOZ_OVERRIDE;
+                       int32_t* aWidth, int32_t* aHeight) final override;
   NS_IMETHOD GroupPosition(int32_t* aGroupLevel, int32_t* aSimilarItemsInGroup,
-                           int32_t* aPositionInGroup) MOZ_FINAL MOZ_OVERRIDE;
+                           int32_t* aPositionInGroup) final override;
   NS_IMETHOD GetRelationByType(uint32_t aType,
                                nsIAccessibleRelation** aRelation)
-    MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetRelations(nsIArray** aRelations) MOZ_FINAL MOZ_OVERRIDE;
+    final override;
+  NS_IMETHOD GetRelations(nsIArray** aRelations) final override;
 
-  NS_IMETHOD GetFocusedChild(nsIAccessible** aChild) MOZ_FINAL MOZ_OVERRIDE;
+  NS_IMETHOD GetFocusedChild(nsIAccessible** aChild) final override;
   NS_IMETHOD GetChildAtPoint(int32_t aX, int32_t aY,
-                             nsIAccessible** aAccessible) MOZ_FINAL MOZ_OVERRIDE;
+                             nsIAccessible** aAccessible) final override;
   NS_IMETHOD GetDeepestChildAtPoint(int32_t aX, int32_t aY,
                                     nsIAccessible** aAccessible)
-    MOZ_FINAL MOZ_OVERRIDE;
+    final override;
 
-  NS_IMETHOD SetSelected(bool aSelect) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD ExtendSelection() MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD TakeSelection() MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD TakeFocus() MOZ_FINAL MOZ_OVERRIDE;
+  NS_IMETHOD SetSelected(bool aSelect) final override;
+  NS_IMETHOD ExtendSelection() final override;
+  NS_IMETHOD TakeSelection() final override;
+  NS_IMETHOD TakeFocus() final override;
 
-  NS_IMETHOD GetActionCount(uint8_t* aActionCount) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetActionName(uint8_t aIndex, nsAString& aName) MOZ_FINAL MOZ_OVERRIDE;
+  NS_IMETHOD GetActionCount(uint8_t* aActionCount) final override;
+  NS_IMETHOD GetActionName(uint8_t aIndex, nsAString& aName) final override;
   NS_IMETHOD GetActionDescription(uint8_t aIndex, nsAString& aDescription)
-    MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD DoAction(uint8_t aIndex) MOZ_FINAL MOZ_OVERRIDE;
+    final override;
+  NS_IMETHOD DoAction(uint8_t aIndex) final override;
 
-  NS_IMETHOD ScrollTo(uint32_t aHow) MOZ_FINAL MOZ_OVERRIDE;
+  NS_IMETHOD ScrollTo(uint32_t aHow) final override;
   NS_IMETHOD ScrollToPoint(uint32_t aCoordinateType,
-                           int32_t aX, int32_t aY) MOZ_FINAL MOZ_OVERRIDE;
+                           int32_t aX, int32_t aY) final override;
 
 protected:
   xpcAccessible() { }
   virtual ~xpcAccessible() {}
 
 private:
   Accessible* Intl();
 
--- a/accessible/xpcom/xpcAccessibleApplication.h
+++ b/accessible/xpcom/xpcAccessibleApplication.h
@@ -22,20 +22,20 @@ class xpcAccessibleApplication : public 
 {
 public:
   explicit xpcAccessibleApplication(Accessible* aIntl) :
     xpcAccessibleGeneric(aIntl) { }
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIAccessibleApplication
-  NS_IMETHOD GetAppName(nsAString& aName) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetAppVersion(nsAString& aVersion) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetPlatformName(nsAString& aName) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetPlatformVersion(nsAString& aVersion) MOZ_FINAL MOZ_OVERRIDE;
+  NS_IMETHOD GetAppName(nsAString& aName) final override;
+  NS_IMETHOD GetAppVersion(nsAString& aVersion) final override;
+  NS_IMETHOD GetPlatformName(nsAString& aName) final override;
+  NS_IMETHOD GetPlatformVersion(nsAString& aVersion) final override;
 
 protected:
   virtual ~xpcAccessibleApplication() {}
 
 private:
   ApplicationAccessible* Intl() { return mIntl->AsApplication(); }
 
   xpcAccessibleApplication(const xpcAccessibleApplication&) = delete;
--- a/accessible/xpcom/xpcAccessibleDocument.h
+++ b/accessible/xpcom/xpcAccessibleDocument.h
@@ -27,37 +27,37 @@ public:
   explicit xpcAccessibleDocument(DocAccessible* aIntl) :
     xpcAccessibleHyperText(aIntl), mCache(kDefaultCacheLength) { }
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(xpcAccessibleDocument,
                                            xpcAccessibleGeneric)
 
   // nsIAccessibleDocument
-  NS_IMETHOD GetURL(nsAString& aURL) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetTitle(nsAString& aTitle) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetMimeType(nsAString& aType) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetDocType(nsAString& aType) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetDOMDocument(nsIDOMDocument** aDOMDocument) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetWindow(nsIDOMWindow** aDOMWindow) MOZ_FINAL MOZ_OVERRIDE;
+  NS_IMETHOD GetURL(nsAString& aURL) final override;
+  NS_IMETHOD GetTitle(nsAString& aTitle) final override;
+  NS_IMETHOD GetMimeType(nsAString& aType) final override;
+  NS_IMETHOD GetDocType(nsAString& aType) final override;
+  NS_IMETHOD GetDOMDocument(nsIDOMDocument** aDOMDocument) final override;
+  NS_IMETHOD GetWindow(nsIDOMWindow** aDOMWindow) final override;
   NS_IMETHOD GetParentDocument(nsIAccessibleDocument** aDocument)
-    MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetChildDocumentCount(uint32_t* aCount) MOZ_FINAL MOZ_OVERRIDE;
+    final override;
+  NS_IMETHOD GetChildDocumentCount(uint32_t* aCount) final override;
   NS_IMETHOD GetChildDocumentAt(uint32_t aIndex,
                                 nsIAccessibleDocument** aDocument)
-    MOZ_FINAL MOZ_OVERRIDE;
+    final override;
   NS_IMETHOD GetVirtualCursor(nsIAccessiblePivot** aVirtualCursor)
-    MOZ_FINAL MOZ_OVERRIDE;
+    final override;
 
   /**
    * Return XPCOM wrapper for the internal accessible.
    */
   xpcAccessibleGeneric* GetAccessible(Accessible* aAccessible);
 
-  virtual void Shutdown() MOZ_OVERRIDE;
+  virtual void Shutdown() override;
 
 protected:
   virtual ~xpcAccessibleDocument() {}
 
 private:
   DocAccessible* Intl() { return mIntl->AsDoc(); }
 
   void NotifyOfShutdown(Accessible* aAccessible)
--- a/accessible/xpcom/xpcAccessibleGeneric.h
+++ b/accessible/xpcom/xpcAccessibleGeneric.h
@@ -36,17 +36,17 @@ public:
     if (mIntl->IsLink())
       mSupportedIfaces |= eHyperLink;
   }
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(xpcAccessibleGeneric, nsIAccessible)
 
   // nsIAccessible
-  virtual Accessible* ToInternalAccessible() const MOZ_FINAL MOZ_OVERRIDE;
+  virtual Accessible* ToInternalAccessible() const final override;
 
   // xpcAccessibleGeneric
   virtual void Shutdown();
 
 protected:
   virtual ~xpcAccessibleGeneric() {}
 
   Accessible* mIntl;
--- a/accessible/xpcom/xpcAccessibleHyperLink.h
+++ b/accessible/xpcom/xpcAccessibleHyperLink.h
@@ -18,23 +18,23 @@ class Accessible;
 
 /**
  * XPCOM nsIAccessibleHyperLink implementation, used by xpcAccessibleGeneric
  * class.
  */
 class xpcAccessibleHyperLink : public nsIAccessibleHyperLink
 {
 public:
-  NS_IMETHOD GetAnchorCount(int32_t* aAnchorCount) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetStartIndex(int32_t* aStartIndex) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetEndIndex(int32_t* aEndIndex) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetURI(int32_t aIndex, nsIURI** aURI) MOZ_FINAL MOZ_OVERRIDE;
+  NS_IMETHOD GetAnchorCount(int32_t* aAnchorCount) final override;
+  NS_IMETHOD GetStartIndex(int32_t* aStartIndex) final override;
+  NS_IMETHOD GetEndIndex(int32_t* aEndIndex) final override;
+  NS_IMETHOD GetURI(int32_t aIndex, nsIURI** aURI) final override;
   NS_IMETHOD GetAnchor(int32_t aIndex, nsIAccessible** aAccessible)
-    MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetValid(bool* aValid) MOZ_FINAL MOZ_OVERRIDE;
+    final override;
+  NS_IMETHOD GetValid(bool* aValid) final override;
 
 protected:
   xpcAccessibleHyperLink() { }
   virtual ~xpcAccessibleHyperLink() {}
 
 private:
   xpcAccessibleHyperLink(const xpcAccessibleHyperLink&) = delete;
   xpcAccessibleHyperLink& operator =(const xpcAccessibleHyperLink&) = delete;
--- a/accessible/xpcom/xpcAccessibleImage.h
+++ b/accessible/xpcom/xpcAccessibleImage.h
@@ -19,18 +19,18 @@ class xpcAccessibleImage : public xpcAcc
 {
 public:
   explicit xpcAccessibleImage(Accessible* aIntl) :
     xpcAccessibleGeneric(aIntl) { }
 
   NS_DECL_ISUPPORTS_INHERITED
 
   NS_IMETHOD GetImagePosition(uint32_t aCoordType,
-                              int32_t* aX, int32_t* aY) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetImageSize(int32_t* aWidth, int32_t* aHeight) MOZ_FINAL MOZ_OVERRIDE;
+                              int32_t* aX, int32_t* aY) final override;
+  NS_IMETHOD GetImageSize(int32_t* aWidth, int32_t* aHeight) final override;
 
 protected:
   virtual ~xpcAccessibleImage() {}
 
 private:
   ImageAccessible* Intl() { return mIntl->AsImage(); }
 
   xpcAccessibleImage(const xpcAccessibleImage&) = delete;
--- a/accessible/xpcom/xpcAccessibleSelectable.h
+++ b/accessible/xpcom/xpcAccessibleSelectable.h
@@ -20,27 +20,27 @@ class Accessible;
 /**
  * XPCOM nsIAccessibleSelectable inteface implementation, used by
  * xpcAccessibleGeneric class.
  */
 class xpcAccessibleSelectable : public nsIAccessibleSelectable
 {
 public:
   // nsIAccessibleSelectable
-  NS_IMETHOD GetSelectedItems(nsIArray** aSelectedItems) MOZ_FINAL MOZ_OVERRIDE;
+  NS_IMETHOD GetSelectedItems(nsIArray** aSelectedItems) final override;
   NS_IMETHOD GetSelectedItemCount(uint32_t* aSelectedItemCount)
-    MOZ_FINAL MOZ_OVERRIDE;
+    final override;
   NS_IMETHOD GetSelectedItemAt(uint32_t aIndex, nsIAccessible** aItem)
-    MOZ_FINAL MOZ_OVERRIDE;
+    final override;
   NS_IMETHOD IsItemSelected(uint32_t aIndex, bool* aIsSelected)
-    MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD AddItemToSelection(uint32_t aIndex) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD RemoveItemFromSelection(uint32_t aIndex) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD SelectAll(bool* aIsMultiSelect) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD UnselectAll() MOZ_FINAL MOZ_OVERRIDE;
+    final override;
+  NS_IMETHOD AddItemToSelection(uint32_t aIndex) final override;
+  NS_IMETHOD RemoveItemFromSelection(uint32_t aIndex) final override;
+  NS_IMETHOD SelectAll(bool* aIsMultiSelect) final override;
+  NS_IMETHOD UnselectAll() final override;
 
 protected:
   xpcAccessibleSelectable() { }
   virtual ~xpcAccessibleSelectable() {}
 
 private:
   xpcAccessibleSelectable(const xpcAccessibleSelectable&) = delete;
   xpcAccessibleSelectable& operator =(const xpcAccessibleSelectable&) = delete;
--- a/accessible/xpcom/xpcAccessibleTable.h
+++ b/accessible/xpcom/xpcAccessibleTable.h
@@ -1,9 +1,9 @@
-/* -*- Mode: C++ MOZ_FINAL; tab-width: 2 MOZ_FINAL; indent-tabs-mode: nil MOZ_FINAL; c-basic-offset: 2 -*- */
+/* -*- Mode: C++ final; tab-width: 2 final; indent-tabs-mode: nil final; c-basic-offset: 2 -*- */
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_a11y_xpcAccessibleTable_h_
 #define mozilla_a11y_xpcAccessibleTable_h_
 
@@ -21,65 +21,65 @@ class xpcAccessibleTable : public xpcAcc
 {
 public:
   explicit xpcAccessibleTable(Accessible* aIntl) :
     xpcAccessibleGeneric(aIntl) { }
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIAccessibleTable
-  NS_IMETHOD GetCaption(nsIAccessible** aCaption) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetSummary(nsAString& aSummary) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetColumnCount(int32_t* aColumnCount) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetRowCount(int32_t* aRowCount) MOZ_FINAL MOZ_OVERRIDE;
+  NS_IMETHOD GetCaption(nsIAccessible** aCaption) final override;
+  NS_IMETHOD GetSummary(nsAString& aSummary) final override;
+  NS_IMETHOD GetColumnCount(int32_t* aColumnCount) final override;
+  NS_IMETHOD GetRowCount(int32_t* aRowCount) final override;
   NS_IMETHOD GetCellAt(int32_t aRowIndex, int32_t aColumnIndex,
-                       nsIAccessible** aCell) MOZ_FINAL MOZ_OVERRIDE;
+                       nsIAccessible** aCell) final override;
   NS_IMETHOD GetCellIndexAt(int32_t aRowIndex, int32_t aColumnIndex,
-                            int32_t* aCellIndex) MOZ_FINAL MOZ_OVERRIDE;
+                            int32_t* aCellIndex) final override;
   NS_IMETHOD GetColumnIndexAt(int32_t aCellIndex, int32_t* aColumnIndex)
-    MOZ_FINAL MOZ_OVERRIDE;
+    final override;
   NS_IMETHOD GetRowIndexAt(int32_t aCellIndex, int32_t* aRowIndex)
-    MOZ_FINAL MOZ_OVERRIDE;
+    final override;
   NS_IMETHOD GetRowAndColumnIndicesAt(int32_t aCellIndex, int32_t* aRowIndex,
                                       int32_t* aColumnIndex)
-    MOZ_FINAL MOZ_OVERRIDE;
+    final override;
   NS_IMETHOD GetColumnExtentAt(int32_t row, int32_t column,
-                               int32_t* aColumnExtent) MOZ_FINAL MOZ_OVERRIDE;
+                               int32_t* aColumnExtent) final override;
   NS_IMETHOD GetRowExtentAt(int32_t row, int32_t column,
-                            int32_t* aRowExtent) MOZ_FINAL MOZ_OVERRIDE;
+                            int32_t* aRowExtent) final override;
   NS_IMETHOD GetColumnDescription(int32_t aColIdx, nsAString& aDescription)
-    MOZ_FINAL MOZ_OVERRIDE;
+    final override;
   NS_IMETHOD GetRowDescription(int32_t aRowIdx, nsAString& aDescription)
-    MOZ_FINAL MOZ_OVERRIDE;
+    final override;
   NS_IMETHOD IsColumnSelected(int32_t aColIdx, bool* _retval)
-    MOZ_FINAL MOZ_OVERRIDE;
+    final override;
   NS_IMETHOD IsRowSelected(int32_t aRowIdx, bool* _retval)
-    MOZ_FINAL MOZ_OVERRIDE;
+    final override;
   NS_IMETHOD IsCellSelected(int32_t aRowIdx, int32_t aColIdx, bool* _retval)
-    MOZ_FINAL MOZ_OVERRIDE;
+    final override;
   NS_IMETHOD GetSelectedCellCount(uint32_t* aSelectedCellCount)
-    MOZ_FINAL MOZ_OVERRIDE;
+    final override;
   NS_IMETHOD GetSelectedColumnCount(uint32_t* aSelectedColumnCount)
-    MOZ_FINAL MOZ_OVERRIDE;
+    final override;
   NS_IMETHOD GetSelectedRowCount(uint32_t* aSelectedRowCount)
-    MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetSelectedCells(nsIArray** aSelectedCell) MOZ_FINAL MOZ_OVERRIDE;
+    final override;
+  NS_IMETHOD GetSelectedCells(nsIArray** aSelectedCell) final override;
   NS_IMETHOD GetSelectedCellIndices(uint32_t* aCellsArraySize,
                                     int32_t** aCellsArray)
-    MOZ_FINAL MOZ_OVERRIDE;
+    final override;
   NS_IMETHOD GetSelectedColumnIndices(uint32_t* aColsArraySize,
                                       int32_t** aColsArray)
-    MOZ_FINAL MOZ_OVERRIDE;
+    final override;
   NS_IMETHOD GetSelectedRowIndices(uint32_t* aRowsArraySize,
-                                   int32_t** aRowsArray) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD SelectColumn(int32_t aColIdx) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD SelectRow(int32_t aRowIdx) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD UnselectColumn(int32_t aColIdx) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD UnselectRow(int32_t aRowIdx) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD IsProbablyForLayout(bool* aIsForLayout) MOZ_FINAL MOZ_OVERRIDE;
+                                   int32_t** aRowsArray) final override;
+  NS_IMETHOD SelectColumn(int32_t aColIdx) final override;
+  NS_IMETHOD SelectRow(int32_t aRowIdx) final override;
+  NS_IMETHOD UnselectColumn(int32_t aColIdx) final override;
+  NS_IMETHOD UnselectRow(int32_t aRowIdx) final override;
+  NS_IMETHOD IsProbablyForLayout(bool* aIsForLayout) final override;
 
 protected:
   virtual ~xpcAccessibleTable() {}
 
 private:
   TableAccessible* Intl() { return mIntl->AsTable(); }
 
   xpcAccessibleTable(const xpcAccessibleTable&) = delete;
--- a/accessible/xpcom/xpcAccessibleTableCell.h
+++ b/accessible/xpcom/xpcAccessibleTableCell.h
@@ -22,24 +22,24 @@ class xpcAccessibleTableCell : public xp
 {
 public:
   explicit xpcAccessibleTableCell(Accessible* aIntl) :
     xpcAccessibleHyperText(aIntl) { }
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIAccessibleTableCell
-  NS_IMETHOD GetTable(nsIAccessibleTable** aTable) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetColumnIndex(int32_t* aColIdx) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetRowIndex(int32_t* aRowIdx) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetColumnExtent(int32_t* aExtent) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetRowExtent(int32_t* aExtent) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetColumnHeaderCells(nsIArray** aHeaderCells) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetRowHeaderCells(nsIArray** aHeaderCells) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD IsSelected(bool* aSelected) MOZ_FINAL MOZ_OVERRIDE;
+  NS_IMETHOD GetTable(nsIAccessibleTable** aTable) final override;
+  NS_IMETHOD GetColumnIndex(int32_t* aColIdx) final override;
+  NS_IMETHOD GetRowIndex(int32_t* aRowIdx) final override;
+  NS_IMETHOD GetColumnExtent(int32_t* aExtent) final override;
+  NS_IMETHOD GetRowExtent(int32_t* aExtent) final override;
+  NS_IMETHOD GetColumnHeaderCells(nsIArray** aHeaderCells) final override;
+  NS_IMETHOD GetRowHeaderCells(nsIArray** aHeaderCells) final override;
+  NS_IMETHOD IsSelected(bool* aSelected) final override;
 
 protected:
   virtual ~xpcAccessibleTableCell() {}
 
 private:
   TableCellAccessible* Intl() { return mIntl->AsTableCell(); }
 
   xpcAccessibleTableCell(const xpcAccessibleTableCell&) = delete;
--- a/accessible/xpcom/xpcAccessibleTextRange.h
+++ b/accessible/xpcom/xpcAccessibleTextRange.h
@@ -21,47 +21,47 @@ class TextRange;
 #define NS_ACCESSIBLETEXTRANGE_IMPL_IID                 \
 {  /* 133c8bf4-4913-4355-bd50-426bd1d6e1ad */           \
   0xb17652d9,                                           \
   0x4f54,                                               \
   0x4c56,                                               \
   { 0xbb, 0x62, 0x6d, 0x5b, 0xf1, 0xef, 0x91, 0x0c }    \
 }
 
-class xpcAccessibleTextRange MOZ_FINAL : public nsIAccessibleTextRange
+class xpcAccessibleTextRange final : public nsIAccessibleTextRange
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS(xpcAccessibleTextRange)
 
-  NS_IMETHOD GetStartContainer(nsIAccessibleText** aAnchor) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetStartOffset(int32_t* aOffset) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetEndContainer(nsIAccessibleText** aAnchor) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetEndOffset(int32_t* aOffset) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetContainer(nsIAccessible** aContainer) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetEmbeddedChildren(nsIArray** aList) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD Compare(nsIAccessibleTextRange* aOtherRange, bool* aResult) MOZ_FINAL MOZ_OVERRIDE;
+  NS_IMETHOD GetStartContainer(nsIAccessibleText** aAnchor) final override;
+  NS_IMETHOD GetStartOffset(int32_t* aOffset) final override;
+  NS_IMETHOD GetEndContainer(nsIAccessibleText** aAnchor) final override;
+  NS_IMETHOD GetEndOffset(int32_t* aOffset) final override;
+  NS_IMETHOD GetContainer(nsIAccessible** aContainer) final override;
+  NS_IMETHOD GetEmbeddedChildren(nsIArray** aList) final override;
+  NS_IMETHOD Compare(nsIAccessibleTextRange* aOtherRange, bool* aResult) final override;
   NS_IMETHOD CompareEndPoints(uint32_t aEndPoint,
                               nsIAccessibleTextRange* aOtherRange,
                               uint32_t aOtherRangeEndPoint,
-                              int32_t* aResult) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetText(nsAString& aText) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetBounds(nsIArray** aRectList) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD Move(uint32_t aUnit, int32_t aCount) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD MoveStart(uint32_t aUnit, int32_t aCount) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD MoveEnd(uint32_t aUnit, int32_t aCount) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD Normalize(uint32_t aUnit) MOZ_FINAL MOZ_OVERRIDE;
+                              int32_t* aResult) final override;
+  NS_IMETHOD GetText(nsAString& aText) final override;
+  NS_IMETHOD GetBounds(nsIArray** aRectList) final override;
+  NS_IMETHOD Move(uint32_t aUnit, int32_t aCount) final override;
+  NS_IMETHOD MoveStart(uint32_t aUnit, int32_t aCount) final override;
+  NS_IMETHOD MoveEnd(uint32_t aUnit, int32_t aCount) final override;
+  NS_IMETHOD Normalize(uint32_t aUnit) final override;
   NS_IMETHOD FindText(const nsAString& aText, bool aIsBackward, bool aIsIgnoreCase,
-                      nsIAccessibleTextRange** aRange) MOZ_FINAL MOZ_OVERRIDE;
+                      nsIAccessibleTextRange** aRange) final override;
   NS_IMETHOD FindAttr(uint32_t aAttr, nsIVariant* aVal, bool aIsBackward,
-                      nsIAccessibleTextRange** aRange) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD AddToSelection() MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD RemoveFromSelection() MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD Select() MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD ScrollIntoView(uint32_t aHow) MOZ_FINAL MOZ_OVERRIDE;
+                      nsIAccessibleTextRange** aRange) final override;
+  NS_IMETHOD AddToSelection() final override;
+  NS_IMETHOD RemoveFromSelection() final override;
+  NS_IMETHOD Select() final override;
+  NS_IMETHOD ScrollIntoView(uint32_t aHow) final override;
 
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_ACCESSIBLETEXTRANGE_IMPL_IID)
 
 private:
   explicit xpcAccessibleTextRange(TextRange&& aRange) :
     mRange(Forward<TextRange>(aRange)) {}
   xpcAccessibleTextRange() {}
 
--- a/accessible/xpcom/xpcAccessibleValue.h
+++ b/accessible/xpcom/xpcAccessibleValue.h
@@ -16,21 +16,21 @@ class Accessible;
 
 /**
  * XPCOM nsIAccessibleValue interface implementation, used by
  * xpcAccessibleGeneric class.
  */
 class xpcAccessibleValue : public nsIAccessibleValue
 {
 public:
-  NS_IMETHOD GetMaximumValue(double* aValue) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetMinimumValue(double* aValue) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetCurrentValue(double* aValue) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD SetCurrentValue(double aValue) MOZ_FINAL MOZ_OVERRIDE;
-  NS_IMETHOD GetMinimumIncrement(double* aMinIncrement) MOZ_FINAL MOZ_OVERRIDE;
+  NS_IMETHOD GetMaximumValue(double* aValue) final override;
+  NS_IMETHOD GetMinimumValue(double* aValue) final override;
+  NS_IMETHOD GetCurrentValue(double* aValue) final override;
+  NS_IMETHOD SetCurrentValue(double aValue) final override;
+  NS_IMETHOD GetMinimumIncrement(double* aMinIncrement) final override;
 
 protected:
   xpcAccessibleValue() { }
   virtual ~xpcAccessibleValue() {}
 
 private:
   Accessible* Intl();
 
--- a/accessible/xul/XULAlertAccessible.h
+++ b/accessible/xul/XULAlertAccessible.h
@@ -18,23 +18,23 @@ namespace a11y {
 class XULAlertAccessible : public AccessibleWrap
 {
 public:
   XULAlertAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // Accessible
-  virtual mozilla::a11y::ENameValueFlag Name(nsString& aName) MOZ_OVERRIDE;
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
+  virtual mozilla::a11y::ENameValueFlag Name(nsString& aName) override;
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
 
   // Widgets
-  virtual bool IsWidget() const MOZ_OVERRIDE;
-  virtual Accessible* ContainerWidget() const MOZ_OVERRIDE;
+  virtual bool IsWidget() const override;
+  virtual Accessible* ContainerWidget() const override;
 
 protected:
   ~XULAlertAccessible();
 };
 
 } // namespace a11y
 } // namespace mozilla
 
--- a/accessible/xul/XULColorPickerAccessible.h
+++ b/accessible/xul/XULColorPickerAccessible.h
@@ -16,42 +16,42 @@ namespace a11y {
  */
 class XULColorPickerTileAccessible : public AccessibleWrap
 {
 public:
   XULColorPickerTileAccessible(nsIContent* aContent,
                                DocAccessible* aDoc);
 
   // Accessible
-  virtual void Value(nsString& aValue) MOZ_OVERRIDE;
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
-  virtual uint64_t NativeInteractiveState() const MOZ_OVERRIDE;
+  virtual void Value(nsString& aValue) override;
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
+  virtual uint64_t NativeInteractiveState() const override;
 
   // Widgets
-  virtual Accessible* ContainerWidget() const MOZ_OVERRIDE;
+  virtual Accessible* ContainerWidget() const override;
 };
 
 
 /**
  * Used for colorpicker button (xul:colorpicker@type="button").
  */
 class XULColorPickerAccessible : public XULColorPickerTileAccessible
 {
 public:
   XULColorPickerAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
 
   // Widgets
-  virtual bool IsWidget() const MOZ_OVERRIDE;
-  virtual bool IsActiveWidget() const MOZ_OVERRIDE;
-  virtual bool AreItemsOperable() const MOZ_OVERRIDE;
+  virtual bool IsWidget() const override;
+  virtual bool IsActiveWidget() const override;
+  virtual bool AreItemsOperable() const override;
 
-  virtual bool IsAcceptableChild(Accessible* aPossibleChild) const MOZ_OVERRIDE;
+  virtual bool IsAcceptableChild(Accessible* aPossibleChild) const override;
 };
 
 } // namespace a11y
 } // namespace mozilla
 
 #endif  
--- a/accessible/xul/XULComboboxAccessible.h
+++ b/accessible/xul/XULComboboxAccessible.h
@@ -17,28 +17,28 @@ namespace a11y {
 class XULComboboxAccessible : public AccessibleWrap
 {
 public:
   enum { eAction_Click = 0 };
 
   XULComboboxAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual void Description(nsString& aDescription) MOZ_OVERRIDE;
-  virtual void Value(nsString& aValue) MOZ_OVERRIDE;
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
-  virtual bool CanHaveAnonChildren() MOZ_OVERRIDE;
+  virtual void Description(nsString& aDescription) override;
+  virtual void Value(nsString& aValue) override;
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
+  virtual bool CanHaveAnonChildren() override;
 
   // ActionAccessible
-  virtual uint8_t ActionCount() MOZ_OVERRIDE;
-  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) MOZ_OVERRIDE;
-  virtual bool DoAction(uint8_t aIndex) MOZ_OVERRIDE;
+  virtual uint8_t ActionCount() override;
+  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
+  virtual bool DoAction(uint8_t aIndex) override;
 
   // Widgets
-  virtual bool IsActiveWidget() const MOZ_OVERRIDE;
-  virtual bool AreItemsOperable() const MOZ_OVERRIDE;
+  virtual bool IsActiveWidget() const override;
+  virtual bool AreItemsOperable() const override;
 };
 
 } // namespace a11y
 } // namespace mozilla
 
 #endif
--- a/accessible/xul/XULElementAccessibles.h
+++ b/accessible/xul/XULElementAccessibles.h
@@ -18,99 +18,99 @@ class XULLabelTextLeafAccessible;
  * Used for XUL description and label elements.
  */
 class XULLabelAccessible : public HyperTextAccessibleWrap
 {
 public:
   XULLabelAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual void Shutdown() MOZ_OVERRIDE;
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
-  virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE;
+  virtual void Shutdown() override;
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
+  virtual Relation RelationByType(RelationType aType) override;
 
   void UpdateLabelValue(const nsString& aValue);
 
 protected:
   // Accessible
-  virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE;
-  virtual void CacheChildren() MOZ_OVERRIDE;
+  virtual ENameValueFlag NativeName(nsString& aName) override;
+  virtual void CacheChildren() override;
 
 private:
   nsRefPtr<XULLabelTextLeafAccessible> mValueTextLeaf;
 };
 
 inline XULLabelAccessible*
 Accessible::AsXULLabel()
 {
   return IsXULLabel() ? static_cast<XULLabelAccessible*>(this) : nullptr;
 }
 
 
 /**
  * Used to implement text interface on XUL label accessible in case when text
  * is provided by @value attribute (no underlying text frame).
  */
-class XULLabelTextLeafAccessible MOZ_FINAL : public TextLeafAccessibleWrap
+class XULLabelTextLeafAccessible final : public TextLeafAccessibleWrap
 {
 public:
   XULLabelTextLeafAccessible(nsIContent* aContent, DocAccessible* aDoc) :
     TextLeafAccessibleWrap(aContent, aDoc)
   { mStateFlags |= eSharedNode; }
 
   virtual ~XULLabelTextLeafAccessible() { }
 
   // Accessible
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
 };
 
 
 /**
  * Used for XUL tooltip element.
  */
 class XULTooltipAccessible : public LeafAccessible
 {
 
 public:
   XULTooltipAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
 };
 
 class XULLinkAccessible : public XULLabelAccessible
 {
 
 public:
   XULLinkAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual void Value(nsString& aValue) MOZ_OVERRIDE;
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeLinkState() const MOZ_OVERRIDE;
+  virtual void Value(nsString& aValue) override;
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeLinkState() const override;
 
   // ActionAccessible
-  virtual uint8_t ActionCount() MOZ_OVERRIDE;
-  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) MOZ_OVERRIDE;
-  virtual bool DoAction(uint8_t aIndex) MOZ_OVERRIDE;
+  virtual uint8_t ActionCount() override;
+  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
+  virtual bool DoAction(uint8_t aIndex) override;
 
   // HyperLinkAccessible
-  virtual bool IsLink() MOZ_OVERRIDE;
-  virtual uint32_t StartOffset() MOZ_OVERRIDE;
-  virtual uint32_t EndOffset() MOZ_OVERRIDE;
-  virtual already_AddRefed<nsIURI> AnchorURIAt(uint32_t aAnchorIndex) MOZ_OVERRIDE;
+  virtual bool IsLink() override;
+  virtual uint32_t StartOffset() override;
+  virtual uint32_t EndOffset() override;
+  virtual already_AddRefed<nsIURI> AnchorURIAt(uint32_t aAnchorIndex) override;
 
 protected:
   virtual ~XULLinkAccessible();
 
   // Accessible
-  virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE;
+  virtual ENameValueFlag NativeName(nsString& aName) override;
 
   enum { eAction_Jump = 0 };
 
 };
 
 } // namespace a11y
 } // namespace mozilla
 
--- a/accessible/xul/XULFormControlAccessible.h
+++ b/accessible/xul/XULFormControlAccessible.h
@@ -31,31 +31,31 @@ class XULButtonAccessible : public Acces
 public:
   enum { eAction_Click = 0 };
   XULButtonAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // Accessible
-  virtual mozilla::a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
+  virtual mozilla::a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
 
   // ActionAccessible
-  virtual uint8_t ActionCount() MOZ_OVERRIDE;
-  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) MOZ_OVERRIDE;
-  virtual bool DoAction(uint8_t aIndex) MOZ_OVERRIDE;
+  virtual uint8_t ActionCount() override;
+  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
+  virtual bool DoAction(uint8_t aIndex) override;
 
   // Widgets
-  virtual bool IsWidget() const MOZ_OVERRIDE;
-  virtual bool IsActiveWidget() const MOZ_OVERRIDE;
-  virtual bool AreItemsOperable() const MOZ_OVERRIDE;
-  virtual Accessible* ContainerWidget() const MOZ_OVERRIDE;
+  virtual bool IsWidget() const override;
+  virtual bool IsActiveWidget() const override;
+  virtual bool AreItemsOperable() const override;
+  virtual Accessible* ContainerWidget() const override;
 
-  virtual bool IsAcceptableChild(Accessible* aPossibleChild) const MOZ_OVERRIDE;
+  virtual bool IsAcceptableChild(Accessible* aPossibleChild) const override;
 
 protected:
   virtual ~XULButtonAccessible();
 
   // XULButtonAccessible
   bool ContainsMenu() const;
 };
 
@@ -65,154 +65,154 @@ protected:
  */
 class XULCheckboxAccessible : public LeafAccessible
 {
 public:
   enum { eAction_Click = 0 };
   XULCheckboxAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual mozilla::a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
+  virtual mozilla::a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
 
   // ActionAccessible
-  virtual uint8_t ActionCount() MOZ_OVERRIDE;
-  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) MOZ_OVERRIDE;
-  virtual bool DoAction(uint8_t aIndex) MOZ_OVERRIDE;
+  virtual uint8_t ActionCount() override;
+  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
+  virtual bool DoAction(uint8_t aIndex) override;
 };
 
 /**
  * Used for XUL dropmarker element.
  */
 class XULDropmarkerAccessible : public LeafAccessible
 {
 public:
   enum { eAction_Click = 0 };
   XULDropmarkerAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual mozilla::a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
+  virtual mozilla::a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
 
   // ActionAccessible
-  virtual uint8_t ActionCount() MOZ_OVERRIDE;
-  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) MOZ_OVERRIDE;
-  virtual bool DoAction(uint8_t aIndex) MOZ_OVERRIDE;
+  virtual uint8_t ActionCount() override;
+  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
+  virtual bool DoAction(uint8_t aIndex) override;
 
 private:
   bool DropmarkerOpen(bool aToggleOpen) const;
 };
 
 /**
  * Used for XUL groupbox element.
  */
-class XULGroupboxAccessible MOZ_FINAL : public AccessibleWrap
+class XULGroupboxAccessible final : public AccessibleWrap
 {
 public:
   XULGroupboxAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual mozilla::a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE;
+  virtual mozilla::a11y::role NativeRole() override;
+  virtual Relation RelationByType(RelationType aType) override;
 
 protected:
   // Accessible
-  virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE;
+  virtual ENameValueFlag NativeName(nsString& aName) override;
 };
 
 /**
  * Used for XUL radio element (radio button).
  */
 class XULRadioButtonAccessible : public RadioButtonAccessible
 {
 
 public:
   XULRadioButtonAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
-  virtual uint64_t NativeInteractiveState() const MOZ_OVERRIDE;
+  virtual uint64_t NativeState() override;
+  virtual uint64_t NativeInteractiveState() const override;
 
   // Widgets
-  virtual Accessible* ContainerWidget() const MOZ_OVERRIDE;
+  virtual Accessible* ContainerWidget() const override;
 };
 
 /**
  * Used for XUL radiogroup element.
  */
 class XULRadioGroupAccessible : public XULSelectControlAccessible
 {
 public:
   XULRadioGroupAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual mozilla::a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeInteractiveState() const MOZ_OVERRIDE;
+  virtual mozilla::a11y::role NativeRole() override;
+  virtual uint64_t NativeInteractiveState() const override;
 
   // Widgets
-  virtual bool IsWidget() const MOZ_OVERRIDE;
-  virtual bool IsActiveWidget() const MOZ_OVERRIDE;
-  virtual bool AreItemsOperable() const MOZ_OVERRIDE;
+  virtual bool IsWidget() const override;
+  virtual bool IsActiveWidget() const override;
+  virtual bool AreItemsOperable() const override;
 };
 
 /**
  * Used for XUL statusbar element.
  */
 class XULStatusBarAccessible : public AccessibleWrap
 {
 public:
   XULStatusBarAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual mozilla::a11y::role NativeRole() MOZ_OVERRIDE;
+  virtual mozilla::a11y::role NativeRole() override;
 };
 
 /**
  * Used for XUL toolbarbutton element.
  */
 class XULToolbarButtonAccessible : public XULButtonAccessible
 {
 public:
   XULToolbarButtonAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
   virtual void GetPositionAndSizeInternal(int32_t* aPosInSet,
-                                          int32_t* aSetSize) MOZ_OVERRIDE;
+                                          int32_t* aSetSize) override;
 
   // nsXULToolbarButtonAccessible
   static bool IsSeparator(Accessible* aAccessible);
 };
 
 /**
  * Used for XUL toolbar element.
  */
 class XULToolbarAccessible : public AccessibleWrap
 {
 public:
   XULToolbarAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual mozilla::a11y::role NativeRole() MOZ_OVERRIDE;
+  virtual mozilla::a11y::role NativeRole() override;
 
 protected:
   // Accessible
-  virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE;
+  virtual ENameValueFlag NativeName(nsString& aName) override;
 };
 
 /**
  * Used for XUL toolbarseparator element.
  */
 class XULToolbarSeparatorAccessible : public LeafAccessible
 {
 public:
   XULToolbarSeparatorAccessible(nsIContent* aContent,
                                 DocAccessible* aDoc);
 
   // Accessible
-  virtual mozilla::a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
+  virtual mozilla::a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
 };
 
 } // namespace a11y
 } // namespace mozilla
 
 #endif
 
--- a/accessible/xul/XULListboxAccessible.h
+++ b/accessible/xul/XULListboxAccessible.h
@@ -24,80 +24,80 @@ namespace a11y {
  * (xul:treecols and xul:listcols).
  */
 class XULColumAccessible : public AccessibleWrap
 {
 public:
   XULColumAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
 };
 
 /**
  * XULColumnItemAccessible are accessibles for list and tree column elements
  * (xul:listcol and xul:treecol).
  */
 class XULColumnItemAccessible : public LeafAccessible
 {
 public:
   XULColumnItemAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
 
   // ActionAccessible
-  virtual uint8_t ActionCount() MOZ_OVERRIDE;
-  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) MOZ_OVERRIDE;
-  virtual bool DoAction(uint8_t aIndex) MOZ_OVERRIDE;
+  virtual uint8_t ActionCount() override;
+  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
+  virtual bool DoAction(uint8_t aIndex) override;
 
   enum { eAction_Click = 0 };
 };
 
 /*
  * A class the represents the XUL Listbox widget.
  */
 class XULListboxAccessible : public XULSelectControlAccessible,
                              public TableAccessible
 {
 public:
   XULListboxAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // TableAccessible
-  virtual uint32_t ColCount() MOZ_OVERRIDE;
-  virtual uint32_t RowCount() MOZ_OVERRIDE;
-  virtual Accessible* CellAt(uint32_t aRowIndex, uint32_t aColumnIndex) MOZ_OVERRIDE;
-  virtual bool IsColSelected(uint32_t aColIdx) MOZ_OVERRIDE;
-  virtual bool IsRowSelected(uint32_t aRowIdx) MOZ_OVERRIDE;
-  virtual bool IsCellSelected(uint32_t aRowIdx, uint32_t aColIdx) MOZ_OVERRIDE;
-  virtual uint32_t SelectedCellCount() MOZ_OVERRIDE;
-  virtual uint32_t SelectedColCount() MOZ_OVERRIDE;
-  virtual uint32_t SelectedRowCount() MOZ_OVERRIDE;
-  virtual void SelectedCells(nsTArray<Accessible*>* aCells) MOZ_OVERRIDE;
-  virtual void SelectedCellIndices(nsTArray<uint32_t>* aCells) MOZ_OVERRIDE;
-  virtual void SelectedColIndices(nsTArray<uint32_t>* aCols) MOZ_OVERRIDE;
-  virtual void SelectedRowIndices(nsTArray<uint32_t>* aRows) MOZ_OVERRIDE;
-  virtual void SelectRow(uint32_t aRowIdx) MOZ_OVERRIDE;
-  virtual void UnselectRow(uint32_t aRowIdx) MOZ_OVERRIDE;
-  virtual Accessible* AsAccessible() MOZ_OVERRIDE { return this; }
+  virtual uint32_t ColCount() override;
+  virtual uint32_t RowCount() override;
+  virtual Accessible* CellAt(uint32_t aRowIndex, uint32_t aColumnIndex) override;
+  virtual bool IsColSelected(uint32_t aColIdx) override;
+  virtual bool IsRowSelected(uint32_t aRowIdx) override;
+  virtual bool IsCellSelected(uint32_t aRowIdx, uint32_t aColIdx) override;
+  virtual uint32_t SelectedCellCount() override;
+  virtual uint32_t SelectedColCount() override;
+  virtual uint32_t SelectedRowCount() override;
+  virtual void SelectedCells(nsTArray<Accessible*>* aCells) override;
+  virtual void SelectedCellIndices(nsTArray<uint32_t>* aCells) override;
+  virtual void SelectedColIndices(nsTArray<uint32_t>* aCols) override;
+  virtual void SelectedRowIndices(nsTArray<uint32_t>* aRows) override;
+  virtual void SelectRow(uint32_t aRowIdx) override;
+  virtual void UnselectRow(uint32_t aRowIdx) override;
+  virtual Accessible* AsAccessible() override { return this; }
 
   // Accessible
-  virtual void Value(nsString& aValue) MOZ_OVERRIDE;
-  virtual TableAccessible* AsTable() MOZ_OVERRIDE { return this; }
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
+  virtual void Value(nsString& aValue) override;
+  virtual TableAccessible* AsTable() override { return this; }
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
 
   // Widgets
-  virtual bool IsWidget() const MOZ_OVERRIDE;
-  virtual bool IsActiveWidget() const MOZ_OVERRIDE;
-  virtual bool AreItemsOperable() const MOZ_OVERRIDE;
+  virtual bool IsWidget() const override;
+  virtual bool IsActiveWidget() const override;
+  virtual bool AreItemsOperable() const override;
 
-  virtual Accessible* ContainerWidget() const MOZ_OVERRIDE;
+  virtual Accessible* ContainerWidget() const override;
 
 protected:
   virtual ~XULListboxAccessible() {}
 
   bool IsMulticolumn() { return ColCount() > 1; }
 };
 
 /**
@@ -108,33 +108,33 @@ class XULListitemAccessible : public XUL
 public:
   enum { eAction_Click = 0 };
 
   NS_DECL_ISUPPORTS_INHERITED
 
   XULListitemAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual void Description(nsString& aDesc) MOZ_OVERRIDE;
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
-  virtual uint64_t NativeInteractiveState() const MOZ_OVERRIDE;
-  virtual bool CanHaveAnonChildren() MOZ_OVERRIDE;
+  virtual void Description(nsString& aDesc) override;
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
+  virtual uint64_t NativeInteractiveState() const override;
+  virtual bool CanHaveAnonChildren() override;
 
   // Actions
-  virtual void ActionNameAt(uint8_t index, nsAString& aName) MOZ_OVERRIDE;
+  virtual void ActionNameAt(uint8_t index, nsAString& aName) override;
 
   // Widgets
-  virtual Accessible* ContainerWidget() const MOZ_OVERRIDE;
+  virtual Accessible* ContainerWidget() const override;
 
 protected:
   virtual ~XULListitemAccessible();
 
   // Accessible
-  virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE;
+  virtual ENameValueFlag NativeName(nsString& aName) override;
 
   // XULListitemAccessible
 
   /**
    * Return listbox accessible for the listitem.
    */
   Accessible* GetListAccessible() const;
 
@@ -150,26 +150,26 @@ class XULListCellAccessible : public Hyp
 {
 public:
   XULListCellAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // Accessible
-  virtual TableCellAccessible* AsTableCell() MOZ_OVERRIDE { return this; }
-  virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() MOZ_OVERRIDE;
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
+  virtual TableCellAccessible* AsTableCell() override { return this; }
+  virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() override;
+  virtual a11y::role NativeRole() override;
 
   // TableCellAccessible
-  virtual TableAccessible* Table() const MOZ_OVERRIDE;
-  virtual uint32_t ColIdx() const MOZ_OVERRIDE;
-  virtual uint32_t RowIdx() const MOZ_OVERRIDE;
-  virtual void ColHeaderCells(nsTArray<Accessible*>* aHeaderCells) MOZ_OVERRIDE;
-  virtual bool Selected() MOZ_OVERRIDE;
+  virtual TableAccessible* Table() const override;
+  virtual uint32_t ColIdx() const override;
+  virtual uint32_t RowIdx() const override;
+  virtual void ColHeaderCells(nsTArray<Accessible*>* aHeaderCells) override;
+  virtual bool Selected() override;
 
 protected:
   virtual ~XULListCellAccessible() {}
 };
 
 } // namespace a11y
 } // namespace mozilla
 
--- a/accessible/xul/XULMenuAccessible.h
+++ b/accessible/xul/XULMenuAccessible.h
@@ -19,106 +19,106 @@ namespace a11y {
 class XULMenuitemAccessible : public AccessibleWrap
 {
 public:
   enum { eAction_Click = 0 };
 
   XULMenuitemAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual void Description(nsString& aDescription) MOZ_OVERRIDE;
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
-  virtual uint64_t NativeInteractiveState() const MOZ_OVERRIDE;
-  virtual int32_t GetLevelInternal() MOZ_OVERRIDE;
+  virtual void Description(nsString& aDescription) override;
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
+  virtual uint64_t NativeInteractiveState() const override;
+  virtual int32_t GetLevelInternal() override;
 
-  virtual bool CanHaveAnonChildren() MOZ_OVERRIDE;
+  virtual bool CanHaveAnonChildren() override;
 
   // ActionAccessible
-  virtual uint8_t ActionCount() MOZ_OVERRIDE;
-  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) MOZ_OVERRIDE;
-  virtual bool DoAction(uint8_t aIndex) MOZ_OVERRIDE;
-  virtual KeyBinding AccessKey() const MOZ_OVERRIDE;
-  virtual KeyBinding KeyboardShortcut() const MOZ_OVERRIDE;
+  virtual uint8_t ActionCount() override;
+  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
+  virtual bool DoAction(uint8_t aIndex) override;
+  virtual KeyBinding AccessKey() const override;
+  virtual KeyBinding KeyboardShortcut() const override;
 
   // Widgets
-  virtual bool IsActiveWidget() const MOZ_OVERRIDE;
-  virtual bool AreItemsOperable() const MOZ_OVERRIDE;
-  virtual Accessible* ContainerWidget() const MOZ_OVERRIDE;
+  virtual bool IsActiveWidget() const override;
+  virtual bool AreItemsOperable() const override;
+  virtual Accessible* ContainerWidget() const override;
 
 protected:
   // Accessible
-  virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE;
+  virtual ENameValueFlag NativeName(nsString& aName) override;
 };
 
 /**
  * Used for XUL menuseparator element.
  */
 class XULMenuSeparatorAccessible : public XULMenuitemAccessible
 {
 public:
   XULMenuSeparatorAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
 
   // ActionAccessible
-  virtual uint8_t ActionCount() MOZ_OVERRIDE;
-  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) MOZ_OVERRIDE;
-  virtual bool DoAction(uint8_t aIndex) MOZ_OVERRIDE;
+  virtual uint8_t ActionCount() override;
+  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
+  virtual bool DoAction(uint8_t aIndex) override;
 
 protected:
   // Accessible
-  virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE;
+  virtual ENameValueFlag NativeName(nsString& aName) override;
 };
 
 
 /**
  * Used for XUL menupopup and panel.
  */
 class XULMenupopupAccessible : public XULSelectControlAccessible
 {
 public:
   XULMenupopupAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
 
   // Widgets
-  virtual bool IsWidget() const MOZ_OVERRIDE;
-  virtual bool IsActiveWidget() const MOZ_OVERRIDE;
-  virtual bool AreItemsOperable() const MOZ_OVERRIDE;
+  virtual bool IsWidget() const override;
+  virtual bool IsActiveWidget() const override;
+  virtual bool AreItemsOperable() const override;
 
-  virtual Accessible* ContainerWidget() const MOZ_OVERRIDE;
+  virtual Accessible* ContainerWidget() const override;
 
 protected:
   // Accessible
-  virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE;
+  virtual ENameValueFlag NativeName(nsString& aName) override;
 };
 
 /**
  * Used for XUL menubar element.
  */
 class XULMenubarAccessible : public AccessibleWrap
 {
 public:
   XULMenubarAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
+  virtual a11y::role NativeRole() override;
 
   // Widget
-  virtual bool IsActiveWidget() const MOZ_OVERRIDE;
-  virtual bool AreItemsOperable() const MOZ_OVERRIDE;
-  virtual Accessible* CurrentItem() MOZ_OVERRIDE;
-  virtual void SetCurrentItem(Accessible* aItem) MOZ_OVERRIDE;
+  virtual bool IsActiveWidget() const override;
+  virtual bool AreItemsOperable() const override;
+  virtual Accessible* CurrentItem() override;
+  virtual void SetCurrentItem(Accessible* aItem) override;
 
 protected:
   // Accessible
-  virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE;
+  virtual ENameValueFlag NativeName(nsString& aName) override;
 };
 
 } // namespace a11y
 } // namespace mozilla
 
 #endif
--- a/accessible/xul/XULSelectControlAccessible.h
+++ b/accessible/xul/XULSelectControlAccessible.h
@@ -18,31 +18,31 @@ namespace a11y {
  */
 class XULSelectControlAccessible : public AccessibleWrap
 {
 public:
   XULSelectControlAccessible(nsIContent* aContent, DocAccessible* aDoc);
   virtual ~XULSelectControlAccessible() {}
 
   // Accessible
-  virtual void Shutdown() MOZ_OVERRIDE;
+  virtual void Shutdown() override;
 
   // SelectAccessible
-  virtual void SelectedItems(nsTArray<Accessible*>* aItems) MOZ_OVERRIDE;
-  virtual uint32_t SelectedItemCount() MOZ_OVERRIDE;
-  virtual Accessible* GetSelectedItem(uint32_t aIndex) MOZ_OVERRIDE;
-  virtual bool IsItemSelected(uint32_t aIndex) MOZ_OVERRIDE;
-  virtual bool AddItemToSelection(uint32_t aIndex) MOZ_OVERRIDE;
-  virtual bool RemoveItemFromSelection(uint32_t aIndex) MOZ_OVERRIDE;
-  virtual bool SelectAll() MOZ_OVERRIDE;
-  virtual bool UnselectAll() MOZ_OVERRIDE;
+  virtual void SelectedItems(nsTArray<Accessible*>* aItems) override;
+  virtual uint32_t SelectedItemCount() override;
+  virtual Accessible* GetSelectedItem(uint32_t aIndex) override;
+  virtual bool IsItemSelected(uint32_t aIndex) override;
+  virtual bool AddItemToSelection(uint32_t aIndex) override;
+  virtual bool RemoveItemFromSelection(uint32_t aIndex) override;
+  virtual bool SelectAll() override;
+  virtual bool UnselectAll() override;
 
   // Widgets
-  virtual Accessible* CurrentItem() MOZ_OVERRIDE;
-  virtual void SetCurrentItem(Accessible* aItem) MOZ_OVERRIDE;
+  virtual Accessible* CurrentItem() override;
+  virtual void SetCurrentItem(Accessible* aItem) override;
 
 protected:
   // nsIDOMXULMultiSelectControlElement inherits from this, so we'll always have
   // one of these if the widget is valid and not defunct
   nsCOMPtr<nsIDOMXULSelectControlElement> mSelectControl;
 };
 
 } // namespace a11y
--- a/accessible/xul/XULSliderAccessible.h
+++ b/accessible/xul/XULSliderAccessible.h
@@ -17,33 +17,33 @@ namespace a11y {
  * Used for XUL slider and scale elements.
  */
 class XULSliderAccessible : public AccessibleWrap
 {
 public:
   XULSliderAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual void Value(nsString& aValue) MOZ_OVERRIDE;
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeInteractiveState() const MOZ_OVERRIDE;
-  virtual bool NativelyUnavailable() const MOZ_OVERRIDE;
-  virtual bool CanHaveAnonChildren() MOZ_OVERRIDE;
+  virtual void Value(nsString& aValue) override;
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeInteractiveState() const override;
+  virtual bool NativelyUnavailable() const override;
+  virtual bool CanHaveAnonChildren() override;
 
   // Value
-  virtual double MaxValue() const MOZ_OVERRIDE;
-  virtual double MinValue() const MOZ_OVERRIDE;
-  virtual double CurValue() const MOZ_OVERRIDE;
-  virtual double Step() const MOZ_OVERRIDE;
-  virtual bool SetCurValue(double aValue) MOZ_OVERRIDE;
+  virtual double MaxValue() const override;
+  virtual double MinValue() const override;
+  virtual double CurValue() const override;
+  virtual double Step() const override;
+  virtual bool SetCurValue(double aValue) override;
 
   // ActionAccessible
-  virtual uint8_t ActionCount() MOZ_OVERRIDE;
-  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) MOZ_OVERRIDE;
-  virtual bool DoAction(uint8_t aIndex) MOZ_OVERRIDE;
+  virtual uint8_t ActionCount() override;
+  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
+  virtual bool DoAction(uint8_t aIndex) override;
 
 protected:
   /**
    * Return anonymous slider element.
    */
   nsIContent* GetSliderElement() const;
 
   nsresult GetSliderAttr(nsIAtom *aName, nsAString& aValue) const;
@@ -61,16 +61,16 @@ private:
  * Used for slider's thumb element.
  */
 class XULThumbAccessible : public AccessibleWrap
 {
 public:
   XULThumbAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
+  virtual a11y::role NativeRole() override;
 };
 
 } // namespace a11y
 } // namespace mozilla
 
 #endif
 
--- a/accessible/xul/XULTabAccessible.h
+++ b/accessible/xul/XULTabAccessible.h
@@ -19,78 +19,78 @@ namespace a11y {
 class XULTabAccessible : public AccessibleWrap
 {
 public:
   enum { eAction_Switch = 0 };
 
   XULTabAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
-  virtual uint64_t NativeInteractiveState() const MOZ_OVERRIDE;
-  virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE;
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
+  virtual uint64_t NativeInteractiveState() const override;
+  virtual Relation RelationByType(RelationType aType) override;
 
   // ActionAccessible
-  virtual uint8_t ActionCount() MOZ_OVERRIDE;
-  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) MOZ_OVERRIDE;
-  virtual bool DoAction(uint8_t aIndex) MOZ_OVERRIDE;
+  virtual uint8_t ActionCount() override;
+  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
+  virtual bool DoAction(uint8_t aIndex) override;
 };
 
 
 /**
  * A container of tab objects, xul:tabs element.
  */
 class XULTabsAccessible : public XULSelectControlAccessible
 {
 public:
   XULTabsAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual void Value(nsString& aValue) MOZ_OVERRIDE;
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
+  virtual void Value(nsString& aValue) override;
+  virtual a11y::role NativeRole() override;
 
   // ActionAccessible
-  virtual uint8_t ActionCount() MOZ_OVERRIDE;
+  virtual uint8_t ActionCount() override;
 
 protected:
   // Accessible
-  virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE;
+  virtual ENameValueFlag NativeName(nsString& aName) override;
 };
 
 
 /**
  * A container of tab panels, xul:tabpanels element.
  */
 class XULTabpanelsAccessible : public AccessibleWrap
 {
 public:
   XULTabpanelsAccessible(nsIContent* aContent, DocAccessible* aDoc) :
     AccessibleWrap(aContent, aDoc)
     { mType = eXULTabpanelsType; }
 
   // Accessible
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
+  virtual a11y::role NativeRole() override;
 };
 
 
 /**
  * A tabpanel object, child elements of xul:tabpanels element.
  *
  * XXX: we need to move the class logic into generic class since
  * for example we do not create instance of this class for XUL textbox used as
  * a tabpanel.
  */
 class XULTabpanelAccessible : public AccessibleWrap
 {
 public:
   XULTabpanelAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE;
+  virtual a11y::role NativeRole() override;
+  virtual Relation RelationByType(RelationType aType) override;
 };
 
 } // namespace a11y
 } // namespace mozilla
 
 #endif
 
--- a/accessible/xul/XULTreeAccessible.h
+++ b/accessible/xul/XULTreeAccessible.h
@@ -34,45 +34,45 @@ public:
   XULTreeAccessible(nsIContent* aContent, DocAccessible* aDoc,
                     nsTreeBodyFrame* aTreeframe);
 
   // nsISupports and cycle collection
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(XULTreeAccessible, Accessible)
 
   // Accessible
-  virtual void Shutdown() MOZ_OVERRIDE;
-  virtual void Value(nsString& aValue) MOZ_OVERRIDE;
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
+  virtual void Shutdown() override;
+  virtual void Value(nsString& aValue) override;
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
   virtual Accessible* ChildAtPoint(int32_t aX, int32_t aY,
-                                   EWhichChildAtPoint aWhichChild) MOZ_OVERRIDE;
+                                   EWhichChildAtPoint aWhichChild) override;
 
-  virtual Accessible* GetChildAt(uint32_t aIndex) const MOZ_OVERRIDE;
-  virtual uint32_t ChildCount() const MOZ_OVERRIDE;
-  virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE;
+  virtual Accessible* GetChildAt(uint32_t aIndex) const override;
+  virtual uint32_t ChildCount() const override;
+  virtual Relation RelationByType(RelationType aType) override;
 
   // SelectAccessible
-  virtual void SelectedItems(nsTArray<Accessible*>* aItems) MOZ_OVERRIDE;
-  virtual uint32_t SelectedItemCount() MOZ_OVERRIDE;
-  virtual Accessible* GetSelectedItem(uint32_t aIndex) MOZ_OVERRIDE;
-  virtual bool IsItemSelected(uint32_t aIndex) MOZ_OVERRIDE;
-  virtual bool AddItemToSelection(uint32_t aIndex) MOZ_OVERRIDE;
-  virtual bool RemoveItemFromSelection(uint32_t aIndex) MOZ_OVERRIDE;
-  virtual bool SelectAll() MOZ_OVERRIDE;
-  virtual bool UnselectAll() MOZ_OVERRIDE;
+  virtual void SelectedItems(nsTArray<Accessible*>* aItems) override;
+  virtual uint32_t SelectedItemCount() override;
+  virtual Accessible* GetSelectedItem(uint32_t aIndex) override;
+  virtual bool IsItemSelected(uint32_t aIndex) override;
+  virtual bool AddItemToSelection(uint32_t aIndex) override;
+  virtual bool RemoveItemFromSelection(uint32_t aIndex) override;
+  virtual bool SelectAll() override;
+  virtual bool UnselectAll() override;
 
   // Widgets
-  virtual bool IsWidget() const MOZ_OVERRIDE;
-  virtual bool IsActiveWidget() const MOZ_OVERRIDE;
-  virtual bool AreItemsOperable() const MOZ_OVERRIDE;
-  virtual Accessible* CurrentItem() MOZ_OVERRIDE;
-  virtual void SetCurrentItem(Accessible* aItem) MOZ_OVERRIDE;
+  virtual bool IsWidget() const override;
+  virtual bool IsActiveWidget() const override;
+  virtual bool AreItemsOperable() const override;
+  virtual Accessible* CurrentItem() override;
+  virtual void SetCurrentItem(Accessible* aItem) override;
 
-  virtual Accessible* ContainerWidget() const MOZ_OVERRIDE;
+  virtual Accessible* ContainerWidget() const override;
 
   // XULTreeAccessible
 
   /**
    * Return tree item accessible at the givem row. If accessible doesn't exist
    * in the cache then create and cache it.
    *
    * @param aRow         [in] the given row index
@@ -140,34 +140,34 @@ public:
                             nsITreeView* aTreeView, int32_t aRow);
 
   // nsISupports and cycle collection
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(XULTreeItemAccessibleBase,
                                            AccessibleWrap)
 
   // Accessible
-  virtual void Shutdown() MOZ_OVERRIDE;
-  virtual nsIntRect Bounds() const MOZ_OVERRIDE;
-  virtual GroupPos GroupPosition() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
-  virtual uint64_t NativeInteractiveState() const MOZ_OVERRIDE;
-  virtual int32_t IndexInParent() const MOZ_OVERRIDE;
-  virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE;
-  virtual Accessible* FocusedChild() MOZ_OVERRIDE;
-  virtual void SetSelected(bool aSelect) MOZ_OVERRIDE;
-  virtual void TakeFocus() MOZ_OVERRIDE;
+  virtual void Shutdown() override;
+  virtual nsIntRect Bounds() const override;
+  virtual GroupPos GroupPosition() override;
+  virtual uint64_t NativeState() override;
+  virtual uint64_t NativeInteractiveState() const override;
+  virtual int32_t IndexInParent() const override;
+  virtual Relation RelationByType(RelationType aType) override;
+  virtual Accessible* FocusedChild() override;
+  virtual void SetSelected(bool aSelect) override;
+  virtual void TakeFocus() override;
 
   // ActionAccessible
-  virtual uint8_t ActionCount() MOZ_OVERRIDE;
-  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) MOZ_OVERRIDE;
-  virtual bool DoAction(uint8_t aIndex) MOZ_OVERRIDE;
+  virtual uint8_t ActionCount() override;
+  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
+  virtual bool DoAction(uint8_t aIndex) override;
 
   // Widgets
-  virtual Accessible* ContainerWidget() const MOZ_OVERRIDE;
+  virtual Accessible* ContainerWidget() const override;
 
   // XULTreeItemAccessibleBase
   NS_DECLARE_STATIC_IID_ACCESSOR(XULTREEITEMBASEACCESSIBLE_IMPL_CID)
 
   /**
    * Return row index associated with the accessible.
    */
   int32_t GetRowIndex() const { return mRow; }
@@ -185,19 +185,19 @@ public:
   virtual void RowInvalidated(int32_t aStartColIdx, int32_t aEndColIdx) = 0;
 
 protected:
   virtual ~XULTreeItemAccessibleBase();
 
   enum { eAction_Click = 0, eAction_Expand = 1 };
 
   // Accessible
-  virtual void DispatchClickEvent(nsIContent *aContent, uint32_t aActionIndex) MOZ_OVERRIDE;
+  virtual void DispatchClickEvent(nsIContent *aContent, uint32_t aActionIndex) override;
   virtual Accessible* GetSiblingAtOffset(int32_t aOffset,
-                                         nsresult *aError = nullptr) const MOZ_OVERRIDE;
+                                         nsresult *aError = nullptr) const override;
 
   // XULTreeItemAccessibleBase
 
   /**
    * Return true if the tree item accessible is expandable (contains subrows).
    */
   bool IsExpandable();
 
@@ -226,28 +226,28 @@ public:
                         nsITreeView* aTreeView, int32_t aRow);
 
   // nsISupports and cycle collection
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(XULTreeItemAccessible,
                                            XULTreeItemAccessibleBase)
 
   // Accessible
-  virtual void Shutdown() MOZ_OVERRIDE;
-  virtual ENameValueFlag Name(nsString& aName) MOZ_OVERRIDE;
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
+  virtual void Shutdown() override;
+  virtual ENameValueFlag Name(nsString& aName) override;
+  virtual a11y::role NativeRole() override;
 
   // XULTreeItemAccessibleBase
-  virtual void RowInvalidated(int32_t aStartColIdx, int32_t aEndColIdx) MOZ_OVERRIDE;
+  virtual void RowInvalidated(int32_t aStartColIdx, int32_t aEndColIdx) override;
 
 protected:
   virtual ~XULTreeItemAccessible();
 
   // Accessible
-  virtual void CacheChildren() MOZ_OVERRIDE;
+  virtual void CacheChildren() override;
 
   // XULTreeItemAccessible
   nsCOMPtr<nsITreeColumn> mColumn;
   nsString mCachedName;
 };
 
 
 /**
@@ -258,17 +258,17 @@ class XULTreeColumAccessible : public XU
 public:
   XULTreeColumAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
 protected:
 
   // Accessible
   virtual Accessible* GetSiblingAtOffset(int32_t aOffset,
                                          nsresult* aError = nullptr) const
-    MOZ_OVERRIDE;
+    override;
 };
 
 
 ////////////////////////////////////////////////////////////////////////////////
 // Accessible downcasting method
 
 inline XULTreeAccessible*
 Accessible::AsXULTree()
--- a/accessible/xul/XULTreeGridAccessible.h
+++ b/accessible/xul/XULTreeGridAccessible.h
@@ -25,85 +25,85 @@ class XULTreeGridAccessible : public XUL
 {
 public:
   XULTreeGridAccessible(nsIContent* aContent, DocAccessible* aDoc,
                         nsTreeBodyFrame* aTreeFrame) :
     XULTreeAccessible(aContent, aDoc, aTreeFrame)
     { mGenericTypes |= eTable; }
 
   // TableAccessible
-  virtual uint32_t ColCount() MOZ_OVERRIDE;
-  virtual uint32_t RowCount() MOZ_OVERRIDE;
-  virtual Accessible* CellAt(uint32_t aRowIndex, uint32_t aColumnIndex) MOZ_OVERRIDE;
-  virtual void ColDescription(uint32_t aColIdx, nsString& aDescription) MOZ_OVERRIDE;
-  virtual bool IsColSelected(uint32_t aColIdx) MOZ_OVERRIDE;
-  virtual bool IsRowSelected(uint32_t aRowIdx) MOZ_OVERRIDE;
-  virtual bool IsCellSelected(uint32_t aRowIdx, uint32_t aColIdx) MOZ_OVERRIDE;
-  virtual uint32_t SelectedCellCount() MOZ_OVERRIDE;
-  virtual uint32_t SelectedColCount() MOZ_OVERRIDE;
-  virtual uint32_t SelectedRowCount() MOZ_OVERRIDE;
-  virtual void SelectedCells(nsTArray<Accessible*>* aCells) MOZ_OVERRIDE;
-  virtual void SelectedCellIndices(nsTArray<uint32_t>* aCells) MOZ_OVERRIDE;
-  virtual void SelectedColIndices(nsTArray<uint32_t>* aCols) MOZ_OVERRIDE;
-  virtual void SelectedRowIndices(nsTArray<uint32_t>* aRows) MOZ_OVERRIDE;
-  virtual void SelectRow(uint32_t aRowIdx) MOZ_OVERRIDE;
-  virtual void UnselectRow(uint32_t aRowIdx) MOZ_OVERRIDE;
-  virtual Accessible* AsAccessible() MOZ_OVERRIDE { return this; }
+  virtual uint32_t ColCount() override;
+  virtual uint32_t RowCount() override;
+  virtual Accessible* CellAt(uint32_t aRowIndex, uint32_t aColumnIndex) override;
+  virtual void ColDescription(uint32_t aColIdx, nsString& aDescription) override;
+  virtual bool IsColSelected(uint32_t aColIdx) override;
+  virtual bool IsRowSelected(uint32_t aRowIdx) override;
+  virtual bool IsCellSelected(uint32_t aRowIdx, uint32_t aColIdx) override;
+  virtual uint32_t SelectedCellCount() override;
+  virtual uint32_t SelectedColCount() override;
+  virtual uint32_t SelectedRowCount() override;
+  virtual void SelectedCells(nsTArray<Accessible*>* aCells) override;
+  virtual void SelectedCellIndices(nsTArray<uint32_t>* aCells) override;
+  virtual void SelectedColIndices(nsTArray<uint32_t>* aCols) override;
+  virtual void SelectedRowIndices(nsTArray<uint32_t>* aRows) override;
+  virtual void SelectRow(uint32_t aRowIdx) override;
+  virtual void UnselectRow(uint32_t aRowIdx) override;
+  virtual Accessible* AsAccessible() override { return this; }
 
   // Accessible
-  virtual TableAccessible* AsTable() MOZ_OVERRIDE { return this; }
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
+  virtual TableAccessible* AsTable() override { return this; }
+  virtual a11y::role NativeRole() override;
 
 protected:
   virtual ~XULTreeGridAccessible();
 
   // XULTreeAccessible
   virtual already_AddRefed<Accessible>
-    CreateTreeItemAccessible(int32_t aRow) const MOZ_OVERRIDE;
+    CreateTreeItemAccessible(int32_t aRow) const override;
 };
 
 
 /**
  * Represents accessible for XUL tree item in the case when XUL tree has
  * multiple columns.
  */
-class XULTreeGridRowAccessible MOZ_FINAL : public XULTreeItemAccessibleBase
+class XULTreeGridRowAccessible final : public XULTreeItemAccessibleBase
 {
 public:
   using Accessible::GetChildAt;
 
   XULTreeGridRowAccessible(nsIContent* aContent, DocAccessible* aDoc,
                            Accessible* aParent, nsITreeBoxObject* aTree,
                            nsITreeView* aTreeView, int32_t aRow);
 
   // nsISupports and cycle collection
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(XULTreeGridRowAccessible,
                                            XULTreeItemAccessibleBase)
 
   // Accessible
-  virtual void Shutdown() MOZ_OVERRIDE;
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual ENameValueFlag Name(nsString& aName) MOZ_OVERRIDE;
+  virtual void Shutdown() override;
+  virtual a11y::role NativeRole() override;
+  virtual ENameValueFlag Name(nsString& aName) override;
   virtual Accessible* ChildAtPoint(int32_t aX, int32_t aY,
-                                   EWhichChildAtPoint aWhichChild) MOZ_OVERRIDE;
+                                   EWhichChildAtPoint aWhichChild) override;
 
-  virtual Accessible* GetChildAt(uint32_t aIndex) const MOZ_OVERRIDE;
-  virtual uint32_t ChildCount() const MOZ_OVERRIDE;
+  virtual Accessible* GetChildAt(uint32_t aIndex) const override;
+  virtual uint32_t ChildCount() const override;
 
   // XULTreeItemAccessibleBase
   virtual XULTreeGridCellAccessible* GetCellAccessible(nsITreeColumn* aColumn)
-    const MOZ_OVERRIDE MOZ_FINAL;
-  virtual void RowInvalidated(int32_t aStartColIdx, int32_t aEndColIdx) MOZ_OVERRIDE;
+    const override final;
+  virtual void RowInvalidated(int32_t aStartColIdx, int32_t aEndColIdx) override;
 
 protected:
   virtual ~XULTreeGridRowAccessible();
 
   // Accessible
-  virtual void CacheChildren() MOZ_OVERRIDE;
+  virtual void CacheChildren() override;
 
   // XULTreeItemAccessibleBase
   mutable nsRefPtrHashtable<nsPtrHashKey<const void>, XULTreeGridCellAccessible>
     mAccessibleCache;
 };
 
 
 /**
@@ -122,54 +122,54 @@ public:
                             int32_t aRow, nsITreeColumn* aColumn);
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(XULTreeGridCellAccessible,
                                            LeafAccessible)
 
   // Accessible
-  virtual TableCellAccessible* AsTableCell() MOZ_OVERRIDE { return this; }
-  virtual nsIntRect Bounds() const MOZ_OVERRIDE;
-  virtual ENameValueFlag Name(nsString& aName) MOZ_OVERRIDE;
-  virtual Accessible* FocusedChild() MOZ_OVERRIDE;
-  virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() MOZ_OVERRIDE;
-  virtual int32_t IndexInParent() const MOZ_OVERRIDE;
-  virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE;
-  virtual a11y::role NativeRole() MOZ_OVERRIDE;
-  virtual uint64_t NativeState() MOZ_OVERRIDE;
-  virtual uint64_t NativeInteractiveState() const MOZ_OVERRIDE;
+  virtual TableCellAccessible* AsTableCell() override { return this; }
+  virtual nsIntRect Bounds() const override;
+  virtual ENameValueFlag Name(nsString& aName) override;
+  virtual Accessible* FocusedChild() override;
+  virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() override;
+  virtual int32_t IndexInParent() const override;
+  virtual Relation RelationByType(RelationType aType) override;
+  virtual a11y::role NativeRole() override;
+  virtual uint64_t NativeState() override;
+  virtual uint64_t NativeInteractiveState() const override;
 
   // ActionAccessible
-  virtual uint8_t ActionCount() MOZ_OVERRIDE;
-  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) MOZ_OVERRIDE;
-  virtual bool DoAction(uint8_t aIndex) MOZ_OVERRIDE;
+  virtual uint8_t ActionCount() override;
+  virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
+  virtual bool DoAction(uint8_t aIndex) override;
 
   // TableCellAccessible
-  virtual TableAccessible* Table() const MOZ_OVERRIDE;
-  virtual uint32_t ColIdx() const MOZ_OVERRIDE;
-  virtual uint32_t RowIdx() const MOZ_OVERRIDE;
-  virtual void ColHeaderCells(nsTArray<Accessible*>* aHeaderCells) MOZ_OVERRIDE;
-  virtual void RowHeaderCells(nsTArray<Accessible*>* aCells) MOZ_OVERRIDE { }
-  virtual bool Selected() MOZ_OVERRIDE;
+  virtual TableAccessible* Table() const override;
+  virtual uint32_t ColIdx() const override;
+  virtual uint32_t RowIdx() const override;
+  virtual void ColHeaderCells(nsTArray<Accessible*>* aHeaderCells) override;
+  virtual void RowHeaderCells(nsTArray<Accessible*>* aCells) override { }
+  virtual bool Selected() override;
 
   /**
    * Fire name or state change event if the accessible text or value has been
    * changed.
    * @return true if name has changed
    */
   bool CellInvalidated();
 
 protected:
   virtual ~XULTreeGridCellAccessible();
 
   // Accessible
   virtual Accessible* GetSiblingAtOffset(int32_t aOffset,
-                                         nsresult* aError = nullptr) const MOZ_OVERRIDE;
-  virtual void DispatchClickEvent(nsIContent* aContent, uint32_t aActionIndex) MOZ_OVERRIDE;
+                                         nsresult* aError = nullptr) const override;
+  virtual void DispatchClickEvent(nsIContent* aContent, uint32_t aActionIndex) override;
 
   // XULTreeGridCellAccessible
 
   /**
    * Return true if value of cell can be modified.
    */
   bool IsEditable() const;
 
--- a/browser/components/dirprovider/DirectoryProvider.h
+++ b/browser/components/dirprovider/DirectoryProvider.h
@@ -12,27 +12,27 @@
 #include "mozilla/Attributes.h"
 
 #define NS_BROWSERDIRECTORYPROVIDER_CONTRACTID \
   "@mozilla.org/browser/directory-provider;1"
 
 namespace mozilla {
 namespace browser {
 
-class DirectoryProvider MOZ_FINAL : public nsIDirectoryServiceProvider2
+class DirectoryProvider final : public nsIDirectoryServiceProvider2
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIDIRECTORYSERVICEPROVIDER
   NS_DECL_NSIDIRECTORYSERVICEPROVIDER2
 
 private:
   ~DirectoryProvider() {}
 
-  class AppendingEnumerator MOZ_FINAL : public nsISimpleEnumerator
+  class AppendingEnumerator final : public nsISimpleEnumerator
   {
   public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSISIMPLEENUMERATOR
 
     AppendingEnumerator(nsISimpleEnumerator* aBase,
                         char const *const *aAppendList);
 
--- a/browser/components/feeds/nsFeedSniffer.h
+++ b/browser/components/feeds/nsFeedSniffer.h
@@ -4,17 +4,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 
 #include "nsIContentSniffer.h"
 #include "nsIStreamListener.h"
 #include "nsStringAPI.h"
 #include "mozilla/Attributes.h"
 
-class nsFeedSniffer MOZ_FINAL : public nsIContentSniffer,
+class nsFeedSniffer final : public nsIContentSniffer,
                                        nsIStreamListener
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSICONTENTSNIFFER
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSISTREAMLISTENER
 
--- a/browser/components/migration/nsIEHistoryEnumerator.h
+++ b/browser/components/migration/nsIEHistoryEnumerator.h
@@ -7,17 +7,17 @@
 
 #include <urlhist.h>
 
 #include "mozilla/Attributes.h"
 #include "nsISimpleEnumerator.h"
 #include "nsIWritablePropertyBag2.h"
 #include "nsAutoPtr.h"
 
-class nsIEHistoryEnumerator MOZ_FINAL : public nsISimpleEnumerator
+class nsIEHistoryEnumerator final : public nsISimpleEnumerator
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSISIMPLEENUMERATOR
 
   nsIEHistoryEnumerator();
 
 private:
--- a/browser/components/shell/nsGNOMEShellService.h
+++ b/browser/components/shell/nsGNOMEShellService.h
@@ -5,17 +5,17 @@
 
 #ifndef nsgnomeshellservice_h____
 #define nsgnomeshellservice_h____
 
 #include "nsIShellService.h"
 #include "nsStringAPI.h"
 #include "mozilla/Attributes.h"
 
-class nsGNOMEShellService MOZ_FINAL : public nsIShellService
+class nsGNOMEShellService final : public nsIShellService
 {
 public:
   nsGNOMEShellService() : mCheckedThisSession(false), mAppIsInPath(false) { }
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSISHELLSERVICE
 
   nsresult Init();
--- a/browser/devtools/tilt/test/browser_tilt_gl01.js
+++ b/browser/devtools/tilt/test/browser_tilt_gl01.js
@@ -125,25 +125,25 @@ function test() {
   renderer.frontFace("ccw");
   is(gl.getParameter(gl.FRONT_FACE), gl.CCW,
     "The front face ccw mode wasn't set correctly.");
 
   renderer.blendMode("alpha");
   is(gl.getParameter(gl.BLEND), true,
     "The blend mode wasn't enabled when requested.");
   is(gl.getParameter(gl.BLEND_SRC_ALPHA), gl.SRC_ALPHA,
-    "The soruce blend func wasn't set correctly.");
+    "The source blend func wasn't set correctly.");
   is(gl.getParameter(gl.BLEND_DST_ALPHA), gl.ONE_MINUS_SRC_ALPHA,
     "The destination blend func wasn't set correctly.");
 
   renderer.blendMode("add");
   is(gl.getParameter(gl.BLEND), true,
     "The blend mode wasn't enabled when requested.");
   is(gl.getParameter(gl.BLEND_SRC_ALPHA), gl.SRC_ALPHA,
-    "The soruce blend func wasn't set correctly.");
+    "The source blend func wasn't set correctly.");
   is(gl.getParameter(gl.BLEND_DST_ALPHA), gl.ONE,
     "The destination blend func wasn't set correctly.");
 
   renderer.blendMode(false);
   is(gl.getParameter(gl.CULL_FACE), false,
     "The blend mode wasn't disabled when requested.");
 
 
--- a/browser/devtools/tilt/test/browser_tilt_gl03.js
+++ b/browser/devtools/tilt/test/browser_tilt_gl03.js
@@ -37,17 +37,17 @@ function test() {
     "The stencil test wasn't set to the correct default value.");
   is(gl.getParameter(gl.CULL_FACE), false,
     "The cull face wasn't set to the correct default value.");
   is(gl.getParameter(gl.FRONT_FACE), gl.CCW,
     "The front face wasn't set to the correct default value.");
   is(gl.getParameter(gl.BLEND), true,
     "The blend mode wasn't set to the correct default value.");
   is(gl.getParameter(gl.BLEND_SRC_ALPHA), gl.SRC_ALPHA,
-    "The soruce blend func wasn't set to the correct default value.");
+    "The source blend func wasn't set to the correct default value.");
   is(gl.getParameter(gl.BLEND_DST_ALPHA), gl.ONE_MINUS_SRC_ALPHA,
     "The destination blend func wasn't set to the correct default value.");
 
 
   ok(isApproxVec(renderer._fillColor, [1, 1, 1, 1]),
     "The fill color wasn't set to the correct default value.");
   ok(isApproxVec(renderer._strokeColor, [0, 0, 0, 1]),
     "The stroke color wasn't set to the correct default value.");
--- a/build/gecko_templates.mozbuild
+++ b/build/gecko_templates.mozbuild
@@ -50,19 +50,17 @@ def GeckoBinary(linkage='dependent', msv
 
         USE_LIBS += [
             xpcomglue,
         ]
     elif linkage != None:
         error('`linkage` must be "dependent", "standalone" or None')
 
     if mozglue:
-        if CONFIG['JS_STANDALONE']:
-            pass
-        elif CONFIG['MOZ_CRT']:
+        if CONFIG['MOZ_CRT']:
             if msvcrt == 'dynamic':
                 USE_LIBS += ['mozcrt']
             elif msvcrt == 'static':
                 USE_LIBS += ['mozglue']
             else:
                 error('`msvcrt` must be "dynamic" or "static"')
         else:
             LDFLAGS += CONFIG['MOZ_GLUE_WRAP_LDFLAGS']
--- a/caps/nsNullPrincipal.h
+++ b/caps/nsNullPrincipal.h
@@ -22,17 +22,17 @@ class nsIURI;
 
 #define NS_NULLPRINCIPAL_CID \
 { 0xa0bd8b42, 0xf6bf, 0x4fb9, \
   { 0x93, 0x42, 0x90, 0xbf, 0xc9, 0xb7, 0xa1, 0xab } }
 #define NS_NULLPRINCIPAL_CONTRACTID "@mozilla.org/nullprincipal;1"
 
 #define NS_NULLPRINCIPAL_SCHEME "moz-nullprincipal"
 
-class nsNullPrincipal MOZ_FINAL : public nsJSPrincipals
+class nsNullPrincipal final : public nsJSPrincipals
 {
 public:
   nsNullPrincipal();
 
   // Our refcount is managed by nsJSPrincipals.  Use this macro to avoid an
   // extra refcount member.
 
   // FIXME: bug 327245 -- I sorta wish there were a clean way to share the
@@ -42,22 +42,22 @@ public:
   NS_DECL_NSIPRINCIPAL
   NS_DECL_NSISERIALIZABLE
 
   static already_AddRefed<nsNullPrincipal> CreateWithInheritedAttributes(nsIPrincipal *aInheritFrom);
 
   nsresult Init(uint32_t aAppId = nsIScriptSecurityManager::NO_APP_ID,
                 bool aInMozBrowser = false);
 
-  virtual void GetScriptLocation(nsACString &aStr) MOZ_OVERRIDE;
+  virtual void GetScriptLocation(nsACString &aStr) override;
 
   static nsresult GenerateNullPrincipalURI(nsACString &aStr);
 
 #ifdef DEBUG
-  virtual void dumpImpl() MOZ_OVERRIDE;
+  virtual void dumpImpl() override;
 #endif 
 
  protected:
   virtual ~nsNullPrincipal();
 
   nsCOMPtr<nsIURI> mURI;
   nsCOMPtr<nsIContentSecurityPolicy> mCSP;
   uint32_t mAppId;
--- a/caps/nsNullPrincipalURI.h
+++ b/caps/nsNullPrincipalURI.h
@@ -19,28 +19,28 @@
 #include "nsIIPCSerializableURI.h"
 #include "mozilla/MemoryReporting.h"
 
 // {51fcd543-3b52-41f7-b91b-6b54102236e6}
 #define NS_NULLPRINCIPALURI_IMPLEMENTATION_CID \
   {0x51fcd543, 0x3b52, 0x41f7, \
     {0xb9, 0x1b, 0x6b, 0x54, 0x10, 0x22, 0x36, 0xe6} }
 
-class nsNullPrincipalURI MOZ_FINAL : public nsIURI
+class nsNullPrincipalURI final : public nsIURI
                                    , public nsISizeOf
                                    , public nsIIPCSerializableURI
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIURI
   NS_DECL_NSIIPCSERIALIZABLEURI
 
   // nsISizeOf
-  virtual size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
-  virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
+  virtual size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
+  virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
 
   explicit nsNullPrincipalURI(const nsCString &aSpec);
 
   // NB: This constructor exists only for deserialization.
   nsNullPrincipalURI() { }
 
 private:
   ~nsNullPrincipalURI() {}
--- a/caps/nsPrincipal.h
+++ b/caps/nsPrincipal.h
@@ -39,51 +39,51 @@ protected:
 
 #ifdef DEBUG
   virtual void dumpImpl() = 0;
 #endif
 
   nsCOMPtr<nsIContentSecurityPolicy> mCSP;
 };
 
-class nsPrincipal MOZ_FINAL : public nsBasePrincipal
+class nsPrincipal final : public nsBasePrincipal
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSISERIALIZABLE
-  NS_IMETHOD Equals(nsIPrincipal* other, bool* _retval) MOZ_OVERRIDE;
-  NS_IMETHOD EqualsConsideringDomain(nsIPrincipal* other, bool* _retval) MOZ_OVERRIDE;
-  NS_IMETHOD GetHashValue(uint32_t* aHashValue) MOZ_OVERRIDE;
-  NS_IMETHOD GetURI(nsIURI** aURI) MOZ_OVERRIDE;
-  NS_IMETHOD GetDomain(nsIURI** aDomain) MOZ_OVERRIDE;
-  NS_IMETHOD SetDomain(nsIURI* aDomain) MOZ_OVERRIDE;
-  NS_IMETHOD GetOrigin(char** aOrigin) MOZ_OVERRIDE;
-  NS_IMETHOD Subsumes(nsIPrincipal* other, bool* _retval) MOZ_OVERRIDE;
-  NS_IMETHOD SubsumesConsideringDomain(nsIPrincipal* other, bool* _retval) MOZ_OVERRIDE;
-  NS_IMETHOD CheckMayLoad(nsIURI* uri, bool report, bool allowIfInheritsPrincipal) MOZ_OVERRIDE;
-  NS_IMETHOD GetJarPrefix(nsACString& aJarPrefix) MOZ_OVERRIDE;
-  NS_IMETHOD GetAppStatus(uint16_t* aAppStatus) MOZ_OVERRIDE;
-  NS_IMETHOD GetAppId(uint32_t* aAppStatus) MOZ_OVERRIDE;
-  NS_IMETHOD GetIsInBrowserElement(bool* aIsInBrowserElement) MOZ_OVERRIDE;
-  NS_IMETHOD GetUnknownAppId(bool* aUnknownAppId) MOZ_OVERRIDE;
-  NS_IMETHOD GetIsNullPrincipal(bool* aIsNullPrincipal) MOZ_OVERRIDE;
-  NS_IMETHOD GetBaseDomain(nsACString& aBaseDomain) MOZ_OVERRIDE;
-  virtual bool IsOnCSSUnprefixingWhitelist() MOZ_OVERRIDE;
+  NS_IMETHOD Equals(nsIPrincipal* other, bool* _retval) override;
+  NS_IMETHOD EqualsConsideringDomain(nsIPrincipal* other, bool* _retval) override;
+  NS_IMETHOD GetHashValue(uint32_t* aHashValue) override;
+  NS_IMETHOD GetURI(nsIURI** aURI) override;
+  NS_IMETHOD GetDomain(nsIURI** aDomain) override;
+  NS_IMETHOD SetDomain(nsIURI* aDomain) override;
+  NS_IMETHOD GetOrigin(char** aOrigin) override;
+  NS_IMETHOD Subsumes(nsIPrincipal* other, bool* _retval) override;
+  NS_IMETHOD SubsumesConsideringDomain(nsIPrincipal* other, bool* _retval) override;
+  NS_IMETHOD CheckMayLoad(nsIURI* uri, bool report, bool allowIfInheritsPrincipal) override;
+  NS_IMETHOD GetJarPrefix(nsACString& aJarPrefix) override;
+  NS_IMETHOD GetAppStatus(uint16_t* aAppStatus) override;
+  NS_IMETHOD GetAppId(uint32_t* aAppStatus) override;
+  NS_IMETHOD GetIsInBrowserElement(bool* aIsInBrowserElement) override;
+  NS_IMETHOD GetUnknownAppId(bool* aUnknownAppId) override;
+  NS_IMETHOD GetIsNullPrincipal(bool* aIsNullPrincipal) override;
+  NS_IMETHOD GetBaseDomain(nsACString& aBaseDomain) override;
+  virtual bool IsOnCSSUnprefixingWhitelist() override;
 #ifdef DEBUG
-  virtual void dumpImpl() MOZ_OVERRIDE;
+  virtual void dumpImpl() override;
 #endif
 
   nsPrincipal();
 
   // Init() must be called before the principal is in a usable state.
   nsresult Init(nsIURI* aCodebase,
                 uint32_t aAppId,
                 bool aInMozBrowser);
 
-  virtual void GetScriptLocation(nsACString& aStr) MOZ_OVERRIDE;
+  virtual void GetScriptLocation(nsACString& aStr) override;
   void SetURI(nsIURI* aURI);
 
   static bool IsPrincipalInherited(nsIURI* aURI) {
     // return true if the loadee URI has
     // the URI_INHERITS_SECURITY_CONTEXT flag set.
     bool doesInheritSecurityContext;
     nsresult rv =
     NS_URIChainHasFlags(aURI,
@@ -134,39 +134,39 @@ public:
 
 protected:
   virtual ~nsExpandedPrincipal();
 
 public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIEXPANDEDPRINCIPAL
   NS_DECL_NSISERIALIZABLE
-  NS_IMETHOD Equals(nsIPrincipal* other, bool* _retval) MOZ_OVERRIDE;
-  NS_IMETHOD EqualsConsideringDomain(nsIPrincipal* other, bool* _retval) MOZ_OVERRIDE;
-  NS_IMETHOD GetHashValue(uint32_t* aHashValue) MOZ_OVERRIDE;
-  NS_IMETHOD GetURI(nsIURI** aURI) MOZ_OVERRIDE;
-  NS_IMETHOD GetDomain(nsIURI** aDomain) MOZ_OVERRIDE;
-  NS_IMETHOD SetDomain(nsIURI* aDomain) MOZ_OVERRIDE;
-  NS_IMETHOD GetOrigin(char** aOrigin) MOZ_OVERRIDE;
-  NS_IMETHOD Subsumes(nsIPrincipal* other, bool* _retval) MOZ_OVERRIDE;
-  NS_IMETHOD SubsumesConsideringDomain(nsIPrincipal* other, bool* _retval) MOZ_OVERRIDE;
-  NS_IMETHOD CheckMayLoad(nsIURI* uri, bool report, bool allowIfInheritsPrincipal) MOZ_OVERRIDE;
-  NS_IMETHOD GetJarPrefix(nsACString& aJarPrefix) MOZ_OVERRIDE;
-  NS_IMETHOD GetAppStatus(uint16_t* aAppStatus) MOZ_OVERRIDE;
-  NS_IMETHOD GetAppId(uint32_t* aAppStatus) MOZ_OVERRIDE;
-  NS_IMETHOD GetIsInBrowserElement(bool* aIsInBrowserElement) MOZ_OVERRIDE;
-  NS_IMETHOD GetUnknownAppId(bool* aUnknownAppId) MOZ_OVERRIDE;
-  NS_IMETHOD GetIsNullPrincipal(bool* aIsNullPrincipal) MOZ_OVERRIDE;
-  NS_IMETHOD GetBaseDomain(nsACString& aBaseDomain) MOZ_OVERRIDE;
-  virtual bool IsOnCSSUnprefixingWhitelist() MOZ_OVERRIDE;
+  NS_IMETHOD Equals(nsIPrincipal* other, bool* _retval) override;
+  NS_IMETHOD EqualsConsideringDomain(nsIPrincipal* other, bool* _retval) override;
+  NS_IMETHOD GetHashValue(uint32_t* aHashValue) override;
+  NS_IMETHOD GetURI(nsIURI** aURI) override;
+  NS_IMETHOD GetDomain(nsIURI** aDomain) override;
+  NS_IMETHOD SetDomain(nsIURI* aDomain) override;
+  NS_IMETHOD GetOrigin(char** aOrigin) override;
+  NS_IMETHOD Subsumes(nsIPrincipal* other, bool* _retval) override;
+  NS_IMETHOD SubsumesConsideringDomain(nsIPrincipal* other, bool* _retval) override;
+  NS_IMETHOD CheckMayLoad(nsIURI* uri, bool report, bool allowIfInheritsPrincipal) override;
+  NS_IMETHOD GetJarPrefix(nsACString& aJarPrefix) override;
+  NS_IMETHOD GetAppStatus(uint16_t* aAppStatus) override;
+  NS_IMETHOD GetAppId(uint32_t* aAppStatus) override;
+  NS_IMETHOD GetIsInBrowserElement(bool* aIsInBrowserElement) override;
+  NS_IMETHOD GetUnknownAppId(bool* aUnknownAppId) override;
+  NS_IMETHOD GetIsNullPrincipal(bool* aIsNullPrincipal) override;
+  NS_IMETHOD GetBaseDomain(nsACString& aBaseDomain) override;
+  virtual bool IsOnCSSUnprefixingWhitelist() override;
 #ifdef DEBUG
-  virtual void dumpImpl() MOZ_OVERRIDE;
+  virtual void dumpImpl() override;
 #endif
   
-  virtual void GetScriptLocation(nsACString &aStr) MOZ_OVERRIDE;
+  virtual void GetScriptLocation(nsACString &aStr) override;
 
 private:
   nsTArray< nsCOMPtr<nsIPrincipal> > mPrincipals;
 };
 
 #define NS_PRINCIPAL_CONTRACTID "@mozilla.org/principal;1"
 #define NS_PRINCIPAL_CID \
   { 0x09b7e598, 0x490d, 0x423f, \
--- a/caps/nsScriptSecurityManager.h
+++ b/caps/nsScriptSecurityManager.h
@@ -27,17 +27,17 @@ class ClassInfoData;
 
 /////////////////////////////
 // nsScriptSecurityManager //
 /////////////////////////////
 #define NS_SCRIPTSECURITYMANAGER_CID \
 { 0x7ee2a4c0, 0x4b93, 0x17d3, \
 { 0xba, 0x18, 0x00, 0x60, 0xb0, 0xf1, 0x99, 0xa2 }}
 
-class nsScriptSecurityManager MOZ_FINAL : public nsIScriptSecurityManager,
+class nsScriptSecurityManager final : public nsIScriptSecurityManager,
                                           public nsIChannelEventSink,
                                           public nsIObserver
 {
 public:
     static void Shutdown();
 
     NS_DEFINE_STATIC_CID_ACCESSOR(NS_SCRIPTSECURITYMANAGER_CID)
 
--- a/caps/nsSystemPrincipal.h
+++ b/caps/nsSystemPrincipal.h
@@ -12,31 +12,31 @@
 #include "nsJSPrincipals.h"
 
 #define NS_SYSTEMPRINCIPAL_CID \
 { 0x4a6212db, 0xaccb, 0x11d3, \
 { 0xb7, 0x65, 0x0, 0x60, 0xb0, 0xb6, 0xce, 0xcb }}
 #define NS_SYSTEMPRINCIPAL_CONTRACTID "@mozilla.org/systemprincipal;1"
 
 
-class nsSystemPrincipal MOZ_FINAL : public nsJSPrincipals
+class nsSystemPrincipal final : public nsJSPrincipals
 {
 public:
     // Our refcount is managed by nsJSPrincipals.  Use this macro to avoid
     // an extra refcount member.
     NS_DECL_ISUPPORTS_INHERITED
     NS_DECL_NSIPRINCIPAL
     NS_DECL_NSISERIALIZABLE
 
     nsSystemPrincipal();
 
-    virtual void GetScriptLocation(nsACString &aStr) MOZ_OVERRIDE;
+    virtual void GetScriptLocation(nsACString &aStr) override;
 
 #ifdef DEBUG
-    virtual void dumpImpl() MOZ_OVERRIDE;
+    virtual void dumpImpl() override;
 #endif 
 
 protected:
     virtual ~nsSystemPrincipal(void);
 
     // XXX Probably unnecessary.  See bug 143559.
     NS_DECL_OWNINGTHREAD
 };
--- a/chrome/nsChromeProtocolHandler.h
+++ b/chrome/nsChromeProtocolHandler.h
@@ -13,17 +13,17 @@
 #define NS_CHROMEPROTOCOLHANDLER_CID                 \
 { /* 61ba33c0-3031-11d3-8cd0-0060b0fc14a3 */         \
     0x61ba33c0,                                      \
     0x3031,                                          \
     0x11d3,                                          \
     {0x8c, 0xd0, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3} \
 }
 
-class nsChromeProtocolHandler MOZ_FINAL : public nsIProtocolHandler,
+class nsChromeProtocolHandler final : public nsIProtocolHandler,
                                           public nsSupportsWeakReference
 {
 public:
     NS_DECL_THREADSAFE_ISUPPORTS
 
     // nsIProtocolHandler methods:
     NS_DECL_NSIPROTOCOLHANDLER
 
--- a/chrome/nsChromeRegistry.h
+++ b/chrome/nsChromeRegistry.h
@@ -42,30 +42,30 @@ class nsChromeRegistry : public nsIToolk
 #endif
                          public nsIObserver,
                          public nsSupportsWeakReference
 {
 public:
   NS_DECL_ISUPPORTS
 
   // nsIXULChromeRegistry methods:
-  NS_IMETHOD ReloadChrome() MOZ_OVERRIDE;
-  NS_IMETHOD RefreshSkins() MOZ_OVERRIDE;
+  NS_IMETHOD ReloadChrome() override;
+  NS_IMETHOD RefreshSkins() override;
   NS_IMETHOD AllowScriptsForPackage(nsIURI* url,
-                                    bool* _retval) MOZ_OVERRIDE;
+                                    bool* _retval) override;
   NS_IMETHOD AllowContentToAccess(nsIURI* url,
-                                  bool* _retval) MOZ_OVERRIDE;
+                                  bool* _retval) override;
   NS_IMETHOD CanLoadURLRemotely(nsIURI* url,
-                                bool* _retval) MOZ_OVERRIDE;
+                                bool* _retval) override;
   NS_IMETHOD MustLoadURLRemotely(nsIURI* url,
-                                 bool* _retval) MOZ_OVERRIDE;
+                                 bool* _retval) override;
 
   // nsIChromeRegistry methods:
-  NS_IMETHOD_(bool) WrappersEnabled(nsIURI *aURI) MOZ_OVERRIDE;
-  NS_IMETHOD ConvertChromeURL(nsIURI* aChromeURI, nsIURI* *aResult) MOZ_OVERRIDE;
+  NS_IMETHOD_(bool) WrappersEnabled(nsIURI *aURI) override;
+  NS_IMETHOD ConvertChromeURL(nsIURI* aChromeURI, nsIURI* *aResult) override;
 
   // nsChromeRegistry methods:
   nsChromeRegistry() : mInitialized(false) { }
 
   virtual nsresult Init();
 
   static already_AddRefed<nsIChromeRegistry> GetService();
 
--- a/chrome/nsChromeRegistryChrome.h
+++ b/chrome/nsChromeRegistryChrome.h
@@ -22,34 +22,34 @@ class nsIPrefBranch;
 struct ChromePackage;
 
 class nsChromeRegistryChrome : public nsChromeRegistry
 {
  public:
   nsChromeRegistryChrome();
   ~nsChromeRegistryChrome();
 
-  nsresult Init() MOZ_OVERRIDE;
+  nsresult Init() override;
 
-  NS_IMETHOD CheckForNewChrome() MOZ_OVERRIDE;
-  NS_IMETHOD CheckForOSAccessibility() MOZ_OVERRIDE;
+  NS_IMETHOD CheckForNewChrome() override;
+  NS_IMETHOD CheckForOSAccessibility() override;
   NS_IMETHOD GetLocalesForPackage(const nsACString& aPackage,
-                                  nsIUTF8StringEnumerator* *aResult) MOZ_OVERRIDE;
+                                  nsIUTF8StringEnumerator* *aResult) override;
   NS_IMETHOD IsLocaleRTL(const nsACString& package,
-                         bool *aResult) MOZ_OVERRIDE;
+                         bool *aResult) override;
   NS_IMETHOD GetSelectedLocale(const nsACString& aPackage,
-                               nsACString& aLocale) MOZ_OVERRIDE;
+                               nsACString& aLocale) override;
   NS_IMETHOD Observe(nsISupports *aSubject, const char *aTopic,
-                     const char16_t *someData) MOZ_OVERRIDE;
+                     const char16_t *someData) override;
 
 #ifdef MOZ_XUL
   NS_IMETHOD GetXULOverlays(nsIURI *aURI,
-                            nsISimpleEnumerator **_retval) MOZ_OVERRIDE;
+                            nsISimpleEnumerator **_retval) override;
   NS_IMETHOD GetStyleOverlays(nsIURI *aURI,
-                              nsISimpleEnumerator **_retval) MOZ_OVERRIDE;
+                              nsISimpleEnumerator **_retval) override;
 #endif
 
   // If aChild is non-null then it is a new child to notify. If aChild is
   // null, then we have installed new chrome and we are resetting all of our
   // children's registered chrome.
   void SendRegisteredChrome(mozilla::dom::PContentParent* aChild);
 
  private:
@@ -61,22 +61,22 @@ class nsChromeRegistryChrome : public ns
                                             const nsCString& aSelectedSkin);
   static PLDHashOperator CollectPackages(const nsACString &aKey,
                                          PackageEntry *package,
                                          void *arg);
 
   nsresult OverrideLocalePackage(const nsACString& aPackage,
                                  nsACString& aOverride);
   nsresult SelectLocaleFromPref(nsIPrefBranch* prefs);
-  nsresult UpdateSelectedLocale() MOZ_OVERRIDE;
+  nsresult UpdateSelectedLocale() override;
   nsIURI* GetBaseURIFromPackage(const nsCString& aPackage,
                                  const nsCString& aProvider,
-                                 const nsCString& aPath) MOZ_OVERRIDE;
+                                 const nsCString& aPath) override;
   nsresult GetFlagsFromPackage(const nsCString& aPackage,
-                               uint32_t* aFlags) MOZ_OVERRIDE;
+                               uint32_t* aFlags) override;
 
   struct ProviderEntry
   {
     ProviderEntry(const nsACString& aProvider, nsIURI* aBase) :
     provider(aProvider),
     baseURI(aBase) { }
 
     nsCString        provider;
@@ -161,24 +161,24 @@ class nsChromeRegistryChrome : public ns
 
   nsCString mSelectedLocale;
   nsCString mSelectedSkin;
 
   // Hash of package names ("global") to PackageEntry objects
   nsClassHashtable<nsCStringHashKey, PackageEntry> mPackagesHash;
 
   virtual void ManifestContent(ManifestProcessingContext& cx, int lineno,
-                               char *const * argv, int flags) MOZ_OVERRIDE;
+                               char *const * argv, int flags) override;
   virtual void ManifestLocale(ManifestProcessingContext& cx, int lineno,
-                              char *const * argv, int flags) MOZ_OVERRIDE;
+                              char *const * argv, int flags) override;
   virtual void ManifestSkin(ManifestProcessingContext& cx, int lineno,
-                            char *const * argv, int flags) MOZ_OVERRIDE;
+                            char *const * argv, int flags) override;
   virtual void ManifestOverlay(ManifestProcessingContext& cx, int lineno,
-                               char *const * argv, int flags) MOZ_OVERRIDE;
+                               char *const * argv, int flags) override;
   virtual void ManifestStyle(ManifestProcessingContext& cx, int lineno,
-                             char *const * argv, int flags) MOZ_OVERRIDE;
+                             char *const * argv, int flags) override;
   virtual void ManifestOverride(ManifestProcessingContext& cx, int lineno,
-                                char *const * argv, int flags) MOZ_OVERRIDE;
+                                char *const * argv, int flags) override;
   virtual void ManifestResource(ManifestProcessingContext& cx, int lineno,
-                                char *const * argv, int flags) MOZ_OVERRIDE;
+                                char *const * argv, int flags) override;
 };
 
 #endif // nsChromeRegistryChrome_h
--- a/chrome/nsChromeRegistryContent.h
+++ b/chrome/nsChromeRegistryContent.h
@@ -20,29 +20,29 @@ class nsChromeRegistryContent : public n
 
   void RegisterRemoteChrome(const InfallibleTArray<ChromePackage>& aPackages,
                             const InfallibleTArray<ResourceMapping>& aResources,
                             const InfallibleTArray<OverrideMapping>& aOverrides,
                             const nsACString& aLocale,
                             bool aReset);
 
   NS_IMETHOD GetLocalesForPackage(const nsACString& aPackage,
-                                  nsIUTF8StringEnumerator* *aResult) MOZ_OVERRIDE;
-  NS_IMETHOD CheckForNewChrome() MOZ_OVERRIDE;
-  NS_IMETHOD CheckForOSAccessibility() MOZ_OVERRIDE;
+                                  nsIUTF8StringEnumerator* *aResult) override;
+  NS_IMETHOD CheckForNewChrome() override;
+  NS_IMETHOD CheckForOSAccessibility() override;
   NS_IMETHOD Observe(nsISupports* aSubject, const char* aTopic,
-                     const char16_t* aData) MOZ_OVERRIDE;
+                     const char16_t* aData) override;
   NS_IMETHOD IsLocaleRTL(const nsACString& package,
-                         bool *aResult) MOZ_OVERRIDE;
+                         bool *aResult) override;
   NS_IMETHOD GetSelectedLocale(const nsACString& aPackage,
-                               nsACString& aLocale) MOZ_OVERRIDE;
+                               nsACString& aLocale) override;
   NS_IMETHOD GetStyleOverlays(nsIURI *aChromeURL,
-                              nsISimpleEnumerator **aResult) MOZ_OVERRIDE;
+                              nsISimpleEnumerator **aResult) override;
   NS_IMETHOD GetXULOverlays(nsIURI *aChromeURL,
-                            nsISimpleEnumerator **aResult) MOZ_OVERRIDE;
+                            nsISimpleEnumerator **aResult) override;
 
   void RegisterPackage(const ChromePackage& aPackage);
   void RegisterOverride(const OverrideMapping& aOverride);
   void RegisterResource(const ResourceMapping& aResource);
 
  private:
   struct PackageEntry
   {
@@ -50,34 +50,34 @@ class nsChromeRegistryContent : public n
     ~PackageEntry() { }
 
     nsCOMPtr<nsIURI> contentBaseURI;
     nsCOMPtr<nsIURI> localeBaseURI;
     nsCOMPtr<nsIURI> skinBaseURI;
     uint32_t         flags;
   };
 
-  nsresult UpdateSelectedLocale() MOZ_OVERRIDE;
+  nsresult UpdateSelectedLocale() override;
   nsIURI* GetBaseURIFromPackage(const nsCString& aPackage,
                      const nsCString& aProvider,
-                     const nsCString& aPath) MOZ_OVERRIDE;
-  nsresult GetFlagsFromPackage(const nsCString& aPackage, uint32_t* aFlags) MOZ_OVERRIDE;
+                     const nsCString& aPath) override;
+  nsresult GetFlagsFromPackage(const nsCString& aPackage, uint32_t* aFlags) override;
 
   nsClassHashtable<nsCStringHashKey, PackageEntry> mPackagesHash;
   nsCString mLocale;
 
   virtual void ManifestContent(ManifestProcessingContext& cx, int lineno,
-                               char *const * argv, int flags) MOZ_OVERRIDE;
+                               char *const * argv, int flags) override;
   virtual void ManifestLocale(ManifestProcessingContext& cx, int lineno,
-                              char *const * argv, int flags) MOZ_OVERRIDE;
+                              char *const * argv, int flags) override;
   virtual void ManifestSkin(ManifestProcessingContext& cx, int lineno,
-                            char *const * argv, int flags) MOZ_OVERRIDE;
+                            char *const * argv, int flags) override;
   virtual void ManifestOverlay(ManifestProcessingContext& cx, int lineno,
-                               char *const * argv, int flags) MOZ_OVERRIDE;
+                               char *const * argv, int flags) override;
   virtual void ManifestStyle(ManifestProcessingContext& cx, int lineno,
-                             char *const * argv, int flags) MOZ_OVERRIDE;
+                             char *const * argv, int flags) override;
   virtual void ManifestOverride(ManifestProcessingContext& cx, int lineno,
-                                char *const * argv, int flags) MOZ_OVERRIDE;
+                                char *const * argv, int flags) override;
   virtual void ManifestResource(ManifestProcessingContext& cx, int lineno,
-                                char *const * argv, int flags) MOZ_OVERRIDE;
+                                char *const * argv, int flags) override;
 };
 
 #endif // nsChromeRegistryContent_h
--- a/configure.in
+++ b/configure.in
@@ -9214,19 +9214,16 @@ fi
 if test -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then
     ac_configure_args="$ac_configure_args --with-nspr-cflags='$NSPR_CFLAGS'"
     ac_configure_args="$ac_configure_args --with-nspr-libs='$NSPR_LIBS'"
 fi
 ac_configure_args="$ac_configure_args --prefix=$dist"
 if test "$MOZ_MEMORY"; then
    ac_configure_args="$ac_configure_args --enable-jemalloc"
 fi
-if test -n "$MOZ_GLUE_IN_PROGRAM"; then
-   export MOZ_GLUE_IN_PROGRAM
-fi
 if test -n "$ZLIB_IN_MOZGLUE"; then
    MOZ_ZLIB_LIBS=
 fi
 export MOZ_NATIVE_ZLIB
 export MOZ_ZLIB_CFLAGS
 export MOZ_ZLIB_LIBS
 export MOZ_APP_NAME
 export MOZ_APP_REMOTINGNAME
--- a/docshell/base/IHistory.h
+++ b/docshell/base/IHistory.h
@@ -126,20 +126,20 @@ public:
    */
   NS_IMETHOD NotifyVisited(nsIURI* aURI) = 0;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(IHistory, IHISTORY_IID)
 
 #define NS_DECL_IHISTORY \
   NS_IMETHOD RegisterVisitedCallback(nsIURI* aURI, \
-                                     mozilla::dom::Link* aContent) MOZ_OVERRIDE; \
+                                     mozilla::dom::Link* aContent) override; \
   NS_IMETHOD UnregisterVisitedCallback(nsIURI* aURI, \
-                                       mozilla::dom::Link* aContent) MOZ_OVERRIDE; \
+                                       mozilla::dom::Link* aContent) override; \
   NS_IMETHOD VisitURI(nsIURI* aURI, \
                       nsIURI* aLastVisitedURI, \
-                      uint32_t aFlags) MOZ_OVERRIDE; \
-  NS_IMETHOD SetURITitle(nsIURI* aURI, const nsAString& aTitle) MOZ_OVERRIDE; \
-  NS_IMETHOD NotifyVisited(nsIURI* aURI) MOZ_OVERRIDE;
+                      uint32_t aFlags) override; \
+  NS_IMETHOD SetURITitle(nsIURI* aURI, const nsAString& aTitle) override; \
+  NS_IMETHOD NotifyVisited(nsIURI* aURI) override;
 
 } // namespace mozilla
 
 #endif // mozilla_IHistory_h_
--- a/docshell/base/LoadContext.h
+++ b/docshell/base/LoadContext.h
@@ -26,17 +26,17 @@ namespace mozilla {
  * typically provided by nsDocShell.  This is only used when the original
  * docshell is in a different process and we need to copy certain values from
  * it.
  *
  * Note: we also generate a new nsILoadContext using LoadContext(uint32_t aAppId)
  * to separate the safebrowsing cookie.
  */
 
-class LoadContext MOZ_FINAL
+class LoadContext final
   : public nsILoadContext
   , public nsIInterfaceRequestor
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSILOADCONTEXT
   NS_DECL_NSIINTERFACEREQUESTOR
 
--- a/docshell/base/nsDSURIContentListener.h
+++ b/docshell/base/nsDSURIContentListener.h
@@ -11,17 +11,17 @@
 #include "nsIURIContentListener.h"
 #include "nsWeakReference.h"
 
 class nsDocShell;
 class nsIWebNavigationInfo;
 class nsIHttpChannel;
 class nsAString;
 
-class nsDSURIContentListener MOZ_FINAL
+class nsDSURIContentListener final
   : public nsIURIContentListener
   , public nsSupportsWeakReference
 {
   friend class nsDocShell;
 
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIURICONTENTLISTENER
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -419,17 +419,17 @@ static bool
 IsSameHost(nsIURI* aUri1, nsIURI* aUri2)
 {
   nsAutoCString host1, host2;
   aUri1->GetAsciiHost(host1);
   aUri2->GetAsciiHost(host2);
   return host1.Equals(host2);
 }
 
-class nsPingListener MOZ_FINAL
+class nsPingListener final
   : public nsIStreamListener
   , public nsIInterfaceRequestor
   , public nsIChannelEventSink
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSISTREAMLISTENER
@@ -9374,30 +9374,30 @@ nsDocShell::CheckLoadingPermissions()
 //*****************************************************************************
 // nsDocShell: Site Loading
 //*****************************************************************************
 namespace {
 
 #ifdef MOZ_PLACES
 // Callback used by CopyFavicon to inform the favicon service that one URI
 // (mNewURI) has the same favicon URI (OnComplete's aFaviconURI) as another.
-class nsCopyFaviconCallback MOZ_FINAL : public nsIFaviconDataCallback
+class nsCopyFaviconCallback final : public nsIFaviconDataCallback
 {
 public:
   NS_DECL_ISUPPORTS
 
   nsCopyFaviconCallback(nsIURI* aNewURI, bool aInPrivateBrowsing)
     : mNewURI(aNewURI)
     , mInPrivateBrowsing(aInPrivateBrowsing)
   {
   }
 
   NS_IMETHODIMP
   OnComplete(nsIURI* aFaviconURI, uint32_t aDataLen,
-             const uint8_t* aData, const nsACString& aMimeType) MOZ_OVERRIDE
+             const uint8_t* aData, const nsACString& aMimeType) override
   {
     // Continue only if there is an associated favicon.
     if (!aFaviconURI) {
       return NS_OK;
     }
 
     NS_ASSERTION(aDataLen == 0,
                  "We weren't expecting the callback to deliver data.");
@@ -9558,16 +9558,18 @@ nsDocShell::InternalLoad(nsIURI* aURI,
                          nsISHEntry* aSHEntry,
                          bool aFirstParty,
                          const nsAString& aSrcdoc,
                          nsIDocShell* aSourceDocShell,
                          nsIURI* aBaseURI,
                          nsIDocShell** aDocShell,
                          nsIRequest** aRequest)
 {
+  MOZ_RELEASE_ASSERT(!mBlockNavigation);
+
   nsresult rv = NS_OK;
   mOriginalUriString.Truncate();
 
 #ifdef PR_LOGGING
   if (gDocShellLeakLog && PR_LOG_TEST(gDocShellLeakLog, PR_LOG_DEBUG)) {
     nsAutoCString spec;
     if (aURI) {
       aURI->GetSpec(spec);
--- a/docshell/base/nsDocShell.h
+++ b/docshell/base/nsDocShell.h
@@ -130,17 +130,17 @@ enum eCharsetReloadState
   eCharsetReloadRequested,
   eCharsetReloadStopOrigional
 };
 
 //*****************************************************************************
 //***    nsDocShell
 //*****************************************************************************
 
-class nsDocShell MOZ_FINAL
+class nsDocShell final
   : public nsDocLoader
   , public nsIDocShell
   , public nsIWebNavigation
   , public nsIBaseWindow
   , public nsIScrollable
   , public nsITextScroll
   , public nsIDocCharset
   , public nsIContentViewerContainer
@@ -160,17 +160,17 @@ class nsDocShell MOZ_FINAL
 
 public:
   MOZ_DECLARE_REFCOUNTED_TYPENAME(nsDocShell)
   // Object Management
   nsDocShell();
 
   NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
 
-  virtual nsresult Init() MOZ_OVERRIDE;
+  virtual nsresult Init() override;
 
   NS_DECL_ISUPPORTS_INHERITED
 
   NS_DECL_NSIDOCSHELL
   NS_DECL_NSIDOCSHELLTREEITEM
   NS_DECL_NSIWEBNAVIGATION
   NS_DECL_NSIBASEWINDOW
   NS_DECL_NSISCROLLABLE
@@ -182,64 +182,64 @@ public:
   NS_DECL_NSICONTENTVIEWERCONTAINER
   NS_DECL_NSIWEBPAGEDESCRIPTOR
   NS_DECL_NSIAUTHPROMPTPROVIDER
   NS_DECL_NSICLIPBOARDCOMMANDS
   NS_DECL_NSIWEBSHELLSERVICES
   NS_DECL_NSINETWORKINTERCEPTCONTROLLER
   NS_FORWARD_SAFE_NSIDOMSTORAGEMANAGER(TopSessionStorageManager())
 
-  NS_IMETHOD Stop() MOZ_OVERRIDE {
+  NS_IMETHOD Stop() override {
     // Need this here because otherwise nsIWebNavigation::Stop
     // overrides the docloader's Stop()
     return nsDocLoader::Stop();
   }
 
   // Need to implement (and forward) nsISecurityEventSink, because
   // nsIWebProgressListener has methods with identical names...
   NS_FORWARD_NSISECURITYEVENTSINK(nsDocLoader::)
 
   // nsILinkHandler
   NS_IMETHOD OnLinkClick(nsIContent* aContent,
                          nsIURI* aURI,
                          const char16_t* aTargetSpec,
                          const nsAString& aFileName,
                          nsIInputStream* aPostDataStream,
                          nsIInputStream* aHeadersDataStream,
-                         bool aIsTrusted) MOZ_OVERRIDE;
+                         bool aIsTrusted) override;
   NS_IMETHOD OnLinkClickSync(nsIContent* aContent,
                              nsIURI* aURI,
                              const char16_t* aTargetSpec,
                              const nsAString& aFileName,
                              nsIInputStream* aPostDataStream = 0,
                              nsIInputStream* aHeadersDataStream = 0,
                              nsIDocShell** aDocShell = 0,
-                             nsIRequest** aRequest = 0) MOZ_OVERRIDE;
+                             nsIRequest** aRequest = 0) override;
   NS_IMETHOD OnOverLink(nsIContent* aContent,
                         nsIURI* aURI,
-                        const char16_t* aTargetSpec) MOZ_OVERRIDE;
-  NS_IMETHOD OnLeaveLink() MOZ_OVERRIDE;
+                        const char16_t* aTargetSpec) override;
+  NS_IMETHOD OnLeaveLink() override;
 
   nsDocShellInfoLoadType ConvertLoadTypeToDocShellLoadInfo(uint32_t aLoadType);
   uint32_t ConvertDocShellLoadInfoToLoadType(
       nsDocShellInfoLoadType aDocShellLoadType);
 
   // Don't use NS_DECL_NSILOADCONTEXT because some of nsILoadContext's methods
   // are shared with nsIDocShell (appID, etc.) and can't be declared twice.
-  NS_IMETHOD GetAssociatedWindow(nsIDOMWindow**) MOZ_OVERRIDE;
-  NS_IMETHOD GetTopWindow(nsIDOMWindow**) MOZ_OVERRIDE;
-  NS_IMETHOD GetTopFrameElement(nsIDOMElement**) MOZ_OVERRIDE;
-  NS_IMETHOD GetNestedFrameId(uint64_t*) MOZ_OVERRIDE;
-  NS_IMETHOD IsAppOfType(uint32_t, bool*) MOZ_OVERRIDE;
-  NS_IMETHOD GetIsContent(bool*) MOZ_OVERRIDE;
-  NS_IMETHOD GetUsePrivateBrowsing(bool*) MOZ_OVERRIDE;
-  NS_IMETHOD SetUsePrivateBrowsing(bool) MOZ_OVERRIDE;
-  NS_IMETHOD SetPrivateBrowsing(bool) MOZ_OVERRIDE;
-  NS_IMETHOD GetUseRemoteTabs(bool*) MOZ_OVERRIDE;
-  NS_IMETHOD SetRemoteTabs(bool) MOZ_OVERRIDE;
+  NS_IMETHOD GetAssociatedWindow(nsIDOMWindow**) override;
+  NS_IMETHOD GetTopWindow(nsIDOMWindow**) override;
+  NS_IMETHOD GetTopFrameElement(nsIDOMElement**) override;
+  NS_IMETHOD GetNestedFrameId(uint64_t*) override;
+  NS_IMETHOD IsAppOfType(uint32_t, bool*) override;
+  NS_IMETHOD GetIsContent(bool*) override;
+  NS_IMETHOD GetUsePrivateBrowsing(bool*) override;
+  NS_IMETHOD SetUsePrivateBrowsing(bool) override;
+  NS_IMETHOD SetPrivateBrowsing(bool) override;
+  NS_IMETHOD GetUseRemoteTabs(bool*) override;
+  NS_IMETHOD SetRemoteTabs(bool) override;
 
   // Restores a cached presentation from history (mLSHE).
   // This method swaps out the content viewer and simulates loads for
   // subframes.  It then simulates the completion of the toplevel load.
   nsresult RestoreFromHistory();
 
   // Perform a URI load from a refresh timer.  This is just like the
   // ForceRefreshURI method on nsIRefreshURI, but makes sure to take
@@ -276,17 +276,17 @@ public:
 
   // Global counter for how many docShells are currently recording profile
   // timeline markers
   static unsigned long gProfileTimelineRecordingsCount;
 
 protected:
   // Object Management
   virtual ~nsDocShell();
-  virtual void DestroyChildren() MOZ_OVERRIDE;
+  virtual void DestroyChildren() override;
 
   // Content Viewer Management
   nsresult EnsureContentViewer();
   // aPrincipal can be passed in if the caller wants.  If null is
   // passed in, the about:blank principal will end up being used.
   nsresult CreateAboutBlankContentViewer(nsIPrincipal* aPrincipal,
                                          nsIURI* aBaseURI,
                                          bool aTryToSaveOldPresentation = true);
@@ -451,17 +451,17 @@ protected:
                                      WalkHistoryEntriesFunc aCallback,
                                      void* aData);
 
   // overridden from nsDocLoader, this provides more information than the
   // normal OnStateChange with flags STATE_REDIRECTING
   virtual void OnRedirectStateChange(nsIChannel* aOldChannel,
                                      nsIChannel* aNewChannel,
                                      uint32_t aRedirectFlags,
-                                     uint32_t aStateFlags) MOZ_OVERRIDE;
+                                     uint32_t aStateFlags) override;
 
   /**
    * Helper function that determines if channel is an HTTP POST.
    *
    * @param aChannel
    *        The channel to test
    *
    * @return True iff channel is an HTTP post.
@@ -686,17 +686,17 @@ protected:
                              bool aFirstParty);
 
 protected:
   nsresult GetCurScrollPos(int32_t aScrollOrientation, int32_t* aCurPos);
   nsresult SetCurScrollPosEx(int32_t aCurHorizontalPos,
                              int32_t aCurVerticalPos);
 
   // Override the parent setter from nsDocLoader
-  virtual nsresult SetDocLoaderParent(nsDocLoader* aLoader) MOZ_OVERRIDE;
+  virtual nsresult SetDocLoaderParent(nsDocLoader* aLoader) override;
 
   void ClearFrameHistory(nsISHEntry* aEntry);
 
   /**
    * Initializes mTiming if it isn't yet.
    * After calling this, mTiming is non-null.
    */
   void MaybeInitTiming();
--- a/docshell/base/nsDownloadHistory.h
+++ b/docshell/base/nsDownloadHistory.h
@@ -8,17 +8,17 @@
 #define __nsDownloadHistory_h__
 
 #include "nsIDownloadHistory.h"
 #include "mozilla/Attributes.h"
 
 #define NS_DOWNLOADHISTORY_CID \
   {0x2ee83680, 0x2af0, 0x4bcb, {0xbf, 0xa0, 0xc9, 0x70, 0x5f, 0x65, 0x54, 0xf1}}
 
-class nsDownloadHistory MOZ_FINAL : public nsIDownloadHistory
+class nsDownloadHistory final : public nsIDownloadHistory
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIDOWNLOADHISTORY
 
   NS_DEFINE_STATIC_CID_ACCESSOR(NS_DOWNLOADHISTORY_CID)
 
 private:
--- a/docshell/base/nsIWebShellServices.h
+++ b/docshell/base/nsIWebShellServices.h
@@ -27,12 +27,12 @@ public:
   NS_IMETHOD StopDocumentLoad(void) = 0;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(nsIWebShellServices, NS_IWEB_SHELL_SERVICES_IID)
 
 /* Use this macro when declaring classes that implement this interface. */
 #define NS_DECL_NSIWEBSHELLSERVICES \
   NS_IMETHOD ReloadDocument(const char* aCharset = nullptr, \
-                            int32_t aSource = kCharsetUninitialized) MOZ_OVERRIDE; \
-  NS_IMETHOD StopDocumentLoad(void) MOZ_OVERRIDE;
+                            int32_t aSource = kCharsetUninitialized) override; \
+  NS_IMETHOD StopDocumentLoad(void) override;
 
 #endif /* nsIWebShellServices_h___ */
--- a/docshell/base/nsWebNavigationInfo.h
+++ b/docshell/base/nsWebNavigationInfo.h
@@ -13,17 +13,17 @@
 #include "mozilla/Attributes.h"
 
 class nsCString;
 
 // Class ID for webnavigationinfo
 #define NS_WEBNAVIGATION_INFO_CID \
  { 0xf30bc0a2, 0x958b, 0x4287,{0xbf, 0x62, 0xce, 0x38, 0xba, 0x0c, 0x81, 0x1e}}
 
-class nsWebNavigationInfo MOZ_FINAL : public nsIWebNavigationInfo
+class nsWebNavigationInfo final : public nsIWebNavigationInfo
 {
 public:
   nsWebNavigationInfo() {}
 
   NS_DECL_ISUPPORTS
 
   NS_DECL_NSIWEBNAVIGATIONINFO
 
--- a/docshell/shistory/src/nsSHEntry.h
+++ b/docshell/shistory/src/nsSHEntry.h
@@ -17,17 +17,17 @@
 // Interfaces needed
 #include "nsISHEntry.h"
 #include "nsISHContainer.h"
 
 class nsSHEntryShared;
 class nsIInputStream;
 class nsIURI;
 
-class nsSHEntry MOZ_FINAL : public nsISHEntry,
+class nsSHEntry final : public nsISHEntry,
                             public nsISHContainer,
                             public nsISHEntryInternal
 {
 public: 
   nsSHEntry();
   nsSHEntry(const nsSHEntry &other);
 
   NS_DECL_ISUPPORTS
--- a/docshell/shistory/src/nsSHEntryShared.cpp
+++ b/docshell/shistory/src/nsSHEntryShared.cpp
@@ -27,17 +27,17 @@ uint64_t gSHEntrySharedID = 0;
 
 } // anonymous namespace
 
 #define CONTENT_VIEWER_TIMEOUT_SECONDS "browser.sessionhistory.contentViewerTimeout"
 // Default this to time out unused content viewers after 30 minutes
 #define CONTENT_VIEWER_TIMEOUT_SECONDS_DEFAULT (30*60)
 
 typedef nsExpirationTracker<nsSHEntryShared, 3> HistoryTrackerBase;
-class HistoryTracker MOZ_FINAL : public HistoryTrackerBase {
+class HistoryTracker final : public HistoryTrackerBase {
 public:
   explicit HistoryTracker(uint32_t aTimeout)
     : HistoryTrackerBase(1000 * aTimeout / 2)
   {
   }
 
 protected:
   virtual void NotifyExpired(nsSHEntryShared *aObj) {
--- a/docshell/shistory/src/nsSHEntryShared.h
+++ b/docshell/shistory/src/nsSHEntryShared.h
@@ -25,17 +25,17 @@ class nsDocShellEditorData;
 class nsISupportsArray;
 
 // A document may have multiple SHEntries, either due to hash navigations or
 // calls to history.pushState.  SHEntries corresponding to the same document
 // share many members; in particular, they share state related to the
 // back/forward cache.
 //
 // nsSHEntryShared is the vehicle for this sharing.
-class nsSHEntryShared MOZ_FINAL : public nsIBFCacheEntry,
+class nsSHEntryShared final : public nsIBFCacheEntry,
                                   public nsIMutationObserver
 {
   public:
     static void EnsureHistoryTracker();
     static void Shutdown();
 
     nsSHEntryShared();
 
--- a/docshell/shistory/src/nsSHistory.cpp
+++ b/docshell/shistory/src/nsSHistory.cpp
@@ -160,17 +160,17 @@ enum HistCmd{
   HIST_CMD_GOTOINDEX,
   HIST_CMD_RELOAD
 } ;
 
 //*****************************************************************************
 //***      nsSHistoryObserver
 //*****************************************************************************
 
-class nsSHistoryObserver MOZ_FINAL : public nsIObserver
+class nsSHistoryObserver final : public nsIObserver
 {
 
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIOBSERVER
 
   nsSHistoryObserver() {}
 
--- a/docshell/shistory/src/nsSHistory.h
+++ b/docshell/shistory/src/nsSHistory.h
@@ -22,17 +22,17 @@
 #include "prclist.h"
 
 class nsIDocShell;
 class nsSHEnumerator;
 class nsSHistoryObserver;
 class nsISHEntry;
 class nsISHTransaction;
 
-class nsSHistory MOZ_FINAL : public PRCList,
+class nsSHistory final : public PRCList,
                              public nsISHistory,
                              public nsISHistoryInternal,
                              public nsIWebNavigation
 {
 public:
   nsSHistory();
 
   NS_DECL_ISUPPORTS
--- a/dom/activities/Activity.h
+++ b/dom/activities/Activity.h
@@ -16,17 +16,17 @@ namespace mozilla {
 namespace dom {
 
 class Activity : public DOMRequest
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(Activity, DOMRequest)
 
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
+  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   static already_AddRefed<Activity>
   Constructor(const GlobalObject& aOwner,
               const ActivityOptions& aOptions,
               ErrorResult& aRv)
   {
     nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(aOwner.GetAsSupports());
     if (!window) {
--- a/dom/alarm/AlarmHalService.h
+++ b/dom/alarm/AlarmHalService.h
@@ -29,20 +29,20 @@ public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIALARMHALSERVICE
 
   void Init();
 
   static already_AddRefed<AlarmHalService> GetInstance();
 
   // Implementing hal::AlarmObserver
-  void Notify(const void_t& aVoid) MOZ_OVERRIDE;
+  void Notify(const void_t& aVoid) override;
 
   // Implementing hal::SystemTimezoneChangeObserver
-  void Notify(const hal::SystemTimezoneChangeInformation& aSystemTimezoneChangeInfo) MOZ_OVERRIDE;
+  void Notify(const hal::SystemTimezoneChangeInformation& aSystemTimezoneChangeInfo) override;
 
 private:
   virtual ~AlarmHalService();
 
   bool mAlarmEnabled;
   static StaticRefPtr<AlarmHalService> sSingleton;
 
   nsCOMPtr<nsIAlarmFiredCb> mAlarmFiredCb;
--- a/dom/animation/Animation.h
+++ b/dom/animation/Animation.h
@@ -199,17 +199,17 @@ public:
   {
     MOZ_ASSERT(aTarget, "null animation target is not yet supported");
   }
 
   NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(Animation)
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(Animation)
 
   nsIDocument* GetParentObject() const { return mDocument; }
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
+  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   // FIXME: If we succeed in moving transition-specific code to a type of
   // AnimationEffect (as per the Web Animations API) we should remove these
   // virtual methods.
   virtual ElementPropertyTransition* AsTransition() { return nullptr; }
   virtual const ElementPropertyTransition* AsTransition() const {
     return nullptr;
   }
--- a/dom/animation/AnimationEffect.h
+++ b/dom/animation/AnimationEffect.h
@@ -10,29 +10,29 @@
 #include "nsWrapperCache.h"
 #include "mozilla/dom/Animation.h"
 
 struct JSContext;
 
 namespace mozilla {
 namespace dom {
 
-class AnimationEffect MOZ_FINAL : public nsWrapperCache
+class AnimationEffect final : public nsWrapperCache
 {
 public:
   explicit AnimationEffect(Animation* aAnimation)
     : mAnimation(aAnimation)
   {
   }
 
   NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(AnimationEffect)
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(AnimationEffect)
 
   Animation* GetParentObject() const { return mAnimation; }
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
+  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   // AnimationEffect interface
   void GetName(nsString& aRetVal) const {
     aRetVal = mAnimation->Name();
   }
 
 private:
   ~AnimationEffect() { }
--- a/dom/animation/AnimationPlayer.h
+++ b/dom/animation/AnimationPlayer.h
@@ -60,17 +60,17 @@ public:
     , mIsRelevant(false)
   {
   }
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(AnimationPlayer)
 
   AnimationTimeline* GetParentObject() const { return mTimeline; }
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
+  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   virtual CSSAnimationPlayer* AsCSSAnimationPlayer() { return nullptr; }
   virtual CSSTransitionPlayer* AsCSSTransitionPlayer() { return nullptr; }
 
   // AnimationPlayer methods
   Animation* GetSource() const { return mSource; }
   AnimationTimeline* Timeline() const { return mTimeline; }
   Nullable<TimeDuration> GetStartTime() const { return mStartTime; }
--- a/dom/animation/AnimationTimeline.h
+++ b/dom/animation/AnimationTimeline.h
@@ -15,17 +15,17 @@
 #include "nsIDocument.h"
 #include "nsRefreshDriver.h"
 
 struct JSContext;
 
 namespace mozilla {
 namespace dom {
 
-class AnimationTimeline MOZ_FINAL : public nsWrapperCache
+class AnimationTimeline final : public nsWrapperCache
 {
 public:
   explicit AnimationTimeline(nsIDocument* aDocument)
     : mDocument(aDocument)
     , mWindow(aDocument->GetParentObject())
   {
     MOZ_ASSERT(mWindow);
   }
@@ -36,17 +36,17 @@ protected:
 public:
   NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(AnimationTimeline)
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(AnimationTimeline)
 
   nsIGlobalObject* GetParentObject() const
   {
     return mWindow;
   }
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
+  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   // AnimationTimeline methods
   Nullable<TimeDuration> GetCurrentTime() const;
 
   // Wrapper functions for AnimationTimeline DOM methods when called from
   // script.
   Nullable<double> GetCurrentTimeAsDouble() const;
 
--- a/dom/animation/PendingPlayerTracker.h
+++ b/dom/animation/PendingPlayerTracker.h
@@ -10,17 +10,17 @@
 #include "nsCycleCollectionParticipant.h"
 #include "nsIDocument.h"
 #include "nsTHashtable.h"
 
 class nsIFrame;
 
 namespace mozilla {
 
-class PendingPlayerTracker MOZ_FINAL
+class PendingPlayerTracker final
 {
 public:
   explicit PendingPlayerTracker(nsIDocument* aDocument)
     : mDocument(aDocument)
   { }
 
   NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(PendingPlayerTracker)
   NS_DECL_CYCLE_COLLECTION_NATIVE_CLASS(PendingPlayerTracker)
--- a/dom/archivereader/ArchiveReader.h
+++ b/dom/archivereader/ArchiveReader.h
@@ -27,17 +27,17 @@ class GlobalObject;
 
 BEGIN_ARCHIVEREADER_NAMESPACE
 
 class ArchiveRequest;
 
 /**
  * This is the ArchiveReader object
  */
-class ArchiveReader MOZ_FINAL : public nsISupports,
+class ArchiveReader final : public nsISupports,
                                 public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(ArchiveReader)
 
   static already_AddRefed<ArchiveReader>
   Constructor(const GlobalObject& aGlobal, File& aBlob,
@@ -46,17 +46,17 @@ public:
   ArchiveReader(File& aBlob, nsPIDOMWindow* aWindow,
                 const nsACString& aEncoding);
 
   nsIDOMWindow* GetParentObject() const
   {
     return mWindow;
   }
 
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
+  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   already_AddRefed<ArchiveRequest> GetFilenames();
   already_AddRefed<ArchiveRequest> GetFile(const nsAString& filename);
   already_AddRefed<ArchiveRequest> GetFiles();
 
   nsresult GetInputStream(nsIInputStream** aInputStream);
   nsresult GetSize(uint64_t* aSize);
 
--- a/dom/archivereader/ArchiveRequest.h
+++ b/dom/archivereader/ArchiveRequest.h
@@ -21,29 +21,29 @@ BEGIN_ARCHIVEREADER_NAMESPACE
 
 /**
  * This is the ArchiveRequest that handles any operation
  * related to ArchiveReader
  */
 class ArchiveRequest : public mozilla::dom::DOMRequest
 {
 public:
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
+  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   ArchiveReader* Reader() const;
 
   NS_DECL_ISUPPORTS_INHERITED
 
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ArchiveRequest, DOMRequest)
 
   ArchiveRequest(nsPIDOMWindow* aWindow,
                  ArchiveReader* aReader);
 
   // nsIDOMEventTarget
-  virtual nsresult PreHandleEvent(EventChainPreVisitor& aVisitor) MOZ_OVERRIDE;
+  virtual nsresult PreHandleEvent(EventChainPreVisitor& aVisitor) override;
 
 public:
   // This is called by the DOMArchiveRequestEvent
   void Run();
 
   // Set the types for this request
   void OpGetFilenames();
   void OpGetFile(const nsAString& aFilename);
--- a/dom/archivereader/ArchiveZipEvent.h
+++ b/dom/archivereader/ArchiveZipEvent.h
@@ -23,20 +23,20 @@ class ArchiveZipItem : public ArchiveIte
 public:
   ArchiveZipItem(const char* aFilename,
                  const ZipCentral& aCentralStruct,
                  const nsACString& aEncoding);
 protected:
   virtual ~ArchiveZipItem();
 
 public:
-  nsresult GetFilename(nsString& aFilename) MOZ_OVERRIDE;
+  nsresult GetFilename(nsString& aFilename) override;
 
   // From zipItem to File:
-  virtual nsIDOMFile* File(ArchiveReader* aArchiveReader) MOZ_OVERRIDE;
+  virtual nsIDOMFile* File(ArchiveReader* aArchiveReader) override;
 
 public: // for the event
   static uint32_t StrToInt32(const uint8_t* aStr);
   static uint16_t StrToInt16(const uint8_t* aStr);
 
 private:
   nsresult ConvertFilename();
 
@@ -53,17 +53,17 @@ private: // data
  * ArchiveReaderEvent implements the ArchiveReaderEvent for the ZIP format
  */
 class ArchiveReaderZipEvent : public ArchiveReaderEvent
 {
 public:
   ArchiveReaderZipEvent(ArchiveReader* aArchiveReader,
                         const nsACString& aEncoding);
 
-  nsresult Exec() MOZ_OVERRIDE;
+  nsresult Exec() override;
 
 private:
   nsCString mEncoding;
 };
 
 END_ARCHIVEREADER_NAMESPACE
 
 #endif // mozilla_dom_archivereader_domarchivezipevent_h__
--- a/dom/archivereader/ArchiveZipFile.cpp
+++ b/dom/archivereader/ArchiveZipFile.cpp
@@ -15,17 +15,17 @@
 using namespace mozilla::dom;
 USING_ARCHIVEREADER_NAMESPACE
 
 #define ZIP_CHUNK 16384
 
 /**
  * Input stream object for zip files
  */
-class ArchiveInputStream MOZ_FINAL : public nsIInputStream,
+class ArchiveInputStream final : public nsIInputStream,
                                      public nsISeekableStream
 {
 public:
   ArchiveInputStream(uint64_t aParentSize,
                      nsIInputStream* aInputStream,
                      nsString& aFilename,
                      uint32_t aStart,
                      uint32_t aLength,
--- a/dom/archivereader/ArchiveZipFile.h
+++ b/dom/archivereader/ArchiveZipFile.h
@@ -51,26 +51,26 @@ public:
     mFileImpl(aFileImpl),
     mFilename(aName)
   {
     MOZ_ASSERT(mFileImpl);
     MOZ_COUNT_CTOR(ArchiveZipFileImpl);
   }
 
   // Overrides:
-  virtual nsresult GetInternalStream(nsIInputStream**) MOZ_OVERRIDE;
+  virtual nsresult GetInternalStream(nsIInputStream**) override;
 protected:
   virtual ~ArchiveZipFileImpl()
   {
     MOZ_COUNT_DTOR(ArchiveZipFileImpl);
   }
 
   virtual already_AddRefed<FileImpl>
   CreateSlice(uint64_t aStart, uint64_t aLength, const nsAString& aContentType,
-              mozilla::ErrorResult& aRv) MOZ_OVERRIDE;
+              mozilla::ErrorResult& aRv) override;
 
 private: // Data
   ZipCentral mCentral;
   nsRefPtr<FileImpl> mFileImpl;
 
   nsString mFilename;
 };
 
--- a/dom/asmjscache/AsmJSCache.cpp
+++ b/dom/asmjscache/AsmJSCache.cpp
@@ -1102,17 +1102,17 @@ FindHashMatch(const Metadata& aMetadata,
     *aModuleIndex = entry.mModuleIndex;
     return true;
   }
 
   return false;
 }
 
 // A runnable that executes for a cache access originating in the main process.
-class SingleProcessRunnable MOZ_FINAL : public File,
+class SingleProcessRunnable final : public File,
                                         private MainProcessRunnable
 {
 public:
   // In the single-process case, the calling JS compilation thread holds the
   // nsIPrincipal alive indirectly (via the global object -> compartment ->
   // principal) so we don't have to ref-count it here. This is fortunate since
   // we are off the main thread and nsIPrincipals can only be ref-counted on
   // the main thread.
@@ -1131,66 +1131,66 @@ public:
 protected:
   ~SingleProcessRunnable()
   {
     MOZ_COUNT_DTOR(SingleProcessRunnable);
   }
 
 private:
   void
-  OnOpenMetadataForRead(const Metadata& aMetadata) MOZ_OVERRIDE
+  OnOpenMetadataForRead(const Metadata& aMetadata) override
   {
     uint32_t moduleIndex;
     if (FindHashMatch(aMetadata, mReadParams, &moduleIndex)) {
       MainProcessRunnable::OpenForRead(moduleIndex);
     } else {
       MainProcessRunnable::CacheMiss();
     }
   }
 
   void
-  OnOpenCacheFile() MOZ_OVERRIDE
+  OnOpenCacheFile() override
   {
     File::OnOpen();
   }
 
   void
-  Close() MOZ_OVERRIDE MOZ_FINAL
+  Close() override final
   {
     MainProcessRunnable::Close();
   }
 
   void
-  OnFailure(JS::AsmJSCacheResult aResult) MOZ_OVERRIDE
+  OnFailure(JS::AsmJSCacheResult aResult) override
   {
     MainProcessRunnable::OnFailure(aResult);
     File::OnFailure(aResult);
   }
 
   void
-  OnClose() MOZ_OVERRIDE MOZ_FINAL
+  OnClose() override final
   {
     MainProcessRunnable::OnClose();
     File::OnClose();
   }
 
   // Avoid MSVC 'dominance' warning by having clear Run() override.
   NS_IMETHODIMP
-  Run() MOZ_OVERRIDE
+  Run() override
   {
     return MainProcessRunnable::Run();
   }
 
   ReadParams mReadParams;
 };
 
 // A runnable that executes in a parent process for a cache access originating
 // in the content process. This runnable gets registered as an IPDL subprotocol
 // actor so that it can communicate with the corresponding ChildProcessRunnable.
-class ParentProcessRunnable MOZ_FINAL : public PAsmJSCacheEntryParent,
+class ParentProcessRunnable final : public PAsmJSCacheEntryParent,
                                         public MainProcessRunnable
 {
 public:
   // The given principal comes from an IPC::Principal which will be dec-refed
   // at the end of the message, so we must ref-count it here. Fortunately, we
   // are on the main thread (where PContent messages are delivered).
   ParentProcessRunnable(nsIPrincipal* aPrincipal,
                         OpenMode aOpenMode,
@@ -1211,32 +1211,32 @@ private:
   {
     MOZ_ASSERT(!mPrincipalHolder, "Should have already been released");
     MOZ_ASSERT(mActorDestroyed);
     MOZ_ASSERT(mFinished);
     MOZ_COUNT_DTOR(ParentProcessRunnable);
   }
 
   bool
-  Recv__delete__(const JS::AsmJSCacheResult& aResult) MOZ_OVERRIDE
+  Recv__delete__(const JS::AsmJSCacheResult& aResult) override
   {
     MOZ_ASSERT(!mFinished);
     mFinished = true;
 
     if (mOpened) {
       MainProcessRunnable::Close();
     } else {
       MainProcessRunnable::Fail();
     }
 
     return true;
   }
 
   void
-  ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
+  ActorDestroy(ActorDestroyReason why) override
   {
     MOZ_ASSERT(!mActorDestroyed);
     mActorDestroyed = true;
 
     // Assume ActorDestroy can happen at any time, so probe the current state to
     // determine what needs to happen.
 
     if (mFinished) {
@@ -1248,71 +1248,71 @@ private:
     if (mOpened) {
       MainProcessRunnable::Close();
     } else {
       MainProcessRunnable::Fail();
     }
   }
 
   void
-  OnOpenMetadataForRead(const Metadata& aMetadata) MOZ_OVERRIDE
+  OnOpenMetadataForRead(const Metadata& aMetadata) override
   {
     MOZ_ASSERT(NS_IsMainThread());
 
     if (!SendOnOpenMetadataForRead(aMetadata)) {
       unused << Send__delete__(this, JS::AsmJSCache_InternalError);
     }
   }
 
   bool
-  RecvSelectCacheFileToRead(const uint32_t& aModuleIndex) MOZ_OVERRIDE
+  RecvSelectCacheFileToRead(const uint32_t& aModuleIndex) override
   {
     MainProcessRunnable::OpenForRead(aModuleIndex);
     return true;
   }
 
   bool
-  RecvCacheMiss() MOZ_OVERRIDE
+  RecvCacheMiss() override
   {
     MainProcessRunnable::CacheMiss();
     return true;
   }
 
   void
-  OnOpenCacheFile() MOZ_OVERRIDE
+  OnOpenCacheFile() override
   {
     MOZ_ASSERT(NS_IsMainThread());
 
     MOZ_ASSERT(!mOpened);
     mOpened = true;
 
     FileDescriptor::PlatformHandleType handle =
       FileDescriptor::PlatformHandleType(PR_FileDesc2NativeHandle(mFileDesc));
     if (!SendOnOpenCacheFile(mFileSize, FileDescriptor(handle))) {
       unused << Send__delete__(this, JS::AsmJSCache_InternalError);
     }
   }
 
   void
-  OnClose() MOZ_OVERRIDE MOZ_FINAL
+  OnClose() override final
   {
     MOZ_ASSERT(NS_IsMainThread());
     MOZ_ASSERT(mOpened);
 
     mFinished = true;
 
     MainProcessRunnable::OnClose();
 
     MOZ_ASSERT(mActorDestroyed);
 
     mPrincipalHolder = nullptr;
   }
 
   void
-  OnFailure(JS::AsmJSCacheResult aResult) MOZ_OVERRIDE
+  OnFailure(JS::AsmJSCacheResult aResult) override
   {
     MOZ_ASSERT(NS_IsMainThread());
     MOZ_ASSERT(!mOpened);
 
     mFinished = true;
 
     MainProcessRunnable::OnFailure(aResult);
 
@@ -1351,17 +1351,17 @@ DeallocEntryParent(PAsmJSCacheEntryParen
 {
   // Transfer ownership back from IPDL.
   nsRefPtr<ParentProcessRunnable> op =
     dont_AddRef(static_cast<ParentProcessRunnable*>(aActor));
 }
 
 namespace {
 
-class ChildProcessRunnable MOZ_FINAL : public File,
+class ChildProcessRunnable final : public File,
                                        public PAsmJSCacheEntryChild
 {
 public:
   NS_DECL_NSIRUNNABLE
 
   // In the single-process case, the calling JS compilation thread holds the
   // nsIPrincipal alive indirectly (via the global object -> compartment ->
   // principal) so we don't have to ref-count it here. This is fortunate since
@@ -1388,32 +1388,32 @@ protected:
   {
     MOZ_ASSERT(mState == eFinished);
     MOZ_ASSERT(mActorDestroyed);
     MOZ_COUNT_DTOR(ChildProcessRunnable);
   }
 
 private:
   bool
-  RecvOnOpenMetadataForRead(const Metadata& aMetadata) MOZ_OVERRIDE
+  RecvOnOpenMetadataForRead(const Metadata& aMetadata) override
   {
     MOZ_ASSERT(NS_IsMainThread());
     MOZ_ASSERT(mState == eOpening);
 
     uint32_t moduleIndex;
     if (FindHashMatch(aMetadata, mReadParams, &moduleIndex)) {
       return SendSelectCacheFileToRead(moduleIndex);
     }
 
     return SendCacheMiss();
   }
 
   bool
   RecvOnOpenCacheFile(const int64_t& aFileSize,
-                      const FileDescriptor& aFileDesc) MOZ_OVERRIDE
+                      const FileDescriptor& aFileDesc) override
   {
     MOZ_ASSERT(NS_IsMainThread());
     MOZ_ASSERT(mState == eOpening);
 
     mFileSize = aFileSize;
 
     mFileDesc = PR_ImportFile(PROsfd(aFileDesc.PlatformHandle()));
     if (!mFileDesc) {
@@ -1421,34 +1421,34 @@ private:
     }
 
     mState = eOpened;
     File::OnOpen();
     return true;
   }
 
   bool
-  Recv__delete__(const JS::AsmJSCacheResult& aResult) MOZ_OVERRIDE
+  Recv__delete__(const JS::AsmJSCacheResult& aResult) override
   {
     MOZ_ASSERT(NS_IsMainThread());
     MOZ_ASSERT(mState == eOpening);
 
     Fail(aResult);
     return true;
   }
 
   void
-  ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
+  ActorDestroy(ActorDestroyReason why) override
   {
     MOZ_ASSERT(NS_IsMainThread());
     mActorDestroyed = true;
   }
 
   void
-  Close() MOZ_OVERRIDE MOZ_FINAL
+  Close() override final
   {
     MOZ_ASSERT(mState == eOpened);
 
     mState = eClosing;
     NS_DispatchToMainThread(this);
   }
 
 private:
@@ -1745,44 +1745,44 @@ GetBuildId(JS::BuildIdCharVector* aBuild
 }
 
 class Client : public quota::Client
 {
   ~Client() {}
 
 public:
   NS_IMETHOD_(MozExternalRefCountType)
-  AddRef() MOZ_OVERRIDE;
+  AddRef() override;
 
   NS_IMETHOD_(MozExternalRefCountType)
-  Release() MOZ_OVERRIDE;
+  Release() override;
 
   virtual Type
-  GetType() MOZ_OVERRIDE
+  GetType() override
   {
     return ASMJS;
   }
 
   virtual nsresult
   InitOrigin(PersistenceType aPersistenceType,
              const nsACString& aGroup,
              const nsACString& aOrigin,
-             UsageInfo* aUsageInfo) MOZ_OVERRIDE
+             UsageInfo* aUsageInfo) override
   {
     if (!aUsageInfo) {
       return NS_OK;
     }
     return GetUsageForOrigin(aPersistenceType, aGroup, aOrigin, aUsageInfo);
   }
 
   virtual nsresult
   GetUsageForOrigin(PersistenceType aPersistenceType,
                     const nsACString& aGroup,
                     const nsACString& aOrigin,
-                    UsageInfo* aUsageInfo) MOZ_OVERRIDE
+                    UsageInfo* aUsageInfo) override
   {
     QuotaManager* qm = QuotaManager::Get();
     MOZ_ASSERT(qm, "We were being called by the QuotaManager");
 
     nsCOMPtr<nsIFile> directory;
     nsresult rv = qm->GetDirectoryForOrigin(aPersistenceType, aOrigin,
                                             getter_AddRefs(directory));
     NS_ENSURE_SUCCESS(rv, rv);
@@ -1821,44 +1821,44 @@ public:
     NS_ENSURE_SUCCESS(rv, rv);
 
     return NS_OK;
   }
 
   virtual void
   OnOriginClearCompleted(PersistenceType aPersistenceType,
                          const nsACString& aOrigin)
-                         MOZ_OVERRIDE
+                         override
   { }
 
   virtual void
-  ReleaseIOThreadObjects() MOZ_OVERRIDE
+  ReleaseIOThreadObjects() override
   { }
 
   virtual bool
-  IsFileServiceUtilized() MOZ_OVERRIDE
+  IsFileServiceUtilized() override
   {
     return false;
   }
 
   virtual bool
-  IsTransactionServiceActivated() MOZ_OVERRIDE
+  IsTransactionServiceActivated() override
   {
     return false;
   }
 
   virtual void
   WaitForStoragesToComplete(nsTArray<nsIOfflineStorage*>& aStorages,
-                            nsIRunnable* aCallback) MOZ_OVERRIDE
+                            nsIRunnable* aCallback) override
   {
     MOZ_ASSERT_UNREACHABLE("There are no storages");
   }
 
   virtual void
-  ShutdownTransactionService() MOZ_OVERRIDE
+  ShutdownTransactionService() override
   { }
 
 private:
   nsAutoRefCnt mRefCnt;
   NS_DECL_OWNINGTHREAD
 };
 
 NS_IMPL_ADDREF(asmjscache::Client)
--- a/dom/audiochannel/tests/TestAudioChannelService.cpp
+++ b/dom/audiochannel/tests/TestAudioChannelService.cpp
@@ -98,24 +98,24 @@ public:
   nsresult SetVisibilityState(bool visible)
   {
     if (mRegistered) {
       mWaitCallback = true;
     }
     return mAgent->SetVisibilityState(visible);
   }
 
-  NS_IMETHODIMP CanPlayChanged(int32_t canPlay) MOZ_OVERRIDE
+  NS_IMETHODIMP CanPlayChanged(int32_t canPlay) override
   {
     mCanPlay = static_cast<AudioChannelState>(canPlay);
     mWaitCallback = false;
     return NS_OK;
   }
 
-  NS_IMETHODIMP WindowVolumeChanged() MOZ_OVERRIDE
+  NS_IMETHODIMP WindowVolumeChanged() override
   {
     return NS_OK;
   }
 
   nsresult GetCanPlay(AudioChannelState *_ret, bool aWaitCallback = false)
   {
     if (aWaitCallback) {
       mWaitCallback = true;
--- a/dom/base/AnonymousContent.h
+++ b/dom/base/AnonymousContent.h
@@ -12,17 +12,17 @@
 #include "nsICSSDeclaration.h"
 #include "nsIDocument.h"
 
 namespace mozilla {
 namespace dom {
 
 class Element;
 
-class AnonymousContent MOZ_FINAL
+class AnonymousContent final
 {
 public:
   // Ref counting and cycle collection
   NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(AnonymousContent)
   NS_DECL_CYCLE_COLLECTION_NATIVE_CLASS(AnonymousContent)
 
   explicit AnonymousContent(Element* aContentNode);
   nsCOMPtr<Element> GetContentNode();
--- a/dom/base/Attr.h
+++ b/dom/base/Attr.h
@@ -23,87 +23,87 @@
 class nsIDocument;
 
 namespace mozilla {
 class EventChainPreVisitor;
 namespace dom {
 
 // Attribute helper class used to wrap up an attribute with a dom
 // object that implements nsIDOMAttr and nsIDOMNode
-class Attr MOZ_FINAL : public nsIAttribute,
+class Attr final : public nsIAttribute,
                        public nsIDOMAttr
 {
   virtual ~Attr() {}
 
 public:
   Attr(nsDOMAttributeMap* aAttrMap,
        already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
        const nsAString& aValue,
        bool aNsAware);
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
 
   // nsIDOMNode interface
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
   virtual void GetTextContentInternal(nsAString& aTextContent,
-                                      ErrorResult& aError) MOZ_OVERRIDE;
+                                      ErrorResult& aError) override;
   virtual void SetTextContentInternal(const nsAString& aTextContent,
-                                      ErrorResult& aError) MOZ_OVERRIDE;
-  virtual void GetNodeValueInternal(nsAString& aNodeValue) MOZ_OVERRIDE;
+                                      ErrorResult& aError) override;
+  virtual void GetNodeValueInternal(nsAString& aNodeValue) override;
   virtual void SetNodeValueInternal(const nsAString& aNodeValue,
-                                    ErrorResult& aError) MOZ_OVERRIDE;
+                                    ErrorResult& aError) override;
 
   // nsIDOMAttr interface
   NS_DECL_NSIDOMATTR
 
-  virtual nsresult PreHandleEvent(EventChainPreVisitor& aVisitor) MOZ_OVERRIDE;
+  virtual nsresult PreHandleEvent(EventChainPreVisitor& aVisitor) override;
 
   // nsIAttribute interface
-  void SetMap(nsDOMAttributeMap *aMap) MOZ_OVERRIDE;
+  void SetMap(nsDOMAttributeMap *aMap) override;
   Element* GetElement() const;
-  nsresult SetOwnerDocument(nsIDocument* aDocument) MOZ_OVERRIDE;
+  nsresult SetOwnerDocument(nsIDocument* aDocument) override;
 
   // nsINode interface
-  virtual bool IsNodeOfType(uint32_t aFlags) const MOZ_OVERRIDE;
-  virtual uint32_t GetChildCount() const MOZ_OVERRIDE;
-  virtual nsIContent *GetChildAt(uint32_t aIndex) const MOZ_OVERRIDE;
-  virtual nsIContent * const * GetChildArray(uint32_t* aChildCount) const MOZ_OVERRIDE;
-  virtual int32_t IndexOf(const nsINode* aPossibleChild) const MOZ_OVERRIDE;
+  virtual bool IsNodeOfType(uint32_t aFlags) const override;
+  virtual uint32_t GetChildCount() const override;
+  virtual nsIContent *GetChildAt(uint32_t aIndex) const override;
+  virtual nsIContent * const * GetChildArray(uint32_t* aChildCount) const override;
+  virtual int32_t IndexOf(const nsINode* aPossibleChild) const override;
   virtual nsresult InsertChildAt(nsIContent* aKid, uint32_t aIndex,
-                                 bool aNotify) MOZ_OVERRIDE;
-  virtual void RemoveChildAt(uint32_t aIndex, bool aNotify) MOZ_OVERRIDE;
-  virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
-  virtual already_AddRefed<nsIURI> GetBaseURI(bool aTryUseXHRDocBaseURI = false) const MOZ_OVERRIDE;
+                                 bool aNotify) override;
+  virtual void RemoveChildAt(uint32_t aIndex, bool aNotify) override;
+  virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const override;
+  virtual already_AddRefed<nsIURI> GetBaseURI(bool aTryUseXHRDocBaseURI = false) const override;
 
   static void Initialize();
   static void Shutdown();
 
   NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_AMBIGUOUS(Attr,
                                                                    nsIAttribute)
 
-  virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
+  virtual nsIDOMNode* AsDOMNode() override { return this; }
 
   // WebIDL
-  virtual JSObject* WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
+  virtual JSObject* WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   // XPCOM GetName() is OK
   // XPCOM GetValue() is OK
 
   void SetValue(const nsAString& aValue, ErrorResult& aRv);
 
   bool Specified() const;
 
   // XPCOM GetNamespaceURI() is OK
   // XPCOM GetPrefix() is OK
   // XPCOM GetLocalName() is OK
 
   Element* GetOwnerElement(ErrorResult& aRv);
 
 protected:
-  virtual Element* GetNameSpaceElement() MOZ_OVERRIDE
+  virtual Element* GetNameSpaceElement() override
   {
     return GetElement();
   }
 
   static bool sInitialized;
 
 private:
   already_AddRefed<nsIAtom> GetNameAtom(nsIContent* aContent);
--- a/dom/base/BarProps.h
+++ b/dom/base/BarProps.h
@@ -35,95 +35,95 @@ public:
   explicit BarProp(nsGlobalWindow *aWindow);
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(BarProp)
 
   nsPIDOMWindow* GetParentObject() const;
 
   virtual JSObject*
-  WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
+  WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   virtual bool GetVisible(ErrorResult& aRv) = 0;
   virtual void SetVisible(bool aVisible, ErrorResult& aRv) = 0;
 
 protected:
   virtual ~BarProp();
 
   bool GetVisibleByFlag(uint32_t aChromeFlag, ErrorResult& aRv);
   void SetVisibleByFlag(bool aVisible, uint32_t aChromeFlag, ErrorResult &aRv);
 
   already_AddRefed<nsIWebBrowserChrome> GetBrowserChrome();
 
   nsRefPtr<nsGlobalWindow> mDOMWindow;
 };
 
 // Script "menubar" object
-class MenubarProp MOZ_FINAL : public BarProp
+class MenubarProp final : public BarProp
 {
 public:
   explicit MenubarProp(nsGlobalWindow *aWindow);
   virtual ~MenubarProp();
 
-  virtual bool GetVisible(ErrorResult& aRv) MOZ_OVERRIDE;
-  virtual void SetVisible(bool aVisible, ErrorResult& aRv) MOZ_OVERRIDE;
+  virtual bool GetVisible(ErrorResult& aRv) override;
+  virtual void SetVisible(bool aVisible, ErrorResult& aRv) override;
 };
 
 // Script "toolbar" object
-class ToolbarProp MOZ_FINAL : public BarProp
+class ToolbarProp final : public BarProp
 {
 public:
   explicit ToolbarProp(nsGlobalWindow *aWindow);
   virtual ~ToolbarProp();
 
-  virtual bool GetVisible(ErrorResult& aRv) MOZ_OVERRIDE;
-  virtual void SetVisible(bool aVisible, ErrorResult& aRv) MOZ_OVERRIDE;
+  virtual bool GetVisible(ErrorResult& aRv) override;
+  virtual void SetVisible(bool aVisible, ErrorResult& aRv) override;
 };
 
 // Script "locationbar" object
-class LocationbarProp MOZ_FINAL : public BarProp
+class LocationbarProp final : public BarProp
 {
 public:
   explicit LocationbarProp(nsGlobalWindow *aWindow);
   virtual ~LocationbarProp();
 
-  virtual bool GetVisible(ErrorResult& aRv) MOZ_OVERRIDE;
-  virtual void SetVisible(bool aVisible, ErrorResult& aRv) MOZ_OVERRIDE;
+  virtual bool GetVisible(ErrorResult& aRv) override;
+  virtual void SetVisible(bool aVisible, ErrorResult& aRv) override;
 };
 
 // Script "personalbar" object
-class PersonalbarProp MOZ_FINAL : public BarProp
+class PersonalbarProp final : public BarProp
 {
 public:
   explicit PersonalbarProp(nsGlobalWindow *aWindow);
   virtual ~PersonalbarProp();
 
-  virtual bool GetVisible(ErrorResult& aRv) MOZ_OVERRIDE;
-  virtual void SetVisible(bool aVisible, ErrorResult& aRv) MOZ_OVERRIDE;
+  virtual bool GetVisible(ErrorResult& aRv) override;
+  virtual void SetVisible(bool aVisible, ErrorResult& aRv) override;
 };
 
 // Script "statusbar" object
-class StatusbarProp MOZ_FINAL : public BarProp
+class StatusbarProp final : public BarProp
 {
 public:
   explicit StatusbarProp(nsGlobalWindow *aWindow);
   virtual ~StatusbarProp();
 
-  virtual bool GetVisible(ErrorResult& aRv) MOZ_OVERRIDE;
-  virtual void SetVisible(bool aVisible, ErrorResult& aRv) MOZ_OVERRIDE;
+  virtual bool GetVisible(ErrorResult& aRv) override;
+  virtual void SetVisible(bool aVisible, ErrorResult& aRv) override;
 };
 
 // Script "scrollbars" object
-class ScrollbarsProp MOZ_FINAL : public BarProp
+class ScrollbarsProp final : public BarProp
 {
 public:
   explicit ScrollbarsProp(nsGlobalWindow *aWindow);
   virtual ~ScrollbarsProp();
 
-  virtual bool GetVisible(ErrorResult& aRv) MOZ_OVERRIDE;
-  virtual void SetVisible(bool aVisible, ErrorResult& aRv) MOZ_OVERRIDE;
+  virtual bool GetVisible(ErrorResult& aRv) override;
+  virtual void SetVisible(bool aVisible, ErrorResult& aRv) override;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif /* mozilla_dom_BarProps_h */
 
--- a/dom/base/Comment.h
+++ b/dom/base/Comment.h
@@ -8,17 +8,17 @@
 
 #include "mozilla/Attributes.h"
 #include "nsIDOMComment.h"
 #include "nsGenericDOMDataNode.h"
 
 namespace mozilla {
 namespace dom {
 
-class Comment MOZ_FINAL : public nsGenericDOMDataNode,
+class Comment final : public nsGenericDOMDataNode,
                           public nsIDOMComment
 {
 private:
   void Init()
   {
     MOZ_ASSERT(mNodeInfo->NodeType() == nsIDOMNode::COMMENT_NODE,
                "Bad NodeType in aNodeInfo");
   }
@@ -47,35 +47,35 @@ public:
   // nsIDOMCharacterData
   NS_FORWARD_NSIDOMCHARACTERDATA(nsGenericDOMDataNode::)
   using nsGenericDOMDataNode::SetData; // Prevent hiding overloaded virtual function.
 
   // nsIDOMComment
   // Empty interface
 
   // nsINode
-  virtual bool IsNodeOfType(uint32_t aFlags) const MOZ_OVERRIDE;
+  virtual bool IsNodeOfType(uint32_t aFlags) const override;
 
   virtual nsGenericDOMDataNode* CloneDataNode(mozilla::dom::NodeInfo *aNodeInfo,
-                                              bool aCloneText) const MOZ_OVERRIDE;
+                                              bool aCloneText) const override;
 
-  virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
+  virtual nsIDOMNode* AsDOMNode() override { return this; }
 #ifdef DEBUG
-  virtual void List(FILE* out, int32_t aIndent) const MOZ_OVERRIDE;
+  virtual void List(FILE* out, int32_t aIndent) const override;
   virtual void DumpContent(FILE* out = stdout, int32_t aIndent = 0,
-                           bool aDumpAll = true) const MOZ_OVERRIDE
+                           bool aDumpAll = true) const override
   {
     return;
   }
 #endif
 
   static already_AddRefed<Comment>
   Constructor(const GlobalObject& aGlobal, const nsAString& aData,
               ErrorResult& aRv);
 
 protected:
-  virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
+  virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) override;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_Comment_h
--- a/dom/base/Console.cpp
+++ b/dom/base/Console.cpp
@@ -143,17 +143,17 @@ ConsoleStructuredCloneCallbacksError(JSC
 }
 
 static const JSStructuredCloneCallbacks gConsoleCallbacks = {
   ConsoleStructuredCloneCallbacksRead,
   ConsoleStructuredCloneCallbacksWrite,
   ConsoleStructuredCloneCallbacksError
 };
 
-class ConsoleCallData MOZ_FINAL
+class ConsoleCallData final
 {
 public:
   ConsoleCallData()
     : mMethodName(Console::MethodLog)
     , mPrivate(false)
     , mTimeStamp(JS_Now() / PR_USEC_PER_MSEC)
     , mIDType(eUnknown)
     , mOuterIDNumber(0)
@@ -389,31 +389,31 @@ protected:
   Console* mConsole;
 
 private:
   nsCOMPtr<nsIEventTarget> mSyncLoopTarget;
 };
 
 // This runnable appends a CallData object into the Console queue running on
 // the main-thread.
-class ConsoleCallDataRunnable MOZ_FINAL : public ConsoleRunnable
+class ConsoleCallDataRunnable final : public ConsoleRunnable
 {
 public:
   ConsoleCallDataRunnable(Console* aConsole,
                           ConsoleCallData* aCallData)
     : ConsoleRunnable(aConsole)
     , mCallData(aCallData)
   { }
 
 private:
   ~ConsoleCallDataRunnable()
   { }
 
   bool
-  PreDispatch(JSContext* aCx) MOZ_OVERRIDE
+  PreDispatch(JSContext* aCx) override
   {
     mWorkerPrivate->AssertIsOnWorkerThread();
 
     ClearException ce(aCx);
     JSAutoCompartment ac(aCx, mCallData->mGlobal);
 
     JS::Rooted<JSObject*> arguments(aCx,
       JS_NewArrayObject(aCx, mCallData->mArguments.Length()));
@@ -436,17 +436,17 @@ private:
     }
 
     mCallData->CleanupJSObjects();
     return true;
   }
 
   void
   RunConsole(JSContext* aCx, nsPIDOMWindow* aOuterWindow,
-             nsPIDOMWindow* aInnerWindow) MOZ_OVERRIDE
+             nsPIDOMWindow* aInnerWindow) override
   {
     MOZ_ASSERT(NS_IsMainThread());
 
     // The windows have to run in parallel.
     MOZ_ASSERT(!!aOuterWindow == !!aInnerWindow);
 
     if (aOuterWindow) {
       mCallData->SetIDs(aOuterWindow->WindowID(), aInnerWindow->WindowID());
@@ -515,31 +515,31 @@ private:
 
   ConsoleCallData* mCallData;
 
   JSAutoStructuredCloneBuffer mArguments;
   ConsoleStructuredCloneData mData;
 };
 
 // This runnable calls ProfileMethod() on the console on the main-thread.
-class ConsoleProfileRunnable MOZ_FINAL : public ConsoleRunnable
+class ConsoleProfileRunnable final : public ConsoleRunnable
 {
 public:
   ConsoleProfileRunnable(Console* aConsole, const nsAString& aAction,
                          const Sequence<JS::Value>& aArguments)
     : ConsoleRunnable(aConsole)
     , mAction(aAction)
     , mArguments(aArguments)
   {
     MOZ_ASSERT(aConsole);
   }
 
 private:
   bool
-  PreDispatch(JSContext* aCx) MOZ_OVERRIDE
+  PreDispatch(JSContext* aCx) override
   {
     ClearException ce(aCx);
 
     JS::Rooted<JSObject*> global(aCx, JS::CurrentGlobalOrNull(aCx));
     if (!global) {
       return false;
     }
 
@@ -565,17 +565,17 @@ private:
       return false;
     }
 
     return true;
   }
 
   void
   RunConsole(JSContext* aCx, nsPIDOMWindow* aOuterWindow,
-             nsPIDOMWindow* aInnerWindow) MOZ_OVERRIDE
+             nsPIDOMWindow* aInnerWindow) override
   {
     ClearException ce(aCx);
 
     // Now we could have the correct window (if we are not window-less).
     mData.mParent = aInnerWindow;
 
     JS::Rooted<JS::Value> argumentsValue(aCx);
     bool ok = mBuffer.read(aCx, &argumentsValue, &gConsoleCallbacks, &mData);
@@ -929,26 +929,26 @@ public:
                         const nsAString& aCause)
     : TimelineMarker(aDocShell, "ConsoleTime", aMetaData, aCause)
   {
     if (aMetaData == TRACING_INTERVAL_END) {
       CaptureStack();
     }
   }
 
-  virtual bool Equals(const TimelineMarker* aOther) MOZ_OVERRIDE
+  virtual bool Equals(const TimelineMarker* aOther) override
   {
     if (!TimelineMarker::Equals(aOther)) {
       return false;
     }
     // Console markers must have matching causes as well.
     return GetCause() == aOther->GetCause();
   }
 
-  virtual void AddDetails(mozilla::dom::ProfileTimelineMarker& aMarker) MOZ_OVERRIDE
+  virtual void AddDetails(mozilla::dom::ProfileTimelineMarker& aMarker) override
   {
     if (GetMetaData() == TRACING_INTERVAL_START) {
       aMarker.mCauseName.Construct(GetCause());
     } else {
       aMarker.mEndStack = GetStack();
     }
   }
 };
--- a/dom/base/Console.h
+++ b/dom/base/Console.h
@@ -20,17 +20,17 @@ class nsIConsoleAPIStorage;
 class nsIXPConnectJSObjectHolder;
 
 namespace mozilla {
 namespace dom {
 
 class ConsoleCallData;
 struct ConsoleStackEntry;
 
-class Console MOZ_FINAL : public nsIObserver
+class Console final : public nsIObserver
                         , public nsWrapperCache
 {
   ~Console();
 
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Console)
   NS_DECL_NSIOBSERVER
@@ -39,17 +39,17 @@ public:
 
   // WebIDL methods
   nsISupports* GetParentObject() const
   {
     return mWindow;
   }
 
   virtual JSObject*
-  WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
+  WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   void
   Log(JSContext* aCx, const Sequence<JS::Value>& aData);
 
   void
   Info(JSContext* aCx, const Sequence<JS::Value>& aData);
 
   void
--- a/dom/base/Crypto.h
+++ b/dom/base/Crypto.h
@@ -45,17 +45,17 @@ public:
 
   nsIGlobalObject*
   GetParentObject() const
   {
     return mParent;
   }
 
   virtual JSObject*
-  WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
+  WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   static uint8_t*
   GetRandomValues(uint32_t aLength);
 
 private:
   nsCOMPtr<nsIGlobalObject> mParent;
   nsRefPtr<SubtleCrypto> mSubtle;
 };
--- a/dom/base/DOMCursor.h
+++ b/dom/base/DOMCursor.h
@@ -22,17 +22,17 @@ class DOMCursor : public DOMRequest
 public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIDOMDOMCURSOR
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(DOMCursor,
                                            DOMRequest)
 
   DOMCursor(nsPIDOMWindow* aWindow, nsICursorContinueCallback *aCallback);
 
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
+  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   bool Done() const
   {
     return mFinished;
   }
   virtual void Continue(ErrorResult& aRv);
 
   void Reset();
--- a/dom/base/DOMError.h
+++ b/dom/base/DOMError.h
@@ -54,17 +54,17 @@ public:
            const nsAString& aMessage);
 
   nsPIDOMWindow* GetParentObject() const
   {
     return mWindow;
   }
 
   virtual JSObject*
-  WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
+  WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   static already_AddRefed<DOMError>
   Constructor(const GlobalObject& global, const nsAString& name,
               const nsAString& message, ErrorResult& aRv);
 
   void GetName(nsString& aRetval) const
   {
     aRetval = mName;
--- a/dom/base/DOMException.h
+++ b/dom/base/DOMException.h
@@ -59,17 +59,17 @@ public:
 
   // Cruft used by XPConnect for exceptions originating in JS implemented
   // components.
   bool StealJSVal(JS::Value* aVp);
   void StowJSVal(JS::Value& aVp);
 
   // WebIDL API
   virtual JSObject* WrapObject(JSContext* cx, JS::Handle<JSObject*> aGivenProto)
-    MOZ_OVERRIDE;
+    override;
 
   nsISupports* GetParentObject() const { return nullptr; }
 
   void GetMessageMoz(nsString& retval);
 
   uint32_t Result() const;
 
   void GetName(nsString& retval);
@@ -128,21 +128,21 @@ class DOMException : public Exception,
 public:
   DOMException(nsresult aRv, const nsACString& aMessage,
                const nsACString& aName, uint16_t aCode);
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIDOMDOMEXCEPTION
 
   // nsIException overrides
-  NS_IMETHOD ToString(nsACString& aReturn) MOZ_OVERRIDE;
+  NS_IMETHOD ToString(nsACString& aReturn) override;
 
   // nsWrapperCache overrides
   virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
-    MOZ_OVERRIDE;
+    override;
 
   static already_AddRefed<DOMException>
   Constructor(GlobalObject& /* unused */,
               const nsAString& aMessage,
               const Optional<nsAString>& aName,
               ErrorResult& aError);
 
   uint16_t Code() const {
--- a/dom/base/DOMImplementation.h
+++ b/dom/base/DOMImplementation.h
@@ -19,17 +19,17 @@
 #include "nsString.h"
 
 class nsIDOMDocument;
 
 namespace mozilla {
 namespace dom {
 class DocumentType;
 
-class DOMImplementation MOZ_FINAL : public nsIDOMDOMImplementation
+class DOMImplementation final : public nsIDOMDOMImplementation
                                   , public nsWrapperCache
 {
   ~DOMImplementation()
   {
   }
 
 public:
   DOMImplementation(nsIDocument* aOwner,
@@ -47,17 +47,17 @@ public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMImplementation)
 
   nsIDocument* GetParentObject() const
   {
     return mOwner;
   }
 
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
+  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   // nsIDOMDOMImplementation
   NS_DECL_NSIDOMDOMIMPLEMENTATION
 
   bool HasFeature(const nsAString& aFeature, const nsAString& aVersion);
 
   already_AddRefed<DocumentType>
   CreateDocumentType(const nsAString& aQualifiedName,
--- a/dom/base/DOMMatrix.h
+++ b/dom/base/DOMMatrix.h
@@ -136,17 +136,17 @@ protected:
   virtual ~DOMMatrixReadOnly() {}
 
 private:
   DOMMatrixReadOnly() = delete;
   DOMMatrixReadOnly(const DOMMatrixReadOnly&) = delete;
   DOMMatrixReadOnly& operator=(const DOMMatrixReadOnly&) = delete;
 };
 
-class DOMMatrix MOZ_FINAL : public DOMMatrixReadOnly
+class DOMMatrix final : public DOMMatrixReadOnly
 {
 public:
   explicit DOMMatrix(nsISupports* aParent)
     : DOMMatrixReadOnly(aParent)
   {}
 
   DOMMatrix(nsISupports* aParent, const DOMMatrixReadOnly& other)
     : DOMMatrixReadOnly(aParent, other)
@@ -161,17 +161,17 @@ public:
   static already_AddRefed<DOMMatrix>
   Constructor(const GlobalObject& aGlobal, const Float32Array& aArray32, ErrorResult& aRv);
   static already_AddRefed<DOMMatrix>
   Constructor(const GlobalObject& aGlobal, const Float64Array& aArray64, ErrorResult& aRv);
   static already_AddRefed<DOMMatrix>
   Constructor(const GlobalObject& aGlobal, const Sequence<double>& aNumberSequence, ErrorResult& aRv);
 
   nsISupports* GetParentObject() const { return mParent; }
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
+  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
 #define Set2DMatrixMember(entry2D, entry3D) \
 { \
   if (mMatrix3D) { \
     mMatrix3D->entry3D = v; \
   } else { \
     mMatrix2D->entry2D = v; \
   } \
--- a/dom/base/DOMParser.h
+++ b/dom/base/DOMParser.h
@@ -15,17 +15,17 @@
 #include "mozilla/dom/DOMParserBinding.h"
 #include "mozilla/dom/TypedArray.h"
 
 class nsIDocument;
 
 namespace mozilla {
 namespace dom {
 
-class DOMParser MOZ_FINAL : public nsIDOMParser,
+class DOMParser final : public nsIDOMParser,
                             public nsSupportsWeakReference,
                             public nsWrapperCache
 {
   typedef mozilla::dom::GlobalObject GlobalObject;
 
   virtual ~DOMParser();
 
 public: 
@@ -70,17 +70,17 @@ public:
   void Init(nsIPrincipal* aPrincipal, nsIURI* aDocumentURI,
             nsIURI* aBaseURI, mozilla::ErrorResult& rv);
 
   nsISupports* GetParentObject() const
   {
     return mOwner;
   }
 
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE
+  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override
   {
     return mozilla::dom::DOMParserBinding::Wrap(aCx, this, aGivenProto);
   }
 
 private:
   explicit DOMParser(nsISupports* aOwner) : mOwner(aOwner), mAttemptedInit(false)
   {
     MOZ_ASSERT(aOwner);
--- a/dom/base/DOMPoint.h
+++ b/dom/base/DOMPoint.h
@@ -43,33 +43,33 @@ public:
 
 protected:
   virtual ~DOMPointReadOnly() {}
 
   nsCOMPtr<nsISupports> mParent;
   double mX, mY, mZ, mW;
 };
 
-class DOMPoint MOZ_FINAL : public DOMPointReadOnly
+class DOMPoint final : public DOMPointReadOnly
 {
 public:
   explicit DOMPoint(nsISupports* aParent, double aX = 0.0, double aY = 0.0,
                     double aZ = 0.0, double aW = 1.0)
     : DOMPointReadOnly(aParent, aX, aY, aZ, aW)
   {}
 
   static already_AddRefed<DOMPoint>
   Constructor(const GlobalObject& aGlobal, const DOMPointInit& aParams,
               ErrorResult& aRV);
   static already_AddRefed<DOMPoint>
   Constructor(const GlobalObject& aGlobal, double aX, double aY,
               double aZ, double aW, ErrorResult& aRV);
 
   nsISupports* GetParentObject() const { return mParent; }
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
+  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   void SetX(double aX) { mX = aX; }
   void SetY(double aY) { mY = aY; }
   void SetZ(double aZ) { mZ = aZ; }
   void SetW(double aW) { mW = aW; }
 };
 
 }
--- a/dom/base/DOMQuad.cpp
+++ b/dom/base/DOMQuad.cpp
@@ -68,46 +68,46 @@ DOMQuad::Constructor(const GlobalObject&
   points[0] = CSSPoint(x, y);
   points[1] = CSSPoint(x + w, y);
   points[2] = CSSPoint(x + w, y + h);
   points[3] = CSSPoint(x, y + h);
   nsRefPtr<DOMQuad> obj = new DOMQuad(aGlobal.GetAsSupports(), points);
   return obj.forget();
 }
 
-class DOMQuad::QuadBounds MOZ_FINAL : public DOMRectReadOnly
+class DOMQuad::QuadBounds final : public DOMRectReadOnly
 {
 public:
   explicit QuadBounds(DOMQuad* aQuad)
     : DOMRectReadOnly(aQuad->GetParentObject())
     , mQuad(aQuad)
   {}
 
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(QuadBounds, DOMRectReadOnly)
   NS_DECL_ISUPPORTS_INHERITED
 
-  virtual double X() const MOZ_OVERRIDE
+  virtual double X() const override
   {
     double x1, x2;
     GetHorizontalMinMax(&x1, &x2);
     return x1;
   }
-  virtual double Y() const MOZ_OVERRIDE
+  virtual double Y() const override
   {
     double y1, y2;
     GetVerticalMinMax(&y1, &y2);
     return y1;
   }
-  virtual double Width() const MOZ_OVERRIDE
+  virtual double Width() const override
   {
     double x1, x2;
     GetHorizontalMinMax(&x1, &x2);
     return x2 - x1;
   }
-  virtual double Height() const MOZ_OVERRIDE
+  virtual double Height() const override
   {
     double y1, y2;
     GetVerticalMinMax(&y1, &y2);
     return y2 - y1;
   }
 
   void GetHorizontalMinMax(double* aX1, double* aX2) const
   {
--- a/dom/base/DOMQuad.h
+++ b/dom/base/DOMQuad.h
@@ -18,29 +18,29 @@
 
 namespace mozilla {
 namespace dom {
 
 class DOMRectReadOnly;
 class DOMPoint;
 struct DOMPointInit;
 
-class DOMQuad MOZ_FINAL : public nsWrapperCache
+class DOMQuad final : public nsWrapperCache
 {
   ~DOMQuad();
 
 public:
   DOMQuad(nsISupports* aParent, CSSPoint aPoints[4]);
   explicit DOMQuad(nsISupports* aParent);
 
   NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(DOMQuad)
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(DOMQuad)
 
   nsISupports* GetParentObject() const { return mParent; }
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
+  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   static already_AddRefed<DOMQuad>
   Constructor(const GlobalObject& aGlobal,
               const DOMPointInit& aP1,
               const DOMPointInit& aP2,
               const DOMPointInit& aP3,
               const DOMPointInit& aP4,
               ErrorResult& aRV);
--- a/dom/base/DOMRect.h
+++ b/dom/base/DOMRect.h
@@ -38,17 +38,17 @@ public:
   {
   }
 
   nsISupports* GetParentObject() const
   {
     MOZ_ASSERT(mParent);
     return mParent;
   }
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
+  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   virtual double X() const = 0;
   virtual double Y() const = 0;
   virtual double Width() const = 0;
   virtual double Height() const = 0;
 
   double Left() const
   {
@@ -70,17 +70,17 @@ public:
     double y = Y(), h = Height();
     return std::max(y, y + h);
   }
 
 protected:
   nsCOMPtr<nsISupports> mParent;
 };
 
-class DOMRect MOZ_FINAL : public DOMRectReadOnly
+class DOMRect final : public DOMRectReadOnly
                         , public nsIDOMClientRect
 {
 public:
   explicit DOMRect(nsISupports* aParent, double aX = 0, double aY = 0,
                    double aWidth = 0, double aHeight = 0)
     : DOMRectReadOnly(aParent)
     , mX(aX)
     , mY(aY)
@@ -93,36 +93,36 @@ public:
   NS_DECL_NSIDOMCLIENTRECT
 
   static already_AddRefed<DOMRect>
   Constructor(const GlobalObject& aGlobal, ErrorResult& aRV);
   static already_AddRefed<DOMRect>
   Constructor(const GlobalObject& aGlobal, double aX, double aY,
               double aWidth, double aHeight, ErrorResult& aRV);
 
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
+  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   void SetRect(float aX, float aY, float aWidth, float aHeight) {
     mX = aX; mY = aY; mWidth = aWidth; mHeight = aHeight;
   }
   void SetLayoutRect(const nsRect& aLayoutRect);
 
-  virtual double X() const MOZ_OVERRIDE
+  virtual double X() const override
   {
     return mX;
   }
-  virtual double Y() const MOZ_OVERRIDE
+  virtual double Y() const override
   {
     return mY;
   }
-  virtual double Width() const MOZ_OVERRIDE
+  virtual double Width() const override
   {
     return mWidth;
   }
-  virtual double Height() const MOZ_OVERRIDE
+  virtual double Height() const override
   {
     return mHeight;
   }
 
   void SetX(double aX)
   {
     mX = aX;
   }
@@ -141,32 +141,32 @@ public:
 
 protected:
   double mX, mY, mWidth, mHeight;
 
 private:
   ~DOMRect() {};
 };
 
-class DOMRectList MOZ_FINAL : public nsIDOMClientRectList,
+class DOMRectList final : public nsIDOMClientRectList,
                               public nsWrapperCache
 {
   ~DOMRectList() {}
 
 public:
   explicit DOMRectList(nsISupports *aParent) : mParent(aParent)
   {
   }
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMRectList)
 
   NS_DECL_NSIDOMCLIENTRECTLIST
   
-  virtual JSObject* WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
+  virtual JSObject* WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override;
 
   nsISupports* GetParentObject()
   {
     return mParent;
   }
 
   void Append(DOMRect* aElement) { mArray.AppendElement(aElement); }
 
--- a/dom/base/DOMRequest.h
+++ b/dom/base/DOMRequest.h
@@ -42,17 +42,17 @@ public:
                                                          DOMEventTargetHelper)
 
   // WrapperCache
   nsPIDOMWindow* GetParentObject() const
   {
     return GetOwner();
   }
 
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
+  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   // WebIDL Interface
   DOMRequestReadyState ReadyState() const
   {
     return mDone ? DOMRequestReadyState::Done
                  : DOMRequestReadyState::Pending;
   }
 
@@ -88,17 +88,17 @@ public:
 protected:
   virtual ~DOMRequest();
 
   void FireEvent(const nsAString& aType, bool aBubble, bool aCancelable);
 
   void RootResultVal();
 };
 
-class DOMRequestService MOZ_FINAL : public nsIDOMRequestService
+class DOMRequestService final : public nsIDOMRequestService
 {
   ~DOMRequestService() {}
 
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIDOMREQUESTSERVICE
 
   // Returns an owning reference! No one should call this but the factory.
--- a/dom/base/DOMStringList.h
+++ b/dom/base/DOMStringList.h
@@ -19,17 +19,17 @@ class DOMStringList : public nsISupports
 {
 protected:
   virtual ~DOMStringList();
 
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMStringList)
 
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
+  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
   nsISupports* GetParentObject()
   {
     return nullptr;
   }
 
   void IndexedGetter(uint32_t aIndex, bool& aFound, nsAString& aResult)
   {
     EnsureFresh();
--- a/dom/base/DocumentFragment.h
+++ b/dom/base/DocumentFragment.h
@@ -60,63 +60,63 @@ public:
                                             nsGkAtoms::documentFragmentNodeName,
                                             nullptr, kNameSpaceID_None,
                                             nsIDOMNode::DOCUMENT_FRAGMENT_NODE)),
       mHost(nullptr)
   {
     Init();
   }
 
-  virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
+  virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   // nsIContent
   nsresult SetAttr(int32_t aNameSpaceID, nsIAtom* aName,
                    const nsAString& aValue, bool aNotify)
   {
     return SetAttr(aNameSpaceID, aName, nullptr, aValue, aNotify);
   }
   virtual nsresult SetAttr(int32_t aNameSpaceID, nsIAtom* aName,
                            nsIAtom* aPrefix, const nsAString& aValue,
-                           bool aNotify) MOZ_OVERRIDE
+                           bool aNotify) override
   {
     return NS_OK;
   }
   virtual nsresult UnsetAttr(int32_t aNameSpaceID, nsIAtom* aAttribute, 
-                             bool aNotify) MOZ_OVERRIDE
+                             bool aNotify) override
   {
     return NS_OK;
   }
-  virtual const nsAttrName* GetAttrNameAt(uint32_t aIndex) const MOZ_OVERRIDE
+  virtual const nsAttrName* GetAttrNameAt(uint32_t aIndex) const override
   {
     return nullptr;
   }
-  virtual uint32_t GetAttrCount() const MOZ_OVERRIDE
+  virtual uint32_t GetAttrCount() const override
   {
     return 0;
   }
 
-  virtual bool IsNodeOfType(uint32_t aFlags) const MOZ_OVERRIDE;
+  virtual bool IsNodeOfType(uint32_t aFlags) const override;
 
-  virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
+  virtual nsIDOMNode* AsDOMNode() override { return this; }
 
   virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
                               nsIContent* aBindingParent,
-                              bool aCompileEventHandlers) MOZ_OVERRIDE
+                              bool aCompileEventHandlers) override
   {
     NS_ASSERTION(false, "Trying to bind a fragment to a tree");
     return NS_ERROR_NOT_IMPLEMENTED;
   }
 
-  virtual void UnbindFromTree(bool aDeep, bool aNullParent) MOZ_OVERRIDE
+  virtual void UnbindFromTree(bool aDeep, bool aNullParent) override
   {
     NS_ASSERTION(false, "Trying to unbind a fragment from a tree");
     return;
   }
 
-  virtual Element* GetNameSpaceElement() MOZ_OVERRIDE
+  virtual Element* GetNameSpaceElement() override
   {
     return nullptr;
   }
 
   nsIContent* GetHost() const
   {
     return mHost;
   }
@@ -125,26 +125,26 @@ public:
   {
     mHost = aHost;
   }
 
   static already_AddRefed<DocumentFragment>
   Constructor(const GlobalObject& aGlobal, ErrorResult& aRv);
 
 #ifdef DEBUG
-  virtual void List(FILE* out, int32_t aIndent) const MOZ_OVERRIDE;
-  virtual void DumpContent(FILE* out, int32_t aIndent, bool aDumpAll) const MOZ_OVERRIDE;
+  virtual void List(FILE* out, int32_t aIndent) const override;
+  virtual void DumpContent(FILE* out, int32_t aIndent, bool aDumpAll) const override;
 #endif
 
 protected:
   virtual ~DocumentFragment()
   {
   }
 
-  nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
+  nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const override;
   nsIContent* mHost; // Weak
 };
 
 } // namespace dom
 } // namespace mozilla
 
 
 #endif // mozilla_dom_DocumentFragment_h__
--- a/dom/base/DocumentType.h
+++ b/dom/base/DocumentType.h
@@ -33,17 +33,17 @@ public:
     : nsGenericDOMDataNode(aNodeInfo)
   {
   }
 
   // nsIDOMNode
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
 };
 
-class DocumentType MOZ_FINAL : public DocumentTypeForward
+class DocumentType final : public DocumentTypeForward
 {
 public:
   DocumentType(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo,
                const nsAString& aPublicId,
                const nsAString& aSystemId,
                const nsAString& aInternalSubset);
 
   // nsISupports
@@ -51,38 +51,38 @@ public:
 
   // nsIDOMNode
   // Forwarded by base class
 
   // nsIDOMDocumentType
   NS_DECL_NSIDOMDOCUMENTTYPE
 
   // nsINode
-  virtual bool IsNodeOfType(uint32_t aFlags) const MOZ_OVERRIDE;
-  virtual void GetNodeValueInternal(nsAString& aNodeValue) MOZ_OVERRIDE
+  virtual bool IsNodeOfType(uint32_t aFlags) const override;
+  virtual void GetNodeValueInternal(nsAString& aNodeValue) override
   {
     SetDOMStringToNull(aNodeValue);
   }
   virtual void SetNodeValueInternal(const nsAString& aNodeValue,
-                                    mozilla::ErrorResult& aError) MOZ_OVERRIDE
+                                    mozilla::ErrorResult& aError) override
   {
   }
 
   // nsIContent overrides
-  virtual const nsTextFragment* GetText() MOZ_OVERRIDE;
+  virtual const nsTextFragment* GetText() override;
 
   virtual nsGenericDOMDataNode* CloneDataNode(mozilla::dom::NodeInfo *aNodeInfo,
-                                              bool aCloneText) const MOZ_OVERRIDE;
+                                              bool aCloneText) const override;
 
-  virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
+  virtual nsIDOMNode* AsDOMNode() override { return this; }
 
 protected:
   virtual ~DocumentType();
 
-  virtual JSObject* WrapNode(JSContext *cx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
+  virtual JSObject* WrapNode(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override;
 
   nsString mPublicId;
   nsString mSystemId;
   nsString mInternalSubset;
 };
 
 } // namespace dom
 } // namespace mozilla
--- a/dom/base/Element.h
+++ b/dom/base/Element.h
@@ -144,17 +144,17 @@ public:
     MOZ_ASSERT(mNodeInfo->NodeType() == nsIDOMNode::ELEMENT_NODE,
                "Bad NodeType in aNodeInfo");
     SetIsElement();
   }
 #endif // MOZILLA_INTERNAL_API
 
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_ELEMENT_IID)
 
-  NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr) MOZ_OVERRIDE;
+  NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr) override;
 
   /**
    * Method to get the full state of this element.  See mozilla/EventStates.h
    * for the possible bits that could be set here.
    */
   EventStates State() const
   {
     // mState is maintained by having whoever might have changed it
@@ -419,23 +419,23 @@ protected:
   virtual void RemoveStates(EventStates aStates)
   {
     NS_PRECONDITION(!aStates.HasAtLeastOneOfStates(INTRINSIC_STATES),
                     "Should only be removing ESM-managed states here");
     RemoveStatesSilently(aStates);
     NotifyStateChange(aStates);
   }
 public:
-  virtual void UpdateEditableState(bool aNotify) MOZ_OVERRIDE;
+  virtual void UpdateEditableState(bool aNotify) override;
 
   virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
                               nsIContent* aBindingParent,
-                              bool aCompileEventHandlers) MOZ_OVERRIDE;
+                              bool aCompileEventHandlers) override;
   virtual void UnbindFromTree(bool aDeep = true,
-                              bool aNullParent = true) MOZ_OVERRIDE;
+                              bool aNullParent = true) override;
 
   /**
    * Normalizes an attribute name and returns it as a nodeinfo if an attribute
    * with that name exists. This method is intended for character case
    * conversion if the content object is case insensitive (e.g. HTML). Returns
    * the nodeinfo of the attribute with the specified name if one exists or
    * null otherwise.
    *
@@ -475,17 +475,17 @@ public:
 
   bool OnlyNotifySameValueSet(int32_t aNamespaceID, nsIAtom* aName,
                               nsIAtom* aPrefix,
                               const nsAttrValueOrString& aValue,
                               bool aNotify, nsAttrValue& aOldValue,
                               uint8_t* aModType, bool* aHasListeners);
 
   virtual nsresult SetAttr(int32_t aNameSpaceID, nsIAtom* aName, nsIAtom* aPrefix,
-                           const nsAString& aValue, bool aNotify) MOZ_OVERRIDE;
+                           const nsAString& aValue, bool aNotify) override;
   nsresult SetParsedAttr(int32_t aNameSpaceID, nsIAtom* aName, nsIAtom* aPrefix,
                          nsAttrValue& aParsedValue, bool aNotify);
   // GetAttr is not inlined on purpose, to keep down codesize from all
   // the inlined nsAttrValue bits for C++ callers.
   bool GetAttr(int32_t aNameSpaceID, nsIAtom* aName,
                nsAString& aResult) const;
   inline bool HasAttr(int32_t aNameSpaceID, nsIAtom* aName) const;
   // aCaseSensitive == eIgnoreCaase means ASCII case-insensitive matching.
@@ -493,34 +493,34 @@ public:
                           const nsAString& aValue,
                           nsCaseTreatment aCaseSensitive) const;
   inline bool AttrValueIs(int32_t aNameSpaceID, nsIAtom* aName,
                           nsIAtom* aValue,
                           nsCaseTreatment aCaseSensitive) const;
   virtual int32_t FindAttrValueIn(int32_t aNameSpaceID,
                                   nsIAtom* aName,
                                   AttrValuesArray* aValues,
-                                  nsCaseTreatment aCaseSensitive) const MOZ_OVERRIDE;
+                                  nsCaseTreatment aCaseSensitive) const override;
   virtual nsresult UnsetAttr(int32_t aNameSpaceID, nsIAtom* aAttribute,
-                             bool aNotify) MOZ_OVERRIDE;
-  virtual const nsAttrName* GetAttrNameAt(uint32_t aIndex) const MOZ_OVERRIDE;
-  virtual uint32_t GetAttrCount() const MOZ_OVERRIDE;
-  virtual bool IsNodeOfType(uint32_t aFlags) const MOZ_OVERRIDE;
+                             bool aNotify) override;
+  virtual const nsAttrName* GetAttrNameAt(uint32_t aIndex) const override;
+  virtual uint32_t GetAttrCount() const override;
+  virtual bool IsNodeOfType(uint32_t aFlags) const override;
 
 #ifdef DEBUG
-  virtual void List(FILE* out = stdout, int32_t aIndent = 0) const MOZ_OVERRIDE
+  virtual void List(FILE* out = stdout, int32_t aIndent = 0) const override
   {
     List(out, aIndent, EmptyCString());
   }
-  virtual void DumpContent(FILE* out, int32_t aIndent, bool aDumpAll) const MOZ_OVERRIDE;
+  virtual void DumpContent(FILE* out, int32_t aIndent, bool aDumpAll) const override;
   void List(FILE* out, int32_t aIndent, const nsCString& aPrefix) const;
   void ListAttributes(FILE* out) const;
 #endif
 
-  void Describe(nsAString& aOutDescription) const MOZ_OVERRIDE;
+  void Describe(nsAString& aOutDescription) const override;
 
   /*
    * Attribute Mapping Helpers
    */
   struct MappedAttributeEntry {
     nsIAtom** attribute;
   };
 
@@ -955,19 +955,19 @@ public:
     GetElementsByTagNameNS(const nsAString& aNamespaceURI,
                            const nsAString& aLocalName,
                            nsIDOMHTMLCollection** aResult);
   nsresult
     GetElementsByClassName(const nsAString& aClassNames,
                            nsIDOMHTMLCollection** aResult);
   void GetClassList(nsISupports** aClassList);
 
-  virtual JSObject* WrapObject(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) MOZ_FINAL MOZ_OVERRIDE;
+  virtual JSObject* WrapObject(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) final override;
 
-  nsINode* GetScopeChainParent() const MOZ_OVERRIDE;
+  nsINode* GetScopeChainParent() const override;
 
   /**
    * Locate an nsIEditor rooted at this content node, if there is one.
    */
   nsIEditor* GetEditorInternal();
 
   /**
    * Helper method for NS_IMPL_BOOL_ATTR macro.
@@ -1206,17 +1206,17 @@ protected:
 
   /**
    * Internal hook for converting an attribute name-string to an atomized name
    */
   virtual const nsAttrName* InternalGetExistingAttrNameFromQName(const nsAString& aStr) const;
 
   nsIFrame* GetStyledFrame();
 
-  virtual Element* GetNameSpaceElement() MOZ_OVERRIDE
+  virtual Element* GetNameSpaceElement() override
   {
     return this;
   }
 
   Attr* GetAttributeNodeNSInternal(const nsAString& aNamespaceURI,
                                    const nsAString& aLocalName);
 
   inline void RegisterActivityObserver();
@@ -1286,17 +1286,17 @@ private:
 
 class RemoveFromBindingManagerRunnable : public nsRunnable
 {
 public:
   RemoveFromBindingManagerRunnable(nsBindingManager* aManager,
                                    nsIContent* aContent,
                                    nsIDocument* aDoc);
 
-  NS_IMETHOD Run() MOZ_OVERRIDE;
+  NS_IMETHOD Run() override;
 private:
   virtual ~RemoveFromBindingManagerRunnable();
   nsRefPtr<nsBindingManager> mManager;
   nsRefPtr<nsIContent> mContent;
   nsCOMPtr<nsIDocument> mDoc;
 };
 
 class DestinationInsertionPointList : public nsINodeList
@@ -1306,21 +1306,21 @@ public:
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS(DestinationInsertionPointList)
 
   // nsIDOMNodeList
   NS_DECL_NSIDOMNODELIST
 
   // nsINodeList
-  virtual nsIContent* Item(uint32_t aIndex) MOZ_OVERRIDE;
-  virtual int32_t IndexOf(nsIContent* aContent) MOZ_OVERRIDE;
-  virtual nsINode* GetParentObject() MOZ_OVERRIDE { return mParent; }
+  virtual nsIContent* Item(uint32_t aIndex) override;
+  virtual int32_t IndexOf(nsIContent* aContent) override;
+  virtual nsINode* GetParentObject() override { return mParent; }
   virtual uint32_t Length() const;
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
+  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 protected:
   virtual ~DestinationInsertionPointList();
 
   nsRefPtr<Element> mParent;
   nsCOMArray<nsIContent> mDestinationPoints;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(Element, NS_ELEMENT_IID)
@@ -1462,345 +1462,345 @@ nsresult                                
   NS_IMETHODIMP                                                       \
   _class::Set##_method(bool aValue)                                   \
   {                                                                   \
     return SetBoolAttr(nsGkAtoms::_atom, aValue);                     \
   }
 
 #define NS_FORWARD_NSIDOMELEMENT_TO_GENERIC                                   \
 typedef mozilla::dom::Element Element;                                        \
-NS_IMETHOD GetTagName(nsAString& aTagName) MOZ_FINAL MOZ_OVERRIDE             \
+NS_IMETHOD GetTagName(nsAString& aTagName) final override             \
 {                                                                             \
   Element::GetTagName(aTagName);                                              \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetId(nsAString& aId) MOZ_FINAL MOZ_OVERRIDE                       \
+NS_IMETHOD GetId(nsAString& aId) final override                       \
 {                                                                             \
   Element::GetId(aId);                                                        \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD SetId(const nsAString& aId) MOZ_FINAL MOZ_OVERRIDE                 \
+NS_IMETHOD SetId(const nsAString& aId) final override                 \
 {                                                                             \
   Element::SetId(aId);                                                        \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetClassName(nsAString& aClassName) MOZ_FINAL MOZ_OVERRIDE         \
+NS_IMETHOD GetClassName(nsAString& aClassName) final override         \
 {                                                                             \
   Element::GetClassName(aClassName);                                          \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD SetClassName(const nsAString& aClassName) MOZ_FINAL MOZ_OVERRIDE   \
+NS_IMETHOD SetClassName(const nsAString& aClassName) final override   \
 {                                                                             \
   Element::SetClassName(aClassName);                                          \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetClassList(nsISupports** aClassList) MOZ_FINAL MOZ_OVERRIDE      \
+NS_IMETHOD GetClassList(nsISupports** aClassList) final override      \
 {                                                                             \
   Element::GetClassList(aClassList);                                          \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetAttributes(nsIDOMMozNamedAttrMap** aAttributes) MOZ_FINAL       \
-  MOZ_OVERRIDE                                                                \
+NS_IMETHOD GetAttributes(nsIDOMMozNamedAttrMap** aAttributes) final       \
+  override                                                                \
 {                                                                             \
   NS_ADDREF(*aAttributes = Attributes());                                     \
   return NS_OK;                                                               \
 }                                                                             \
 using Element::GetAttribute;                                                  \
-NS_IMETHOD GetAttribute(const nsAString& name, nsAString& _retval) MOZ_FINAL  \
-  MOZ_OVERRIDE                                                                \
+NS_IMETHOD GetAttribute(const nsAString& name, nsAString& _retval) final  \
+  override                                                                \
 {                                                                             \
   nsString attr;                                                              \
   GetAttribute(name, attr);                                                   \
   _retval = attr;                                                             \
   return NS_OK;                                                               \
 }                                                                             \
 NS_IMETHOD GetAttributeNS(const nsAString& namespaceURI,                      \
                           const nsAString& localName,                         \
-                          nsAString& _retval) MOZ_FINAL MOZ_OVERRIDE          \
+                          nsAString& _retval) final override          \
 {                                                                             \
   Element::GetAttributeNS(namespaceURI, localName, _retval);                  \
   return NS_OK;                                                               \
 }                                                                             \
 NS_IMETHOD SetAttribute(const nsAString& name,                                \
-                        const nsAString& value) MOZ_OVERRIDE                  \
+                        const nsAString& value) override                  \
 {                                                                             \
   mozilla::ErrorResult rv;                                                    \
   Element::SetAttribute(name, value, rv);                                     \
   return rv.ErrorCode();                                                      \
 }                                                                             \
 NS_IMETHOD SetAttributeNS(const nsAString& namespaceURI,                      \
                           const nsAString& qualifiedName,                     \
-                          const nsAString& value) MOZ_FINAL MOZ_OVERRIDE      \
+                          const nsAString& value) final override      \
 {                                                                             \
   mozilla::ErrorResult rv;                                                    \
   Element::SetAttributeNS(namespaceURI, qualifiedName, value, rv);            \
   return rv.ErrorCode();                                                      \
 }                                                                             \
 using Element::RemoveAttribute;                                               \
-NS_IMETHOD RemoveAttribute(const nsAString& name) MOZ_FINAL MOZ_OVERRIDE      \
+NS_IMETHOD RemoveAttribute(const nsAString& name) final override      \
 {                                                                             \
   mozilla::ErrorResult rv;                                                    \
   RemoveAttribute(name, rv);                                                  \
   return rv.ErrorCode();                                                      \
 }                                                                             \
 NS_IMETHOD RemoveAttributeNS(const nsAString& namespaceURI,                   \
-                             const nsAString& localName) MOZ_FINAL            \
-  MOZ_OVERRIDE                                                                \
+                             const nsAString& localName) final            \
+  override                                                                \
 {                                                                             \
   mozilla::ErrorResult rv;                                                    \
   Element::RemoveAttributeNS(namespaceURI, localName, rv);                    \
   return rv.ErrorCode();                                                      \
 }                                                                             \
 using Element::HasAttribute;                                                  \
 NS_IMETHOD HasAttribute(const nsAString& name,                                \
-                           bool* _retval) MOZ_FINAL MOZ_OVERRIDE              \
+                           bool* _retval) final override              \
 {                                                                             \
   *_retval = HasAttribute(name);                                              \
   return NS_OK;                                                               \
 }                                                                             \
 NS_IMETHOD HasAttributeNS(const nsAString& namespaceURI,                      \
                           const nsAString& localName,                         \
-                          bool* _retval) MOZ_FINAL MOZ_OVERRIDE               \
+                          bool* _retval) final override               \
 {                                                                             \
   *_retval = Element::HasAttributeNS(namespaceURI, localName);                \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD HasAttributes(bool* _retval) MOZ_FINAL MOZ_OVERRIDE                \
+NS_IMETHOD HasAttributes(bool* _retval) final override                \
 {                                                                             \
   *_retval = Element::HasAttributes();                                        \
   return NS_OK;                                                               \
 }                                                                             \
 NS_IMETHOD GetAttributeNode(const nsAString& name,                            \
-                            nsIDOMAttr** _retval) MOZ_FINAL MOZ_OVERRIDE      \
+                            nsIDOMAttr** _retval) final override      \
 {                                                                             \
   NS_IF_ADDREF(*_retval = Element::GetAttributeNode(name));                   \
   return NS_OK;                                                               \
 }                                                                             \
 NS_IMETHOD SetAttributeNode(nsIDOMAttr* newAttr,                              \
-                            nsIDOMAttr** _retval) MOZ_FINAL MOZ_OVERRIDE      \
+                            nsIDOMAttr** _retval) final override      \
 {                                                                             \
   if (!newAttr) {                                                             \
     return NS_ERROR_INVALID_POINTER;                                          \
   }                                                                           \
   mozilla::ErrorResult rv;                                                    \
   mozilla::dom::Attr* attr = static_cast<mozilla::dom::Attr*>(newAttr);       \
   *_retval = Element::SetAttributeNode(*attr, rv).take();                     \
   return rv.ErrorCode();                                                      \
 }                                                                             \
 NS_IMETHOD RemoveAttributeNode(nsIDOMAttr* oldAttr,                           \
-                               nsIDOMAttr** _retval) MOZ_FINAL MOZ_OVERRIDE   \
+                               nsIDOMAttr** _retval) final override   \
 {                                                                             \
   if (!oldAttr) {                                                             \
     return NS_ERROR_INVALID_POINTER;                                          \
   }                                                                           \
   mozilla::ErrorResult rv;                                                    \
   mozilla::dom::Attr* attr = static_cast<mozilla::dom::Attr*>(oldAttr);       \
   *_retval = Element::RemoveAttributeNode(*attr, rv).take();                  \
   return rv.ErrorCode();                                                      \
 }                                                                             \
 NS_IMETHOD GetAttributeNodeNS(const nsAString& namespaceURI,                  \
                               const nsAString& localName,                     \
-                              nsIDOMAttr** _retval) MOZ_FINAL MOZ_OVERRIDE    \
+                              nsIDOMAttr** _retval) final override    \
 {                                                                             \
   NS_IF_ADDREF(*_retval = Element::GetAttributeNodeNS(namespaceURI,           \
                                                       localName));            \
   return NS_OK;                                                               \
 }                                                                             \
 NS_IMETHOD SetAttributeNodeNS(nsIDOMAttr* newAttr,                            \
-                              nsIDOMAttr** _retval) MOZ_FINAL MOZ_OVERRIDE    \
+                              nsIDOMAttr** _retval) final override    \
 {                                                                             \
   mozilla::ErrorResult rv;                                                    \
   mozilla::dom::Attr* attr = static_cast<mozilla::dom::Attr*>(newAttr);       \
   *_retval = Element::SetAttributeNodeNS(*attr, rv).take();                   \
   return rv.ErrorCode();                                                      \
 }                                                                             \
 NS_IMETHOD GetElementsByTagName(const nsAString& name,                        \
-                                nsIDOMHTMLCollection** _retval) MOZ_FINAL     \
-                                                                MOZ_OVERRIDE  \
+                                nsIDOMHTMLCollection** _retval) final     \
+                                                                override  \
 {                                                                             \
   Element::GetElementsByTagName(name, _retval);                               \
   return NS_OK;                                                               \
 }                                                                             \
 NS_IMETHOD GetElementsByTagNameNS(const nsAString& namespaceURI,              \
                                   const nsAString& localName,                 \
-                                  nsIDOMHTMLCollection** _retval) MOZ_FINAL   \
-                                                                  MOZ_OVERRIDE\
+                                  nsIDOMHTMLCollection** _retval) final   \
+                                                                  override\
 {                                                                             \
   return Element::GetElementsByTagNameNS(namespaceURI, localName,             \
                                          _retval);                            \
 }                                                                             \
 NS_IMETHOD GetElementsByClassName(const nsAString& classes,                   \
-                                  nsIDOMHTMLCollection** _retval) MOZ_FINAL   \
-                                                                  MOZ_OVERRIDE\
+                                  nsIDOMHTMLCollection** _retval) final   \
+                                                                  override\
 {                                                                             \
   return Element::GetElementsByClassName(classes, _retval);                   \
 }                                                                             \
-NS_IMETHOD GetChildElements(nsIDOMNodeList** aChildElements) MOZ_FINAL        \
-  MOZ_OVERRIDE                                                                \
+NS_IMETHOD GetChildElements(nsIDOMNodeList** aChildElements) final        \
+  override                                                                \
 {                                                                             \
   nsIHTMLCollection* list = FragmentOrElement::Children();                    \
   return CallQueryInterface(list, aChildElements);                            \
 }                                                                             \
-NS_IMETHOD GetFirstElementChild(nsIDOMElement** aFirstElementChild) MOZ_FINAL \
-  MOZ_OVERRIDE                                                                \
+NS_IMETHOD GetFirstElementChild(nsIDOMElement** aFirstElementChild) final \
+  override                                                                \
 {                                                                             \
   Element* element = Element::GetFirstElementChild();                         \
   if (!element) {                                                             \
     *aFirstElementChild = nullptr;                                            \
     return NS_OK;                                                             \
   }                                                                           \
   return CallQueryInterface(element, aFirstElementChild);                     \
 }                                                                             \
-NS_IMETHOD GetLastElementChild(nsIDOMElement** aLastElementChild) MOZ_FINAL   \
-  MOZ_OVERRIDE                                                                \
+NS_IMETHOD GetLastElementChild(nsIDOMElement** aLastElementChild) final   \
+  override                                                                \
 {                                                                             \
   Element* element = Element::GetLastElementChild();                          \
   if (!element) {                                                             \
     *aLastElementChild = nullptr;                                             \
     return NS_OK;                                                             \
   }                                                                           \
   return CallQueryInterface(element, aLastElementChild);                      \
 }                                                                             \
 NS_IMETHOD GetPreviousElementSibling(nsIDOMElement** aPreviousElementSibling) \
-  MOZ_FINAL MOZ_OVERRIDE                                                      \
+  final override                                                      \
 {                                                                             \
   Element* element = Element::GetPreviousElementSibling();                    \
   if (!element) {                                                             \
     *aPreviousElementSibling = nullptr;                                       \
     return NS_OK;                                                             \
   }                                                                           \
   return CallQueryInterface(element, aPreviousElementSibling);                \
 }                                                                             \
 NS_IMETHOD GetNextElementSibling(nsIDOMElement** aNextElementSibling)         \
-  MOZ_FINAL MOZ_OVERRIDE                                                      \
+  final override                                                      \
 {                                                                             \
   Element* element = Element::GetNextElementSibling();                        \
   if (!element) {                                                             \
     *aNextElementSibling = nullptr;                                           \
     return NS_OK;                                                             \
   }                                                                           \
   return CallQueryInterface(element, aNextElementSibling);                    \
 }                                                                             \
-NS_IMETHOD GetChildElementCount(uint32_t* aChildElementCount) MOZ_FINAL       \
-  MOZ_OVERRIDE                                                                \
+NS_IMETHOD GetChildElementCount(uint32_t* aChildElementCount) final       \
+  override                                                                \
 {                                                                             \
   *aChildElementCount = Element::ChildElementCount();                         \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD MozRemove() MOZ_FINAL MOZ_OVERRIDE                                 \
+NS_IMETHOD MozRemove() final override                                 \
 {                                                                             \
   nsINode::Remove();                                                          \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetClientRects(nsIDOMClientRectList** _retval) MOZ_FINAL           \
-  MOZ_OVERRIDE                                                                \
+NS_IMETHOD GetClientRects(nsIDOMClientRectList** _retval) final           \
+  override                                                                \
 {                                                                             \
   *_retval = Element::GetClientRects().take();                                \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetBoundingClientRect(nsIDOMClientRect** _retval) MOZ_FINAL        \
-  MOZ_OVERRIDE                                                                \
+NS_IMETHOD GetBoundingClientRect(nsIDOMClientRect** _retval) final        \
+  override                                                                \
 {                                                                             \
   *_retval = Element::GetBoundingClientRect().take();                         \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetScrollTop(int32_t* aScrollTop) MOZ_FINAL MOZ_OVERRIDE           \
+NS_IMETHOD GetScrollTop(int32_t* aScrollTop) final override           \
 {                                                                             \
   *aScrollTop = Element::ScrollTop();                                         \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD SetScrollTop(int32_t aScrollTop) MOZ_FINAL MOZ_OVERRIDE            \
+NS_IMETHOD SetScrollTop(int32_t aScrollTop) final override            \
 {                                                                             \
   Element::SetScrollTop(aScrollTop);                                          \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetScrollLeft(int32_t* aScrollLeft) MOZ_FINAL MOZ_OVERRIDE         \
+NS_IMETHOD GetScrollLeft(int32_t* aScrollLeft) final override         \
 {                                                                             \
   *aScrollLeft = Element::ScrollLeft();                                       \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD SetScrollLeft(int32_t aScrollLeft) MOZ_FINAL MOZ_OVERRIDE          \
+NS_IMETHOD SetScrollLeft(int32_t aScrollLeft) final override          \
 {                                                                             \
   Element::SetScrollLeft(aScrollLeft);                                        \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetScrollWidth(int32_t* aScrollWidth) MOZ_FINAL MOZ_OVERRIDE       \
+NS_IMETHOD GetScrollWidth(int32_t* aScrollWidth) final override       \
 {                                                                             \
   *aScrollWidth = Element::ScrollWidth();                                     \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetScrollHeight(int32_t* aScrollHeight) MOZ_FINAL MOZ_OVERRIDE     \
+NS_IMETHOD GetScrollHeight(int32_t* aScrollHeight) final override     \
 {                                                                             \
   *aScrollHeight = Element::ScrollHeight();                                   \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetClientTop(int32_t* aClientTop) MOZ_FINAL MOZ_OVERRIDE           \
+NS_IMETHOD GetClientTop(int32_t* aClientTop) final override           \
 {                                                                             \
   *aClientTop = Element::ClientTop();                                         \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetClientLeft(int32_t* aClientLeft) MOZ_FINAL MOZ_OVERRIDE         \
+NS_IMETHOD GetClientLeft(int32_t* aClientLeft) final override         \
 {                                                                             \
   *aClientLeft = Element::ClientLeft();                                       \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetClientWidth(int32_t* aClientWidth) MOZ_FINAL MOZ_OVERRIDE       \
+NS_IMETHOD GetClientWidth(int32_t* aClientWidth) final override       \
 {                                                                             \
   *aClientWidth = Element::ClientWidth();                                     \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetClientHeight(int32_t* aClientHeight) MOZ_FINAL MOZ_OVERRIDE     \
+NS_IMETHOD GetClientHeight(int32_t* aClientHeight) final override     \
 {                                                                             \
   *aClientHeight = Element::ClientHeight();                                   \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetScrollLeftMax(int32_t* aScrollLeftMax) MOZ_FINAL MOZ_OVERRIDE   \
+NS_IMETHOD GetScrollLeftMax(int32_t* aScrollLeftMax) final override   \
 {                                                                             \
   *aScrollLeftMax = Element::ScrollLeftMax();                                 \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetScrollTopMax(int32_t* aScrollTopMax) MOZ_FINAL MOZ_OVERRIDE     \
+NS_IMETHOD GetScrollTopMax(int32_t* aScrollTopMax) final override     \
 {                                                                             \
   *aScrollTopMax = Element::ScrollTopMax();                                   \
   return NS_OK;                                                               \
 }                                                                             \
 NS_IMETHOD MozMatchesSelector(const nsAString& selector,                      \
-                              bool* _retval) MOZ_FINAL MOZ_OVERRIDE           \
+                              bool* _retval) final override           \
 {                                                                             \
   mozilla::ErrorResult rv;                                                    \
   *_retval = Element::MozMatchesSelector(selector, rv);                       \
   return rv.ErrorCode();                                                      \
 }                                                                             \
-NS_IMETHOD SetCapture(bool retargetToElement) MOZ_FINAL MOZ_OVERRIDE          \
+NS_IMETHOD SetCapture(bool retargetToElement) final override          \
 {                                                                             \
   Element::SetCapture(retargetToElement);                                     \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD ReleaseCapture(void) MOZ_FINAL MOZ_OVERRIDE                        \
+NS_IMETHOD ReleaseCapture(void) final override                        \
 {                                                                             \
   Element::ReleaseCapture();                                                  \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD MozRequestFullScreen(void) MOZ_FINAL MOZ_OVERRIDE                  \
+NS_IMETHOD MozRequestFullScreen(void) final override                  \
 {                                                                             \
   mozilla::ErrorResult rv;                                                    \
   Element::MozRequestFullScreen(nullptr, JS::UndefinedHandleValue, rv);       \
   return rv.ErrorCode();                                                      \
 }                                                                             \
-NS_IMETHOD MozRequestPointerLock(void) MOZ_FINAL MOZ_OVERRIDE                 \
+NS_IMETHOD MozRequestPointerLock(void) final override                 \
 {                                                                             \
   Element::MozRequestPointerLock();                                           \
   return NS_OK;                                                               \
 }                                                                             \
 using nsINode::QuerySelector;                                                 \
 NS_IMETHOD QuerySelector(const nsAString& aSelector,                          \
-                         nsIDOMElement **aReturn) MOZ_FINAL MOZ_OVERRIDE      \
+                         nsIDOMElement **aReturn) final override      \
 {                                                                             \
   return nsINode::QuerySelector(aSelector, aReturn);                          \
 }                                                                             \
 using nsINode::QuerySelectorAll;                                              \
 NS_IMETHOD QuerySelectorAll(const nsAString& aSelector,                       \
-                            nsIDOMNodeList **aReturn) MOZ_FINAL MOZ_OVERRIDE  \
+                            nsIDOMNodeList **aReturn) final override  \
 {                                                                             \
   return nsINode::QuerySelectorAll(aSelector, aReturn);                       \
 }
 
 #endif // mozilla_dom_Element_h__
--- a/dom/base/EventSource.cpp
+++ b/dom/base/EventSource.cpp
@@ -483,29 +483,29 @@ EventSource::OnStopRequest(nsIRequest *a
 
   return NS_OK;
 }
 
 /**
  * Simple helper class that just forwards the redirect callback back
  * to the EventSource.
  */
-class AsyncVerifyRedirectCallbackFwr MOZ_FINAL : public nsIAsyncVerifyRedirectCallback
+class AsyncVerifyRedirectCallbackFwr final : public nsIAsyncVerifyRedirectCallback
 {
 public:
   explicit AsyncVerifyRedirectCallbackFwr(EventSource* aEventsource)
     : mEventSource(aEventsource)
   {
   }
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS(AsyncVerifyRedirectCallbackFwr)
 
   // nsIAsyncVerifyRedirectCallback implementation
-  NS_IMETHOD OnRedirectVerifyCallback(nsresult aResult) MOZ_OVERRIDE
+  NS_IMETHOD OnRedirectVerifyCallback(nsresult aResult) override
   {
     nsresult rv = mEventSource->OnRedirectVerifyCallback(aResult);
     if (NS_FAILED(rv)) {
       mEventSource->mErrorLoadOnRedirect = true;
       mEventSource->DispatchFailConnection();
     }
 
     return NS_OK;
--- a/dom/base/EventSource.h
+++ b/dom/base/EventSource.h
@@ -31,17 +31,17 @@ namespace mozilla {
 
 class ErrorResult;
 
 namespace dom {
 
 class AsyncVerifyRedirectCallbackFwr;
 struct EventSourceInit;
 
-class EventSource MOZ_FINAL : public DOMEventTargetHelper
+class EventSource final : public DOMEventTargetHelper
                             , public nsIObserver
                             , public nsIStreamListener
                             , public nsIChannelEventSink
                             , public nsIInterfaceRequestor
                             , public nsSupportsWeakReference
 {
 friend class AsyncVerifyRedirectCallbackFwr;
 
@@ -53,17 +53,17 @@ public:
 
   NS_DECL_NSIOBSERVER
   NS_DECL_NSISTREAMLISTENER
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSICHANNELEVENTSINK
   NS_DECL_NSIINTERFACEREQUESTOR
 
   // nsWrapperCache
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
+  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   // WebIDL
   nsPIDOMWindow*
   GetParentObject() const
   {
     return GetOwner();
   }
   static already_AddRefed<EventSource>
@@ -93,17 +93,17 @@ public:
   IMPL_EVENT_HANDLER(open)
   IMPL_EVENT_HANDLER(message)
   IMPL_EVENT_HANDLER(error)
   void Close();
 
   // Determine if preferences allow EventSource
   static bool PrefEnabled(JSContext* aCx = nullptr, JSObject* aGlobal = nullptr);
 
-  virtual void DisconnectFromOwner() MOZ_OVERRIDE;
+  virtual void DisconnectFromOwner() override;
 
 protected:
   virtual ~EventSource();
 
   nsresult Init(nsISupports* aOwner,
                 const nsAString& aURL,
                 bool aWithCredentials);
 
--- a/dom/base/File.cpp
+++ b/dom/base/File.cpp
@@ -46,17 +46,17 @@
 namespace mozilla {
 namespace dom {
 
 // XXXkhuey the input stream that we pass out of a File
 // can outlive the actual File object.  Thus, we must
 // ensure that the buffer underlying the stream we get
 // from NS_NewByteInputStream is held alive as long as the
 // stream is.  We do that by passing back this class instead.
-class DataOwnerAdapter MOZ_FINAL : public nsIInputStream,
+class DataOwnerAdapter final : public nsIInputStream,
                                    public nsISeekableStream,
                                    public nsIIPCSerializableInputStream
 {
   typedef FileImplMemory::DataOwner DataOwner;
 public:
   static nsresult Create(DataOwner* aDataOwner,
                          uint32_t aStart,
                          uint32_t aLength,
@@ -1094,26 +1094,26 @@ FileImplMemory::DataOwner::sDataOwnerMut
 /* static */ StaticAutoPtr<LinkedList<FileImplMemory::DataOwner>>
 FileImplMemory::DataOwner::sDataOwners;
 
 /* static */ bool
 FileImplMemory::DataOwner::sMemoryReporterRegistered = false;
 
 MOZ_DEFINE_MALLOC_SIZE_OF(MemoryFileDataOwnerMallocSizeOf)
 
-class FileImplMemoryDataOwnerMemoryReporter MOZ_FINAL
+class FileImplMemoryDataOwnerMemoryReporter final
   : public nsIMemoryReporter
 {
   ~FileImplMemoryDataOwnerMemoryReporter() {}
 
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
 
   NS_IMETHOD CollectReports(nsIMemoryReporterCallback *aCallback,
-                            nsISupports *aClosure, bool aAnonymize) MOZ_OVERRIDE
+                            nsISupports *aClosure, bool aAnonymize) override
   {
     typedef FileImplMemory::DataOwner DataOwner;
 
     StaticMutexAutoLock lock(DataOwner::sDataOwnerMutex);
 
     if (!DataOwner::sDataOwners) {
       return NS_OK;
     }
--- a/dom/base/File.h
+++ b/dom/base/File.h
@@ -46,17 +46,17 @@ class FileInfo;
 };
 
 struct BlobPropertyBag;
 struct ChromeFilePropertyBag;
 struct FilePropertyBag;
 class FileImpl;
 class OwningArrayBufferOrArrayBufferViewOrBlobOrString;
 
-class File MOZ_FINAL : public nsIDOMFile
+class File final : public nsIDOMFile
                      , public nsIXHRSendable
                      , public nsIMutable
                      , public nsSupportsWeakReference
                      , public nsWrapperCache
 {
 public:
   NS_DECL_NSIDOMBLOB
   NS_DECL_NSIDOMFILE
@@ -184,17 +184,17 @@ public:
 
   // File constructor - ChromeOnly
   static already_AddRefed<File>
   Constructor(const GlobalObject& aGlobal,
               nsIFile* aData,
               const ChromeFilePropertyBag& aBag,
               ErrorResult& aRv);
 
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
+  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   uint64_t GetSize(ErrorResult& aRv);
 
   // XPCOM GetType is OK
 
   // XPCOM GetName is OK
 
   int64_t GetLastModified(ErrorResult& aRv);
@@ -353,94 +353,94 @@ public:
     , mLastModificationDate(UINT64_MAX)
   {
     NS_ASSERTION(aLength != UINT64_MAX,
                  "Must know length when creating slice");
     // Ensure non-null mContentType by default
     mContentType.SetIsVoid(false);
   }
 
-  virtual void GetName(nsAString& aName) MOZ_OVERRIDE;
+  virtual void GetName(nsAString& aName) override;
 
-  virtual nsresult GetPath(nsAString& aName) MOZ_OVERRIDE;
+  virtual nsresult GetPath(nsAString& aName) override;
 
-  virtual int64_t GetLastModified(ErrorResult& aRv) MOZ_OVERRIDE;
+  virtual int64_t GetLastModified(ErrorResult& aRv) override;
 
-  virtual void SetLastModified(int64_t aLastModified) MOZ_OVERRIDE;
+  virtual void SetLastModified(int64_t aLastModified) override;
 
-  virtual void GetMozFullPath(nsAString& aName, ErrorResult& aRv) MOZ_OVERRIDE;
+  virtual void GetMozFullPath(nsAString& aName, ErrorResult& aRv) override;
 
   virtual void GetMozFullPathInternal(nsAString& aFileName,
-                                      ErrorResult& aRv) MOZ_OVERRIDE;
+                                      ErrorResult& aRv) override;
 
-  virtual uint64_t GetSize(ErrorResult& aRv) MOZ_OVERRIDE
+  virtual uint64_t GetSize(ErrorResult& aRv) override
   {
     return mLength;
   }
 
-  virtual void GetType(nsAString& aType) MOZ_OVERRIDE;
+  virtual void GetType(nsAString& aType) override;
 
   virtual already_AddRefed<FileImpl>
   CreateSlice(uint64_t aStart, uint64_t aLength,
-              const nsAString& aContentType, ErrorResult& aRv) MOZ_OVERRIDE
+              const nsAString& aContentType, ErrorResult& aRv) override
   {
     return nullptr;
   }
 
   virtual const nsTArray<nsRefPtr<FileImpl>>*
-  GetSubBlobImpls() const MOZ_OVERRIDE
+  GetSubBlobImpls() const override
   {
     return nullptr;
   }
 
-  virtual nsresult GetInternalStream(nsIInputStream** aStream) MOZ_OVERRIDE
+  virtual nsresult GetInternalStream(nsIInputStream** aStream) override
   {
     return NS_ERROR_NOT_IMPLEMENTED;
   }
 
-  virtual int64_t GetFileId() MOZ_OVERRIDE;
+  virtual int64_t GetFileId() override;
 
-  virtual void AddFileInfo(indexedDB::FileInfo* aFileInfo) MOZ_OVERRIDE;
+  virtual void AddFileInfo(indexedDB::FileInfo* aFileInfo) override;
 
   virtual indexedDB::FileInfo*
-  GetFileInfo(indexedDB::FileManager* aFileManager) MOZ_OVERRIDE;
+  GetFileInfo(indexedDB::FileManager* aFileManager) override;
 
   virtual nsresult GetSendInfo(nsIInputStream** aBody,
                                uint64_t* aContentLength,
                                nsACString& aContentType,
-                               nsACString& aCharset) MOZ_OVERRIDE;
+                               nsACString& aCharset) override;
 
-  virtual nsresult GetMutable(bool* aMutable) const MOZ_OVERRIDE;
+  virtual nsresult GetMutable(bool* aMutable) const override;
 
-  virtual nsresult SetMutable(bool aMutable) MOZ_OVERRIDE;
+  virtual nsresult SetMutable(bool aMutable) override;
 
   virtual void
   SetLazyData(const nsAString& aName, const nsAString& aContentType,
-              uint64_t aLength, uint64_t aLastModifiedDate) MOZ_OVERRIDE
+              uint64_t aLength, uint64_t aLastModifiedDate) override
   {
     NS_ASSERTION(aLength, "must have length");
 
     mName = aName;
     mContentType = aContentType;
     mLength = aLength;
     mLastModificationDate = aLastModifiedDate;
     mIsFile = !aName.IsVoid();
   }
 
-  virtual bool IsMemoryFile() const MOZ_OVERRIDE
+  virtual bool IsMemoryFile() const override
   {
     return false;
   }
 
-  virtual bool IsDateUnknown() const MOZ_OVERRIDE
+  virtual bool IsDateUnknown() const override
   {
     return mIsFile && mLastModificationDate == UINT64_MAX;
   }
 
-  virtual bool IsFile() const MOZ_OVERRIDE
+  virtual bool IsFile() const override
   {
     return mIsFile;
   }
 
   virtual bool IsStoredFile() const
   {
     return false;
   }
@@ -451,17 +451,17 @@ public:
     return false;
   }
 
   virtual bool IsSnapshot() const
   {
     return false;
   }
 
-  virtual bool IsSizeUnknown() const MOZ_OVERRIDE
+  virtual bool IsSizeUnknown() const override
   {
     return mLength == UINT64_MAX;
   }
 
 protected:
   virtual ~FileImplBase() {}
 
   indexedDB::FileInfo* GetFileInfo() const
@@ -487,17 +487,17 @@ protected:
   // Protected by IndexedDatabaseManager::FileMutex()
   nsTArray<nsRefPtr<indexedDB::FileInfo>> mFileInfos;
 };
 
 /**
  * This class may be used off the main thread, and in particular, its
  * constructor and destructor may not run on the same thread.  Be careful!
  */
-class FileImplMemory MOZ_FINAL : public FileImplBase
+class FileImplMemory final : public FileImplBase
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
 
   FileImplMemory(void* aMemoryBuffer, uint64_t aLength, const nsAString& aName,
                  const nsAString& aContentType, uint64_t aLastModifiedDate)
     : FileImplBase(aName, aContentType, aLength, aLastModifiedDate)
     , mDataOwner(new DataOwner(aMemoryBuffer, aLength))
@@ -508,28 +508,28 @@ public:
   FileImplMemory(void* aMemoryBuffer, uint64_t aLength,
                  const nsAString& aContentType)
     : FileImplBase(aContentType, aLength)
     , mDataOwner(new DataOwner(aMemoryBuffer, aLength))
   {
     NS_ASSERTION(mDataOwner && mDataOwner->mData, "must have data");
   }
 
-  virtual nsresult GetInternalStream(nsIInputStream** aStream) MOZ_OVERRIDE;
+  virtual nsresult GetInternalStream(nsIInputStream** aStream) override;
 
   virtual already_AddRefed<FileImpl>
   CreateSlice(uint64_t aStart, uint64_t aLength,
-              const nsAString& aContentType, ErrorResult& aRv) MOZ_OVERRIDE;
+              const nsAString& aContentType, ErrorResult& aRv) override;
 
-  virtual bool IsMemoryFile() const MOZ_OVERRIDE
+  virtual bool IsMemoryFile() const override
   {
     return true;
   }
 
-  class DataOwner MOZ_FINAL : public mozilla::LinkedListElement<DataOwner> {
+  class DataOwner final : public mozilla::LinkedListElement<DataOwner> {
   public:
     NS_INLINE_DECL_THREADSAFE_REFCOUNTING(DataOwner)
     DataOwner(void* aMemoryBuffer, uint64_t aLength)
       : mData(aMemoryBuffer)
       , mLength(aLength)
     {
       mozilla::StaticMutexAutoLock lock(sDataOwnerMutex);
 
@@ -580,36 +580,36 @@ private:
   }
 
   ~FileImplMemory() {}
 
   // Used when backed by a memory store
   nsRefPtr<DataOwner> mDataOwner;
 };
 
-class FileImplTemporaryFileBlob MOZ_FINAL : public FileImplBase
+class FileImplTemporaryFileBlob final : public FileImplBase
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
 
   FileImplTemporaryFileBlob(PRFileDesc* aFD, uint64_t aStartPos,
                             uint64_t aLength, const nsAString& aContentType)
     : FileImplBase(aContentType, aLength)
     , mLength(aLength)
     , mStartPos(aStartPos)
     , mContentType(aContentType)
   {
     mFileDescOwner = new nsTemporaryFileInputStream::FileDescOwner(aFD);
   }
 
-  virtual nsresult GetInternalStream(nsIInputStream** aStream) MOZ_OVERRIDE;
+  virtual nsresult GetInternalStream(nsIInputStream** aStream) override;
 
   virtual already_AddRefed<FileImpl>
   CreateSlice(uint64_t aStart, uint64_t aLength,
-              const nsAString& aContentType, ErrorResult& aRv) MOZ_OVERRIDE;
+              const nsAString& aContentType, ErrorResult& aRv) override;
 
 private:
   FileImplTemporaryFileBlob(const FileImplTemporaryFileBlob* aOther,
                             uint64_t aStart, uint64_t aLength,
                             const nsAString& aContentType)
     : FileImplBase(aContentType, aLength)
     , mLength(aLength)
     , mStartPos(aStart)
@@ -734,23 +734,23 @@ public:
     , mIsTemporary(false)
   {
     // Lazily get the content type and size
     mContentType.SetIsVoid(true);
     mName.SetIsVoid(true);
   }
 
   // Overrides
-  virtual uint64_t GetSize(ErrorResult& aRv) MOZ_OVERRIDE;
-  virtual void GetType(nsAString& aType) MOZ_OVERRIDE;
-  virtual int64_t GetLastModified(ErrorResult& aRv) MOZ_OVERRIDE;
-  virtual void SetLastModified(int64_t aLastModified) MOZ_OVERRIDE;
+  virtual uint64_t GetSize(ErrorResult& aRv) override;
+  virtual void GetType(nsAString& aType) override;
+  virtual int64_t GetLastModified(ErrorResult& aRv) override;
+  virtual void SetLastModified(int64_t aLastModified) override;
   virtual void GetMozFullPathInternal(nsAString& aFullPath,
-                                      ErrorResult& aRv) MOZ_OVERRIDE;
-  virtual nsresult GetInternalStream(nsIInputStream**) MOZ_OVERRIDE;
+                                      ErrorResult& aRv) override;
+  virtual nsresult GetInternalStream(nsIInputStream**) override;
 
   void SetPath(const nsAString& aFullPath);
 
 protected:
   virtual ~FileImplFile() {
     if (mFile && mIsTemporary) {
       NS_WARNING("In temporary ~FileImplFile");
       // Ignore errors if any, not much we can do. Clean-up will be done by
@@ -790,50 +790,50 @@ private:
       }
 
       mFileInfos.AppendElement(fileInfo);
     }
   }
 
   virtual already_AddRefed<FileImpl>
   CreateSlice(uint64_t aStart, uint64_t aLength,
-              const nsAString& aContentType, ErrorResult& aRv) MOZ_OVERRIDE;
+              const nsAString& aContentType, ErrorResult& aRv) override;
 
-  virtual bool IsStoredFile() const MOZ_OVERRIDE
+  virtual bool IsStoredFile() const override
   {
     return mStoredFile;
   }
 
-  virtual bool IsWholeFile() const MOZ_OVERRIDE
+  virtual bool IsWholeFile() const override
   {
     return mWholeFile;
   }
 
   nsCOMPtr<nsIFile> mFile;
   bool mWholeFile;
   bool mStoredFile;
   bool mIsTemporary;
 };
 
-class FileList MOZ_FINAL : public nsIDOMFileList,
+class FileList final : public nsIDOMFileList,
                            public nsWrapperCache
 {
   ~FileList() {}
 
 public:
   explicit FileList(nsISupports *aParent) : mParent(aParent)
   {