Merge inbound to mozilla-central. a=merge
authorshindli <shindli@mozilla.com>
Sun, 18 Feb 2018 11:35:16 +0200
changeset 404333 e7438140bb208aba474a74bdab428fc55962491c
parent 404323 c2b3a9f871a37bc2cf82cd42568bd2eff034bd3e (current diff)
parent 404332 13aea3b64e17ad4994e327bb6c551d8dcdd81799 (diff)
child 404336 3b4db655a2318dd0daf61a7ff2879e360a792294
child 404340 473f8e78ebf9cbfc94f94771b07717f4d9ad7b81
push id33464
push usershindli@mozilla.com
push dateSun, 18 Feb 2018 09:35:40 +0000
treeherdermozilla-central@e7438140bb20 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone60.0a1
first release with
nightly linux32
e7438140bb20 / 60.0a1 / 20180218100128 / files
nightly linux64
e7438140bb20 / 60.0a1 / 20180218100128 / files
nightly mac
e7438140bb20 / 60.0a1 / 20180218100128 / files
nightly win32
e7438140bb20 / 60.0a1 / 20180218100128 / files
nightly win64
e7438140bb20 / 60.0a1 / 20180218100128 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge inbound to mozilla-central. a=merge
browser/components/extensions/test/browser/browser_ext_contentscript_animate.js
dom/animation/test/chrome/test_keyframe_effect_xrays.html
--- a/accessible/aom/AccessibleNode.h
+++ b/accessible/aom/AccessibleNode.h
@@ -28,18 +28,18 @@ class AccessibleNode : public nsISupport
                        public nsWrapperCache
 {
 public:
   explicit AccessibleNode(nsINode* aNode);
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS;
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(AccessibleNode);
 
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override final;
-  virtual dom::ParentObject GetParentObject() const final;
+  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;
+  dom::ParentObject GetParentObject() const;
 
   void GetRole(nsAString& aRole);
   void GetStates(nsTArray<nsString>& aStates);
   void GetAttributes(nsTArray<nsString>& aAttributes);
   nsINode* GetDOMNode();
 
   bool Is(const Sequence<nsString>& aFlavors);
   bool Has(const Sequence<nsString>& aAttributes);
--- a/accessible/base/nsAccessibilityService.cpp
+++ b/accessible/base/nsAccessibilityService.cpp
@@ -459,17 +459,17 @@ class PluginTimerCallBack final : public
 {
   ~PluginTimerCallBack() {}
 
 public:
   explicit PluginTimerCallBack(nsIContent* aContent) : mContent(aContent) {}
 
   NS_DECL_ISUPPORTS
 
-  NS_IMETHOD Notify(nsITimer* aTimer) final override
+  NS_IMETHOD Notify(nsITimer* aTimer) final
   {
     if (!mContent->IsInUncomposedDoc())
       return NS_OK;
 
     nsIPresShell* ps = mContent->OwnerDoc()->GetShell();
     if (ps) {
       DocAccessible* doc = ps->GetDocAccessible();
       if (doc) {
@@ -483,17 +483,17 @@ public:
 
     // We couldn't get a doc accessible so presumably the document went away.
     // In this case don't leak our ref to the content or timer.
     sPendingPlugins->RemoveElement(mContent);
     sPluginTimers->RemoveElement(aTimer);
     return NS_OK;
   }
 
-  NS_IMETHOD GetName(nsACString& aName) final override
+  NS_IMETHOD GetName(nsACString& aName) final
   {
     aName.AssignLiteral("PluginTimerCallBack");
     return NS_OK;
   }
 
 private:
   nsCOMPtr<nsIContent> mContent;
 };
--- a/accessible/generic/BaseAccessibles.h
+++ b/accessible/generic/BaseAccessibles.h
@@ -30,18 +30,18 @@ public:
   LeafAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // nsISupports
   NS_INLINE_DECL_REFCOUNTING_INHERITED(LeafAccessible, AccessibleWrap)
 
   // Accessible
   virtual Accessible* ChildAtPoint(int32_t aX, int32_t aY,
                                    EWhichChildAtPoint aWhichChild) override;
-  virtual bool InsertChildAt(uint32_t aIndex, Accessible* aChild) override final;
-  virtual bool RemoveChild(Accessible* aChild) override final;
+  bool InsertChildAt(uint32_t aIndex, Accessible* aChild) final;
+  bool RemoveChild(Accessible* aChild) final;
 
   virtual bool IsAcceptableChild(nsIContent* aEl) const override;
 
 protected:
   virtual ~LeafAccessible() {}
 };
 
 /**
@@ -111,21 +111,21 @@ protected:
  * crossplatform accessible tree.
  */
 class DummyAccessible : public AccessibleWrap
 {
 public:
   explicit DummyAccessible(DocAccessible* aDocument = nullptr) :
     AccessibleWrap(nullptr, aDocument) { }
 
-  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;
+  uint64_t NativeState() final;
+  uint64_t NativeInteractiveState() const final;
+  uint64_t NativeLinkState() const final;
+  bool NativelyUnavailable() const final;
+  void ApplyARIAState(uint64_t* aState) const final;
 
 protected:
   virtual ~DummyAccessible() { }
 };
 
 } // namespace a11y
 } // namespace mozilla
 
--- a/accessible/ipc/DocAccessibleParent.h
+++ b/accessible/ipc/DocAccessibleParent.h
@@ -72,25 +72,25 @@ public:
    */
   virtual mozilla::ipc::IPCResult RecvEvent(const uint64_t& aID, const uint32_t& aType)
     override;
 
   virtual mozilla::ipc::IPCResult RecvShowEvent(const ShowEventData& aData, const bool& aFromUser)
     override;
   virtual mozilla::ipc::IPCResult RecvHideEvent(const uint64_t& aRootID, const bool& aFromUser)
     override;
-  virtual mozilla::ipc::IPCResult RecvStateChangeEvent(const uint64_t& aID,
-                                                       const uint64_t& aState,
-                                                       const bool& aEnabled) override final;
+  mozilla::ipc::IPCResult RecvStateChangeEvent(const uint64_t& aID,
+                                               const uint64_t& aState,
+                                               const bool& aEnabled) final;
 
-  virtual mozilla::ipc::IPCResult RecvCaretMoveEvent(const uint64_t& aID,
+  mozilla::ipc::IPCResult RecvCaretMoveEvent(const uint64_t& aID,
 #if defined(XP_WIN)
-                                                     const LayoutDeviceIntRect& aCaretRect,
+                                             const LayoutDeviceIntRect& aCaretRect,
 #endif
-                                                     const int32_t& aOffset) override final;
+                                             const int32_t& aOffset) final;
 
   virtual mozilla::ipc::IPCResult RecvTextChangeEvent(const uint64_t& aID, const nsString& aStr,
                                                       const int32_t& aStart, const uint32_t& aLen,
                                                       const bool& aIsInsert,
                                                       const bool& aFromUser) override;
 
 #if defined(XP_WIN)
   virtual mozilla::ipc::IPCResult RecvSyncTextChangeEvent(const uint64_t& aID, const nsString& aStr,
@@ -101,17 +101,17 @@ public:
   virtual mozilla::ipc::IPCResult RecvFocusEvent(const uint64_t& aID,
                                                  const LayoutDeviceIntRect& aCaretRect) override;
 #endif // defined(XP_WIN)
 
   virtual mozilla::ipc::IPCResult RecvSelectionEvent(const uint64_t& aID,
                                                      const uint64_t& aWidgetID,
                                                      const uint32_t& aType) override;
 
-  virtual mozilla::ipc::IPCResult RecvRoleChangedEvent(const uint32_t& aRole) override final;
+  mozilla::ipc::IPCResult RecvRoleChangedEvent(const uint32_t& aRole) final;
 
   virtual mozilla::ipc::IPCResult RecvBindChildDoc(PDocAccessibleParent* aChildDoc, const uint64_t& aID) override;
 
   void Unbind()
   {
     if (DocAccessibleParent* parent = ParentDoc()) {
       parent->RemoveChildDoc(this);
     }
--- 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() final                               \
+  ULONG STDMETHODCALLTYPE AddRef() final                                       \
   {                                                                            \
     MOZ_ASSERT(int32_t(mRefCnt) >= 0, "illegal refcnt");                       \
     ++mRefCnt;                                                                 \
     return mRefCnt;                                                            \
   }                                                                            \
-  virtual ULONG STDMETHODCALLTYPE Release() final                              \
+  ULONG STDMETHODCALLTYPE Release() final                                      \
   {                                                                            \
      MOZ_ASSERT(int32_t(mRefCnt) > 0, "dup release");                          \
      --mRefCnt;                                                                \
      if (mRefCnt)                                                              \
        return mRefCnt;                                                         \
                                                                                \
      delete this;                                                              \
      return 0;                                                                 \
--- a/accessible/xpcom/xpcAccessible.h
+++ b/accessible/xpcom/xpcAccessible.h
@@ -20,78 +20,78 @@ class AccessibleOrProxy;
 /**
  * XPCOM nsIAccessible interface implementation, used by xpcAccessibleGeneric
  * class.
  */
 class xpcAccessible : public nsIAccessible
 {
 public:
   // nsIAccessible
-  NS_IMETHOD GetParent(nsIAccessible** aParent) final override;
-  NS_IMETHOD GetNextSibling(nsIAccessible** aNextSibling) final override;
+  NS_IMETHOD GetParent(nsIAccessible** aParent) final;
+  NS_IMETHOD GetNextSibling(nsIAccessible** aNextSibling) final;
   NS_IMETHOD GetPreviousSibling(nsIAccessible** aPreviousSibling)
-    final override;
-  NS_IMETHOD GetFirstChild(nsIAccessible** aFirstChild) final override;
-  NS_IMETHOD GetLastChild(nsIAccessible** aLastChild) final override;
-  NS_IMETHOD GetChildCount(int32_t* aChildCount) final override;
+    final;
+  NS_IMETHOD GetFirstChild(nsIAccessible** aFirstChild) final;
+  NS_IMETHOD GetLastChild(nsIAccessible** aLastChild) final;
+  NS_IMETHOD GetChildCount(int32_t* aChildCount) final;
   NS_IMETHOD GetChildAt(int32_t aChildIndex, nsIAccessible** aChild)
-    final override;
-  NS_IMETHOD GetChildren(nsIArray** aChildren) final override;
-  NS_IMETHOD GetIndexInParent(int32_t* aIndexInParent) final override;
+    final;
+  NS_IMETHOD GetChildren(nsIArray** aChildren) final;
+  NS_IMETHOD GetIndexInParent(int32_t* aIndexInParent) final;
 
-  NS_IMETHOD GetDOMNode(nsIDOMNode** aDOMNode) final override;
-  NS_IMETHOD GetId(nsAString& aID) final override;
-  NS_IMETHOD GetDocument(nsIAccessibleDocument** aDocument) final override;
+  NS_IMETHOD GetDOMNode(nsIDOMNode** aDOMNode) final;
+  NS_IMETHOD GetId(nsAString& aID) final;
+  NS_IMETHOD GetDocument(nsIAccessibleDocument** aDocument) final;
   NS_IMETHOD GetRootDocument(nsIAccessibleDocument** aRootDocument)
-    final override;
+    final;
 
-  NS_IMETHOD GetRole(uint32_t* aRole) final override;
+  NS_IMETHOD GetRole(uint32_t* aRole) final;
   NS_IMETHOD GetState(uint32_t* aState, uint32_t* aExtraState)
-    final override;
+    final;
 
-  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 GetDescription(nsAString& aDescription) final;
+  NS_IMETHOD GetName(nsAString& aName) final;
+  NS_IMETHOD GetLanguage(nsAString& aLanguage) final;
+  NS_IMETHOD GetValue(nsAString& aValue) final;
+  NS_IMETHOD GetHelp(nsAString& aHelp) final;
 
-  NS_IMETHOD GetAccessKey(nsAString& aAccessKey) final override;
-  NS_IMETHOD GetKeyboardShortcut(nsAString& aKeyBinding) final override;
+  NS_IMETHOD GetAccessKey(nsAString& aAccessKey) final;
+  NS_IMETHOD GetKeyboardShortcut(nsAString& aKeyBinding) final;
 
   NS_IMETHOD GetAttributes(nsIPersistentProperties** aAttributes)
-    final override;
+    final;
   NS_IMETHOD GetBounds(int32_t* aX, int32_t* aY,
-                       int32_t* aWidth, int32_t* aHeight) final override;
+                       int32_t* aWidth, int32_t* aHeight) final;
   NS_IMETHOD GroupPosition(int32_t* aGroupLevel, int32_t* aSimilarItemsInGroup,
-                           int32_t* aPositionInGroup) final override;
+                           int32_t* aPositionInGroup) final;
   NS_IMETHOD GetRelationByType(uint32_t aType,
                                nsIAccessibleRelation** aRelation)
-    final override;
-  NS_IMETHOD GetRelations(nsIArray** aRelations) final override;
+    final;
+  NS_IMETHOD GetRelations(nsIArray** aRelations) final;
 
-  NS_IMETHOD GetFocusedChild(nsIAccessible** aChild) final override;
+  NS_IMETHOD GetFocusedChild(nsIAccessible** aChild) final;
   NS_IMETHOD GetChildAtPoint(int32_t aX, int32_t aY,
-                             nsIAccessible** aAccessible) final override;
+                             nsIAccessible** aAccessible) final;
   NS_IMETHOD GetDeepestChildAtPoint(int32_t aX, int32_t aY,
                                     nsIAccessible** aAccessible)
-    final override;
+    final;
 
-  NS_IMETHOD SetSelected(bool aSelect) final override;
-  NS_IMETHOD TakeSelection() final override;
-  NS_IMETHOD TakeFocus() final override;
+  NS_IMETHOD SetSelected(bool aSelect) final;
+  NS_IMETHOD TakeSelection() final;
+  NS_IMETHOD TakeFocus() final;
 
-  NS_IMETHOD GetActionCount(uint8_t* aActionCount) final override;
-  NS_IMETHOD GetActionName(uint8_t aIndex, nsAString& aName) final override;
+  NS_IMETHOD GetActionCount(uint8_t* aActionCount) final;
+  NS_IMETHOD GetActionName(uint8_t aIndex, nsAString& aName) final;
   NS_IMETHOD GetActionDescription(uint8_t aIndex, nsAString& aDescription)
-    final override;
-  NS_IMETHOD DoAction(uint8_t aIndex) final override;
+    final;
+  NS_IMETHOD DoAction(uint8_t aIndex) final;
 
-  NS_IMETHOD ScrollTo(uint32_t aHow) final override;
+  NS_IMETHOD ScrollTo(uint32_t aHow) final;
   NS_IMETHOD ScrollToPoint(uint32_t aCoordinateType,
-                           int32_t aX, int32_t aY) final override;
+                           int32_t aX, int32_t aY) final;
 
 protected:
   xpcAccessible() { }
   virtual ~xpcAccessible() {}
 
 private:
   Accessible* Intl();
   AccessibleOrProxy IntlGeneric();
--- 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) final override;
-  NS_IMETHOD GetAppVersion(nsAString& aVersion) final override;
-  NS_IMETHOD GetPlatformName(nsAString& aName) final override;
-  NS_IMETHOD GetPlatformVersion(nsAString& aVersion) final override;
+  NS_IMETHOD GetAppName(nsAString& aName) final;
+  NS_IMETHOD GetAppVersion(nsAString& aVersion) final;
+  NS_IMETHOD GetPlatformName(nsAString& aName) final;
+  NS_IMETHOD GetPlatformVersion(nsAString& aVersion) final;
 
 protected:
   virtual ~xpcAccessibleApplication()
   {
     Shutdown();
   }
 
 private:
--- a/accessible/xpcom/xpcAccessibleDocument.h
+++ b/accessible/xpcom/xpcAccessibleDocument.h
@@ -29,30 +29,30 @@ public:
 
   xpcAccessibleDocument(ProxyAccessible* aProxy, uint32_t aInterfaces) :
     xpcAccessibleHyperText(aProxy, aInterfaces), mCache(kDefaultCacheLength),
     mRemote(true) {}
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIAccessibleDocument
-  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(mozIDOMWindowProxy** aDOMWindow) final override;
+  NS_IMETHOD GetURL(nsAString& aURL) final;
+  NS_IMETHOD GetTitle(nsAString& aTitle) final;
+  NS_IMETHOD GetMimeType(nsAString& aType) final;
+  NS_IMETHOD GetDocType(nsAString& aType) final;
+  NS_IMETHOD GetDOMDocument(nsIDOMDocument** aDOMDocument) final;
+  NS_IMETHOD GetWindow(mozIDOMWindowProxy** aDOMWindow) final;
   NS_IMETHOD GetParentDocument(nsIAccessibleDocument** aDocument)
-    final override;
-  NS_IMETHOD GetChildDocumentCount(uint32_t* aCount) final override;
+    final;
+  NS_IMETHOD GetChildDocumentCount(uint32_t* aCount) final;
   NS_IMETHOD GetChildDocumentAt(uint32_t aIndex,
                                 nsIAccessibleDocument** aDocument)
-    final override;
+    final;
   NS_IMETHOD GetVirtualCursor(nsIAccessiblePivot** aVirtualCursor)
-    final override;
+    final;
 
   /**
    * Return XPCOM wrapper for the internal accessible.
    */
   xpcAccessibleGeneric* GetAccessible(Accessible* aAccessible);
   xpcAccessibleGeneric* GetXPCAccessible(ProxyAccessible* aProxy);
 
   virtual void Shutdown() override;
--- a/accessible/xpcom/xpcAccessibleGeneric.h
+++ b/accessible/xpcom/xpcAccessibleGeneric.h
@@ -39,17 +39,17 @@ public:
   }
 
   xpcAccessibleGeneric(ProxyAccessible* aProxy, uint8_t aInterfaces) :
     mIntl(aProxy), mSupportedIfaces(aInterfaces) {}
 
   NS_DECL_ISUPPORTS
 
   // nsIAccessible
-  virtual Accessible* ToInternalAccessible() const final override;
+  Accessible* ToInternalAccessible() const final;
 
   // xpcAccessibleGeneric
   virtual void Shutdown();
 
 protected:
   virtual ~xpcAccessibleGeneric();
 
   AccessibleOrProxy 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) 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 GetAnchorCount(int32_t* aAnchorCount) final;
+  NS_IMETHOD GetStartIndex(int32_t* aStartIndex) final;
+  NS_IMETHOD GetEndIndex(int32_t* aEndIndex) final;
+  NS_IMETHOD GetURI(int32_t aIndex, nsIURI** aURI) final;
   NS_IMETHOD GetAnchor(int32_t aIndex, nsIAccessible** aAccessible)
-    final override;
-  NS_IMETHOD GetValid(bool* aValid) final override;
+    final;
+  NS_IMETHOD GetValid(bool* aValid) final;
 
 protected:
   xpcAccessibleHyperLink() { }
   virtual ~xpcAccessibleHyperLink() {}
 
 private:
   xpcAccessibleHyperLink(const xpcAccessibleHyperLink&) = delete;
   xpcAccessibleHyperLink& operator =(const xpcAccessibleHyperLink&) = delete;
--- a/accessible/xpcom/xpcAccessibleImage.h
+++ b/accessible/xpcom/xpcAccessibleImage.h
@@ -22,18 +22,18 @@ public:
     xpcAccessibleGeneric(aIntl) { }
 
   xpcAccessibleImage(ProxyAccessible* aProxy, uint32_t aInterfaces) :
     xpcAccessibleGeneric(aProxy, aInterfaces) {}
 
   NS_DECL_ISUPPORTS_INHERITED
 
   NS_IMETHOD GetImagePosition(uint32_t aCoordType,
-                              int32_t* aX, int32_t* aY) final override;
-  NS_IMETHOD GetImageSize(int32_t* aWidth, int32_t* aHeight) final override;
+                              int32_t* aX, int32_t* aY) final;
+  NS_IMETHOD GetImageSize(int32_t* aWidth, int32_t* aHeight) final;
 
 protected:
   virtual ~xpcAccessibleImage() {}
 
 private:
   ImageAccessible* Intl()
   { return mIntl.IsAccessible() ? mIntl.AsAccessible()->AsImage() : nullptr; }
 
--- 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) final override;
+  NS_IMETHOD GetSelectedItems(nsIArray** aSelectedItems) final;
   NS_IMETHOD GetSelectedItemCount(uint32_t* aSelectedItemCount)
-    final override;
+    final;
   NS_IMETHOD GetSelectedItemAt(uint32_t aIndex, nsIAccessible** aItem)
-    final override;
+    final;
   NS_IMETHOD IsItemSelected(uint32_t aIndex, bool* aIsSelected)
-    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;
+    final;
+  NS_IMETHOD AddItemToSelection(uint32_t aIndex) final;
+  NS_IMETHOD RemoveItemFromSelection(uint32_t aIndex) final;
+  NS_IMETHOD SelectAll(bool* aIsMultiSelect) final;
+  NS_IMETHOD UnselectAll() final;
 
 protected:
   xpcAccessibleSelectable() { }
   virtual ~xpcAccessibleSelectable() {}
 
 private:
   xpcAccessibleSelectable(const xpcAccessibleSelectable&) = delete;
   xpcAccessibleSelectable& operator =(const xpcAccessibleSelectable&) = delete;
--- a/accessible/xpcom/xpcAccessibleTable.h
+++ b/accessible/xpcom/xpcAccessibleTable.h
@@ -24,65 +24,65 @@ public:
     xpcAccessibleGeneric(aIntl) { }
 
   xpcAccessibleTable(ProxyAccessible* aProxy, uint32_t aInterfaces) :
     xpcAccessibleGeneric(aProxy, aInterfaces) {}
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIAccessibleTable
-  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 GetCaption(nsIAccessible** aCaption) final;
+  NS_IMETHOD GetSummary(nsAString& aSummary) final;
+  NS_IMETHOD GetColumnCount(int32_t* aColumnCount) final;
+  NS_IMETHOD GetRowCount(int32_t* aRowCount) final;
   NS_IMETHOD GetCellAt(int32_t aRowIndex, int32_t aColumnIndex,
-                       nsIAccessible** aCell) final override;
+                       nsIAccessible** aCell) final;
   NS_IMETHOD GetCellIndexAt(int32_t aRowIndex, int32_t aColumnIndex,
-                            int32_t* aCellIndex) final override;
+                            int32_t* aCellIndex) final;
   NS_IMETHOD GetColumnIndexAt(int32_t aCellIndex, int32_t* aColumnIndex)
-    final override;
+    final;
   NS_IMETHOD GetRowIndexAt(int32_t aCellIndex, int32_t* aRowIndex)
-    final override;
+    final;
   NS_IMETHOD GetRowAndColumnIndicesAt(int32_t aCellIndex, int32_t* aRowIndex,
                                       int32_t* aColumnIndex)
-    final override;
+    final;
   NS_IMETHOD GetColumnExtentAt(int32_t row, int32_t column,
-                               int32_t* aColumnExtent) final override;
+                               int32_t* aColumnExtent) final;
   NS_IMETHOD GetRowExtentAt(int32_t row, int32_t column,
-                            int32_t* aRowExtent) final override;
+                            int32_t* aRowExtent) final;
   NS_IMETHOD GetColumnDescription(int32_t aColIdx, nsAString& aDescription)
-    final override;
+    final;
   NS_IMETHOD GetRowDescription(int32_t aRowIdx, nsAString& aDescription)
-    final override;
+    final;
   NS_IMETHOD IsColumnSelected(int32_t aColIdx, bool* _retval)
-    final override;
+    final;
   NS_IMETHOD IsRowSelected(int32_t aRowIdx, bool* _retval)
-    final override;
+    final;
   NS_IMETHOD IsCellSelected(int32_t aRowIdx, int32_t aColIdx, bool* _retval)
-    final override;
+    final;
   NS_IMETHOD GetSelectedCellCount(uint32_t* aSelectedCellCount)
-    final override;
+    final;
   NS_IMETHOD GetSelectedColumnCount(uint32_t* aSelectedColumnCount)
-    final override;
+    final;
   NS_IMETHOD GetSelectedRowCount(uint32_t* aSelectedRowCount)
-    final override;
-  NS_IMETHOD GetSelectedCells(nsIArray** aSelectedCell) final override;
+    final;
+  NS_IMETHOD GetSelectedCells(nsIArray** aSelectedCell) final;
   NS_IMETHOD GetSelectedCellIndices(uint32_t* aCellsArraySize,
                                     int32_t** aCellsArray)
-    final override;
+    final;
   NS_IMETHOD GetSelectedColumnIndices(uint32_t* aColsArraySize,
                                       int32_t** aColsArray)
-    final override;
+    final;
   NS_IMETHOD GetSelectedRowIndices(uint32_t* aRowsArraySize,
-                                   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;
+                                   int32_t** aRowsArray) final;
+  NS_IMETHOD SelectColumn(int32_t aColIdx) final;
+  NS_IMETHOD SelectRow(int32_t aRowIdx) final;
+  NS_IMETHOD UnselectColumn(int32_t aColIdx) final;
+  NS_IMETHOD UnselectRow(int32_t aRowIdx) final;
+  NS_IMETHOD IsProbablyForLayout(bool* aIsForLayout) final;
 
 protected:
   virtual ~xpcAccessibleTable() {}
 
 private:
   TableAccessible* Intl()
   { return mIntl.IsAccessible() ? mIntl.AsAccessible()->AsTable() : nullptr; }
 
--- a/accessible/xpcom/xpcAccessibleTableCell.h
+++ b/accessible/xpcom/xpcAccessibleTableCell.h
@@ -25,24 +25,24 @@ public:
     xpcAccessibleHyperText(aIntl) { }
 
   xpcAccessibleTableCell(ProxyAccessible* aProxy, uint32_t aInterfaces) :
     xpcAccessibleHyperText(aProxy, aInterfaces) {}
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIAccessibleTableCell
-  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;
+  NS_IMETHOD GetTable(nsIAccessibleTable** aTable) final;
+  NS_IMETHOD GetColumnIndex(int32_t* aColIdx) final;
+  NS_IMETHOD GetRowIndex(int32_t* aRowIdx) final;
+  NS_IMETHOD GetColumnExtent(int32_t* aExtent) final;
+  NS_IMETHOD GetRowExtent(int32_t* aExtent) final;
+  NS_IMETHOD GetColumnHeaderCells(nsIArray** aHeaderCells) final;
+  NS_IMETHOD GetRowHeaderCells(nsIArray** aHeaderCells) final;
+  NS_IMETHOD IsSelected(bool* aSelected) final;
 
 protected:
   virtual ~xpcAccessibleTableCell() {}
 
 private:
   TableCellAccessible* Intl()
   {
     if (Accessible* acc = mIntl.AsAccessible()) {
--- a/accessible/xpcom/xpcAccessibleTextRange.h
+++ b/accessible/xpcom/xpcAccessibleTextRange.h
@@ -27,42 +27,42 @@ class TextRange;
 }
 
 class xpcAccessibleTextRange final : public nsIAccessibleTextRange
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS(xpcAccessibleTextRange)
 
-  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 GetStartContainer(nsIAccessibleText** aAnchor) final;
+  NS_IMETHOD GetStartOffset(int32_t* aOffset) final;
+  NS_IMETHOD GetEndContainer(nsIAccessibleText** aAnchor) final;
+  NS_IMETHOD GetEndOffset(int32_t* aOffset) final;
+  NS_IMETHOD GetContainer(nsIAccessible** aContainer) final;
+  NS_IMETHOD GetEmbeddedChildren(nsIArray** aList) final;
+  NS_IMETHOD Compare(nsIAccessibleTextRange* aOtherRange, bool* aResult) final;
   NS_IMETHOD CompareEndPoints(uint32_t aEndPoint,
                               nsIAccessibleTextRange* aOtherRange,
                               uint32_t aOtherRangeEndPoint,
-                              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 Crop(nsIAccessible* aContainer, bool* aSuccess) final override;
+                              int32_t* aResult) final;
+  NS_IMETHOD GetText(nsAString& aText) final;
+  NS_IMETHOD GetBounds(nsIArray** aRectList) final;
+  NS_IMETHOD Move(uint32_t aUnit, int32_t aCount) final;
+  NS_IMETHOD MoveStart(uint32_t aUnit, int32_t aCount) final;
+  NS_IMETHOD MoveEnd(uint32_t aUnit, int32_t aCount) final;
+  NS_IMETHOD Normalize(uint32_t aUnit) final;
+  NS_IMETHOD Crop(nsIAccessible* aContainer, bool* aSuccess) final;
   NS_IMETHOD FindText(const nsAString& aText, bool aIsBackward, bool aIsIgnoreCase,
-                      nsIAccessibleTextRange** aRange) final override;
+                      nsIAccessibleTextRange** aRange) final;
   NS_IMETHOD FindAttr(uint32_t aAttr, nsIVariant* aVal, bool aIsBackward,
-                      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;
+                      nsIAccessibleTextRange** aRange) final;
+  NS_IMETHOD AddToSelection() final;
+  NS_IMETHOD RemoveFromSelection() final;
+  NS_IMETHOD Select() final;
+  NS_IMETHOD ScrollIntoView(uint32_t aHow) final;
 
   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) 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;
+  NS_IMETHOD GetMaximumValue(double* aValue) final;
+  NS_IMETHOD GetMinimumValue(double* aValue) final;
+  NS_IMETHOD GetCurrentValue(double* aValue) final;
+  NS_IMETHOD SetCurrentValue(double aValue) final;
+  NS_IMETHOD GetMinimumIncrement(double* aMinIncrement) final;
 
 protected:
   xpcAccessibleValue() { }
   virtual ~xpcAccessibleValue() {}
 
 private:
   AccessibleOrProxy Intl();
 
--- a/accessible/xul/XULTreeGridAccessible.h
+++ b/accessible/xul/XULTreeGridAccessible.h
@@ -85,18 +85,18 @@ public:
   virtual ENameValueFlag Name(nsString& aName) override;
   virtual Accessible* ChildAtPoint(int32_t aX, int32_t aY,
                                    EWhichChildAtPoint aWhichChild) override;
 
   virtual Accessible* GetChildAt(uint32_t aIndex) const override;
   virtual uint32_t ChildCount() const override;
 
   // XULTreeItemAccessibleBase
-  virtual XULTreeGridCellAccessible* GetCellAccessible(nsITreeColumn* aColumn)
-    const override final;
+  XULTreeGridCellAccessible* GetCellAccessible(nsITreeColumn* aColumn)
+    const final;
   virtual void RowInvalidated(int32_t aStartColIdx, int32_t aEndColIdx) override;
 
 protected:
   virtual ~XULTreeGridRowAccessible();
 
   // XULTreeItemAccessibleBase
   mutable nsRefPtrHashtable<nsPtrHashKey<const void>, XULTreeGridCellAccessible>
     mAccessibleCache;
--- a/browser/components/extensions/test/browser/browser-common.ini
+++ b/browser/components/extensions/test/browser/browser-common.ini
@@ -1,11 +1,9 @@
 [DEFAULT]
-prefs =
-    dom.animations-api.core.enabled=true
 support-files =
   head.js
   head_pageAction.js
   head_sessions.js
   head_webNavigation.js
   profilerSymbols.sjs
   context.html
   context_frame.html
@@ -207,9 +205,8 @@ tags = fullscreen
 [browser_ext_windows_create_params.js]
 [browser_ext_windows_create_tabId.js]
 [browser_ext_windows_create_url.js]
 [browser_ext_windows_events.js]
 [browser_ext_windows_size.js]
 skip-if = os == 'mac' # Fails when windows are randomly opened in fullscreen mode
 [browser_ext_windows_update.js]
 tags = fullscreen
-[browser_ext_contentscript_animate.js]
deleted file mode 100644
--- a/browser/components/extensions/test/browser/browser_ext_contentscript_animate.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set sts=2 sw=2 et tw=80: */
-"use strict";
-
-add_task(async function test_animate() {
-  let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, "http://mochi.test:8888/");
-
-  let extension = ExtensionTestUtils.loadExtension({
-    manifest: {
-      "content_scripts": [
-        {
-          "matches": ["http://mochi.test/*"],
-          "js": ["content-script.js"],
-        },
-      ],
-    },
-
-    files: {
-      "content-script.js": function() {
-        let elem = document.getElementsByTagName("body")[0];
-        elem.style.border = "2px solid red";
-
-        let anim = elem.animate({opacity: [1, 0]}, 2000);
-        let frames = anim.effect.getKeyframes();
-        browser.test.assertEq(frames.length, 2,
-                              "frames for Element.animate should be non-zero");
-        browser.test.assertEq(frames[0].opacity, "1",
-                              "first frame opacity for Element.animate should be specified value");
-        browser.test.assertEq(frames[0].computedOffset, 0,
-                              "first frame offset for Element.animate should be 0");
-        browser.test.assertEq(frames[1].opacity, "0",
-                              "last frame opacity for Element.animate should be specified value");
-        browser.test.assertEq(frames[1].computedOffset, 1,
-                              "last frame offset for Element.animate should be 1");
-
-        browser.test.notifyPass("contentScriptAnimate");
-      },
-    },
-  });
-
-  await extension.startup();
-  await extension.awaitFinish("contentScriptAnimate");
-  await extension.unload();
-
-  await BrowserTestUtils.removeTab(tab);
-});
-
-add_task(async function test_KeyframeEffect() {
-  let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, "http://mochi.test:8888/");
-
-  let extension = ExtensionTestUtils.loadExtension({
-    manifest: {
-      "content_scripts": [
-        {
-          "matches": ["http://mochi.test/*"],
-          "js": ["content-script.js"],
-        },
-      ],
-    },
-
-    files: {
-      "content-script.js": function() {
-        let elem = document.getElementsByTagName("body")[0];
-        elem.style.border = "2px solid red";
-
-        let effect = new KeyframeEffect(elem, [
-          {opacity: 1, offset: 0},
-          {opacity: 0, offset: 1},
-        ], {duration: 1000, fill: "forwards"});
-        let frames = effect.getKeyframes();
-        browser.test.assertEq(frames.length, 2,
-                              "frames for KeyframeEffect ctor should be non-zero");
-        browser.test.assertEq(frames[0].opacity, "1",
-                              "first frame opacity for KeyframeEffect ctor should be specified value");
-        browser.test.assertEq(frames[0].computedOffset, 0,
-                              "first frame offset for KeyframeEffect ctor should be 0");
-        browser.test.assertEq(frames[1].opacity, "0",
-                              "last frame opacity for KeyframeEffect ctor should be specified value");
-        browser.test.assertEq(frames[1].computedOffset, 1,
-                              "last frame offset for KeyframeEffect ctor should be 1");
-
-        let animation = new Animation(effect, document.timeline);
-        animation.play();
-
-        browser.test.notifyPass("contentScriptKeyframeEffect");
-      },
-    },
-  });
-
-  await extension.startup();
-  await extension.awaitFinish("contentScriptKeyframeEffect");
-  await extension.unload();
-
-  await BrowserTestUtils.removeTab(tab);
-});
--- a/build/clang-plugin/tests/TestNeedsNoVTableType.cpp
+++ b/build/clang-plugin/tests/TestNeedsNoVTableType.cpp
@@ -31,17 +31,17 @@ struct B : virtual A {};
 struct C : A {};
 struct D {
   void d();
 };
 struct E {
   virtual void e();
 };
 struct F : E {
-  virtual void e() final override;
+  void e() final;
 };
 struct G {
   virtual void e() = 0;
 };
 
 void f() {
   {
     PickyConsumer<A> a1;
--- a/caps/BasePrincipal.h
+++ b/caps/BasePrincipal.h
@@ -55,41 +55,41 @@ public:
   {
     MOZ_ASSERT(Is<T>());
     return static_cast<T*>(this);
   }
 
   enum DocumentDomainConsideration { DontConsiderDocumentDomain, ConsiderDocumentDomain};
   bool Subsumes(nsIPrincipal* aOther, DocumentDomainConsideration aConsideration);
 
-  NS_IMETHOD GetOrigin(nsACString& aOrigin) final override;
-  NS_IMETHOD GetOriginNoSuffix(nsACString& aOrigin) final override;
-  NS_IMETHOD Equals(nsIPrincipal* other, bool* _retval) final override;
-  NS_IMETHOD EqualsConsideringDomain(nsIPrincipal* other, bool* _retval) final override;
-  NS_IMETHOD Subsumes(nsIPrincipal* other, bool* _retval) final override;
-  NS_IMETHOD SubsumesConsideringDomain(nsIPrincipal* other, bool* _retval) final override;
-  NS_IMETHOD SubsumesConsideringDomainIgnoringFPD(nsIPrincipal* other, bool* _retval) final override;
-  NS_IMETHOD CheckMayLoad(nsIURI* uri, bool report, bool allowIfInheritsPrincipal) final override;
-  NS_IMETHOD GetAddonPolicy(nsISupports** aResult) final override;
+  NS_IMETHOD GetOrigin(nsACString& aOrigin) final;
+  NS_IMETHOD GetOriginNoSuffix(nsACString& aOrigin) final;
+  NS_IMETHOD Equals(nsIPrincipal* other, bool* _retval) final;
+  NS_IMETHOD EqualsConsideringDomain(nsIPrincipal* other, bool* _retval) final;
+  NS_IMETHOD Subsumes(nsIPrincipal* other, bool* _retval) final;
+  NS_IMETHOD SubsumesConsideringDomain(nsIPrincipal* other, bool* _retval) final;
+  NS_IMETHOD SubsumesConsideringDomainIgnoringFPD(nsIPrincipal* other, bool* _retval) final;
+  NS_IMETHOD CheckMayLoad(nsIURI* uri, bool report, bool allowIfInheritsPrincipal) final;
+  NS_IMETHOD GetAddonPolicy(nsISupports** aResult) final;
   NS_IMETHOD GetCsp(nsIContentSecurityPolicy** aCsp) override;
   NS_IMETHOD SetCsp(nsIContentSecurityPolicy* aCsp) override;
   NS_IMETHOD EnsureCSP(nsIDOMDocument* aDocument, nsIContentSecurityPolicy** aCSP) override;
   NS_IMETHOD GetPreloadCsp(nsIContentSecurityPolicy** aPreloadCSP) override;
   NS_IMETHOD EnsurePreloadCSP(nsIDOMDocument* aDocument, nsIContentSecurityPolicy** aCSP) override;
   NS_IMETHOD GetCspJSON(nsAString& outCSPinJSON) override;
   NS_IMETHOD GetIsNullPrincipal(bool* aResult) override;
   NS_IMETHOD GetIsCodebasePrincipal(bool* aResult) override;
   NS_IMETHOD GetIsExpandedPrincipal(bool* aResult) override;
   NS_IMETHOD GetIsSystemPrincipal(bool* aResult) override;
-  NS_IMETHOD GetOriginAttributes(JSContext* aCx, JS::MutableHandle<JS::Value> aVal) final override;
-  NS_IMETHOD GetOriginSuffix(nsACString& aOriginSuffix) final override;
-  NS_IMETHOD GetAppId(uint32_t* aAppId) final override;
-  NS_IMETHOD GetIsInIsolatedMozBrowserElement(bool* aIsInIsolatedMozBrowserElement) final override;
-  NS_IMETHOD GetUserContextId(uint32_t* aUserContextId) final override;
-  NS_IMETHOD GetPrivateBrowsingId(uint32_t* aPrivateBrowsingId) final override;
+  NS_IMETHOD GetOriginAttributes(JSContext* aCx, JS::MutableHandle<JS::Value> aVal) final;
+  NS_IMETHOD GetOriginSuffix(nsACString& aOriginSuffix) final;
+  NS_IMETHOD GetAppId(uint32_t* aAppId) final;
+  NS_IMETHOD GetIsInIsolatedMozBrowserElement(bool* aIsInIsolatedMozBrowserElement) final;
+  NS_IMETHOD GetUserContextId(uint32_t* aUserContextId) final;
+  NS_IMETHOD GetPrivateBrowsingId(uint32_t* aPrivateBrowsingId) final;
 
   virtual bool AddonHasPermission(const nsAtom* aPerm);
 
   virtual bool IsCodebasePrincipal() const { return false; };
 
   static BasePrincipal* Cast(nsIPrincipal* aPrin) { return static_cast<BasePrincipal*>(aPrin); }
 
   static already_AddRefed<BasePrincipal>
@@ -97,17 +97,17 @@ public:
 
   // These following method may not create a codebase principal in case it's
   // not possible to generate a correct origin from the passed URI. If this
   // happens, a NullPrincipal is returned.
 
   static already_AddRefed<BasePrincipal>
   CreateCodebasePrincipal(nsIURI* aURI, const OriginAttributes& aAttrs);
 
-  const OriginAttributes& OriginAttributesRef() final override { return mOriginAttributes; }
+  const OriginAttributes& OriginAttributesRef() final { return mOriginAttributes; }
   uint32_t AppId() const { return mOriginAttributes.mAppId; }
   extensions::WebExtensionPolicy* AddonPolicy();
   uint32_t UserContextId() const { return mOriginAttributes.mUserContextId; }
   uint32_t PrivateBrowsingId() const { return mOriginAttributes.mPrivateBrowsingId; }
   bool IsInIsolatedMozBrowserElement() const { return mOriginAttributes.mInIsolatedMozBrowser; }
 
   PrincipalKind Kind() const { return mKind; }
 
--- a/caps/nsJSPrincipals.h
+++ b/caps/nsJSPrincipals.h
@@ -20,17 +20,17 @@ public:
   static bool ReadPrincipals(JSContext* aCx, JSStructuredCloneReader* aReader,
                              JSPrincipals** aOutPrincipals);
 
   static bool ReadKnownPrincipalType(JSContext* aCx,
                                      JSStructuredCloneReader* aReader,
                                      uint32_t aTag,
                                      JSPrincipals** aOutPrincipals);
 
-  bool write(JSContext* aCx, JSStructuredCloneWriter* aWriter) final override;
+  bool write(JSContext* aCx, JSStructuredCloneWriter* aWriter) final;
 
   /*
    * Get a weak reference to nsIPrincipal associated with the given JS
    * principal, and vice-versa.
    */
   static nsJSPrincipals* get(JSPrincipals *principals) {
     nsJSPrincipals *self = static_cast<nsJSPrincipals *>(principals);
     MOZ_ASSERT_IF(self, self->debugToken == DEBUG_TOKEN);
--- a/devtools/shared/heapsnapshot/DeserializedNode.h
+++ b/devtools/shared/heapsnapshot/DeserializedNode.h
@@ -247,23 +247,23 @@ protected:
     return *static_cast<DeserializedNode*>(ptr);
   }
 
 public:
   static void construct(void* storage, DeserializedNode* ptr) {
     new (storage) Concrete(ptr);
   }
 
-  CoarseType coarseType() const final override { return get().coarseType; }
+  CoarseType coarseType() const final { return get().coarseType; }
   Id identifier() const override { return get().id; }
   bool isLive() const override { return false; }
   const char16_t* typeName() const override;
   Node::Size size(mozilla::MallocSizeOf mallocSizeof) const override;
   const char* jsObjectClassName() const override { return get().jsObjectClassName; }
-  const char* scriptFilename() const final override { return get().scriptFilename; }
+  const char* scriptFilename() const final { return get().scriptFilename; }
 
   bool hasAllocationStack() const override { return get().allocationStack.isSome(); }
   StackFrame allocationStack() const override;
 
   // We ignore the `bool wantNames` parameter because we can't control whether
   // the core dump was serialized with edge names or not.
   js::UniquePtr<EdgeRange> edges(JSContext* cx, bool) const override;
 
--- a/devtools/shared/heapsnapshot/HeapSnapshot.cpp
+++ b/devtools/shared/heapsnapshot/HeapSnapshot.cpp
@@ -1250,24 +1250,24 @@ public:
   bool init() {
     return framesAlreadySerialized.init() &&
            twoByteStringsAlreadySerialized.init() &&
            oneByteStringsAlreadySerialized.init();
   }
 
   ~StreamWriter() override { }
 
-  virtual bool writeMetadata(uint64_t timestamp) final override {
+  bool writeMetadata(uint64_t timestamp) final {
     protobuf::Metadata metadata;
     metadata.set_timestamp(timestamp);
     return writeMessage(metadata);
   }
 
-  virtual bool writeNode(const JS::ubi::Node& ubiNode,
-                         EdgePolicy includeEdges) override final {
+  bool writeNode(const JS::ubi::Node& ubiNode,
+                         EdgePolicy includeEdges) final {
     // NB: de-duplicated string properties must be written in the same order
     // here as they are read in `HeapSnapshot::saveNode` or else indices in
     // references to already serialized strings will be off.
 
     protobuf::Node protobufNode;
     protobufNode.set_id(ubiNode.identifier());
 
     protobufNode.set_coarsetype(JS::ubi::CoarseTypeToUint32(ubiNode.coarseType()));
--- a/dom/animation/AnimationUtils.cpp
+++ b/dom/animation/AnimationUtils.cpp
@@ -44,26 +44,16 @@ AnimationUtils::GetCurrentRealmDocument(
 {
   nsGlobalWindowInner* win = xpc::CurrentWindowOrNull(aCx);
   if (!win) {
     return nullptr;
   }
   return win->GetDoc();
 }
 
-/* static */ nsIDocument*
-AnimationUtils::GetDocumentFromGlobal(JSObject* aGlobalObject)
-{
-  nsGlobalWindowInner* win = xpc::WindowOrNull(aGlobalObject);
-  if (!win) {
-    return nullptr;
-  }
-  return win->GetDoc();
-}
-
 /* static */ bool
 AnimationUtils::IsOffscreenThrottlingEnabled()
 {
   static bool sOffscreenThrottlingEnabled;
   static bool sPrefCached = false;
 
   if (!sPrefCached) {
     sPrefCached = true;
--- a/dom/animation/AnimationUtils.h
+++ b/dom/animation/AnimationUtils.h
@@ -57,24 +57,16 @@ public:
 
   /**
    * Get the document from the JS context to use when parsing CSS properties.
    */
   static nsIDocument*
   GetCurrentRealmDocument(JSContext* aCx);
 
   /**
-   * Get the document from the global object, or nullptr if the document has
-   * no window, to use when constructing DOM object without entering the
-   * target window's compartment (see KeyframeEffect constructor).
-   */
-  static nsIDocument*
-  GetDocumentFromGlobal(JSObject* aGlobalObject);
-
-  /**
    * Checks if offscreen animation throttling is enabled.
    */
   static bool
   IsOffscreenThrottlingEnabled();
 
   /**
    * Returns true if the given EffectSet contains a current effect that animates
    * scale. |aFrame| is used for calculation of scale values.
--- a/dom/animation/KeyframeEffectReadOnly.cpp
+++ b/dom/animation/KeyframeEffectReadOnly.cpp
@@ -898,27 +898,17 @@ template <class KeyframeEffectType, clas
 /* static */ already_AddRefed<KeyframeEffectType>
 KeyframeEffectReadOnly::ConstructKeyframeEffect(
     const GlobalObject& aGlobal,
     const Nullable<ElementOrCSSPseudoElement>& aTarget,
     JS::Handle<JSObject*> aKeyframes,
     const OptionsType& aOptions,
     ErrorResult& aRv)
 {
-  // We should get the document from `aGlobal` instead of the current Realm
-  // to make this works in Xray case.
-  //
-  // In all non-Xray cases, `aGlobal` matches the current Realm, so this
-  // matches the spec behavior.
-  //
-  // In Xray case, the new objects should be created using the document of
-  // the target global, but KeyframeEffect and KeyframeEffectReadOnly
-  // constructors are called in the caller's compartment to access
-  // `aKeyframes` object.
-  nsIDocument* doc = AnimationUtils::GetDocumentFromGlobal(aGlobal.Get());
+  nsIDocument* doc = AnimationUtils::GetCurrentRealmDocument(aGlobal.Context());
   if (!doc) {
     aRv.Throw(NS_ERROR_FAILURE);
     return nullptr;
   }
 
   TimingParams timingParams =
     TimingParams::FromOptionsUnion(aOptions, doc, aRv);
   if (aRv.Failed()) {
--- a/dom/animation/test/chrome.ini
+++ b/dom/animation/test/chrome.ini
@@ -3,17 +3,16 @@ support-files =
   testcommon.js
   ../../imptests/testharness.js
   ../../imptests/testharnessreport.js
   !/dom/animation/test/chrome/file_animate_xrays.html
 
 [chrome/test_animate_xrays.html]
 # file_animate_xrays.html needs to go in mochitest.ini since it is served
 # over HTTP
-[chrome/test_keyframe_effect_xrays.html]
 [chrome/test_animation_observers_async.html]
 [chrome/test_animation_observers_sync.html]
 [chrome/test_animation_performance_warning.html]
 [chrome/test_animation_properties.html]
 [chrome/test_cssanimation_missing_keyframes.html]
 [chrome/test_generated_content_getAnimations.html]
 [chrome/test_running_on_compositor.html]
 [chrome/test_simulate_compute_values_failure.html]
--- a/dom/animation/test/chrome/file_animate_xrays.html
+++ b/dom/animation/test/chrome/file_animate_xrays.html
@@ -1,18 +1,19 @@
 <!doctype html>
 <html>
 <head>
 <meta charset=utf-8>
 <script>
 Element.prototype.animate = function() {
   throw 'Called animate() as defined in content document';
 }
-for (let name of ["KeyframeEffect", "KeyframeEffectReadOnly", "Animation"]) {
-  this[name] = function() {
-    throw `Called overridden ${name} constructor`;
+// Bug 1211783: Use KeyframeEffect (not KeyframeEffectReadOnly) here
+for (var obj of [KeyframeEffectReadOnly, Animation]) {
+  obj = function() {
+    throw 'Called overridden ' + String(obj) + ' constructor';
   };
 }
 </script>
 <body>
 <div id="target"></div>
 </body>
 </html>
--- a/dom/animation/test/chrome/test_animate_xrays.html
+++ b/dom/animation/test/chrome/test_animate_xrays.html
@@ -1,40 +1,31 @@
 <!doctype html>
 <head>
 <meta charset=utf-8>
 <script type="application/javascript" src="../testharness.js"></script>
 <script type="application/javascript" src="../testharnessreport.js"></script>
 <script type="application/javascript" src="../testcommon.js"></script>
 </head>
 <body>
-<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1414674"
-  target="_blank">Mozilla Bug 1414674</a>
+<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1045994"
+  target="_blank">Mozilla Bug 1045994</a>
 <div id="log"></div>
 <iframe id="iframe"
   src="http://example.org/tests/dom/animation/test/chrome/file_animate_xrays.html"></iframe>
 <script>
 'use strict';
 
 var win = document.getElementById('iframe').contentWindow;
 
 async_test(function(t) {
   window.addEventListener('load', t.step_func(function() {
     var target = win.document.getElementById('target');
-    var anim = target.animate({opacity: [ 1, 0 ]}, 100 * MS_PER_SEC);
-    // The frames object should be accessible via x-ray.
-    var frames = anim.effect.getKeyframes();
-    assert_equals(frames.length, 2,
-                  "frames for Element.animate should be non-zero");
-    assert_equals(frames[0].opacity, "1",
-                  "first frame opacity for Element.animate should be specified value");
-    assert_equals(frames[0].computedOffset, 0,
-                  "first frame offset for Element.animate should be 0");
-    assert_equals(frames[1].opacity, "0",
-                  "last frame opacity for Element.animate should be specified value");
-    assert_equals(frames[1].computedOffset, 1,
-                  "last frame offset for Element.animate should be 1");
+    var anim = target.animate({ opacity: [ 0, 1 ] }, 100 * MS_PER_SEC);
+    // In the x-ray case, the frames object will be given an opaque wrapper
+    // so it won't be possible to fetch any frames from it.
+    assert_equals(anim.effect.getKeyframes().length, 0);
     t.done();
   }));
 }, 'Calling animate() across x-rays');
 
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/chrome/test_keyframe_effect_xrays.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!doctype html>
-<head>
-<meta charset=utf-8>
-<script type="application/javascript" src="../testharness.js"></script>
-<script type="application/javascript" src="../testharnessreport.js"></script>
-<script type="application/javascript" src="../testcommon.js"></script>
-</head>
-<body>
-<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1414674"
-  target="_blank">Mozilla Bug 1414674</a>
-<div id="log"></div>
-<iframe id="iframe"
-  src="http://example.org/tests/dom/animation/test/chrome/file_animate_xrays.html"></iframe>
-<script>
-'use strict';
-
-var win = document.getElementById('iframe').contentWindow;
-
-async_test(function(t) {
-  window.addEventListener('load', t.step_func(function() {
-    var target = win.document.getElementById('target');
-    var effect = new win.KeyframeEffect(target, [
-      {opacity: 1, offset: 0},
-      {opacity: 0, offset: 1},
-    ], {duration: 100 * MS_PER_SEC, fill: "forwards"});
-    // The frames object should be accessible via x-ray.
-    var frames = effect.getKeyframes();
-    assert_equals(frames.length, 2,
-                  "frames for KeyframeEffect ctor should be non-zero");
-    assert_equals(frames[0].opacity, "1",
-                  "first frame opacity for KeyframeEffect ctor should be specified value");
-    assert_equals(frames[0].computedOffset, 0,
-                  "first frame offset for KeyframeEffect ctor should be 0");
-    assert_equals(frames[1].opacity, "0",
-                  "last frame opacity for KeyframeEffect ctor should be specified value");
-    assert_equals(frames[1].computedOffset, 1,
-                  "last frame offset for KeyframeEffect ctor should be 1");
-    var animation = new win.Animation(effect, document.timeline);
-    animation.play();
-    t.done();
-  }));
-}, 'Calling KeyframeEffect() ctor across x-rays');
-
-</script>
-</body>
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -3799,33 +3799,32 @@ Element::Animate(const Nullable<ElementO
   nsCOMPtr<nsIGlobalObject> ownerGlobal = referenceElement->GetOwnerGlobal();
   if (!ownerGlobal) {
     aError.Throw(NS_ERROR_FAILURE);
     return nullptr;
   }
   GlobalObject global(aContext, ownerGlobal->GetGlobalJSObject());
   MOZ_ASSERT(!global.Failed());
 
-  // KeyframeEffect constructor doesn't follow the standard Xray calling
-  // convention and needs to be called in caller's compartment.
-  // This should match to RunConstructorInCallerCompartment attribute in
-  // KeyframeEffect.webidl.
-  RefPtr<KeyframeEffect> effect =
-    KeyframeEffect::Constructor(global, aTarget, aKeyframes, aOptions,
-                                aError);
-  if (aError.Failed()) {
-    return nullptr;
-  }
-
-  // Animation constructor follows the standard Xray calling convention and
-  // needs to be called in the target element's compartment.
+  // Wrap the aKeyframes object for the cross-compartment case.
+  JS::Rooted<JSObject*> keyframes(aContext);
+  keyframes = aKeyframes;
   Maybe<JSAutoCompartment> ac;
   if (js::GetContextCompartment(aContext) !=
       js::GetObjectCompartment(ownerGlobal->GetGlobalJSObject())) {
     ac.emplace(aContext, ownerGlobal->GetGlobalJSObject());
+    if (!JS_WrapObject(aContext, &keyframes)) {
+      return nullptr;
+    }
+  }
+
+  RefPtr<KeyframeEffect> effect =
+    KeyframeEffect::Constructor(global, aTarget, keyframes, aOptions, aError);
+  if (aError.Failed()) {
+    return nullptr;
   }
 
   AnimationTimeline* timeline = referenceElement->OwnerDoc()->Timeline();
   RefPtr<Animation> animation =
     Animation::Constructor(global, effect,
                            Optional<AnimationTimeline*>(timeline), aError);
   if (aError.Failed()) {
     return nullptr;
--- a/dom/base/Element.h
+++ b/dom/base/Element.h
@@ -1562,17 +1562,17 @@ public:
   static CORSMode StringToCORSMode(const nsAString& aValue);
 
   /**
    * Return the CORS mode for a given nsAttrValue (which may be null,
    * but if not should have been parsed via ParseCORSValue).
    */
   static CORSMode AttrValueToCORSMode(const nsAttrValue* aValue);
 
-  virtual JSObject* WrapObject(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) final override;
+  JSObject* WrapObject(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) final;
 
   nsINode* GetScopeChainParent() const override;
 
   /**
    * Locate a TextEditor rooted at this content node, if there is one.
    */
   mozilla::TextEditor* GetTextEditorInternal();
 
--- a/dom/base/FragmentOrElement.h
+++ b/dom/base/FragmentOrElement.h
@@ -242,18 +242,18 @@ public:
    */
 
   class nsExtendedDOMSlots final : public nsIContent::nsExtendedContentSlots
   {
   public:
     nsExtendedDOMSlots();
     ~nsExtendedDOMSlots() final;
 
-    void Traverse(nsCycleCollectionTraversalCallback&) final override;
-    void Unlink() final override;
+    void Traverse(nsCycleCollectionTraversalCallback&) final;
+    void Unlink() final;
 
     /**
      * SMIL Overridde style rules (for SMIL animation of CSS properties)
      * @see Element::GetSMILOverrideStyle
      */
     RefPtr<nsDOMCSSAttributeDeclaration> mSMILOverrideStyle;
 
     /**
@@ -294,18 +294,18 @@ public:
   };
 
   class nsDOMSlots final : public nsIContent::nsContentSlots
   {
   public:
     nsDOMSlots();
     ~nsDOMSlots() final;
 
-    void Traverse(nsCycleCollectionTraversalCallback&) final override;
-    void Unlink() final override;
+    void Traverse(nsCycleCollectionTraversalCallback&) final;
+    void Unlink() final;
 
     size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
 
     /**
      * The .style attribute (an interface that forwards to the actual
      * style rules)
      * @see nsGenericHTMLElement::GetStyle
      */
@@ -339,17 +339,17 @@ protected:
                             bool aNeverSanitize = false);
 
   // Override from nsINode
   nsIContent::nsContentSlots* CreateSlots() override
   {
     return new nsDOMSlots();
   }
 
-  nsIContent::nsExtendedContentSlots* CreateExtendedSlots() final override
+  nsIContent::nsExtendedContentSlots* CreateExtendedSlots() final
   {
     return new nsExtendedDOMSlots();
   }
 
   nsDOMSlots* DOMSlots()
   {
     return static_cast<nsDOMSlots*>(Slots());
   }
--- a/dom/base/StyleSheetList.h
+++ b/dom/base/StyleSheetList.h
@@ -24,17 +24,17 @@ class StyleSheetList final : public nsSt
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(StyleSheetList)
 
   NS_DECL_NSIMUTATIONOBSERVER_NODEWILLBEDESTROYED
 
   explicit StyleSheetList(DocumentOrShadowRoot& aScope);
 
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override final;
+  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;
 
   nsINode* GetParentObject() const
   {
     return mDocumentOrShadowRoot ? &mDocumentOrShadowRoot->AsNode() : nullptr;
   }
 
   uint32_t Length() const
   {
--- a/dom/base/TextInputProcessor.cpp
+++ b/dom/base/TextInputProcessor.cpp
@@ -55,194 +55,194 @@ public:
     // SelectionChangeDataBase::mString still refers nsString instance owned
     // by aSelectionChangeData.  So, this needs to copy the instance.
     nsString* string = new nsString(aSelectionChangeData.String());
     mSelectionChangeData.mString = string;
   }
 
   NS_DECL_ISUPPORTS
 
-  NS_IMETHOD GetType(nsACString& aType) override final
+  NS_IMETHOD GetType(nsACString& aType) final
   {
     aType = mType;
     return NS_OK;
   }
 
   // "notify-text-change" and "notify-selection-change"
-  NS_IMETHOD GetOffset(uint32_t* aOffset) override final
+  NS_IMETHOD GetOffset(uint32_t* aOffset) final
   {
     if (NS_WARN_IF(!aOffset)) {
       return NS_ERROR_INVALID_ARG;
     }
     if (IsSelectionChange()) {
       *aOffset = mSelectionChangeData.mOffset;
       return NS_OK;
     }
     if (IsTextChange()) {
       *aOffset = mTextChangeData.mStartOffset;
       return NS_OK;
     }
     return NS_ERROR_NOT_AVAILABLE;
   }
 
   // "notify-selection-change"
-  NS_IMETHOD GetText(nsAString& aText) override final
+  NS_IMETHOD GetText(nsAString& aText) final
   {
     if (IsSelectionChange()) {
       aText = mSelectionChangeData.String();
       return NS_OK;
     }
     return NS_ERROR_NOT_AVAILABLE;
   }
 
-  NS_IMETHOD GetCollapsed(bool* aCollapsed) override final
+  NS_IMETHOD GetCollapsed(bool* aCollapsed) final
   {
     if (NS_WARN_IF(!aCollapsed)) {
       return NS_ERROR_INVALID_ARG;
     }
     if (IsSelectionChange()) {
       *aCollapsed = mSelectionChangeData.IsCollapsed();
       return NS_OK;
     }
     return NS_ERROR_NOT_AVAILABLE;
   }
 
-  NS_IMETHOD GetLength(uint32_t* aLength) override final
+  NS_IMETHOD GetLength(uint32_t* aLength) final
   {
     if (NS_WARN_IF(!aLength)) {
       return NS_ERROR_INVALID_ARG;
     }
     if (IsSelectionChange()) {
       *aLength = mSelectionChangeData.Length();
       return NS_OK;
     }
     return NS_ERROR_NOT_AVAILABLE;
   }
 
-  NS_IMETHOD GetReversed(bool* aReversed) override final
+  NS_IMETHOD GetReversed(bool* aReversed) final
   {
     if (NS_WARN_IF(!aReversed)) {
       return NS_ERROR_INVALID_ARG;
     }
     if (IsSelectionChange()) {
       *aReversed = mSelectionChangeData.mReversed;
       return NS_OK;
     }
     return NS_ERROR_NOT_AVAILABLE;
   }
 
-  NS_IMETHOD GetWritingMode(nsACString& aWritingMode) override final
+  NS_IMETHOD GetWritingMode(nsACString& aWritingMode) final
   {
     if (IsSelectionChange()) {
       WritingMode writingMode = mSelectionChangeData.GetWritingMode();
       if (!writingMode.IsVertical()) {
         aWritingMode.AssignLiteral("horizontal-tb");
       } else if (writingMode.IsVerticalLR()) {
         aWritingMode.AssignLiteral("vertical-lr");
       } else {
         aWritingMode.AssignLiteral("vertical-rl");
       }
       return NS_OK;
     }
     return NS_ERROR_NOT_AVAILABLE;
   }
 
-  NS_IMETHOD GetCausedByComposition(bool* aCausedByComposition) override final
+  NS_IMETHOD GetCausedByComposition(bool* aCausedByComposition) final
   {
     if (NS_WARN_IF(!aCausedByComposition)) {
       return NS_ERROR_INVALID_ARG;
     }
     if (IsSelectionChange()) {
       *aCausedByComposition = mSelectionChangeData.mCausedByComposition;
       return NS_OK;
     }
     return NS_ERROR_NOT_AVAILABLE;
   }
 
   NS_IMETHOD GetCausedBySelectionEvent(
-               bool* aCausedBySelectionEvent) override final
+               bool* aCausedBySelectionEvent) final
   {
     if (NS_WARN_IF(!aCausedBySelectionEvent)) {
       return NS_ERROR_INVALID_ARG;
     }
     if (IsSelectionChange()) {
       *aCausedBySelectionEvent = mSelectionChangeData.mCausedBySelectionEvent;
       return NS_OK;
     }
     return NS_ERROR_NOT_AVAILABLE;
   }
 
   NS_IMETHOD GetOccurredDuringComposition(
-               bool* aOccurredDuringComposition) override final
+               bool* aOccurredDuringComposition) final
   {
     if (NS_WARN_IF(!aOccurredDuringComposition)) {
       return NS_ERROR_INVALID_ARG;
     }
     if (IsSelectionChange()) {
       *aOccurredDuringComposition =
         mSelectionChangeData.mOccurredDuringComposition;
       return NS_OK;
     }
     return NS_ERROR_NOT_AVAILABLE;
   }
 
   // "notify-text-change"
-  NS_IMETHOD GetRemovedLength(uint32_t* aLength) override final
+  NS_IMETHOD GetRemovedLength(uint32_t* aLength) final
   {
     if (NS_WARN_IF(!aLength)) {
       return NS_ERROR_INVALID_ARG;
     }
     if (IsTextChange()) {
       *aLength = mTextChangeData.OldLength();
       return NS_OK;
     }
     return NS_ERROR_NOT_AVAILABLE;
   }
 
-  NS_IMETHOD GetAddedLength(uint32_t* aLength) override final
+  NS_IMETHOD GetAddedLength(uint32_t* aLength) final
   {
     if (NS_WARN_IF(!aLength)) {
       return NS_ERROR_INVALID_ARG;
     }
     if (IsTextChange()) {
       *aLength = mTextChangeData.NewLength();
       return NS_OK;
     }
     return NS_ERROR_NOT_AVAILABLE;
   }
 
   NS_IMETHOD GetCausedOnlyByComposition(
-               bool* aCausedOnlyByComposition) override final
+               bool* aCausedOnlyByComposition) final
   {
     if (NS_WARN_IF(!aCausedOnlyByComposition)) {
       return NS_ERROR_INVALID_ARG;
     }
     if (IsTextChange()) {
       *aCausedOnlyByComposition = mTextChangeData.mCausedOnlyByComposition;
       return NS_OK;
     }
     return NS_ERROR_NOT_AVAILABLE;
   }
 
   NS_IMETHOD GetIncludingChangesDuringComposition(
-               bool* aIncludingChangesDuringComposition) override final
+               bool* aIncludingChangesDuringComposition) final
   {
     if (NS_WARN_IF(!aIncludingChangesDuringComposition)) {
       return NS_ERROR_INVALID_ARG;
     }
     if (IsTextChange()) {
       *aIncludingChangesDuringComposition =
         mTextChangeData.mIncludingChangesDuringComposition;
       return NS_OK;
     }
     return NS_ERROR_NOT_AVAILABLE;
   }
 
   NS_IMETHOD GetIncludingChangesWithoutComposition(
-               bool* aIncludingChangesWithoutComposition) override final
+               bool* aIncludingChangesWithoutComposition) final
   {
     if (NS_WARN_IF(!aIncludingChangesWithoutComposition)) {
       return NS_ERROR_INVALID_ARG;
     }
     if (IsTextChange()) {
       *aIncludingChangesWithoutComposition =
         mTextChangeData.mIncludingChangesWithoutComposition;
       return NS_OK;
--- a/dom/base/nsContentList.h
+++ b/dom/base/nsContentList.h
@@ -167,17 +167,17 @@ public:
   {
     return nsWrapperCache::GetWrapperPreserveColor();
   }
   virtual void PreserveWrapperInternal(nsISupports* aScriptObjectHolder) override
   {
     nsWrapperCache::PreserveWrapper(aScriptObjectHolder);
   }
 
-  virtual uint32_t Length() override final
+  uint32_t Length() final
   {
     return 0;
   }
   virtual nsIContent* Item(uint32_t aIndex) override;
   virtual mozilla::dom::Element* GetElementAt(uint32_t index) override;
   virtual mozilla::dom::Element*
   GetFirstNamedElement(const nsAString& aName, bool& aFound) override;
   virtual void GetSupportedNames(nsTArray<nsString>& aNames) override;
@@ -341,17 +341,17 @@ public:
   // nsBaseContentList overrides
   virtual int32_t IndexOf(nsIContent *aContent, bool aDoFlush) override;
   virtual int32_t IndexOf(nsIContent* aContent) override;
   virtual nsINode* GetParentObject() override
   {
     return mRootNode;
   }
 
-  virtual uint32_t Length() override final
+  uint32_t Length() final
   {
     return Length(true);
   }
   virtual nsIContent* Item(uint32_t aIndex) override;
   virtual mozilla::dom::Element* GetElementAt(uint32_t index) override;
   virtual mozilla::dom::Element*
   GetFirstNamedElement(const nsAString& aName, bool& aFound) override
   {
--- a/dom/base/nsDOMCaretPosition.h
+++ b/dom/base/nsDOMCaretPosition.h
@@ -82,20 +82,18 @@ public:
     mAnonymousContentNode = aNode;
   }
 
   nsISupports* GetParentObject() const
   {
     return GetOffsetNode();
   }
 
-  virtual JSObject* WrapObject(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
-    override final;
+  JSObject* WrapObject(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) final;
 
 protected:
   virtual ~nsDOMCaretPosition();
 
   uint32_t mOffset;
   nsCOMPtr<nsINode> mOffsetNode;
   nsCOMPtr<nsINode> mAnonymousContentNode;
 };
 #endif
-
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -10531,17 +10531,17 @@ class nsCallExitFullscreen : public Runn
 {
 public:
   explicit nsCallExitFullscreen(nsIDocument* aDoc)
     : mozilla::Runnable("nsCallExitFullscreen")
     , mDoc(aDoc)
   {
   }
 
-  NS_IMETHOD Run() override final
+  NS_IMETHOD Run() final
   {
     if (!mDoc) {
       FullscreenRoots::ForEach(&AskWindowToExitFullscreen);
     } else {
       AskWindowToExitFullscreen(mDoc);
     }
     return NS_OK;
   }
@@ -11538,17 +11538,17 @@ class PointerLockRequest final : public 
 public:
   PointerLockRequest(Element* aElement, bool aUserInputOrChromeCaller)
     : mozilla::Runnable("PointerLockRequest")
     , mElement(do_GetWeakReference(aElement))
     , mDocument(do_GetWeakReference(aElement->OwnerDoc()))
     , mUserInputOrChromeCaller(aUserInputOrChromeCaller)
   {}
 
-  NS_IMETHOD Run() final override;
+  NS_IMETHOD Run() final;
 
 private:
   nsWeakPtr mElement;
   nsWeakPtr mDocument;
   bool mUserInputOrChromeCaller;
 };
 
 static const char*
--- a/dom/base/nsDocument.h
+++ b/dom/base/nsDocument.h
@@ -408,17 +408,17 @@ public:
   /**
    * Create a new presentation shell that will use aContext for
    * its presentation context (presentation contexts <b>must not</b> be
    * shared among multiple presentation shells).
    */
   already_AddRefed<nsIPresShell> CreateShell(nsPresContext* aContext,
                                              nsViewManager* aViewManager,
                                              mozilla::StyleSetHandle aStyleSet)
-    final override;
+    final;
   virtual void DeleteShell() override;
 
   virtual bool GetAllowPlugins() override;
 
   static bool IsElementAnimateEnabled(JSContext* aCx, JSObject* aObject);
   static bool IsWebAnimationsEnabled(JSContext* aCx, JSObject* aObject);
   static bool IsWebAnimationsEnabled(mozilla::dom::CallerType aCallerType);
   virtual mozilla::dom::DocumentTimeline* Timeline() override;
@@ -709,17 +709,17 @@ public:
   virtual void
     EnumerateExternalResources(nsSubDocEnumFunc aCallback, void* aData) override;
 
   // Returns our (lazily-initialized) animation controller.
   // If HasAnimationController is true, this is guaranteed to return non-null.
   nsSMILAnimationController* GetAnimationController() override;
 
   virtual mozilla::PendingAnimationTracker*
-  GetPendingAnimationTracker() final override
+  GetPendingAnimationTracker() final
   {
     return mPendingAnimationTracker;
   }
 
   virtual mozilla::PendingAnimationTracker*
   GetOrCreatePendingAnimationTracker() override;
 
   virtual void SuppressEventHandling(uint32_t aIncrease) override;
--- a/dom/base/nsGenericDOMDataNode.h
+++ b/dom/base/nsGenericDOMDataNode.h
@@ -143,17 +143,17 @@ public:
   // Need to implement this here too to avoid hiding.
   nsresult SetText(const nsAString& aStr, bool aNotify)
   {
     return SetText(aStr.BeginReading(), aStr.Length(), aNotify);
   }
   virtual nsresult AppendText(const char16_t* aBuffer, uint32_t aLength,
                               bool aNotify) override;
   virtual bool TextIsOnlyWhitespace() override;
-  virtual bool ThreadSafeTextIsOnlyWhitespace() const final override;
+  bool ThreadSafeTextIsOnlyWhitespace() const final;
   virtual bool HasTextForTranslation() override;
   virtual void AppendTextTo(nsAString& aResult) override;
   MOZ_MUST_USE
   virtual bool AppendTextTo(nsAString& aResult,
                             const mozilla::fallible_t&) override;
   virtual void SaveSubtreeState() override;
 
 #ifdef DEBUG
--- a/dom/base/nsGlobalWindowOuter.h
+++ b/dom/base/nsGlobalWindowOuter.h
@@ -343,20 +343,20 @@ public:
   // Outer windows only.
   virtual bool DispatchCustomEvent(const nsAString& aEventName) override;
   bool DispatchResizeEvent(const mozilla::CSSIntSize& aSize);
 
   // For accessing protected field mFullScreen
   friend class FullscreenTransitionTask;
 
   // Outer windows only.
-  virtual nsresult SetFullscreenInternal(
-    FullscreenReason aReason, bool aIsFullscreen) override final;
-  virtual void FullscreenWillChange(bool aIsFullscreen) override final;
-  virtual void FinishFullscreenChange(bool aIsFullscreen) override final;
+  nsresult SetFullscreenInternal(
+    FullscreenReason aReason, bool aIsFullscreen) final;
+  void FullscreenWillChange(bool aIsFullscreen) final;
+  void FinishFullscreenChange(bool aIsFullscreen) final;
   bool SetWidgetFullscreen(FullscreenReason aReason, bool aIsFullscreen,
                            nsIWidget* aWidget, nsIScreen* aScreen);
   bool FullScreen() const;
 
   using EventTarget::EventListenerAdded;
   virtual void EventListenerAdded(nsAtom* aType) override;
   using EventTarget::EventListenerRemoved;
   virtual void EventListenerRemoved(nsAtom* aType) override;
--- a/dom/base/nsRange.h
+++ b/dom/base/nsRange.h
@@ -367,17 +367,17 @@ public:
   void SetStartAfter(nsINode& aNode, ErrorResult& aErr);
   void SetStartBefore(nsINode& aNode, ErrorResult& aErr);
 
   static void GetInnerTextNoFlush(mozilla::dom::DOMString& aValue,
                                   mozilla::ErrorResult& aError,
                                   nsIContent* aContainer);
 
   nsINode* GetParentObject() const { return mOwner; }
-  virtual JSObject* WrapObject(JSContext* cx, JS::Handle<JSObject*> aGivenProto) override final;
+  JSObject* WrapObject(JSContext* cx, JS::Handle<JSObject*> aGivenProto) final;
   DocGroup* GetDocGroup() const;
 
 private:
   // no copy's or assigns
   nsRange(const nsRange&);
   nsRange& operator=(const nsRange&);
 
   /**
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -7801,20 +7801,17 @@ class CGPerSignatureCall(CGThing):
         # since GlobalObject already contains the context.
         needsCx = needCx(returnType, arguments, self.extendedAttributes,
                          not descriptor.interface.isJSImplemented(), static)
         if needsCx:
             argsPre.append("cx")
 
         needsUnwrap = False
         argsPost = []
-        runConstructorInCallerCompartment = \
-            descriptor.interface.getExtendedAttribute(
-                'RunConstructorInCallerCompartment')
-        if isConstructor and not runConstructorInCallerCompartment:
+        if isConstructor:
             needsUnwrap = True
             needsUnwrappedVar = False
             unwrappedVar = "obj"
             if descriptor.interface.isJSImplemented():
                 # We need the desired proto in our constructor, because the
                 # constructor will actually construct our reflector.
                 argsPost.append("desiredProto")
         elif descriptor.interface.isJSImplemented():
--- a/dom/bindings/IterableIterator.h
+++ b/dom/bindings/IterableIterator.h
@@ -172,17 +172,17 @@ protected:
     aResult.set(&dictValue.toObject());
   }
 
 protected:
   virtual ~IterableIterator() {}
 
   // Since we're templated on a binding, we need to possibly CC it, but can't do
   // that through macros. So it happens here.
-  virtual void UnlinkHelper() final override
+  void UnlinkHelper() final
   {
     mIterableObj = nullptr;
   }
 
   virtual void TraverseHelper(nsCycleCollectionTraversalCallback& cb) override
   {
     IterableIterator<T>* tmp = this;
     NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mIterableObj);
--- a/dom/bindings/parser/WebIDL.py
+++ b/dom/bindings/parser/WebIDL.py
@@ -1738,17 +1738,16 @@ class IDLInterface(IDLInterfaceOrNamespa
                     member.addExtendedAttributes([attr])
             elif (identifier == "NeedResolve" or
                   identifier == "OverrideBuiltins" or
                   identifier == "ChromeOnly" or
                   identifier == "Unforgeable" or
                   identifier == "LegacyEventInit" or
                   identifier == "ProbablyShortLivingWrapper" or
                   identifier == "LegacyUnenumerableNamedProperties" or
-                  identifier == "RunConstructorInCallerCompartment" or
                   identifier == "NonOrdinaryGetPrototypeOf"):
                 # Known extended attributes that do not take values
                 if not attr.noArguments():
                     raise WebIDLError("[%s] must take no arguments" % identifier,
                                       [attr.location])
             elif identifier == "Exposed":
                 convertExposedAttrToGlobalNameSet(attr,
                                                   self._exposureGlobalNames)
--- a/dom/crypto/WebCryptoTask.h
+++ b/dom/crypto/WebCryptoTask.h
@@ -174,23 +174,23 @@ protected:
   virtual nsresult BeforeCrypto() { return NS_OK; }
   virtual nsresult DoCrypto() { return NS_OK; }
   virtual nsresult AfterCrypto() { return NS_OK; }
   virtual void Resolve() {}
   virtual void Cleanup() {}
 
   void FailWithError(nsresult aRv);
 
-  virtual nsresult CalculateResult() final;
+  nsresult CalculateResult();
 
-  virtual void CallCallback(nsresult rv) final;
+  void CallCallback(nsresult rv);
 
 private:
-  NS_IMETHOD Run() override final;
-  nsresult Cancel() override final;
+  NS_IMETHOD Run() final;
+  nsresult Cancel() final;
 
   class InternalWorkerHolder;
 
   nsCOMPtr<nsISerialEventTarget> mOriginalEventTarget;
   RefPtr<InternalWorkerHolder> mWorkerHolder;
   nsresult mRv;
 };
 
--- a/dom/events/Event.h
+++ b/dom/events/Event.h
@@ -88,17 +88,17 @@ public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Event)
 
   nsIGlobalObject* GetParentObject()
   {
     return mOwner;
   }
 
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override final;
+  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;
 
   virtual JSObject* WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto);
 
 #define GENERATED_EVENT(EventClass_) \
   virtual EventClass_* As##EventClass_()  \
   {                                       \
     return nullptr;                       \
   }
--- a/dom/html/HTMLAnchorElement.h
+++ b/dom/html/HTMLAnchorElement.h
@@ -227,17 +227,17 @@ public:
     SetHTMLAttr(nsGkAtoms::shape, aValue, rv);
   }
   void Stringify(nsAString& aResult)
   {
     GetHref(aResult);
   }
   void ToString(nsAString& aSource);
 
-  virtual void NodeInfoChanged(nsIDocument* aOldDoc) final override
+  void NodeInfoChanged(nsIDocument* aOldDoc) final
   {
     ClearHasPendingLinkUpdate();
     nsGenericHTMLElement::NodeInfoChanged(aOldDoc);
   }
 
   static DOMTokenListSupportedToken sSupportedRelValues[];
 
 protected:
--- a/dom/html/HTMLAreaElement.h
+++ b/dom/html/HTMLAreaElement.h
@@ -183,17 +183,17 @@ public:
   }
 
   void ToString(nsAString& aSource);
   void Stringify(nsAString& aResult)
   {
     GetHref(aResult);
   }
 
-  virtual void NodeInfoChanged(nsIDocument* aOldDoc) final override
+  void NodeInfoChanged(nsIDocument* aOldDoc) final
   {
     ClearHasPendingLinkUpdate();
     nsGenericHTMLElement::NodeInfoChanged(aOldDoc);
   }
 
 protected:
   virtual ~HTMLAreaElement();
 
--- a/dom/html/HTMLLinkElement.h
+++ b/dom/html/HTMLLinkElement.h
@@ -192,17 +192,17 @@ public:
   }
   mozilla::net::ReferrerPolicy GetLinkReferrerPolicy() override
   {
     return GetReferrerPolicyAsEnum();
   }
 
   virtual CORSMode GetCORSMode() const override;
 
-  virtual void NodeInfoChanged(nsIDocument* aOldDoc) final override
+  void NodeInfoChanged(nsIDocument* aOldDoc) final
   {
     ClearHasPendingLinkUpdate();
     nsGenericHTMLElement::NodeInfoChanged(aOldDoc);
   }
 
 protected:
   virtual ~HTMLLinkElement();
 
--- a/dom/html/HTMLMediaElement.h
+++ b/dom/html/HTMLMediaElement.h
@@ -164,78 +164,78 @@ public:
                                int32_t *aTabIndex) override;
   virtual int32_t TabIndexDefault() override;
 
   // Called by the video decoder object, on the main thread,
   // when it has read the metadata containing video dimensions,
   // etc.
   virtual void MetadataLoaded(
     const MediaInfo* aInfo,
-    UniquePtr<const MetadataTags> aTags) final override;
+    UniquePtr<const MetadataTags> aTags) final;
 
   // Called by the decoder object, on the main thread,
   // when it has read the first frame of the video or audio.
-  virtual void FirstFrameLoaded() final override;
+  void FirstFrameLoaded() final;
 
   // Called by the video decoder object, on the main thread,
   // when the resource has a network error during loading.
-  virtual void NetworkError(const MediaResult& aError) final override;
+  void NetworkError(const MediaResult& aError) final;
 
   // Called by the video decoder object, on the main thread, when the
   // resource has a decode error during metadata loading or decoding.
-  virtual void DecodeError(const MediaResult& aError) final override;
+  void DecodeError(const MediaResult& aError) final;
 
   // Called by the decoder object, on the main thread, when the
   // resource has a decode issue during metadata loading or decoding, but can
   // continue decoding.
-  virtual void DecodeWarning(const MediaResult& aError) final override;
+  void DecodeWarning(const MediaResult& aError) final;
 
   // Return true if error attribute is not null.
-  virtual bool HasError() const final override;
+  bool HasError() const final;
 
   // Called by the video decoder object, on the main thread, when the
   // resource load has been cancelled.
-  virtual void LoadAborted() final override;
+  void LoadAborted() final;
 
   // Called by the video decoder object, on the main thread,
   // when the video playback has ended.
-  virtual void PlaybackEnded() final override;
+  void PlaybackEnded() final;
 
   // Called by the video decoder object, on the main thread,
   // when the resource has started seeking.
-  virtual void SeekStarted() final override;
+  void SeekStarted() final;
 
   // Called by the video decoder object, on the main thread,
   // when the resource has completed seeking.
-  virtual void SeekCompleted() final override;
+  void SeekCompleted() final;
 
   // Called by the media stream, on the main thread, when the download
   // has been suspended by the cache or because the element itself
   // asked the decoder to suspend the download.
-  virtual void DownloadSuspended() final override;
+  void DownloadSuspended() final;
 
   // Called by the media stream, on the main thread, when the download
   // has been resumed by the cache or because the element itself
   // asked the decoder to resumed the download.
   void DownloadResumed();
 
   // Called to indicate the download is progressing.
-  virtual void DownloadProgressed() final override;
+  void DownloadProgressed() final;
 
   // Called by the media decoder to indicate whether the media cache has
   // suspended the channel.
-  virtual void NotifySuspendedByCache(bool aSuspendedByCache) final override;
+  void NotifySuspendedByCache(bool aSuspendedByCache) final;
 
   bool IsActive() const;
 
   bool IsHidden() const;
 
   // Called by the media decoder and the video frame to get the
   // ImageContainer containing the video data.
-  virtual VideoFrameContainer* GetVideoFrameContainer() final override;
+  VideoFrameContainer* GetVideoFrameContainer() final;
   layers::ImageContainer* GetImageContainer();
 
   /**
    * Call this to reevaluate whether we should start/stop due to our owner
    * document being active, inactive, visible or hidden.
    */
   void NotifyOwnerDocumentActivityChanged();
 
@@ -246,17 +246,17 @@ public:
 
   // Called after the MediaStream we're playing rendered a frame to aContainer
   // with a different principalHandle than the previous frame.
   void PrincipalHandleChangedForVideoFrameContainer(
     VideoFrameContainer* aContainer,
     const PrincipalHandle& aNewPrincipalHandle) override;
 
   // Dispatch events
-  virtual void DispatchAsyncEvent(const nsAString& aName) final override;
+  void DispatchAsyncEvent(const nsAString& aName) final;
 
   // Triggers a recomputation of readyState.
   void UpdateReadyState() override { UpdateReadyStateInternal(); }
 
   // Dispatch events that were raised while in the bfcache
   nsresult DispatchPendingMediaEvents();
 
   // Return true if we can activate autoplay assuming enough data has arrived.
@@ -291,17 +291,17 @@ public:
   // Principal of the currently playing video resource. Anything accessing the
   // image container of this element must have a principal that subsumes this
   // principal. If there are no live video tracks but content has been rendered
   // to the image container, we return the last video principal we had. Should
   // the image container be empty with no live video tracks, we return nullptr.
   already_AddRefed<nsIPrincipal> GetCurrentVideoPrincipal();
 
   // called to notify that the principal of the decoder's media resource has changed.
-  void NotifyDecoderPrincipalChanged() final override;
+  void NotifyDecoderPrincipalChanged() final;
 
   void GetEMEInfo(nsString& aEMEInfo);
 
   // An interface for observing principal changes on the media elements
   // MediaDecoder. This will also be notified if the active CORSMode changes.
   class DecoderPrincipalChangeObserver
   {
   public:
@@ -422,17 +422,17 @@ public:
   void RunInStableState(nsIRunnable* aRunnable);
 
   /**
    * Fires a timeupdate event. If aPeriodic is true, the event will only
    * be fired if we've not fired a timeupdate event (for any reason) in the
    * last 250ms, as required by the spec when the current time is periodically
    * increasing during playback.
    */
-  virtual void FireTimeUpdate(bool aPeriodic) final override;
+  void FireTimeUpdate(bool aPeriodic) final;
 
   /**
    * This will return null if mSrcStream is null, or if mSrcStream is not
    * null but its GetPlaybackStream() returns null --- which can happen during
    * cycle collection unlinking!
    */
   MediaStream* GetSrcMediaStream() const;
 
@@ -467,21 +467,21 @@ public:
     SetOrRemoveNullableStringAttr(nsGkAtoms::crossorigin, aCrossOrigin, aError);
   }
 
   uint16_t NetworkState() const
   {
     return mNetworkState;
   }
 
-  void NotifyXPCOMShutdown() final override;
+  void NotifyXPCOMShutdown() final;
 
   // Called by media decoder when the audible state changed or when input is
   // a media stream.
-  virtual void SetAudibleState(bool aAudible) final override;
+  void SetAudibleState(bool aAudible) final;
 
   // Notify agent when the MediaElement changes its audible state.
   void NotifyAudioPlaybackChanged(AudibleChangedReasons aReason);
 
   void GetPreload(nsAString& aValue)
   {
     GetEnumAttr(nsGkAtoms::preload, nullptr, aValue);
   }
@@ -782,17 +782,17 @@ public:
 
   // These are used for testing only
   float ComputedVolume() const;
   bool ComputedMuted() const;
   nsSuspendedTypes ComputedSuspended() const;
 
   void SetMediaInfo(const MediaInfo& aInfo);
 
-  virtual AbstractThread* AbstractMainThread() const final override;
+  AbstractThread* AbstractMainThread() const final;
 
   // Telemetry: to record the usage of a {visible / invisible} video element as
   // the source of {drawImage(), createPattern(), createImageBitmap() and
   // captureStream()} APIs.
   enum class CallerAPI {
     DRAW_IMAGE,
     CREATE_PATTERN,
     CREATE_IMAGEBITMAP,
@@ -1236,23 +1236,23 @@ protected:
    * Suspend (if aPauseForInactiveDocument) or resume element playback and
    * resource download.  If aSuspendEvents is true, event delivery is
    * suspended (and events queued) until the element is resumed.
    */
   void SuspendOrResumeElement(bool aPauseElement, bool aSuspendEvents);
 
   // Get the HTMLMediaElement object if the decoder is being used from an
   // HTML media element, and null otherwise.
-  virtual HTMLMediaElement* GetMediaElement() final override
+  HTMLMediaElement* GetMediaElement() final
   {
     return this;
   }
 
   // Return true if decoding should be paused
-  virtual bool GetPaused() final override
+  bool GetPaused() final
   {
     return Paused();
   }
 
   /**
    * Video has been playing while hidden and, if feature was enabled, would
    * trigger suspending decoder.
    * Used to track hidden-video-decode-suspend telemetry.
--- a/dom/html/HTMLTitleElement.h
+++ b/dom/html/HTMLTitleElement.h
@@ -48,18 +48,17 @@ public:
   virtual void UnbindFromTree(bool aDeep = true,
                               bool aNullParent = true) override;
 
   virtual void DoneAddingChildren(bool aHaveNotified) override;
 
 protected:
   virtual ~HTMLTitleElement();
 
-  virtual JSObject* WrapNode(JSContext* cx, JS::Handle<JSObject*> aGivenProto)
-    override final;
+  JSObject* WrapNode(JSContext* cx, JS::Handle<JSObject*> aGivenProto) final;
 
 private:
   void SendTitleChangeEvent(bool aBound);
 };
 
 } // namespace dom
 } // namespace mozilla
 
--- a/dom/indexedDB/ActorsParent.cpp
+++ b/dom/indexedDB/ActorsParent.cpp
@@ -7549,17 +7549,17 @@ protected:
   SendResults() = 0;
 
   // We need to declare refcounting unconditionally, because
   // OpenDirectoryListener has pure-virtual refcounting.
   NS_DECL_ISUPPORTS_INHERITED
 
   // Common nsIRunnable implementation that subclasses may not override.
   NS_IMETHOD
-  Run() final override;
+  Run() final;
 
   // OpenDirectoryListener overrides.
   void
   DirectoryLockAcquired(DirectoryLock* aLock) override;
 
   void
   DirectoryLockFailed() override;
 
@@ -7892,17 +7892,17 @@ protected:
   virtual nsresult
   DoDatabaseWork() = 0;
 
   virtual void
   SendResults() = 0;
 
   // Common nsIRunnable implementation that subclasses may not override.
   NS_IMETHOD
-  Run() final override;
+  Run() final;
 
   // IPDL methods.
   void
   ActorDestroy(ActorDestroyReason aWhy) override;
 };
 
 class CreateFileOp final
   : public DatabaseOp
--- a/dom/media/ChannelMediaDecoder.h
+++ b/dom/media/ChannelMediaDecoder.h
@@ -113,17 +113,17 @@ private:
   // Called on the main thread only. aStatus is the result from OnStopRequest.
   void NotifyDownloadEnded(nsresult aStatus);
 
   // Called by the MediaResource to keep track of the number of bytes read
   // from the resource. Called on the main by an event runner dispatched
   // by the MediaResource read functions.
   void NotifyBytesConsumed(int64_t aBytes, int64_t aOffset);
 
-  bool CanPlayThroughImpl() override final;
+  bool CanPlayThroughImpl() final;
 
   struct PlaybackRateInfo
   {
     uint32_t mRate; // Estimate of the current playback rate (bytes/second).
     bool mReliable; // True if mRate is a reliable estimate.
   };
   // The actual playback rate computation.
   static PlaybackRateInfo ComputePlaybackRate(
--- a/dom/media/GraphDriver.h
+++ b/dom/media/GraphDriver.h
@@ -582,17 +582,17 @@ public:
     }
     return threadPool->Dispatch(this, aFlags);
   }
 
 protected:
   virtual ~AsyncCubebTask();
 
 private:
-  NS_IMETHOD Run() override final;
+  NS_IMETHOD Run() final;
 
   RefPtr<AudioCallbackDriver> mDriver;
   AsyncCubebOperation mOperation;
   RefPtr<MediaStreamGraphImpl> mShutdownGrip;
 };
 
 } // namespace mozilla
 
--- a/dom/media/MediaDevices.cpp
+++ b/dom/media/MediaDevices.cpp
@@ -26,17 +26,17 @@ class FuzzTimerCallBack final : public n
 {
   ~FuzzTimerCallBack() {}
 
 public:
   explicit FuzzTimerCallBack(MediaDevices* aMediaDevices) : mMediaDevices(aMediaDevices) {}
 
   NS_DECL_ISUPPORTS
 
-  NS_IMETHOD Notify(nsITimer* aTimer) final override
+  NS_IMETHOD Notify(nsITimer* aTimer) final
   {
     mMediaDevices->DispatchTrustedEvent(NS_LITERAL_STRING("devicechange"));
     return NS_OK;
   }
 
   NS_IMETHOD GetName(nsACString& aName) override
   {
     aName.AssignLiteral("FuzzTimerCallBack");
--- a/dom/media/encoder/VP8TrackEncoder.h
+++ b/dom/media/encoder/VP8TrackEncoder.h
@@ -27,23 +27,23 @@ class VP8TrackEncoder : public VideoTrac
     ENCODE_I_FRAME, // The next frame will be encoded as I-Frame.
     SKIP_FRAME, // Skip the next frame.
   };
 
 public:
   VP8TrackEncoder(TrackRate aTrackRate, FrameDroppingMode aFrameDroppingMode);
   virtual ~VP8TrackEncoder();
 
-  already_AddRefed<TrackMetadataBase> GetMetadata() final override;
+  already_AddRefed<TrackMetadataBase> GetMetadata() final;
 
-  nsresult GetEncodedTrack(EncodedFrameContainer& aData) final override;
+  nsresult GetEncodedTrack(EncodedFrameContainer& aData) final;
 
 protected:
   nsresult Init(int32_t aWidth, int32_t aHeight,
-                int32_t aDisplayWidth, int32_t aDisplayHeight) final override;
+                int32_t aDisplayWidth, int32_t aDisplayHeight) final;
 
 private:
   // Get the EncodeOperation for next target frame.
   EncodeOperation GetNextEncodeOperation(TimeDuration aTimeElapsed,
                                          StreamTime aProcessedDuration);
 
   // Get the encoded data from encoder to aData.
   // Return value: false if the vpx_codec_get_cx_data returns null
--- a/dom/media/hls/HLSDecoder.h
+++ b/dom/media/hls/HLSDecoder.h
@@ -44,17 +44,17 @@ public:
   // Called as data arrives on the underlying HLS player. Main thread only.
   void NotifyDataArrived();
 
 private:
   friend class HLSResourceCallbacksSupport;
 
   MediaDecoderStateMachine* CreateStateMachine();
 
-  bool CanPlayThroughImpl() override final
+  bool CanPlayThroughImpl() final
   {
     // TODO: We don't know how to estimate 'canplaythrough' for this decoder.
     // For now we just return true for 'autoplay' can work.
     return true;
   }
 
   nsCOMPtr<nsIChannel> mChannel;
   nsCOMPtr<nsIURI> mURI;
--- a/dom/media/webaudio/AudioBufferSourceNode.h
+++ b/dom/media/webaudio/AudioBufferSourceNode.h
@@ -21,17 +21,17 @@ class AudioBufferSourceNode final : publ
 {
 public:
   static already_AddRefed<AudioBufferSourceNode>
   Create(JSContext* aCx, AudioContext& aAudioContext,
          const AudioBufferSourceOptions& aOptions, ErrorResult& aRv);
 
   void DestroyMediaStream() override;
 
-  uint16_t NumberOfInputs() const final override
+  uint16_t NumberOfInputs() const final
   {
     return 0;
   }
   AudioBufferSourceNode* AsAudioBufferSourceNode() override
   {
     return this;
   }
   NS_DECL_ISUPPORTS_INHERITED
--- a/dom/media/webaudio/AudioDestinationNode.h
+++ b/dom/media/webaudio/AudioDestinationNode.h
@@ -32,17 +32,17 @@ public:
   void DestroyMediaStream() override;
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(AudioDestinationNode, AudioNode)
   NS_DECL_NSIAUDIOCHANNELAGENTCALLBACK
 
   JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
-  uint16_t NumberOfOutputs() const final override
+  uint16_t NumberOfOutputs() const final
   {
     return 0;
   }
 
   uint32_t MaxChannelCount() const;
   void SetChannelCount(uint32_t aChannelCount,
                        ErrorResult& aRv) override;
 
--- a/dom/media/webaudio/ConstantSourceNode.h
+++ b/dom/media/webaudio/ConstantSourceNode.h
@@ -30,17 +30,17 @@ public:
   static already_AddRefed<ConstantSourceNode>
   Constructor(const GlobalObject& aGlobal,
               AudioContext& aContext,
               const ConstantSourceOptions& aOptions,
               ErrorResult& aRv);
 
   void DestroyMediaStream() override;
 
-  uint16_t NumberOfInputs() const final override
+  uint16_t NumberOfInputs() const final
   {
     return 0;
   }
 
   AudioParam* Offset() const
   {
     return mOffset;
   }
--- a/dom/media/webaudio/MediaStreamAudioDestinationNode.h
+++ b/dom/media/webaudio/MediaStreamAudioDestinationNode.h
@@ -29,17 +29,17 @@ public:
   Constructor(const GlobalObject& aGlobal, AudioContext& aAudioContext,
               const AudioNodeOptions& aOptions, ErrorResult& aRv)
   {
     return Create(aAudioContext, aOptions, aRv);
   }
 
   JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
-  uint16_t NumberOfOutputs() const final override
+  uint16_t NumberOfOutputs() const final
   {
     return 0;
   }
 
   void DestroyMediaStream() override;
 
   DOMMediaStream* DOMStream() const
   {
--- a/dom/media/webaudio/OscillatorNode.h
+++ b/dom/media/webaudio/OscillatorNode.h
@@ -35,17 +35,17 @@ public:
   {
     return Create(aAudioContext, aOptions, aRv);
   }
 
   JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   void DestroyMediaStream() override;
 
-  uint16_t NumberOfInputs() const final override
+  uint16_t NumberOfInputs() const final
   {
     return 0;
   }
 
   OscillatorType Type() const
   {
     return mType;
   }
--- a/dom/notification/Notification.cpp
+++ b/dom/notification/Notification.cpp
@@ -87,17 +87,17 @@ public:
                     const nsAString& aTitle,
                     const nsAString& aDir,
                     const nsAString& aLang,
                     const nsAString& aBody,
                     const nsAString& aTag,
                     const nsAString& aIcon,
                     const nsAString& aData,
                     const nsAString& aBehavior,
-                    const nsAString& aServiceWorkerRegistrationScope) final override
+                    const nsAString& aServiceWorkerRegistrationScope) final
   {
     AssertIsOnMainThread();
     MOZ_ASSERT(!aID.IsEmpty());
 
     // Skip scopes that don't match when called from getNotifications().
     if (!mScope.IsEmpty() && !mScope.Equals(aServiceWorkerRegistrationScope)) {
       return NS_OK;
     }
@@ -140,17 +140,17 @@ public:
       mWindow(aWindow),
       mPromise(aPromise)
   {
     AssertIsOnMainThread();
     MOZ_ASSERT(aWindow);
     MOZ_ASSERT(aPromise);
   }
 
-  NS_IMETHOD Done() final override
+  NS_IMETHOD Done() final
   {
     ErrorResult result;
     AutoTArray<RefPtr<Notification>, 5> notifications;
 
     for (uint32_t i = 0; i < mStrings.Length(); ++i) {
       RefPtr<Notification> n =
         Notification::ConstructFromFields(mWindow,
                                           mStrings[i].mID,
@@ -2082,17 +2082,17 @@ public:
 
   WorkerGetCallback(PromiseWorkerProxy* aProxy, const nsAString& aScope)
     : ScopeCheckingGetCallback(aScope), mPromiseProxy(aProxy)
   {
     AssertIsOnMainThread();
     MOZ_ASSERT(aProxy);
   }
 
-  NS_IMETHOD Done() final override
+  NS_IMETHOD Done() final
   {
     AssertIsOnMainThread();
     MOZ_ASSERT(mPromiseProxy, "Was Done() called twice?");
 
     RefPtr<PromiseWorkerProxy> proxy = mPromiseProxy.forget();
     MutexAutoLock lock(proxy->Lock());
     if (proxy->CleanedUp()) {
       return NS_OK;
--- a/dom/svg/SVGAElement.h
+++ b/dom/svg/SVGAElement.h
@@ -66,17 +66,17 @@ public:
   virtual bool ElementHasHref() const override;
 
   // WebIDL
   already_AddRefed<SVGAnimatedString> Href();
   already_AddRefed<SVGAnimatedString> Target();
   void GetDownload(nsAString & aDownload);
   void SetDownload(const nsAString & aDownload, ErrorResult& rv);
 
-  virtual void NodeInfoChanged(nsIDocument* aOldDoc) final override
+  void NodeInfoChanged(nsIDocument* aOldDoc) final
   {
     ClearHasPendingLinkUpdate();
     SVGAElementBase::NodeInfoChanged(aOldDoc);
   }
 
 protected:
   virtual ~SVGAElement();
 
--- a/dom/svg/SVGAnimatedEnumeration.h
+++ b/dom/svg/SVGAnimatedEnumeration.h
@@ -21,18 +21,18 @@ public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SVGAnimatedEnumeration)
 
   nsSVGElement* GetParentObject() const
   {
     return mSVGElement;
   }
 
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
-    override final;
+  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
+    final;
 
   virtual uint16_t BaseVal() = 0;
   virtual void SetBaseVal(uint16_t aBaseVal, ErrorResult& aRv) = 0;
   virtual uint16_t AnimVal() = 0;
 
 protected:
   explicit SVGAnimatedEnumeration(nsSVGElement* aSVGElement)
     : mSVGElement(aSVGElement)
--- a/dom/svg/SVGAnimatedInteger.h
+++ b/dom/svg/SVGAnimatedInteger.h
@@ -21,18 +21,18 @@ public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SVGAnimatedInteger)
 
   nsSVGElement* GetParentObject() const
   {
     return mSVGElement;
   }
 
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
-    override final;
+  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
+    final;
 
   virtual int32_t BaseVal() = 0;
   virtual void SetBaseVal(int32_t aBaseVal) = 0;
   virtual int32_t AnimVal() = 0;
 
 protected:
   explicit SVGAnimatedInteger(nsSVGElement* aSVGElement)
     : mSVGElement(aSVGElement)
--- a/dom/svg/SVGAnimatedNumber.h
+++ b/dom/svg/SVGAnimatedNumber.h
@@ -22,18 +22,18 @@ public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SVGAnimatedNumber)
 
   nsSVGElement* GetParentObject() const
   {
     return mSVGElement;
   }
 
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
-    override final;
+  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
+    final;
 
   virtual float BaseVal() = 0;
   virtual void SetBaseVal(float aBaseVal) = 0;
   virtual float AnimVal() = 0;
 
 protected:
   explicit SVGAnimatedNumber(nsSVGElement* aSVGElement)
     : mSVGElement(aSVGElement)
--- a/dom/svg/SVGGeometryElement.h
+++ b/dom/svg/SVGGeometryElement.h
@@ -56,17 +56,17 @@ public:
                                 const nsAttrValue* aOldValue,
                                 nsIPrincipal* aSubjectPrincipal,
                                 bool aNotify) override;
 
   /**
    * Causes this element to discard any Path object that GetOrBuildPath may
    * have cached.
    */
-  virtual void ClearAnyCachedPath() override final {
+  void ClearAnyCachedPath() final {
     mCachedPath = nullptr;
   }
 
   virtual bool AttributeDefinesGeometry(const nsAtom *aName);
 
   /**
    * Returns true if this element's geometry depends on the width or height of its
    * coordinate context (typically the viewport established by its nearest <svg>
--- a/dom/svg/SVGRect.h
+++ b/dom/svg/SVGRect.h
@@ -22,52 +22,52 @@ class SVGRect final : public SVGIRect
 public:
   explicit SVGRect(nsIContent* aParent, float x=0.0f, float y=0.0f, float w=0.0f,
                    float h=0.0f);
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SVGRect)
 
   // WebIDL
-  virtual float X() const override final
+  float X() const final
   {
     return mX;
   }
 
-  virtual void SetX(float aX, ErrorResult& aRv) final override
+  void SetX(float aX, ErrorResult& aRv) final
   {
     mX = aX;
   }
 
-  virtual float Y() const override final
+  float Y() const final
   {
     return mY;
   }
 
-  virtual void SetY(float aY, ErrorResult& aRv) final override
+  void SetY(float aY, ErrorResult& aRv) final
   {
     mY = aY;
   }
 
-  virtual float Width() const override final
+  float Width() const final
   {
     return mWidth;
   }
 
-  virtual void SetWidth(float aWidth, ErrorResult& aRv) final override
+  void SetWidth(float aWidth, ErrorResult& aRv) final
   {
     mWidth = aWidth;
   }
 
-  virtual float Height() const override final
+  float Height() const final
   {
     return mHeight;
   }
 
-  virtual void SetHeight(float aHeight, ErrorResult& aRv) final override
+  void SetHeight(float aHeight, ErrorResult& aRv) final
   {
     mHeight = aHeight;
   }
 
   virtual nsIContent* GetParentObject() const override
   {
     return mParent;
   }
--- a/dom/svg/nsSVGElement.h
+++ b/dom/svg/nsSVGElement.h
@@ -311,17 +311,17 @@ public:
   {
     if (!mClassAttribute.IsAnimated()) {
       return nullptr;
     }
     return mClassAnimAttr;
   }
 
   virtual void ClearAnyCachedPath() {}
-  virtual nsIDOMNode* AsDOMNode() final override { return this; }
+  nsIDOMNode* AsDOMNode() final { return this; }
   virtual bool IsTransformable() { return false; }
 
   // WebIDL
   mozilla::dom::SVGSVGElement* GetOwnerSVGElement();
   nsSVGElement* GetViewportElement();
   already_AddRefed<mozilla::dom::SVGAnimatedString> ClassName();
 
   virtual bool IsSVGFocusable(bool* aIsFocusable, int32_t* aTabIndex);
@@ -333,19 +333,19 @@ public:
 protected:
   virtual JSObject* WrapNode(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override;
 
   // We define BeforeSetAttr here and mark it final to ensure it is NOT used
   // by SVG elements.
   // This is because we're not currently passing the correct value for aValue to
   // BeforeSetAttr since it would involve allocating extra SVG value types.
   // See the comment in nsSVGElement::WillChangeValue.
-  virtual nsresult BeforeSetAttr(int32_t aNamespaceID, nsAtom* aName,
-                                 const nsAttrValueOrString* aValue,
-                                 bool aNotify) override final;
+  nsresult BeforeSetAttr(int32_t aNamespaceID, nsAtom* aName,
+                         const nsAttrValueOrString* aValue,
+                         bool aNotify) final;
   virtual nsresult AfterSetAttr(int32_t aNamespaceID, nsAtom* aName,
                                 const nsAttrValue* aValue,
                                 const nsAttrValue* aOldValue,
                                 nsIPrincipal* aSubjectPrincipal,
                                 bool aNotify) override;
   virtual bool ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
                                 const nsAString& aValue,
                                 nsIPrincipal* aMaybeScriptedPrincipal,
--- a/dom/svg/nsSVGViewBox.h
+++ b/dom/svg/nsSVGViewBox.h
@@ -110,40 +110,40 @@ public:
       : mozilla::dom::SVGIRect()
       , mVal(aVal)
       , mSVGElement(aSVGElement)
     {}
 
     nsSVGViewBox* mVal; // kept alive because it belongs to content
     RefPtr<nsSVGElement> mSVGElement;
 
-    float X() const override final
+    float X() const final
     {
       return mVal->GetBaseValue().x;
     }
 
-    float Y() const override final
+    float Y() const final
     {
       return mVal->GetBaseValue().y;
     }
 
-    float Width() const override final
+    float Width() const final
     {
       return mVal->GetBaseValue().width;
     }
 
-    float Height() const override final
+    float Height() const final
     {
       return mVal->GetBaseValue().height;
     }
 
-    void SetX(float aX, mozilla::ErrorResult& aRv) final override;
-    void SetY(float aY, mozilla::ErrorResult& aRv) final override;
-    void SetWidth(float aWidth, mozilla::ErrorResult& aRv) final override;
-    void SetHeight(float aHeight, mozilla::ErrorResult& aRv) final override;
+    void SetX(float aX, mozilla::ErrorResult& aRv) final;
+    void SetY(float aY, mozilla::ErrorResult& aRv) final;
+    void SetWidth(float aWidth, mozilla::ErrorResult& aRv) final;
+    void SetHeight(float aHeight, mozilla::ErrorResult& aRv) final;
 
     virtual nsIContent* GetParentObject() const override
     {
       return mSVGElement;
     }
 
   private:
     virtual ~DOMBaseVal();
@@ -160,56 +160,56 @@ public:
       , mSVGElement(aSVGElement)
     {}
 
     nsSVGViewBox* mVal; // kept alive because it belongs to content
     RefPtr<nsSVGElement> mSVGElement;
 
     // Script may have modified animation parameters or timeline -- DOM getters
     // need to flush any resample requests to reflect these modifications.
-    float X() const override final
+    float X() const final
     {
       mSVGElement->FlushAnimations();
       return mVal->GetAnimValue().x;
     }
 
-    float Y() const override final
+    float Y() const final
     {
       mSVGElement->FlushAnimations();
       return mVal->GetAnimValue().y;
     }
 
-    float Width() const override final
+    float Width() const final
     {
       mSVGElement->FlushAnimations();
       return mVal->GetAnimValue().width;
     }
 
-    float Height() const override final
+    float Height() const final
     {
       mSVGElement->FlushAnimations();
       return mVal->GetAnimValue().height;
     }
 
-    void SetX(float aX, mozilla::ErrorResult& aRv) final override
+    void SetX(float aX, mozilla::ErrorResult& aRv) final
     {
       aRv.Throw(NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR);
     }
 
-    void SetY(float aY, mozilla::ErrorResult& aRv) final override
+    void SetY(float aY, mozilla::ErrorResult& aRv) final
     {
       aRv.Throw(NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR);
     }
 
-    void SetWidth(float aWidth, mozilla::ErrorResult& aRv) final override
+    void SetWidth(float aWidth, mozilla::ErrorResult& aRv) final
     {
       aRv.Throw(NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR);
     }
 
-    void SetHeight(float aHeight, mozilla::ErrorResult& aRv) final override
+    void SetHeight(float aHeight, mozilla::ErrorResult& aRv) final
     {
       aRv.Throw(NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR);
     }
 
     virtual nsIContent* GetParentObject() const override
     {
       return mSVGElement;
     }
--- a/dom/webidl/KeyframeEffect.webidl
+++ b/dom/webidl/KeyframeEffect.webidl
@@ -15,20 +15,17 @@ enum IterationCompositeOperation {
   "accumulate"
 };
 
 dictionary KeyframeEffectOptions : AnimationEffectTimingProperties {
   IterationCompositeOperation iterationComposite = "replace";
   CompositeOperation          composite = "replace";
 };
 
-// KeyframeEffectReadOnly should run in the caller's compartment to do custom
-// processing on the `keyframes` object.
 [Func="nsDocument::IsWebAnimationsEnabled",
- RunConstructorInCallerCompartment,
  Constructor ((Element or CSSPseudoElement)? target,
               object? keyframes,
               optional (unrestricted double or KeyframeEffectOptions) options),
  Constructor (KeyframeEffectReadOnly source)]
 interface KeyframeEffectReadOnly : AnimationEffectReadOnly {
   readonly attribute (Element or CSSPseudoElement)?  target;
   readonly attribute IterationCompositeOperation iterationComposite;
   readonly attribute CompositeOperation          composite;
@@ -52,20 +49,17 @@ dictionary AnimationPropertyDetails {
            DOMString                               warning;
   required sequence<AnimationPropertyValueDetails> values;
 };
 
 partial interface KeyframeEffectReadOnly {
   [ChromeOnly, Throws] sequence<AnimationPropertyDetails> getProperties();
 };
 
-// KeyframeEffect should run in the caller's compartment to do custom
-// processing on the `keyframes` object.
 [Func="nsDocument::IsWebAnimationsEnabled",
- RunConstructorInCallerCompartment,
  Constructor ((Element or CSSPseudoElement)? target,
               object? keyframes,
               optional (unrestricted double or KeyframeEffectOptions) options),
  Constructor (KeyframeEffectReadOnly source)]
 interface KeyframeEffect : KeyframeEffectReadOnly {
   inherit attribute (Element or CSSPseudoElement)? target;
   [NeedsCallerType]
   inherit attribute IterationCompositeOperation    iterationComposite;
--- a/dom/workers/WorkerRunnable.h
+++ b/dom/workers/WorkerRunnable.h
@@ -194,18 +194,18 @@ protected:
 
 private:
   virtual bool
   IsDebuggerRunnable() const override
   {
     return true;
   }
 
-  virtual bool
-  PreDispatch(WorkerPrivate* aWorkerPrivate) override final
+  bool
+  PreDispatch(WorkerPrivate* aWorkerPrivate) final
   {
     AssertIsOnMainThread();
 
     return true;
   }
 
   virtual void
   PostDispatch(WorkerPrivate* aWorkerPrivate,
@@ -477,30 +477,30 @@ public:
   nsresult
   Cancel() override;
 
 protected:
   virtual ~MainThreadStopSyncLoopRunnable()
   { }
 
 private:
-  virtual bool
-  PreDispatch(WorkerPrivate* aWorkerPrivate) override final
+  bool
+  PreDispatch(WorkerPrivate* aWorkerPrivate) final
   {
     AssertIsOnMainThread();
     return true;
   }
 
   virtual void
   PostDispatch(WorkerPrivate* aWorkerPrivate,
                bool aDispatchResult) override;
 
   virtual bool
   WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override;
 
-  virtual bool
-  DispatchInternal() override final;
+  bool
+  DispatchInternal() final;
 };
 
 } // dom namespace
 } // mozilla namespace
 
 #endif // mozilla_dom_workers_workerrunnable_h__
--- a/dom/xhr/XMLHttpRequestWorker.cpp
+++ b/dom/xhr/XMLHttpRequestWorker.cpp
@@ -529,21 +529,18 @@ public:
     mStatusResult(NS_OK), mResponseResult(NS_OK),
     mScopeObj(RootingCx(), aScopeObj)
   { }
 
 private:
   ~EventRunnable()
   { }
 
-  virtual bool
-  PreDispatch(WorkerPrivate* /* unused */) override final;
-
-  virtual bool
-  WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override;
+  bool PreDispatch(WorkerPrivate* /* unused */) final;
+  bool WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override;
 };
 
 class SyncTeardownRunnable final : public WorkerThreadProxySyncRunnable
 {
 public:
   SyncTeardownRunnable(WorkerPrivate* aWorkerPrivate, Proxy* aProxy)
   : WorkerThreadProxySyncRunnable(aWorkerPrivate, aProxy)
   { }
--- a/dom/xul/nsXULElement.h
+++ b/dom/xul/nsXULElement.h
@@ -376,17 +376,17 @@ public:
     {
     }
 #endif
 
     virtual bool PerformAccesskey(bool aKeyCausesActivation,
                                   bool aIsTrustedEvent) override;
     void ClickWithInputSource(uint16_t aInputSource, bool aIsTrustedEvent);
 
-    nsIContent* GetBindingParent() const final override
+    nsIContent* GetBindingParent() const final
     {
       return mBindingParent;
     }
 
     virtual bool IsNodeOfType(uint32_t aFlags) const override;
     virtual bool IsFocusableInternal(int32_t* aTabIndex, bool aWithMouse) override;
 
 #ifdef MOZ_OLD_STYLE
--- a/editor/composer/nsComposerCommands.h
+++ b/editor/composer/nsComposerCommands.h
@@ -85,21 +85,21 @@ protected:
 class nsStyleUpdatingCommand final : public nsBaseStateUpdatingCommand
 {
 public:
   explicit nsStyleUpdatingCommand(nsAtom* aTagName);
 
 protected:
 
   // get the current state (on or off) for this style or block format
-  virtual nsresult GetCurrentState(mozilla::HTMLEditor* aHTMLEditor,
-                                   nsICommandParams* aParams) override final;
+  nsresult GetCurrentState(mozilla::HTMLEditor* aHTMLEditor,
+                           nsICommandParams* aParams) final;
 
   // add/remove the style
-  virtual nsresult ToggleState(mozilla::HTMLEditor* aHTMLEditor) override final;
+  nsresult ToggleState(mozilla::HTMLEditor* aHTMLEditor) final;
 };
 
 
 class nsInsertTagCommand : public nsBaseComposerCommand
 {
 public:
   explicit nsInsertTagCommand(nsAtom* aTagName);
 
@@ -117,36 +117,36 @@ protected:
 class nsListCommand final : public nsBaseStateUpdatingCommand
 {
 public:
   explicit nsListCommand(nsAtom* aTagName);
 
 protected:
 
   // get the current state (on or off) for this style or block format
-  virtual nsresult GetCurrentState(mozilla::HTMLEditor* aHTMLEditor,
-                                   nsICommandParams* aParams) override final;
+  nsresult GetCurrentState(mozilla::HTMLEditor* aHTMLEditor,
+                           nsICommandParams* aParams) final;
 
   // add/remove the style
-  virtual nsresult ToggleState(mozilla::HTMLEditor* aHTMLEditor) override final;
+  nsresult ToggleState(mozilla::HTMLEditor* aHTMLEditor) final;
 };
 
 class nsListItemCommand final : public nsBaseStateUpdatingCommand
 {
 public:
   explicit nsListItemCommand(nsAtom* aTagName);
 
 protected:
 
   // get the current state (on or off) for this style or block format
-  virtual nsresult GetCurrentState(mozilla::HTMLEditor* aHTMLEditor,
-                                   nsICommandParams* aParams) override final;
+  nsresult GetCurrentState(mozilla::HTMLEditor* aHTMLEditor,
+                           nsICommandParams* aParams) final;
 
   // add/remove the style
-  virtual nsresult ToggleState(mozilla::HTMLEditor* aHTMLEditor) override final;
+  nsresult ToggleState(mozilla::HTMLEditor* aHTMLEditor) final;
 };
 
 // Base class for commands whose state consists of a string (e.g. para format)
 class nsMultiStateCommand : public nsBaseComposerCommand
 {
 public:
 
   nsMultiStateCommand();
@@ -167,117 +167,116 @@ protected:
 
 class nsParagraphStateCommand final : public nsMultiStateCommand
 {
 public:
                    nsParagraphStateCommand();
 
 protected:
 
-  virtual nsresult GetCurrentState(mozilla::HTMLEditor* aHTMLEditor,
-                                   nsICommandParams* aParams) override final;
-  virtual nsresult SetState(mozilla::HTMLEditor* aHTMLEditor,
-                            nsString& newState) override final;
+  nsresult GetCurrentState(mozilla::HTMLEditor* aHTMLEditor,
+                           nsICommandParams* aParams) final;
+  nsresult SetState(mozilla::HTMLEditor* aHTMLEditor,
+                    nsString& newState) final;
 };
 
 class nsFontFaceStateCommand final : public nsMultiStateCommand
 {
 public:
                    nsFontFaceStateCommand();
 
 protected:
 
-  virtual nsresult GetCurrentState(mozilla::HTMLEditor* aHTMLEditor,
-                                   nsICommandParams* aParams) override final;
-  virtual nsresult SetState(mozilla::HTMLEditor* aHTMLEditor,
-                            nsString& newState) override final;
+  nsresult GetCurrentState(mozilla::HTMLEditor* aHTMLEditor,
+                           nsICommandParams* aParams) final;
+  nsresult SetState(mozilla::HTMLEditor* aHTMLEditor,
+                    nsString& newState) final;
 };
 
 class nsFontSizeStateCommand final : public nsMultiStateCommand
 {
 public:
                    nsFontSizeStateCommand();
 
 protected:
 
-  virtual nsresult GetCurrentState(mozilla::HTMLEditor* aHTMLEditor,
-                                   nsICommandParams* aParams) override final;
-  virtual nsresult SetState(mozilla::HTMLEditor* aHTMLEditor,
-                            nsString& newState) override final;
+  nsresult GetCurrentState(mozilla::HTMLEditor* aHTMLEditor,
+                           nsICommandParams* aParams) final;
+  nsresult SetState(mozilla::HTMLEditor* aHTMLEditor,
+                    nsString& newState) final;
 };
 
 class nsHighlightColorStateCommand final : public nsMultiStateCommand
 {
 public:
                    nsHighlightColorStateCommand();
 
 protected:
 
   NS_IMETHOD IsCommandEnabled(const char* aCommandName,
                               nsISupports* aCommandRefCon,
-                              bool* _retval) override final;
-  virtual nsresult GetCurrentState(mozilla::HTMLEditor* aHTMLEditor,
-                                   nsICommandParams* aParams) override final;
-  virtual nsresult SetState(mozilla::HTMLEditor* aHTMLEditor,
-                            nsString& newState) override final;
-
+                              bool* _retval) final;
+  nsresult GetCurrentState(mozilla::HTMLEditor* aHTMLEditor,
+                           nsICommandParams* aParams) final;
+  nsresult SetState(mozilla::HTMLEditor* aHTMLEditor,
+                    nsString& newState) final;
 };
 
 class nsFontColorStateCommand final : public nsMultiStateCommand
 {
 public:
                    nsFontColorStateCommand();
 
 protected:
 
-  virtual nsresult GetCurrentState(mozilla::HTMLEditor* aHTMLEditor,
-                                   nsICommandParams* aParams) override final;
-  virtual nsresult SetState(mozilla::HTMLEditor* aHTMLEditor,
-                            nsString& newState) override final;
+  nsresult GetCurrentState(mozilla::HTMLEditor* aHTMLEditor,
+                           nsICommandParams* aParams) final;
+  nsresult SetState(mozilla::HTMLEditor* aHTMLEditor,
+                    nsString& newState) final;
 };
 
 class nsAlignCommand final : public nsMultiStateCommand
 {
 public:
                    nsAlignCommand();
 
 protected:
 
-  virtual nsresult GetCurrentState(mozilla::HTMLEditor* aHTMLEditor,
-                                   nsICommandParams* aParams) override final;
-  virtual nsresult SetState(mozilla::HTMLEditor* aHTMLEditor,
-                            nsString& newState) override final;
+  nsresult GetCurrentState(mozilla::HTMLEditor* aHTMLEditor,
+                           nsICommandParams* aParams) final;
+  nsresult SetState(mozilla::HTMLEditor* aHTMLEditor,
+                    nsString& newState) final;
 };
 
 class nsBackgroundColorStateCommand final : public nsMultiStateCommand
 {
 public:
                    nsBackgroundColorStateCommand();
 
 protected:
 
-  virtual nsresult GetCurrentState(mozilla::HTMLEditor* aHTMLEditor,
-                                   nsICommandParams* aParams) override final;
-  virtual nsresult SetState(mozilla::HTMLEditor* aHTMLEditor,
-                            nsString& newState) override final;
+  nsresult GetCurrentState(mozilla::HTMLEditor* aHTMLEditor,
+                           nsICommandParams* aParams) final;
+  nsresult SetState(mozilla::HTMLEditor* aHTMLEditor,
+                    nsString& newState) final;
 };
 
 class nsAbsolutePositioningCommand final : public nsBaseStateUpdatingCommand
 {
 public:
   nsAbsolutePositioningCommand();
 
 protected:
 
   NS_IMETHOD IsCommandEnabled(const char* aCommandName,
                               nsISupports* aCommandRefCon,
-                              bool* _retval) override final;
-  virtual nsresult GetCurrentState(mozilla::HTMLEditor* aHTMLEditor,
-                                   nsICommandParams* aParams) override final;
-  virtual nsresult ToggleState(mozilla::HTMLEditor* aHTMLEditor) override final;
+                              bool* _retval) final;
+  nsresult GetCurrentState(mozilla::HTMLEditor* aHTMLEditor,
+                           nsICommandParams* aParams) final;
+  nsresult ToggleState(mozilla::HTMLEditor* aHTMLEditor) final;
 };
 
 // composer commands
 
 NS_DECL_COMPOSER_COMMAND(nsCloseCommand)
 NS_DECL_COMPOSER_COMMAND(nsDocumentStateCommand)
 NS_DECL_COMPOSER_COMMAND(nsSetDocumentStateCommand)
 NS_DECL_COMPOSER_COMMAND(nsSetDocumentOptionsCommand)
--- a/extensions/cookie/nsPermissionManager.cpp
+++ b/extensions/cookie/nsPermissionManager.cpp
@@ -375,17 +375,17 @@ public:
       "INSERT INTO moz_hosts_new "
       "(id, origin, type, permission, expireType, expireTime, modificationTime) "
       "VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7)"), getter_AddRefs(mStmt));
   }
 
   nsresult
   Insert(const nsACString& aOrigin, const nsCString& aType,
          uint32_t aPermission, uint32_t aExpireType, int64_t aExpireTime,
-         int64_t aModificationTime) final override
+         int64_t aModificationTime) final
   {
     nsresult rv = mStmt->BindInt64ByIndex(0, *mID);
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = mStmt->BindUTF8StringByIndex(1, aOrigin);
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = mStmt->BindUTF8StringByIndex(2, aType);
@@ -425,17 +425,17 @@ public:
                                     int64_t aID) : mPm(aPm)
                                                  , mOperation(aOperation)
                                                  , mID(aID)
   {}
 
   nsresult
   Insert(const nsACString& aOrigin, const nsCString& aType,
          uint32_t aPermission, uint32_t aExpireType, int64_t aExpireTime,
-         int64_t aModificationTime) final override
+         int64_t aModificationTime) final
   {
     nsCOMPtr<nsIPrincipal> principal;
     nsresult rv = GetPrincipalFromOrigin(aOrigin, getter_AddRefs(principal));
     NS_ENSURE_SUCCESS(rv, rv);
 
     return mPm->AddInternal(principal, aType, aPermission, mID,
                             aExpireType, aExpireTime, aModificationTime,
                             nsPermissionManager::eDontNotify, mOperation);
@@ -460,17 +460,17 @@ public:
     mDBConn->CreateStatement(NS_LITERAL_CSTRING(
       "SELECT id FROM moz_perms WHERE origin = ?1 AND type = ?2"),
       getter_AddRefs(mLookupStmt));
   }
 
   nsresult
   Insert(const nsACString& aOrigin, const nsCString& aType,
          uint32_t aPermission, uint32_t aExpireType, int64_t aExpireTime,
-         int64_t aModificationTime) final override
+         int64_t aModificationTime) final
   {
     // Every time the migration code wants to insert an origin into
     // the database we need to check to see if someone has already
     // created a permissions entry for that permission. If they have,
     // we don't want to insert a duplicate row.
     //
     // We can afford to do this lookup unconditionally and not perform
     // caching, as a origin type pair should only be attempted to be
--- a/gfx/2d/2D.h
+++ b/gfx/2d/2D.h
@@ -1218,16 +1218,40 @@ public:
    */
   virtual void PushLayer(bool aOpaque, Float aOpacity,
                          SourceSurface* aMask,
                          const Matrix& aMaskTransform,
                          const IntRect& aBounds = IntRect(),
                          bool aCopyBackground = false) { MOZ_CRASH("GFX: PushLayer"); }
 
   /**
+   * Push a 'layer' to the DrawTarget, a layer is a temporary surface that all
+   * drawing will be redirected to, this is used for example to support group
+   * opacity or the masking of groups. Clips must be balanced within a layer,
+   * i.e. between a matching PushLayer/PopLayer pair there must be as many
+   * PushClip(Rect) calls as there are PopClip calls.
+   *
+   * @param aOpaque Whether the layer will be opaque
+   * @param aOpacity Opacity of the layer
+   * @param aMask Mask applied to the layer
+   * @param aMaskTransform Transform applied to the layer mask
+   * @param aBounds Optional bounds in device space to which the layer is
+   *                limited in size.
+   * @param aCopyBackground Whether to copy the background into the layer, this
+   *                        is only supported when aOpaque is true.
+   */
+  virtual void PushLayerWithBlend(bool aOpaque, Float aOpacity,
+                         SourceSurface* aMask,
+                         const Matrix& aMaskTransform,
+                         const IntRect& aBounds = IntRect(),
+                         bool aCopyBackground = false,
+                         CompositionOp = CompositionOp::OP_OVER) { MOZ_CRASH("GFX: PushLayerWithBlend"); }
+
+
+  /**
    * This balances a call to PushLayer and proceeds to blend the layer back
    * onto the background. This blend will blend the temporary surface back
    * onto the target in device space using POINT sampling and operator over.
    */
   virtual void PopLayer() { MOZ_CRASH("GFX: PopLayer"); }
 
   /**
    * Perform an in-place blur operation. This is only supported on data draw
--- a/gfx/2d/DrawTargetRecording.cpp
+++ b/gfx/2d/DrawTargetRecording.cpp
@@ -522,16 +522,33 @@ DrawTargetRecording::PushLayer(bool aOpa
   }
 
   mRecorder->RecordEvent(RecordedPushLayer(this, aOpaque, aOpacity, aMask,
                                            aMaskTransform, aBounds,
                                            aCopyBackground));
 }
 
 void
+DrawTargetRecording::PushLayerWithBlend(bool aOpaque, Float aOpacity,
+                                        SourceSurface* aMask,
+                                        const Matrix& aMaskTransform,
+                                        const IntRect& aBounds,
+                                        bool aCopyBackground,
+                                        CompositionOp aCompositionOp)
+{
+  if (aMask) {
+    EnsureSurfaceStoredRecording(mRecorder, aMask, "PushLayer");
+  }
+
+  mRecorder->RecordEvent(RecordedPushLayerWithBlend(this, aOpaque, aOpacity, aMask,
+                                           aMaskTransform, aBounds,
+                                           aCopyBackground, aCompositionOp));
+}
+
+void
 DrawTargetRecording::PopLayer()
 {
   mRecorder->RecordEvent(RecordedPopLayer(static_cast<DrawTarget*>(this)));
 }
 
 already_AddRefed<SourceSurface>
 DrawTargetRecording::CreateSourceSurfaceFromData(unsigned char *aData,
                                                  const IntSize &aSize,
--- a/gfx/2d/DrawTargetRecording.h
+++ b/gfx/2d/DrawTargetRecording.h
@@ -227,16 +227,42 @@ public:
    */
   virtual void PushLayer(bool aOpaque, Float aOpacity,
                          SourceSurface* aMask,
                          const Matrix& aMaskTransform,
                          const IntRect& aBounds = IntRect(),
                          bool aCopyBackground = false) override;
 
   /**
+   * Push a 'layer' to the DrawTarget, a layer is a temporary surface that all
+   * drawing will be redirected to, this is used for example to support group
+   * opacity or the masking of groups. Clips must be balanced within a layer,
+   * i.e. between a matching PushLayer/PopLayer pair there must be as many
+   * PushClip(Rect) calls as there are PopClip calls.
+   *
+   * @param aOpaque Whether the layer will be opaque
+   * @param aOpacity Opacity of the layer
+   * @param aMask Mask applied to the layer
+   * @param aMaskTransform Transform applied to the layer mask
+   * @param aBounds Optional bounds in device space to which the layer is
+   *                limited in size.
+   * @param aCopyBackground Whether to copy the background into the layer, this
+   *                        is only supported when aOpaque is true.a
+   * @param aCompositionOp The CompositionOp to use when blending the layer into
+   *                       the destination
+   */
+  virtual void PushLayerWithBlend(bool aOpaque, Float aOpacity,
+                         SourceSurface* aMask,
+                         const Matrix& aMaskTransform,
+                         const IntRect& aBounds = IntRect(),
+                         bool aCopyBackground = false,
+                         CompositionOp aCompositionOp = CompositionOp::OP_OVER) override;
+
+
+  /**
    * This balances a call to PushLayer and proceeds to blend the layer back
    * onto the background. This blend will blend the temporary surface back
    * onto the target in device space using POINT sampling and operator over.
    */
   virtual void PopLayer() override;
 
   /*
    * Create a SourceSurface optimized for use with this DrawTarget from
--- a/gfx/2d/DrawTargetSkia.cpp
+++ b/gfx/2d/DrawTargetSkia.cpp
@@ -2062,25 +2062,36 @@ DrawTargetSkia::PopClip()
   SetTransform(GetTransform());
 }
 
 void
 DrawTargetSkia::PushLayer(bool aOpaque, Float aOpacity, SourceSurface* aMask,
                           const Matrix& aMaskTransform, const IntRect& aBounds,
                           bool aCopyBackground)
 {
-  PushedLayer layer(GetPermitSubpixelAA(), aOpaque, aOpacity, aMask, aMaskTransform,
+  PushLayerWithBlend(aOpaque, aOpacity, aMask, aMaskTransform, aBounds, aCopyBackground, CompositionOp::OP_OVER);
+}
+
+void
+DrawTargetSkia::PushLayerWithBlend(bool aOpaque, Float aOpacity, SourceSurface* aMask,
+                                   const Matrix& aMaskTransform, const IntRect& aBounds,
+                                   bool aCopyBackground, CompositionOp aCompositionOp)
+{
+  PushedLayer layer(GetPermitSubpixelAA(), aOpaque, aOpacity, aCompositionOp, aMask, aMaskTransform,
                     mCanvas->getTopDevice());
   mPushedLayers.push_back(layer);
 
   SkPaint paint;
 
   // If we have a mask, set the opacity to 0 so that SkCanvas::restore skips
   // implicitly drawing the layer so that we can properly mask it in PopLayer.
   paint.setAlpha(aMask ? 0 : ColorFloatToByte(aOpacity));
+  if (!aMask) {
+    paint.setBlendMode(GfxOpToSkiaOp(layer.mCompositionOp));
+  }
 
   // aBounds is supplied in device space, but SaveLayerRec wants local space.
   SkRect bounds = IntRectToSkRect(aBounds);
   if (!bounds.isEmpty()) {
     SkMatrix inverseCTM;
     if (mCanvas->getTotalMatrix().invert(&inverseCTM)) {
       inverseCTM.mapRect(&bounds);
     } else {
@@ -2137,16 +2148,17 @@ DrawTargetSkia::PopLayer()
 #endif
     }
 
     // Restore the background with the layer's device left alive.
     mCanvas->restore();
 
     SkPaint paint;
     paint.setAlpha(ColorFloatToByte(layer.mOpacity));
+    paint.setBlendMode(GfxOpToSkiaOp(layer.mCompositionOp));
 
     SkMatrix maskMat, layerMat;
     // Get the total transform affecting the mask, considering its pattern
     // transform and the current canvas transform.
     GfxMatrixToSkiaMatrix(layer.mMaskTransform, maskMat);
     maskMat.postConcat(mCanvas->getTotalMatrix());
     if (!maskMat.invert(&layerMat)) {
       gfxDebug() << *this << ": PopLayer() failed to invert mask transform";
--- a/gfx/2d/DrawTargetSkia.h
+++ b/gfx/2d/DrawTargetSkia.h
@@ -104,16 +104,22 @@ public:
   virtual void PushClipRect(const Rect& aRect) override;
   virtual void PushDeviceSpaceClipRects(const IntRect* aRects, uint32_t aCount) override;
   virtual void PopClip() override;
   virtual void PushLayer(bool aOpaque, Float aOpacity,
                          SourceSurface* aMask,
                          const Matrix& aMaskTransform,
                          const IntRect& aBounds = IntRect(),
                          bool aCopyBackground = false) override;
+  virtual void PushLayerWithBlend(bool aOpaque, Float aOpacity,
+                                  SourceSurface* aMask,
+                                  const Matrix& aMaskTransform,
+                                  const IntRect& aBounds = IntRect(),
+                                  bool aCopyBackground = false,
+                                  CompositionOp aCompositionOp = CompositionOp::OP_OVER) override;
   virtual void PopLayer() override;
   virtual void Blur(const AlphaBoxBlur& aBlur) override;
   virtual already_AddRefed<SourceSurface> CreateSourceSurfaceFromData(unsigned char *aData,
                                                             const IntSize &aSize,
                                                             int32_t aStride,
                                                             SurfaceFormat aFormat) const override;
   virtual already_AddRefed<SourceSurface> OptimizeSourceSurface(SourceSurface *aSurface) const override;
   virtual already_AddRefed<SourceSurface> OptimizeSourceSurfaceForUnknownAlpha(SourceSurface *aSurface) const override;
@@ -173,29 +179,32 @@ private:
 
   bool UsingSkiaGPU() const;
 
   struct PushedLayer
   {
     PushedLayer(bool aOldPermitSubpixelAA,
                 bool aOpaque,
                 Float aOpacity,
+                CompositionOp aCompositionOp,
                 SourceSurface* aMask,
                 const Matrix& aMaskTransform,
                 SkBaseDevice* aPreviousDevice)
       : mOldPermitSubpixelAA(aOldPermitSubpixelAA),
         mOpaque(aOpaque),
         mOpacity(aOpacity),
+        mCompositionOp(aCompositionOp),
         mMask(aMask),
         mMaskTransform(aMaskTransform),
         mPreviousDevice(aPreviousDevice)
     {}
     bool mOldPermitSubpixelAA;
     bool mOpaque;
     Float mOpacity;
+    CompositionOp mCompositionOp;
     RefPtr<SourceSurface> mMask;
     Matrix mMaskTransform;
     SkBaseDevice* mPreviousDevice;
   };
   std::vector<PushedLayer> mPushedLayers;
 
 #ifdef USE_SKIA_GPU
   sk_sp<GrContext> mGrContext;
--- a/gfx/2d/GradientStopsD2D.h
+++ b/gfx/2d/GradientStopsD2D.h
@@ -21,17 +21,17 @@ public:
 
   GradientStopsD2D(ID2D1GradientStopCollection *aStopCollection, ID3D11Device *aDevice)
     : mStopCollection(aStopCollection)
     , mDevice(aDevice)
   {}
 
   virtual BackendType GetBackendType() const { return BackendType::DIRECT2D; }
 
-  virtual bool IsValid() const final{ return mDevice == Factory::GetDirect3D11Device(); }
+  bool IsValid() const final { return mDevice == Factory::GetDirect3D11Device(); }
 
 private:
   friend class DrawTargetD2D;
   friend class DrawTargetD2D1;
 
   mutable RefPtr<ID2D1GradientStopCollection> mStopCollection;
   RefPtr<ID3D11Device> mDevice;
 };
--- a/gfx/2d/InlineTranslator.h
+++ b/gfx/2d/InlineTranslator.h
@@ -29,163 +29,163 @@ using gfx::NativeFontResource;
 
 class InlineTranslator final : public Translator
 {
 public:
   explicit InlineTranslator(DrawTarget* aDT, void* aFontContext = nullptr);
 
   bool TranslateRecording(char *, size_t len);
 
-  DrawTarget* LookupDrawTarget(ReferencePtr aRefPtr) final override
+  DrawTarget* LookupDrawTarget(ReferencePtr aRefPtr) final
   {
     DrawTarget* result = mDrawTargets.GetWeak(aRefPtr);
     MOZ_ASSERT(result);
     return result;
   }
 
-  Path* LookupPath(ReferencePtr aRefPtr) final override
+  Path* LookupPath(ReferencePtr aRefPtr) final
   {
     Path* result = mPaths.GetWeak(aRefPtr);
     MOZ_ASSERT(result);
     return result;
   }
 
-  SourceSurface* LookupSourceSurface(ReferencePtr aRefPtr) final override
+  SourceSurface* LookupSourceSurface(ReferencePtr aRefPtr) final
   {
     SourceSurface* result = mSourceSurfaces.GetWeak(aRefPtr);
     MOZ_ASSERT(result);
     return result;
   }
 
-  FilterNode* LookupFilterNode(ReferencePtr aRefPtr) final override
+  FilterNode* LookupFilterNode(ReferencePtr aRefPtr) final
   {
     FilterNode* result = mFilterNodes.GetWeak(aRefPtr);
     MOZ_ASSERT(result);
     return result;
   }
 
-  GradientStops* LookupGradientStops(ReferencePtr aRefPtr) final override
+  GradientStops* LookupGradientStops(ReferencePtr aRefPtr) final
   {
     GradientStops* result =  mGradientStops.GetWeak(aRefPtr);
     MOZ_ASSERT(result);
     return result;
   }
 
-  ScaledFont* LookupScaledFont(ReferencePtr aRefPtr) final override
+  ScaledFont* LookupScaledFont(ReferencePtr aRefPtr) final
   {
     ScaledFont* result = mScaledFonts.GetWeak(aRefPtr);
     MOZ_ASSERT(result);
     return result;
   }
 
-  UnscaledFont* LookupUnscaledFont(ReferencePtr aRefPtr) override final
+  UnscaledFont* LookupUnscaledFont(ReferencePtr aRefPtr) final
   {
     UnscaledFont* result = mUnscaledFonts.GetWeak(aRefPtr);
     MOZ_ASSERT(result);
     return result;
   }
 
-  virtual UnscaledFont* LookupUnscaledFontByIndex(size_t index) override final
+  UnscaledFont* LookupUnscaledFontByIndex(size_t index) final
   {
     UnscaledFont* result = mUnscaledFontTable[index];
     return result;
   }
 
-  NativeFontResource* LookupNativeFontResource(uint64_t aKey) final override
+  NativeFontResource* LookupNativeFontResource(uint64_t aKey) final
   {
     NativeFontResource* result = mNativeFontResources.GetWeak(aKey);
     MOZ_ASSERT(result);
     return result;
   }
 
-  void AddDrawTarget(ReferencePtr aRefPtr, DrawTarget *aDT) final override
+  void AddDrawTarget(ReferencePtr aRefPtr, DrawTarget *aDT) final
   {
     mDrawTargets.Put(aRefPtr, aDT);
   }
 
-  void AddPath(ReferencePtr aRefPtr, Path *aPath) final override
+  void AddPath(ReferencePtr aRefPtr, Path *aPath) final
   {
     mPaths.Put(aRefPtr, aPath);
   }
 
-  void AddSourceSurface(ReferencePtr aRefPtr, SourceSurface *aSurface) final override
+  void AddSourceSurface(ReferencePtr aRefPtr, SourceSurface *aSurface) final
   {
     mSourceSurfaces.Put(aRefPtr, aSurface);
   }
 
-  void AddFilterNode(ReferencePtr aRefPtr, FilterNode *aFilter) final override
+  void AddFilterNode(ReferencePtr aRefPtr, FilterNode *aFilter) final
   {
     mFilterNodes.Put(aRefPtr, aFilter);
   }
 
-  void AddGradientStops(ReferencePtr aRefPtr, GradientStops *aStops) final override
+  void AddGradientStops(ReferencePtr aRefPtr, GradientStops *aStops) final
   {
     mGradientStops.Put(aRefPtr, aStops);
   }
 
-  void AddScaledFont(ReferencePtr aRefPtr, ScaledFont *aScaledFont) final override
+  void AddScaledFont(ReferencePtr aRefPtr, ScaledFont *aScaledFont) final
   {
     mScaledFonts.Put(aRefPtr, aScaledFont);
   }
 
-  void AddUnscaledFont(ReferencePtr aRefPtr, UnscaledFont *aUnscaledFont) final override
+  void AddUnscaledFont(ReferencePtr aRefPtr, UnscaledFont *aUnscaledFont) final
   {
     mUnscaledFontTable.push_back(aUnscaledFont);
     mUnscaledFonts.Put(aRefPtr, aUnscaledFont);
   }
 
   void AddNativeFontResource(uint64_t aKey,
-                             NativeFontResource *aScaledFontResouce) final override
+                             NativeFontResource *aScaledFontResouce) final
   {
     mNativeFontResources.Put(aKey, aScaledFontResouce);
   }
 
-  void RemoveDrawTarget(ReferencePtr aRefPtr) final override
+  void RemoveDrawTarget(ReferencePtr aRefPtr) final
   {
     mDrawTargets.Remove(aRefPtr);
   }
 
-  void RemovePath(ReferencePtr aRefPtr) final override
+  void RemovePath(ReferencePtr aRefPtr) final
   {
     mPaths.Remove(aRefPtr);
   }
 
-  void RemoveSourceSurface(ReferencePtr aRefPtr) final override
+  void RemoveSourceSurface(ReferencePtr aRefPtr) final
   {
     mSourceSurfaces.Remove(aRefPtr);
   }
 
-  void RemoveFilterNode(ReferencePtr aRefPtr) final override
+  void RemoveFilterNode(ReferencePtr aRefPtr) final
   {
     mFilterNodes.Remove(aRefPtr);
   }
 
-  void RemoveGradientStops(ReferencePtr aRefPtr) final override
+  void RemoveGradientStops(ReferencePtr aRefPtr) final
   {
     mGradientStops.Remove(aRefPtr);
   }
 
-  void RemoveScaledFont(ReferencePtr aRefPtr) final override
+  void RemoveScaledFont(ReferencePtr aRefPtr) final
   {
     mScaledFonts.Remove(aRefPtr);
   }
 
-  void RemoveUnscaledFont(ReferencePtr aRefPtr) final override
+  void RemoveUnscaledFont(ReferencePtr aRefPtr) final
   {
     mUnscaledFonts.Remove(aRefPtr);
   }
 
 
   already_AddRefed<DrawTarget> CreateDrawTarget(ReferencePtr aRefPtr,
                                                 const gfx::IntSize &aSize,
-                                                gfx::SurfaceFormat aFormat) final override;
+                                                gfx::SurfaceFormat aFormat) final;
 
-  mozilla::gfx::DrawTarget* GetReferenceDrawTarget() final override { return mBaseDT; }
+  mozilla::gfx::DrawTarget* GetReferenceDrawTarget() final { return mBaseDT; }
 
-  void* GetFontContext() final override { return mFontContext; }
+  void* GetFontContext() final { return mFontContext; }
 
 private:
   RefPtr<DrawTarget> mBaseDT;
   void*              mFontContext;
 
   std::vector<RefPtr<UnscaledFont>> mUnscaledFontTable;
   nsRefPtrHashtable<nsPtrHashKey<void>, DrawTarget> mDrawTargets;
   nsRefPtrHashtable<nsPtrHashKey<void>, Path> mPaths;
--- a/gfx/2d/NativeFontResourceDWrite.h
+++ b/gfx/2d/NativeFontResourceDWrite.h
@@ -30,17 +30,17 @@ public:
    * @return Referenced NativeFontResourceDWrite or nullptr if invalid.
    */
   static already_AddRefed<NativeFontResourceDWrite>
     Create(uint8_t *aFontData, uint32_t aDataLength, bool aNeedsCairo);
 
   already_AddRefed<UnscaledFont>
     CreateUnscaledFont(uint32_t aIndex,
                        const uint8_t* aInstanceData,
-                       uint32_t aInstanceDataLength) final override;
+                       uint32_t aInstanceDataLength) final;
 
 private:
   NativeFontResourceDWrite(IDWriteFactory *aFactory,
                            already_AddRefed<IDWriteFontFile> aFontFile,
                            DWRITE_FONT_FACE_TYPE aFaceType,
                            uint32_t aNumberOfFaces, bool aNeedsCairo)
     : mFactory(aFactory), mFontFile(aFontFile), mFaceType(aFaceType)
     , mNumberOfFaces(aNumberOfFaces), mNeedsCairo(aNeedsCairo)
--- a/gfx/2d/NativeFontResourceFontconfig.h
+++ b/gfx/2d/NativeFontResourceFontconfig.h
@@ -20,17 +20,17 @@ class NativeFontResourceFontconfig final
 public:
   MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(NativeFontResourceFontconfig, override)
 
   static already_AddRefed<NativeFontResourceFontconfig>
     Create(uint8_t *aFontData, uint32_t aDataLength, FT_Library aFTLibrary = nullptr);
 
   already_AddRefed<UnscaledFont>
     CreateUnscaledFont(uint32_t aIndex,
-                       const uint8_t* aInstanceData, uint32_t aInstanceDataLength) final override;
+                       const uint8_t* aInstanceData, uint32_t aInstanceDataLength) final;
 
   ~NativeFontResourceFontconfig();
 
 private:
   NativeFontResourceFontconfig(UniquePtr<uint8_t[]>&& aFontData, FT_Face aFace);
 
   UniquePtr<uint8_t[]> mFontData;
   FT_Face mFace;
--- a/gfx/2d/NativeFontResourceGDI.h
+++ b/gfx/2d/NativeFontResourceGDI.h
@@ -32,17 +32,17 @@ public:
   static already_AddRefed<NativeFontResourceGDI>
     Create(uint8_t *aFontData, uint32_t aDataLength);
 
   ~NativeFontResourceGDI();
 
   already_AddRefed<UnscaledFont>
     CreateUnscaledFont(uint32_t aIndex,
                        const uint8_t* aInstanceData,
-                       uint32_t aInstanceDataLength) final override;
+                       uint32_t aInstanceDataLength) final;
 
 private:
   explicit NativeFontResourceGDI(HANDLE aFontResourceHandle)
     : mFontResourceHandle(aFontResourceHandle)
   {}
 
   HANDLE mFontResourceHandle;
 };
--- a/gfx/2d/NativeFontResourceMac.h
+++ b/gfx/2d/NativeFontResourceMac.h
@@ -20,17 +20,17 @@ public:
   MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(NativeFontResourceMac, override)
 
   static already_AddRefed<NativeFontResourceMac>
     Create(uint8_t *aFontData, uint32_t aDataLength);
 
   already_AddRefed<UnscaledFont>
     CreateUnscaledFont(uint32_t aIndex,
                        const uint8_t* aInstanceData,
-                       uint32_t aInstanceDataLength) final override;
+                       uint32_t aInstanceDataLength) final;
 
   ~NativeFontResourceMac()
   {
     CFRelease(mFontRef);
   }
 
 private:
   explicit NativeFontResourceMac(CGFontRef aFontRef) : mFontRef(aFontRef) {}
--- a/gfx/2d/RecordedEvent.h
+++ b/gfx/2d/RecordedEvent.h
@@ -251,16 +251,17 @@ public:
     DRAWFILTER,
     FILTERNODESETATTRIBUTE,
     FILTERNODESETINPUT,
     CREATESIMILARDRAWTARGET,
     CREATECLIPPEDDRAWTARGET,
     FONTDATA,
     FONTDESC,
     PUSHLAYER,
+    PUSHLAYERWITHBLEND,
     POPLAYER,
     UNSCALEDFONTCREATION,
     UNSCALEDFONTDESTRUCTION,
     INTOLUMINANCE,
   };
   static const uint32_t kTotalEventTypes = RecordedEvent::FILTERNODESETINPUT + 1;
 
   virtual ~RecordedEvent() {}
--- a/gfx/2d/RecordedEventImpl.h
+++ b/gfx/2d/RecordedEventImpl.h
@@ -525,16 +525,52 @@ private:
   bool mOpaque;
   Float mOpacity;
   ReferencePtr mMask;
   Matrix mMaskTransform;
   IntRect mBounds;
   bool mCopyBackground;
 };
 
+class RecordedPushLayerWithBlend : public RecordedDrawingEvent<RecordedPushLayerWithBlend> {
+public:
+  RecordedPushLayerWithBlend(DrawTarget* aDT, bool aOpaque, Float aOpacity,
+                    SourceSurface* aMask, const Matrix& aMaskTransform,
+                    const IntRect& aBounds, bool aCopyBackground,
+                    CompositionOp aCompositionOp)
+    : RecordedDrawingEvent(PUSHLAYERWITHBLEND, aDT), mOpaque(aOpaque)
+    , mOpacity(aOpacity), mMask(aMask), mMaskTransform(aMaskTransform)
+    , mBounds(aBounds), mCopyBackground(aCopyBackground)
+    , mCompositionOp(aCompositionOp)
+  {
+  }
+
+  virtual bool PlayEvent(Translator *aTranslator) const override;
+
+  template<class S> void Record(S &aStream) const;
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "PushLayerWithBlend"; }
+
+private:
+  friend class RecordedEvent;
+
+  template<class S>
+  MOZ_IMPLICIT RecordedPushLayerWithBlend(S &aStream);
+
+  bool mOpaque;
+  Float mOpacity;
+  ReferencePtr mMask;
+  Matrix mMaskTransform;
+  IntRect mBounds;
+  bool mCopyBackground;
+  CompositionOp mCompositionOp;
+};
+
+
 class RecordedPopLayer : public RecordedDrawingEvent<RecordedPopLayer> {
 public:
   MOZ_IMPLICIT RecordedPopLayer(DrawTarget* aDT)
     : RecordedDrawingEvent(POPLAYER, aDT)
   {
   }
 
   virtual bool PlayEvent(Translator *aTranslator) const override;
@@ -2263,16 +2299,61 @@ RecordedPushLayer::RecordedPushLayer(S &
 inline void
 RecordedPushLayer::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mDT << "] PushPLayer (Opaque=" << mOpaque <<
     ", Opacity=" << mOpacity << ", Mask Ref=" << mMask << ") ";
 }
 
 inline bool
+RecordedPushLayerWithBlend::PlayEvent(Translator *aTranslator) const
+{
+  SourceSurface* mask = mMask ? aTranslator->LookupSourceSurface(mMask)
+                              : nullptr;
+  aTranslator->LookupDrawTarget(mDT)->
+    PushLayerWithBlend(mOpaque, mOpacity, mask, mMaskTransform, mBounds, mCopyBackground, mCompositionOp);
+  return true;
+}
+
+template<class S>
+void
+RecordedPushLayerWithBlend::Record(S &aStream) const
+{
+  RecordedDrawingEvent::Record(aStream);
+  WriteElement(aStream, mOpaque);
+  WriteElement(aStream, mOpacity);
+  WriteElement(aStream, mMask);
+  WriteElement(aStream, mMaskTransform);
+  WriteElement(aStream, mBounds);
+  WriteElement(aStream, mCopyBackground);
+  WriteElement(aStream, mCompositionOp);
+}
+
+template<class S>
+RecordedPushLayerWithBlend::RecordedPushLayerWithBlend(S &aStream)
+  : RecordedDrawingEvent(PUSHLAYERWITHBLEND, aStream)
+{
+  ReadElement(aStream, mOpaque);
+  ReadElement(aStream, mOpacity);
+  ReadElement(aStream, mMask);
+  ReadElement(aStream, mMaskTransform);
+  ReadElement(aStream, mBounds);
+  ReadElement(aStream, mCopyBackground);
+  ReadElement(aStream, mCompositionOp);
+}
+
+inline void
+RecordedPushLayerWithBlend::OutputSimpleEventInfo(std::stringstream &aStringStream) const
+{
+  aStringStream << "[" << mDT << "] PushLayerWithBlend (Opaque=" << mOpaque <<
+    ", Opacity=" << mOpacity << ", Mask Ref=" << mMask << ") ";
+}
+
+
+inline bool
 RecordedPopLayer::PlayEvent(Translator *aTranslator) const
 {
   aTranslator->LookupDrawTarget(mDT)->PopLayer();
   return true;
 }
 
 template<class S>
 void
@@ -3406,16 +3487,17 @@ RecordedFilterNodeSetInput::OutputSimple
     f(MASKSURFACE, RecordedMaskSurface); \
     f(FILTERNODESETATTRIBUTE, RecordedFilterNodeSetAttribute); \
     f(FILTERNODESETINPUT, RecordedFilterNodeSetInput); \
     f(CREATESIMILARDRAWTARGET, RecordedCreateSimilarDrawTarget); \
     f(CREATECLIPPEDDRAWTARGET, RecordedCreateClippedDrawTarget); \
     f(FONTDATA, RecordedFontData); \
     f(FONTDESC, RecordedFontDescriptor); \
     f(PUSHLAYER, RecordedPushLayer); \
+    f(PUSHLAYERWITHBLEND, RecordedPushLayerWithBlend); \
     f(POPLAYER, RecordedPopLayer); \
     f(UNSCALEDFONTCREATION, RecordedUnscaledFontCreation); \
     f(UNSCALEDFONTDESTRUCTION, RecordedUnscaledFontDestruction); \
     f(INTOLUMINANCE, RecordedIntoLuminanceSource);
 
 template<class S>
 RecordedEvent *
 RecordedEvent::LoadEvent(S &aStream, EventType aType)
--- a/gfx/layers/d3d11/CompositorD3D11.h
+++ b/gfx/layers/d3d11/CompositorD3D11.h
@@ -37,17 +37,17 @@ public:
 
   virtual TextureFactoryIdentifier
     GetTextureFactoryIdentifier() override;
 
   virtual already_AddRefed<DataTextureSource>
     CreateDataTextureSource(TextureFlags aFlags = TextureFlags::NO_FLAGS) override;
 
   virtual bool CanUseCanvasLayerForSize(const gfx::IntSize& aSize) override;
-  virtual int32_t GetMaxTextureSize() const final override;
+  int32_t GetMaxTextureSize() const final;
 
   virtual void MakeCurrent(MakeCurrentFlags aFlags = 0)  override {}
 
   virtual already_AddRefed<CompositingRenderTarget>
     CreateRenderTarget(const gfx::IntRect &aRect,
                        SurfaceInitMode aInit) override;
 
   virtual already_AddRefed<CompositingRenderTarget>
--- a/gfx/thebes/PrintTargetCG.h
+++ b/gfx/thebes/PrintTargetCG.h
@@ -19,27 +19,27 @@ class PrintTargetCG final : public Print
 {
 public:
   static already_AddRefed<PrintTargetCG>
   CreateOrNull(PMPrintSession aPrintSession,
                PMPageFormat aPageFormat,
                PMPrintSettings aPrintSettings,
                const IntSize& aSize);
 
-  virtual nsresult BeginPrinting(const nsAString& aTitle,
-                                 const nsAString& aPrintToFileName,
-                                 int32_t aStartPage,
-                                 int32_t aEndPage) final override;
-  virtual nsresult EndPrinting() final override;
-  virtual nsresult AbortPrinting() final override;
-  virtual nsresult BeginPage() final override;
-  virtual nsresult EndPage() final override;
+  nsresult BeginPrinting(const nsAString& aTitle,
+                         const nsAString& aPrintToFileName,
+                         int32_t aStartPage,
+                         int32_t aEndPage) final;
+  nsresult EndPrinting() final;
+  nsresult AbortPrinting() final;
+  nsresult BeginPage() final;
+  nsresult EndPage() final;
 
   virtual already_AddRefed<DrawTarget>
-  GetReferenceDrawTarget() final override;
+  GetReferenceDrawTarget() final;
 
 private:
   PrintTargetCG(PMPrintSession aPrintSession,
                 PMPageFormat aPageFormat,
                 PMPrintSettings aPrintSettings,
                 const IntSize& aSize);
   ~PrintTargetCG();
 
--- a/gfx/thebes/PrintTargetEMF.h
+++ b/gfx/thebes/PrintTargetEMF.h
@@ -36,28 +36,28 @@ public:
   typedef mozilla::widget::PDFiumProcessParent PDFiumProcessParent;
 
   static already_AddRefed<PrintTargetEMF>
   CreateOrNull(HDC aDC, const IntSize& aSizeInPoints);
 
   nsresult BeginPrinting(const nsAString& aTitle,
                                  const nsAString& aPrintToFileName,
                                  int32_t aStartPage,
-                                 int32_t aEndPage) final override;
-  nsresult EndPrinting() final override;
-  nsresult AbortPrinting() final override;
-  nsresult BeginPage() final override;
-  nsresult EndPage() final override;
+                                 int32_t aEndPage) final;
+  nsresult EndPrinting() final;
+  nsresult AbortPrinting() final;
+  nsresult BeginPage() final;
+  nsresult EndPage() final;
 
   already_AddRefed<DrawTarget>
   MakeDrawTarget(const IntSize& aSize,
-                 DrawEventRecorder* aRecorder = nullptr) final override;
+                 DrawEventRecorder* aRecorder = nullptr) final;
 
   already_AddRefed<DrawTarget>
-  GetReferenceDrawTarget() final override;
+  GetReferenceDrawTarget() final;
 
   void ConvertToEMFDone(const nsresult& aResult, mozilla::ipc::Shmem&& aEMF);
   bool IsSyncPagePrinting() const final { return false; }
   void ChannelIsBroken() { mChannelBroken = true; }
 
 private:
   PrintTargetEMF(HDC aDC, const IntSize& aSize);
   ~PrintTargetEMF() override;
--- a/gfx/thebes/PrintTargetSkPDF.h
+++ b/gfx/thebes/PrintTargetSkPDF.h
@@ -34,22 +34,21 @@ public:
                                  int32_t aStartPage,
                                  int32_t aEndPage) override;
   virtual nsresult EndPrinting() override;
   virtual void Finish() override;
 
   virtual nsresult BeginPage() override;
   virtual nsresult EndPage() override;
 
-  virtual already_AddRefed<DrawTarget>
+  already_AddRefed<DrawTarget>
   MakeDrawTarget(const IntSize& aSize,
-                 DrawEventRecorder* aRecorder = nullptr) final override;
+                 DrawEventRecorder* aRecorder = nullptr) final;
 
-  virtual already_AddRefed<DrawTarget>
-  GetReferenceDrawTarget() override final;
+  already_AddRefed<DrawTarget> GetReferenceDrawTarget() final;
 
 private:
   PrintTargetSkPDF(const IntSize& aSize,
                    UniquePtr<SkWStream> aStream);
   virtual ~PrintTargetSkPDF();
 
   // Do not hand out references to this object.  It holds a non-owning
   // reference to mOStreame, so must not outlive mOStream.
--- a/gfx/thebes/PrintTargetThebes.h
+++ b/gfx/thebes/PrintTargetThebes.h
@@ -38,17 +38,17 @@ public:
   virtual nsresult BeginPage() override;
   virtual nsresult EndPage() override;
   virtual void Finish() override;
 
   virtual already_AddRefed<DrawTarget>
   MakeDrawTarget(const IntSize& aSize,
                  DrawEventRecorder* aRecorder = nullptr) override;
 
-  virtual already_AddRefed<DrawTarget> GetReferenceDrawTarget() final override;
+  already_AddRefed<DrawTarget> GetReferenceDrawTarget() final;
 
 private:
 
   // Only created via CreateOrNull
   explicit PrintTargetThebes(gfxASurface* aSurface);
 
   RefPtr<gfxASurface> mGfxSurface;
 };
--- a/gfx/thebes/gfxAndroidPlatform.cpp
+++ b/gfx/thebes/gfxAndroidPlatform.cpp
@@ -370,17 +370,17 @@ public:
         }
 
     private:
         java::VsyncSource::GlobalRef mJavaVsync;
         bool mObservingVsync;
         TimeDuration mVsyncDuration;
     };
 
-    Display& GetGlobalDisplay() final override { return GetDisplayInstance(); }
+    Display& GetGlobalDisplay() final { return GetDisplayInstance(); }
 
 private:
    virtual ~AndroidVsyncSource() {}
 
    static Display& GetDisplayInstance()
    {
        static Display globalDisplay;
        return globalDisplay;
--- a/gfx/thebes/gfxDWriteFontList.h
+++ b/gfx/thebes/gfxDWriteFontList.h
@@ -55,33 +55,33 @@ public:
      */
     gfxDWriteFontFamily(const nsAString& aName,
                         IDWriteFontFamily *aFamily,
                         bool aIsSystemFontFamily = false)
       : gfxFontFamily(aName), mDWFamily(aFamily),
         mIsSystemFontFamily(aIsSystemFontFamily), mForceGDIClassic(false) {}
     virtual ~gfxDWriteFontFamily();
     
-    void FindStyleVariations(FontInfoData *aFontInfoData = nullptr) final override;
+    void FindStyleVariations(FontInfoData *aFontInfoData = nullptr) final;
 
-    void LocalizedName(nsAString& aLocalizedName) final override;
+    void LocalizedName(nsAString& aLocalizedName) final;
 
     void ReadFaceNames(gfxPlatformFontList *aPlatformFontList,
                        bool aNeedFullnamePostscriptNames,
-                       FontInfoData *aFontInfoData = nullptr) final override;
+                       FontInfoData *aFontInfoData = nullptr) final;
 
     void SetForceGDIClassic(bool aForce) { mForceGDIClassic = aForce; }
 
     void AddSizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf,
-                                FontListSizes* aSizes) const final override;
+                                FontListSizes* aSizes) const final;
     void AddSizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf,
-                                FontListSizes* aSizes) const final override;
+                                FontListSizes* aSizes) const final;
 
     bool FilterForFontList(nsAtom* aLangGroup,
-                           const nsACString& aGeneric) const final override {
+                           const nsACString& aGeneric) const final {
         return !IsSymbolFontFamily();
     }
 
 protected:
     // helper for FilterForFontList
     bool IsSymbolFontFamily() const;
 
     /** This font family's directwrite fontfamily object */
--- a/gfx/thebes/gfxFcPlatformFontList.h
+++ b/gfx/thebes/gfxFcPlatformFontList.h
@@ -224,17 +224,17 @@ public:
 
     void
     FindAllFontsForStyle(const gfxFontStyle& aFontStyle,
                          nsTArray<gfxFontEntry*>& aFontEntryList,
                          bool& aNeedsSyntheticBold,
                          bool aIgnoreSizeTolerance) override;
 
     bool FilterForFontList(nsAtom* aLangGroup,
-                           const nsACString& aGeneric) const final override {
+                           const nsACString& aGeneric) const final {
         return SupportsLangGroup(aLangGroup);
     }
 
 protected:
     virtual ~gfxFontconfigFontFamily();
 
     // helper for FilterForFontList
     bool SupportsLangGroup(nsAtom *aLangGroup) const;
--- a/gfx/thebes/gfxGDIFontList.h
+++ b/gfx/thebes/gfxGDIFontList.h
@@ -209,17 +209,17 @@ public:
         mWindowsFamily(0),
         mWindowsPitch(0),
         mCharset()
     {}
 
     virtual void FindStyleVariations(FontInfoData *aFontInfoData = nullptr);
 
     bool FilterForFontList(nsAtom* aLangGroup,
-                           const nsACString& aGeneric) const final override {
+                           const nsACString& aGeneric) const final {
         return !IsSymbolFontFamily() &&
                SupportsLangGroup(aLangGroup) &&
                MatchesGenericFamily(aGeneric);
     }
 
 protected:
     friend class gfxGDIFontList;
 
--- a/gfx/thebes/gfxTextRun.h
+++ b/gfx/thebes/gfxTextRun.h
@@ -536,21 +536,21 @@ public:
             ConvertFromGlyphRunArray();
         }
         // Clear out the one remaining GlyphRun.
         mSingleGlyphRun.mFont = nullptr;
     }
     void SortGlyphRuns();
     void SanitizeGlyphRuns();
 
-    const CompressedGlyph* GetCharacterGlyphs() const final override {
+    const CompressedGlyph* GetCharacterGlyphs() const final {
         MOZ_ASSERT(mCharacterGlyphs, "failed to initialize mCharacterGlyphs");
         return mCharacterGlyphs;
     }
-    CompressedGlyph* GetCharacterGlyphs() final override {
+    CompressedGlyph* GetCharacterGlyphs() final {
         MOZ_ASSERT(mCharacterGlyphs, "failed to initialize mCharacterGlyphs");
         return mCharacterGlyphs;
     }
 
     // clean out results from shaping in progress, used for fallback scenarios
     void ClearGlyphsAndCharacters();
 
     void SetSpaceGlyph(gfxFont* aFont, DrawTarget* aDrawTarget,
--- a/image/Image.h
+++ b/image/Image.h
@@ -243,18 +243,17 @@ class ImageResource : public Image
 public:
   already_AddRefed<ProgressTracker> GetProgressTracker() override
   {
     RefPtr<ProgressTracker> progressTracker = mProgressTracker;
     MOZ_ASSERT(progressTracker);
     return progressTracker.forget();
   }
 
-  void SetProgressTracker(
-                       ProgressTracker* aProgressTracker) override final
+  void SetProgressTracker(ProgressTracker* aProgressTracker) final
   {
     MOZ_ASSERT(aProgressTracker);
     MOZ_ASSERT(!mProgressTracker);
     mProgressTracker = aProgressTracker;
   }
 
   virtual void IncrementAnimationConsumers() override;
   virtual void DecrementAnimationConsumers() override;
--- a/image/SurfacePipe.h
+++ b/image/SurfacePipe.h
@@ -652,21 +652,21 @@ class AbstractSurfaceSink : public Surfa
 public:
   AbstractSurfaceSink()
     : mImageData(nullptr)
     , mImageDataLength(0)
     , mRow(0)
     , mFlipVertically(false)
   { }
 
-  Maybe<SurfaceInvalidRect> TakeInvalidRect() override final;
+  Maybe<SurfaceInvalidRect> TakeInvalidRect() final;
 
 protected:
-  uint8_t* DoResetToFirstRow() override final;
-  uint8_t* DoAdvanceRow() override final;
+  uint8_t* DoResetToFirstRow() final;
+  uint8_t* DoAdvanceRow() final;
   virtual uint8_t* GetRowPointer() const = 0;
 
   gfx::IntRect mInvalidRect;  /// The region of the surface that has been written
                               /// to since the last call to TakeInvalidRect().
   uint8_t*  mImageData;       /// A pointer to the beginning of the surface data.
   uint32_t  mImageDataLength; /// The length of the surface data.
   uint32_t  mRow;             /// The row to which we're writing. (0-indexed)
   bool      mFlipVertically;  /// If true, write the rows from top to bottom.
--- a/ipc/chromium/src/base/message_pump_libevent.h
+++ b/ipc/chromium/src/base/message_pump_libevent.h
@@ -202,17 +202,17 @@ protected:
   /**
    * OnError will be called when |read| returns error. Derived class should
    * implement this function to handle error cases when needed.
    */
   virtual void OnError() {}
   virtual void OnLineRead(int aFd, nsDependentCSubstring& aMessage) = 0;
   virtual void OnFileCanWriteWithoutBlocking(int /* aFd */) override {}
 private:
-  virtual void OnFileCanReadWithoutBlocking(int aFd) final override;
+  void OnFileCanReadWithoutBlocking(int aFd) final;
 
   mozilla::UniquePtr<char[]> mReceiveBuffer;
   int mReceivedIndex;
   int mBufferSize;
   char mTerminator;
 };
 }  // namespace base
 
--- a/js/public/UbiNode.h
+++ b/js/public/UbiNode.h
@@ -1059,19 +1059,19 @@ class JS_PUBLIC_API(Concrete<JS::Symbol>
 template<>
 class JS_PUBLIC_API(Concrete<JSScript>) : TracerConcreteWithCompartment<JSScript> {
   protected:
     explicit Concrete(JSScript *ptr) : TracerConcreteWithCompartment<JSScript>(ptr) { }
 
   public:
     static void construct(void *storage, JSScript *ptr) { new (storage) Concrete(ptr); }
 
-    CoarseType coarseType() const final override { return CoarseType::Script; }
+    CoarseType coarseType() const final { return CoarseType::Script; }
     Size size(mozilla::MallocSizeOf mallocSizeOf) const override;
-    const char* scriptFilename() const final override;
+    const char* scriptFilename() const final;
 
     const char16_t* typeName() const override { return concreteTypeName; }
     static const char16_t concreteTypeName[];
 };
 
 // The JSObject specialization.
 template<>
 class JS_PUBLIC_API(Concrete<JSObject>) : public TracerConcreteWithCompartment<JSObject> {
@@ -1086,48 +1086,48 @@ class JS_PUBLIC_API(Concrete<JSObject>) 
     const char* jsObjectClassName() const override;
     MOZ_MUST_USE bool jsObjectConstructorName(JSContext* cx, UniqueTwoByteChars& outName)
         const override;
     Size size(mozilla::MallocSizeOf mallocSizeOf) const override;
 
     bool hasAllocationStack() const override;
     StackFrame allocationStack() const override;
 
-    CoarseType coarseType() const final override { return CoarseType::Object; }
+    CoarseType coarseType() const final { return CoarseType::Object; }
 
     const char16_t* typeName() const override { return concreteTypeName; }
     static const char16_t concreteTypeName[];
 };
 
 // For JSString, we extend the generic template with a 'size' implementation.
 template<>
 class JS_PUBLIC_API(Concrete<JSString>) : TracerConcrete<JSString> {
   protected:
     explicit Concrete(JSString *ptr) : TracerConcrete<JSString>(ptr) { }
 
   public:
     static void construct(void *storage, JSString *ptr) { new (storage) Concrete(ptr); }
 
     Size size(mozilla::MallocSizeOf mallocSizeOf) const override;
 
-    CoarseType coarseType() const final override { return CoarseType::String; }
+    CoarseType coarseType() const final { return CoarseType::String; }
 
     const char16_t* typeName() const override { return concreteTypeName; }
     static const char16_t concreteTypeName[];
 };
 
 // The ubi::Node null pointer. Any attempt to operate on a null ubi::Node asserts.
 template<>
 class JS_PUBLIC_API(Concrete<void>) : public Base {
     const char16_t* typeName() const override;
     Size size(mozilla::MallocSizeOf mallocSizeOf) const override;
     js::UniquePtr<EdgeRange> edges(JSContext* cx, bool wantNames) const override;
     JS::Zone* zone() const override;
     JSCompartment* compartment() const override;
-    CoarseType coarseType() const final override;
+    CoarseType coarseType() const final;
 
     explicit Concrete(void* ptr) : Base(ptr) { }
 
   public:
     static void construct(void* storage, void* ptr) { new (storage) Concrete(ptr); }
 };
 
 
--- a/js/src/builtin/Promise.h
+++ b/js/src/builtin/Promise.h
@@ -190,17 +190,17 @@ class OffThreadPromiseTask : public JS::
 
   protected:
     OffThreadPromiseTask(JSContext* cx, Handle<PromiseObject*> promise);
 
     // To be called by OffThreadPromiseTask and implemented by the derived class.
     virtual bool resolve(JSContext* cx, Handle<PromiseObject*> promise) = 0;
 
     // JS::Dispatchable implementation. Ends with 'delete this'.
-    void run(JSContext* cx, MaybeShuttingDown maybeShuttingDown) override final;
+    void run(JSContext* cx, MaybeShuttingDown maybeShuttingDown) final;
 
   public:
     ~OffThreadPromiseTask() override;
 
     // Initializing an OffThreadPromiseTask informs the runtime that it must
     // wait on shutdown for this task to rejoin the active JSContext by calling
     // dispatchResolveAndDestroy().
     bool init(JSContext* cx);
--- a/js/src/frontend/TokenStream.h
+++ b/js/src/frontend/TokenStream.h
@@ -769,29 +769,29 @@ class TokenStreamAnyChars
                                      unsigned flags, unsigned errorNumber, va_list args);
 
     // Compute error metadata for an error at no offset.
     void computeErrorMetadataNoOffset(ErrorMetadata* err);
 
   public:
     // ErrorReporter API.
 
-    virtual const JS::ReadOnlyCompileOptions& options() const override final {
+    const JS::ReadOnlyCompileOptions& options() const final {
         return options_;
     }
 
-    virtual void
-    lineAndColumnAt(size_t offset, uint32_t* line, uint32_t* column) const override final;
+    void
+    lineAndColumnAt(size_t offset, uint32_t* line, uint32_t* column) const final;
 
-    virtual void currentLineAndColumn(uint32_t* line, uint32_t* column) const override final;
+    void currentLineAndColumn(uint32_t* line, uint32_t* column) const final;
 
-    virtual bool hasTokenizationStarted() const override final;
-    virtual void reportErrorNoOffsetVA(unsigned errorNumber, va_list args) override final;
+    bool hasTokenizationStarted() const final;
+    void reportErrorNoOffsetVA(unsigned errorNumber, va_list args) final;
 
-    virtual const char* getFilename() const override final {
+    const char* getFilename() const final {
         return filename_;
     }
 
   protected:
     // Options used for parsing/tokenizing.
     const ReadOnlyCompileOptions& options_;
 
     Token               tokens[ntokens];    // circular token buffer
--- a/js/src/jit/CodeGenerator.cpp
+++ b/js/src/jit/CodeGenerator.cpp
@@ -657,17 +657,17 @@ class OutOfLineTestObject : public OutOf
 
   public:
     OutOfLineTestObject()
 #ifdef DEBUG
       : ifEmulatesUndefined_(nullptr), ifDoesntEmulateUndefined_(nullptr)
 #endif
     { }
 
-    void accept(CodeGenerator* codegen) final override {
+    void accept(CodeGenerator* codegen) final {
         MOZ_ASSERT(initialized());
         codegen->emitOOLTestObject(objreg_, ifEmulatesUndefined_, ifDoesntEmulateUndefined_,
                                    scratch_);
     }
 
     // Specify the register where the object to be tested is found, labels to
     // jump to if the object is truthy or falsy, and a scratch register for
     // use in the out-of-line path.
--- a/js/src/jit/IonCode.h
+++ b/js/src/jit/IonCode.h
@@ -815,17 +815,17 @@ namespace ubi {
 template<>
 class Concrete<js::jit::JitCode> : TracerConcrete<js::jit::JitCode> {
   protected:
     explicit Concrete(js::jit::JitCode *ptr) : TracerConcrete<js::jit::JitCode>(ptr) { }
 
   public:
     static void construct(void *storage, js::jit::JitCode *ptr) { new (storage) Concrete(ptr); }
 
-    CoarseType coarseType() const final override { return CoarseType::Script; }
+    CoarseType coarseType() const final { return CoarseType::Script; }
 
     Size size(mozilla::MallocSizeOf mallocSizeOf) const override {
         Size size = js::gc::Arena::thingSize(get().asTenured().getAllocKind());
         size += get().bufferSize();
         size += get().headerSize();
         return size;
     }
 
--- a/js/src/jit/IonControlFlow.h
+++ b/js/src/jit/IonControlFlow.h
@@ -187,23 +187,23 @@ class CFGControlInstruction : public Tem
 };
 
 template <size_t Successors>
 class CFGAryControlInstruction : public CFGControlInstruction
 {
     mozilla::Array<CFGBlock*, Successors> successors_;
 
   public:
-    size_t numSuccessors() const final override {
+    size_t numSuccessors() const final {
         return Successors;
     }
-    CFGBlock* getSuccessor(size_t i) const final override {
+    CFGBlock* getSuccessor(size_t i) const final {
         return successors_[i];
     }
-    void replaceSuccessor(size_t i, CFGBlock* succ) final override {
+    void replaceSuccessor(size_t i, CFGBlock* succ) final {
         successors_[i] = succ;
     }
 };
 
 class CFGTry : public CFGControlInstruction
 {
     CFGBlock* tryBlock_;
     jsbytecode* catchStartPc_;
@@ -220,24 +220,24 @@ class CFGTry : public CFGControlInstruct
     TRIVIAL_CFG_NEW_WRAPPERS
 
     static CFGTry* CopyWithNewTargets(TempAllocator& alloc, CFGTry* old,
                                       CFGBlock* tryBlock, CFGBlock* merge)
     {
         return new(alloc) CFGTry(tryBlock, old->catchStartPc(), merge);
     }
 
-    size_t numSuccessors() const final override {
+    size_t numSuccessors() const final {
         return 2;
     }
-    CFGBlock* getSuccessor(size_t i) const final override {
+    CFGBlock* getSuccessor(size_t i) const final {
         MOZ_ASSERT(i < numSuccessors());
         return (i == 0) ? tryBlock_ : mergePoint_;
     }
-    void replaceSuccessor(size_t i, CFGBlock* succ) final override {
+    void replaceSuccessor(size_t i, CFGBlock* succ) final {
         MOZ_ASSERT(i < numSuccessors());
         if (i == 0)
             tryBlock_ = succ;
         else
             mergePoint_ = succ;
     }
 
     CFGBlock* tryBlock() const {
@@ -267,24 +267,24 @@ class CFGTableSwitch : public CFGControl
 
   public:
     CFG_CONTROL_HEADER(TableSwitch);
 
     static CFGTableSwitch* New(TempAllocator& alloc, size_t low, size_t high) {
         return new(alloc) CFGTableSwitch(alloc, low, high);
     }
 
-    size_t numSuccessors() const final override {
+    size_t numSuccessors() const final {
         return successors_.length();
     }
-    CFGBlock* getSuccessor(size_t i) const final override {
+    CFGBlock* getSuccessor(size_t i) const final {
         MOZ_ASSERT(i < numSuccessors());
         return successors_[i];
     }
-    void replaceSuccessor(size_t i, CFGBlock* succ) final override {
+    void replaceSuccessor(size_t i, CFGBlock* succ) final {
         MOZ_ASSERT(i < numSuccessors());
         successors_[i] = succ;
     }
 
     bool addDefault(CFGBlock* defaultCase) {
         MOZ_ASSERT(successors_.length() == 0);
         return successors_.append(defaultCase);
     }
--- a/js/src/jit/LIR.h
+++ b/js/src/jit/LIR.h
@@ -1158,20 +1158,20 @@ class LInstructionHelper : public detail
     mozilla::Array<LAllocation, Operands> operands_;
 
   protected:
     LInstructionHelper()
       : details::LInstructionFixedDefsTempsHelper<Defs, Temps>(Operands)
     {}
 
   public:
-    LAllocation* getOperand(size_t index) final override {
+    LAllocation* getOperand(size_t index) final {
         return &operands_[index];
     }
-    void setOperand(size_t index, const LAllocation& a) final override {
+    void setOperand(size_t index, const LAllocation& a) final {
         operands_[index] = a;
     }
     void setBoxOperand(size_t index, const LBoxAllocation& alloc) {
 #ifdef JS_NUNBOX32
         operands_[index + TYPE_INDEX] = alloc.type();
         operands_[index + PAYLOAD_INDEX] = alloc.payload();
 #else
         operands_[index] = alloc.value();
@@ -1204,20 +1204,20 @@ class LVariadicInstruction : public deta
     explicit LVariadicInstruction(size_t numOperands)
       : details::LInstructionFixedDefsTempsHelper<Defs, Temps>(numOperands)
     {}
 
   public:
     MOZ_MUST_USE bool init(TempAllocator& alloc) {
         return operands_.init(alloc, this->nonPhiNumOperands_);
     }
-    LAllocation* getOperand(size_t index) final override {
+    LAllocation* getOperand(size_t index) final {
         return &operands_[index];
     }
-    void setOperand(size_t index, const LAllocation& a) final override {
+    void setOperand(size_t index, const LAllocation& a) final {
         operands_[index] = a;
     }
     void setBoxOperand(size_t index, const LBoxAllocation& a) {
 #ifdef JS_NUNBOX32
         operands_[index + TYPE_INDEX] = a.type();
         operands_[index + PAYLOAD_INDEX] = a.payload();
 #else
         operands_[index] = a.value();
--- a/js/src/jit/MIR.h
+++ b/js/src/jit/MIR.h
@@ -1278,42 +1278,42 @@ class MInstruction
     MOZ_FOR_EACH(NAMED_OPERAND_ACCESSOR_APPLY, (), (__VA_ARGS__))
 
 template <size_t Arity>
 class MAryInstruction : public MInstruction
 {
     mozilla::Array<MUse, Arity> operands_;
 
   protected:
-    MUse* getUseFor(size_t index) final override {
+    MUse* getUseFor(size_t index) final {
         return &operands_[index];
     }
-    const MUse* getUseFor(size_t index) const final override {
+    const MUse* getUseFor(size_t index) const final {
         return &operands_[index];
     }
     void initOperand(size_t index, MDefinition* operand) {
         operands_[index].init(operand, this);
     }
 
   public:
-    MDefinition* getOperand(size_t index) const final override {
+    MDefinition* getOperand(size_t index) const final {
         return operands_[index].producer();
     }
-    size_t numOperands() const final override {
+    size_t numOperands() const final {
         return Arity;
     }
 #ifdef DEBUG
     static const size_t staticNumOperands = Arity;
 #endif
-    size_t indexOf(const MUse* u) const final override {
+    size_t indexOf(const MUse* u) const final {
         MOZ_ASSERT(u >= &operands_[0]);
         MOZ_ASSERT(u <= &operands_[numOperands() - 1]);
         return u - &operands_[0];
     }
-    void replaceOperand(size_t index, MDefinition* operand) final override {
+    void replaceOperand(size_t index, MDefinition* operand) final {
         operands_[index].replaceProducer(operand);
     }
 
     explicit MAryInstruction(Opcode op)
       : MInstruction(op)
     { }
 
     explicit MAryInstruction(const MAryInstruction<Arity>& other)
@@ -1458,37 +1458,37 @@ class MVariadicT : public T
     { }
     MOZ_MUST_USE bool init(TempAllocator& alloc, size_t length) {
         return operands_.init(alloc, length);
     }
     void initOperand(size_t index, MDefinition* operand) {
         // FixedList doesn't initialize its elements, so do an unchecked init.
         operands_[index].initUnchecked(operand, this);
     }
-    MUse* getUseFor(size_t index) final override {
+    MUse* getUseFor(size_t index) final {
         return &operands_[index];
     }
-    const MUse* getUseFor(size_t index) const final override {
+    const MUse* getUseFor(size_t index) const final {
         return &operands_[index];
     }
 
   public:
     // Will assert if called before initialization.
-    MDefinition* getOperand(size_t index) const final override {
+    MDefinition* getOperand(size_t index) const final {
         return operands_[index].producer();
     }
-    size_t numOperands() const final override {
+    size_t numOperands() const final {
         return operands_.length();
     }
-    size_t indexOf(const MUse* u) const final override {
+    size_t indexOf(const MUse* u) const final {
         MOZ_ASSERT(u >= &operands_[0]);
         MOZ_ASSERT(u <= &operands_[numOperands() - 1]);
         return u - &operands_[0];
     }
-    void replaceOperand(size_t index, MDefinition* operand) final override {
+    void replaceOperand(size_t index, MDefinition* operand) final {
         operands_[index].replaceProducer(operand);
     }
 };
 
 typedef MVariadicT<MInstruction> MVariadicInstruction;
 
 // Generates an LSnapshot without further effect.
 class MStart : public MNullaryInstruction
@@ -3025,22 +3025,22 @@ class MTableSwitch final
         MOZ_ASSERT(index == 0);
         return operand_.producer();
     }
 
     size_t numOperands() const override {
         return 1;
     }
 
-    size_t indexOf(const MUse* u) const final override {
+    size_t indexOf(const MUse* u) const final {
         MOZ_ASSERT(u == getUseFor(0));
         return 0;
     }
 
-    void replaceOperand(size_t index, MDefinition* operand) final override {
+    void replaceOperand(size_t index, MDefinition* operand) final {
         MOZ_ASSERT(index == 0);
         operand_.replaceProducer(operand);
     }
 
     MDefinition* foldsTo(TempAllocator& alloc) override;
 };
 
 template <size_t Arity, size_t Successors>
@@ -3052,48 +3052,48 @@ class MAryControlInstruction : public MC
   protected:
     explicit MAryControlInstruction(Opcode op)
       : MControlInstruction(op)
     { }
     void setSuccessor(size_t index, MBasicBlock* successor) {
         successors_[index] = successor;
     }
 
-    MUse* getUseFor(size_t index) final override {
+    MUse* getUseFor(size_t index) final {
         return &operands_[index];
     }
-    const MUse* getUseFor(size_t index) const final override {
+    const MUse* getUseFor(size_t index) const final {
         return &operands_[index];
     }
     void initOperand(size_t index, MDefinition* operand) {
         operands_[index].init(operand, this);
     }
 
   public:
-    MDefinition* getOperand(size_t index) const final override {
+    MDefinition* getOperand(size_t index) const final {
         return operands_[index].producer();
     }
-    size_t numOperands() const final override {
+    size_t numOperands() const final {
         return Arity;
     }
-    size_t indexOf(const MUse* u) const final override {
+    size_t indexOf(const MUse* u) const final {
         MOZ_ASSERT(u >= &operands_[0]);
         MOZ_ASSERT(u <= &operands_[numOperands() - 1]);
         return u - &operands_[0];
     }
-    void replaceOperand(size_t index, MDefinition* operand) final override {
+    void replaceOperand(size_t index, MDefinition* operand) final {
         operands_[index].replaceProducer(operand);
     }
-    size_t numSuccessors() const final override {
+    size_t numSuccessors() const final {
         return Successors;
     }
-    MBasicBlock* getSuccessor(size_t i) const final override {
+    MBasicBlock* getSuccessor(size_t i) const final {
         return successors_[i];
     }
-    void replaceSuccessor(size_t i, MBasicBlock* succ) final override {
+    void replaceSuccessor(size_t i, MBasicBlock* succ) final {
         successors_[i] = succ;
     }
 };
 
 // Jump to the start of another basic block.
 class MGoto
   : public MAryControlInstruction<0, 1>,
     public NoTypePolicy::Data
@@ -7914,22 +7914,22 @@ class MPhi final
     void removeAllOperands();
 
     MDefinition* getOperand(size_t index) const override {
         return inputs_[index].producer();
     }
     size_t numOperands() const override {
         return inputs_.length();
     }
-    size_t indexOf(const MUse* u) const final override {
+    size_t indexOf(const MUse* u) const final {
         MOZ_ASSERT(u >= &inputs_[0]);
         MOZ_ASSERT(u <= &inputs_[numOperands() - 1]);
         return u - &inputs_[0];
     }
-    void replaceOperand(size_t index, MDefinition* operand) final override {
+    void replaceOperand(size_t index, MDefinition* operand) final {
         inputs_[index].replaceProducer(operand);
     }
     bool hasBackedgeType() const {
         return hasBackedgeType_;
     }
     bool triedToSpecialize() const {
         return triedToSpecialize_;
     }
@@ -11356,55 +11356,55 @@ class MDispatchInstruction
     NAMED_OPERANDS((0, input))
     MDispatchInstruction(TempAllocator& alloc, Opcode op, MDefinition* input)
       : MControlInstruction(op), map_(alloc), fallback_(nullptr)
     {
         initOperand(0, input);
     }
 
   protected:
-    MUse* getUseFor(size_t index) final override {
+    MUse* getUseFor(size_t index) final {
         MOZ_ASSERT(index == 0);
         return &operand_;
     }
-    const MUse* getUseFor(size_t index) const final override {
+    const MUse* getUseFor(size_t index) const final {
         MOZ_ASSERT(index == 0);
         return &operand_;
     }
-    MDefinition* getOperand(size_t index) const final override {
+    MDefinition* getOperand(size_t index) const final {
         MOZ_ASSERT(index == 0);
         return operand_.producer();
     }
-    size_t numOperands() const final override {
+    size_t numOperands() const final {
         return 1;
     }
-    size_t indexOf(const MUse* u) const final override {
+    size_t indexOf(const MUse* u) const final {
         MOZ_ASSERT(u == getUseFor(0));
         return 0;
     }
-    void replaceOperand(size_t index, MDefinition* operand) final override {
+    void replaceOperand(size_t index, MDefinition* operand) final {
         MOZ_ASSERT(index == 0);
         operand_.replaceProducer(operand);
     }
 
   public:
     void setSuccessor(size_t i, MBasicBlock* successor) {
         MOZ_ASSERT(i < numSuccessors());
         if (i == map_.length())
             fallback_ = successor;
         else
             map_[i].block = successor;
     }
-    size_t numSuccessors() const final override {
+    size_t numSuccessors() const final {
         return map_.length() + (fallback_ ? 1 : 0);
     }
-    void replaceSuccessor(size_t i, MBasicBlock* successor) final override {
+    void replaceSuccessor(size_t i, MBasicBlock* successor) final {
         setSuccessor(i, successor);
     }
-    MBasicBlock* getSuccessor(size_t i) const final override {
+    MBasicBlock* getSuccessor(size_t i) const final {
         MOZ_ASSERT(i < numSuccessors());
         if (i == map_.length())
             return fallback_;
         return map_[i].block;
     }
 
   public:
     MOZ_MUST_USE bool addCase(JSFunction* func, ObjectGroup* funcGroup, MBasicBlock* block) {
@@ -13548,26 +13548,26 @@ class MResumePoint final :
         return operands_.length();
     }
     uint32_t stackDepth() const {
         return numAllocatedOperands();
     }
     size_t numOperands() const override {
         return numAllocatedOperands();
     }
-    size_t indexOf(const MUse* u) const final override {
+    size_t indexOf(const MUse* u) const final {
         MOZ_ASSERT(u >= &operands_[0]);
         MOZ_ASSERT(u <= &operands_[numOperands() - 1]);
         return u - &operands_[0];
     }
     void initOperand(size_t index, MDefinition* operand) {
         // FixedList doesn't initialize its elements, so do an unchecked init.
         operands_[index].initUnchecked(operand, this);
     }
-    void replaceOperand(size_t index, MDefinition* operand) final override {
+    void replaceOperand(size_t index, MDefinition* operand) final {
         operands_[index].replaceProducer(operand);
     }
 
     bool isObservableOperand(MUse* u) const;
     bool isObservableOperand(size_t index) const;
     bool isRecoverableOperand(MUse* u) const;
 
     MDefinition* getOperand(size_t index) const override {
--- a/js/src/vm/JSScript.h
+++ b/js/src/vm/JSScript.h
@@ -2484,19 +2484,19 @@ namespace ubi {
 template<>
 class Concrete<js::LazyScript> : TracerConcrete<js::LazyScript> {
   protected:
     explicit Concrete(js::LazyScript *ptr) : TracerConcrete<js::LazyScript>(ptr) { }
 
   public:
     static void construct(void *storage, js::LazyScript *ptr) { new (storage) Concrete(ptr); }
 
-    CoarseType coarseType() const final override { return CoarseType::Script; }
+    CoarseType coarseType() const final { return CoarseType::Script; }
     Size size(mozilla::MallocSizeOf mallocSizeOf) const override;
-    const char* scriptFilename() const final override;
+    const char* scriptFilename() const final;
 
     const char16_t* typeName() const override { return concreteTypeName; }
     static const char16_t concreteTypeName[];
 };
 } // namespace ubi
 } // namespace JS
 
 #endif /* vm_JSScript_h */
--- a/js/src/vm/RegExpShared.h
+++ b/js/src/vm/RegExpShared.h
@@ -365,17 +365,17 @@ class Concrete<js::RegExpShared> : Trace
   protected:
     explicit Concrete(js::RegExpShared* ptr) : TracerConcrete<js::RegExpShared>(ptr) { }
 
   public:
     static void construct(void* storage, js::RegExpShared* ptr) {
         new (storage) Concrete(ptr);
     }
 
-    CoarseType coarseType() const final override { return CoarseType::Other; }
+    CoarseType coarseType() const final { return CoarseType::Other; }
 
     Size size(mozilla::MallocSizeOf mallocSizeOf) const override;
 
     const char16_t* typeName() const override { return concreteTypeName; }
     static const char16_t concreteTypeName[];
 };
 
 } // namespace ubi
--- a/js/src/vm/Scope.h
+++ b/js/src/vm/Scope.h
@@ -1572,17 +1572,17 @@ class Concrete<js::Scope> : TracerConcre
   protected:
     explicit Concrete(js::Scope* ptr) : TracerConcrete<js::Scope>(ptr) { }
 
   public:
     static void construct(void* storage, js::Scope* ptr) {
         new (storage) Concrete(ptr);
     }
 
-    CoarseType coarseType() const final override { return CoarseType::Script; }
+    CoarseType coarseType() const final { return CoarseType::Script; }
 
     Size size(mozilla::MallocSizeOf mallocSizeOf) const override;
 
     const char16_t* typeName() const override { return concreteTypeName; }
     static const char16_t concreteTypeName[];
 };
 
 } // namespace ubi
--- a/js/src/vm/UbiNodeCensus.cpp
+++ b/js/src/vm/UbiNodeCensus.cpp
@@ -141,17 +141,17 @@ class BucketCount : public CountType {
     { }
 
     void destructCount(CountBase& countBase) override {
         Count& count = static_cast<Count&>(countBase);
         count.~Count();
     }
 
     CountBasePtr makeCount() override { return CountBasePtr(js_new<Count>(*this)); }
-    void traceCount(CountBase& countBase, JSTracer* trc) final override { }
+    void traceCount(CountBase& countBase, JSTracer* trc) final { }
     bool count(CountBase& countBase, mozilla::MallocSizeOf mallocSizeOf, const Node& node) override;
     bool report(JSContext* cx, CountBase& countBase, MutableHandleValue report) override;
 };
 
 bool
 BucketCount::count(CountBase& countBase, mozilla::MallocSizeOf mallocSizeOf, const Node& node)
 {
     Count& count = static_cast<Count&>(countBase);
--- a/js/src/wasm/WasmBaselineCompile.cpp
+++ b/js/src/wasm/WasmBaselineCompile.cpp
@@ -2170,17 +2170,17 @@ class BaseCompiler final : public BaseCo
     //  - Operations that need specific registers: multiply, quotient,
     //    remainder, will tend to sync because the registers we need
     //    will tend to be allocated.  We may be able to avoid that by
     //    prioritizing registers differently (takeLast instead of
     //    takeFirst) but we may also be able to allocate an unused
     //    register on demand to free up one we need, thus avoiding the
     //    sync.  That type of fix would go into needI32().
 
-    void sync() final override {
+    void sync() final {
         size_t start = 0;
         size_t lim = stk_.length();
 
         for (size_t i = lim; i > 0; i--) {
             // Memory opcodes are first in the enum, single check against MemLast is fine.
             if (stk_[i - 1].kind() <= Stk::MemLast) {
                 start = i;
                 break;
--- a/layout/base/nsPresContext.cpp
+++ b/layout/base/nsPresContext.cpp
@@ -2357,17 +2357,17 @@ public:
   CounterStyleCleaner(nsRefreshDriver* aRefreshDriver,
                       CounterStyleManager* aCounterStyleManager)
     : mRefreshDriver(aRefreshDriver)
     , mCounterStyleManager(aCounterStyleManager)
   {
   }
   virtual ~CounterStyleCleaner() {}
 
-  void DidRefresh() final override
+  void DidRefresh() final
   {
     mRefreshDriver->RemovePostRefreshObserver(this);
     mCounterStyleManager->CleanRetiredStyles();
     delete this;
   }
 
 private:
   RefPtr<nsRefreshDriver> mRefreshDriver;
--- a/layout/generic/nsTextFrame.h
+++ b/layout/generic/nsTextFrame.h
@@ -76,21 +76,21 @@ public:
   void Init(nsIContent* aContent,
             nsContainerFrame* aParent,
             nsIFrame* aPrevInFlow) override;
 
   void DestroyFrom(nsIFrame* aDestructRoot, PostDestroyData& aPostDestroyData) override;
 
   nsresult GetCursor(const nsPoint& aPoint, nsIFrame::Cursor& aCursor) override;
 
-  nsresult CharacterDataChanged(CharacterDataChangeInfo* aInfo) final override;
+  nsresult CharacterDataChanged(CharacterDataChangeInfo* aInfo) final;
 
   nsTextFrame* GetPrevContinuation() const override { return nullptr; }
-  nsTextFrame* GetNextContinuation() const final override { return mNextContinuation; }
-  void SetNextContinuation(nsIFrame* aNextContinuation) final override
+  nsTextFrame* GetNextContinuation() const final { return mNextContinuation; }
+  void SetNextContinuation(nsIFrame* aNextContinuation) final
   {
     NS_ASSERTION(!aNextContinuation || Type() == aNextContinuation->Type(),
                  "setting a next continuation with incorrect type!");
     NS_ASSERTION(
       !nsSplittableFrame::IsInNextContinuationChain(aNextContinuation, this),
       "creating a loop in continuation chain!");
     mNextContinuation = static_cast<nsTextFrame*>(aNextContinuation);
     if (aNextContinuation)
@@ -106,17 +106,17 @@ public:
   nsTextFrame* GetNextInFlow() const
   {
     return mNextContinuation &&
                (mNextContinuation->GetStateBits() &
                 NS_FRAME_IS_FLUID_CONTINUATION)
              ? mNextContinuation
              : nullptr;
   }
-  void SetNextInFlow(nsIFrame* aNextInFlow) final override
+  void SetNextInFlow(nsIFrame* aNextInFlow) final
   {
     NS_ASSERTION(!aNextInFlow || Type() == aNextInFlow->Type(),
                  "setting a next in flow with incorrect type!");
     NS_ASSERTION(
       !nsSplittableFrame::IsInNextContinuationChain(aNextInFlow, this),
       "creating a loop in continuation chain!");
     mNextContinuation = static_cast<nsTextFrame*>(aNextInFlow);
     if (mNextContinuation &&
@@ -127,25 +127,25 @@ public:
         GetContent()->DeleteProperty(nsGkAtoms::flowlength);
         GetContent()->UnsetFlags(NS_HAS_FLOWLENGTH_PROPERTY);
       }
     }
     if (aNextInFlow) {
       aNextInFlow->AddStateBits(NS_FRAME_IS_FLUID_CONTINUATION);
     }
   }
-  nsTextFrame* LastInFlow() const final override;
-  nsTextFrame* LastContinuation() const final override;
+  nsTextFrame* LastInFlow() const final;
+  nsTextFrame* LastContinuation() const final;
 
-  nsSplittableType GetSplittableType() const final override
+  nsSplittableType GetSplittableType() const final
   {
     return NS_FRAME_SPLITTABLE;
   }
 
-  bool IsFrameOfType(uint32_t aFlags) const final override
+  bool IsFrameOfType(uint32_t aFlags) const final
   {
     // Set the frame state bit for text frames to mark them as replaced.
     // XXX kipp: temporary
     return nsFrame::IsFrameOfType(
       aFlags & ~(nsIFrame::eReplaced | nsIFrame::eLineParticipant));
   }
 
   bool ShouldSuppressLineBreak() const
@@ -233,17 +233,17 @@ public:
                                          bool inHint,
                                          int32_t* outFrameContentOffset,
                                          nsIFrame** outChildFrame) override;
 
   bool IsVisibleInSelection(nsISelection* aSelection) override;
 
   bool IsEmpty() override;
   bool IsSelfEmpty() override { return IsEmpty(); }
-  nscoord GetLogicalBaseline(mozilla::WritingMode aWritingMode) const final override;
+  nscoord GetLogicalBaseline(mozilla::WritingMode aWritingMode) const final;
 
   bool HasSignificantTerminalNewline() const override;
 
   /**
    * Returns true if this text frame is logically adjacent to the end of the
    * line.
    */
   bool IsAtEndOfLine() const;
--- a/layout/printing/PrintTranslator.h
+++ b/layout/printing/PrintTranslator.h
@@ -32,153 +32,153 @@ using gfx::NativeFontResource;
 
 class PrintTranslator final : public Translator
 {
 public:
   explicit PrintTranslator(nsDeviceContext* aDeviceContext);
 
   bool TranslateRecording(PRFileDescStream& aRecording);
 
-  DrawTarget* LookupDrawTarget(ReferencePtr aRefPtr) final override
+  DrawTarget* LookupDrawTarget(ReferencePtr aRefPtr) final
   {
     DrawTarget* result = mDrawTargets.GetWeak(aRefPtr);
     MOZ_ASSERT(result);
     return result;
   }
 
-  Path* LookupPath(ReferencePtr aRefPtr) final override
+  Path* LookupPath(ReferencePtr aRefPtr) final
   {
     Path* result = mPaths.GetWeak(aRefPtr);
     MOZ_ASSERT(result);
     return result;
   }
 
-  SourceSurface* LookupSourceSurface(ReferencePtr aRefPtr) final override
+  SourceSurface* LookupSourceSurface(ReferencePtr aRefPtr) final
   {
     SourceSurface* result = mSourceSurfaces.GetWeak(aRefPtr);
     MOZ_ASSERT(result);
     return result;
   }
 
-  FilterNode* LookupFilterNode(ReferencePtr aRefPtr) final override
+  FilterNode* LookupFilterNode(ReferencePtr aRefPtr) final
   {
     FilterNode* result = mFilterNodes.GetWeak(aRefPtr);
     MOZ_ASSERT(result);
     return result;
   }
 
-  GradientStops* LookupGradientStops(ReferencePtr aRefPtr) final override
+  GradientStops* LookupGradientStops(ReferencePtr aRefPtr) final
   {
     GradientStops* result =  mGradientStops.GetWeak(aRefPtr);
     MOZ_ASSERT(result);
     return result;
   }
 
-  ScaledFont* LookupScaledFont(ReferencePtr aRefPtr) final override
+  ScaledFont* LookupScaledFont(ReferencePtr aRefPtr) final
   {
     ScaledFont* result = mScaledFonts.GetWeak(aRefPtr);
     MOZ_ASSERT(result);
     return result;
   }
 
-  UnscaledFont* LookupUnscaledFont(ReferencePtr aRefPtr) final override
+  UnscaledFont* LookupUnscaledFont(ReferencePtr aRefPtr) final
   {
     UnscaledFont* result = mUnscaledFonts.GetWeak(aRefPtr);
     MOZ_ASSERT(result);
     return result;
   }
 
-  NativeFontResource* LookupNativeFontResource(uint64_t aKey) final override
+  NativeFontResource* LookupNativeFontResource(uint64_t aKey) final
   {
     NativeFontResource* result = mNativeFontResources.GetWeak(aKey);
     MOZ_ASSERT(result);
     return result;
   }
 
-  void AddDrawTarget(ReferencePtr aRefPtr, DrawTarget *aDT) final override
+  void AddDrawTarget(ReferencePtr aRefPtr, DrawTarget *aDT) final
   {
     mDrawTargets.Put(aRefPtr, aDT);
   }
 
-  void AddPath(ReferencePtr aRefPtr, Path *aPath) final override
+  void AddPath(ReferencePtr aRefPtr, Path *aPath) final
   {
     mPaths.Put(aRefPtr, aPath);
   }
 
-  void AddSourceSurface(ReferencePtr aRefPtr, SourceSurface *aSurface) final override
+  void AddSourceSurface(ReferencePtr aRefPtr, SourceSurface *aSurface) final
   {
     mSourceSurfaces.Put(aRefPtr, aSurface);
   }
 
-  void AddFilterNode(ReferencePtr aRefPtr, FilterNode *aFilter) final override
+  void AddFilterNode(ReferencePtr aRefPtr, FilterNode *aFilter) final
   {
     mFilterNodes.Put(aRefPtr, aFilter);
   }
 
-  void AddGradientStops(ReferencePtr aRefPtr, GradientStops *aStops) final override
+  void AddGradientStops(ReferencePtr aRefPtr, GradientStops *aStops) final
   {
     mGradientStops.Put(aRefPtr, aStops);
   }
 
-  void AddScaledFont(ReferencePtr aRefPtr, ScaledFont *aScaledFont) final override
+  void AddScaledFont(ReferencePtr aRefPtr, ScaledFont *aScaledFont) final
   {
     mScaledFonts.Put(aRefPtr, aScaledFont);
   }
 
-  void AddUnscaledFont(ReferencePtr aRefPtr, UnscaledFont* aUnscaledFont) final override
+  void AddUnscaledFont(ReferencePtr aRefPtr, UnscaledFont* aUnscaledFont) final
   {
     mUnscaledFonts.Put(aRefPtr, aUnscaledFont);
   }
 
   void AddNativeFontResource(uint64_t aKey,
-                             NativeFontResource *aScaledFontResouce) final override
+                             NativeFontResource *aScaledFontResouce) final
   {
     mNativeFontResources.Put(aKey, aScaledFontResouce);
   }
 
-  void RemoveDrawTarget(ReferencePtr aRefPtr) final override
+  void RemoveDrawTarget(ReferencePtr aRefPtr) final
   {
     mDrawTargets.Remove(aRefPtr);
   }
 
-  void RemovePath(ReferencePtr aRefPtr) final override
+  void RemovePath(ReferencePtr aRefPtr) final
   {
     mPaths.Remove(aRefPtr);
   }
 
-  void RemoveSourceSurface(ReferencePtr aRefPtr) final override
+  void RemoveSourceSurface(ReferencePtr aRefPtr) final
   {
     mSourceSurfaces.Remove(aRefPtr);
   }
 
-  void RemoveFilterNode(ReferencePtr aRefPtr) final override
+  void RemoveFilterNode(ReferencePtr aRefPtr) final
   {
     mFilterNodes.Remove(aRefPtr);
   }
 
-  void RemoveGradientStops(ReferencePtr aRefPtr) final override
+  void RemoveGradientStops(ReferencePtr aRefPtr) final
   {
     mGradientStops.Remove(aRefPtr);
   }
 
-  void RemoveScaledFont(ReferencePtr aRefPtr) final override
+  void RemoveScaledFont(ReferencePtr aRefPtr) final
   {
     mScaledFonts.Remove(aRefPtr);
   }
 
-  void RemoveUnscaledFont(ReferencePtr aRefPtr) final override
+  void RemoveUnscaledFont(ReferencePtr aRefPtr) final
   {
     mUnscaledFonts.Remove(aRefPtr);
   }
 
   already_AddRefed<DrawTarget> CreateDrawTarget(ReferencePtr aRefPtr,
                                                 const gfx::IntSize &aSize,
-                                                gfx::SurfaceFormat aFormat) final override;
+                                                gfx::SurfaceFormat aFormat) final;
 
-  mozilla::gfx::DrawTarget* GetReferenceDrawTarget() final override { return mBaseDT; }
+  mozilla::gfx::DrawTarget* GetReferenceDrawTarget() final { return mBaseDT; }
 
 private:
   RefPtr<nsDeviceContext> mDeviceContext;
   RefPtr<DrawTarget> mBaseDT;
 
   nsRefPtrHashtable<nsPtrHashKey<void>, DrawTarget> mDrawTargets;
   nsRefPtrHashtable<nsPtrHashKey<void>, Path> mPaths;
   nsRefPtrHashtable<nsPtrHashKey<void>, SourceSurface> mSourceSurfaces;
--- a/layout/printing/ipc/RemotePrintJobChild.h
+++ b/layout/printing/ipc/RemotePrintJobChild.h
@@ -22,32 +22,32 @@ class RemotePrintJobChild final : public
                                 , public nsIWebProgressListener
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIWEBPROGRESSLISTENER
 
   RemotePrintJobChild();
 
-  void ActorDestroy(ActorDestroyReason aWhy) final override;
+  void ActorDestroy(ActorDestroyReason aWhy) final;
 
   nsresult InitializePrint(const nsString& aDocumentTitle,
                            const nsString& aPrintToFile,
                            const int32_t& aStartPage,
                            const int32_t& aEndPage);
 
   mozilla::ipc::IPCResult RecvPrintInitializationResult(
     const nsresult& aRv,
-    const FileDescriptor& aFd) final override;
+    const FileDescriptor& aFd) final;
 
   void ProcessPage();
 
-  mozilla::ipc::IPCResult RecvPageProcessed(const FileDescriptor& aFd) final override;
+  mozilla::ipc::IPCResult RecvPageProcessed(const FileDescriptor& aFd) final;
 
-  mozilla::ipc::IPCResult RecvAbortPrint(const nsresult& aRv) final override;
+  mozilla::ipc::IPCResult RecvAbortPrint(const nsresult& aRv) final;
 
   void SetPagePrintTimer(nsPagePrintTimer* aPagePrintTimer);
 
   void SetPrintJob(nsPrintJob* aPrintJob);
 
   PRFileDesc* GetNextPageFD();
 
 private:
--- a/layout/printing/ipc/RemotePrintJobParent.h
+++ b/layout/printing/ipc/RemotePrintJobParent.h
@@ -24,38 +24,38 @@ class PrintTranslator;
 namespace mozilla {
 namespace layout {
 
 class RemotePrintJobParent final : public PRemotePrintJobParent
 {
 public:
   explicit RemotePrintJobParent(nsIPrintSettings* aPrintSettings);
 
-  void ActorDestroy(ActorDestroyReason aWhy) final override;
+  void ActorDestroy(ActorDestroyReason aWhy) final;
 
   mozilla::ipc::IPCResult RecvInitializePrint(const nsString& aDocumentTitle,
                                               const nsString& aPrintToFile,
                                               const int32_t& aStartPage,
-                                              const int32_t& aEndPage) final override;
+                                              const int32_t& aEndPage) final;
 
-  mozilla::ipc::IPCResult RecvProcessPage() final override;
+  mozilla::ipc::IPCResult RecvProcessPage() final;
 
-  mozilla::ipc::IPCResult RecvFinalizePrint() final override;
+  mozilla::ipc::IPCResult RecvFinalizePrint() final;
 
-  mozilla::ipc::IPCResult RecvAbortPrint(const nsresult& aRv) final override;
+  mozilla::ipc::IPCResult RecvAbortPrint(const nsresult& aRv) final;
 
   mozilla::ipc::IPCResult RecvStateChange(const long& aStateFlags,
-                                          const nsresult& aStatus) final override;
+                                          const nsresult& aStatus) final;
 
   mozilla::ipc::IPCResult RecvProgressChange(const long& aCurSelfProgress,
                                              const long& aMaxSelfProgress,
                                              const long& aCurTotalProgress,
-                                             const long& aMaxTotalProgress) final override;
+                                             const long& aMaxTotalProgress) final;
 
-  mozilla::ipc::IPCResult RecvStatusChange(const nsresult& aStatus) final override;
+  mozilla::ipc::IPCResult RecvStatusChange(const nsresult& aStatus) final;
 
   /**
     * Register a progress listener to receive print progress updates.
     *
     * @param aListener the progress listener to register. Must not be null.
     */
   void RegisterListener(nsIWebProgressListener* aListener);
 
--- a/layout/style/CSSFontFeatureValuesRule.h
+++ b/layout/style/CSSFontFeatureValuesRule.h
@@ -14,21 +14,21 @@
 namespace mozilla {
 namespace dom {
 
 class CSSFontFeatureValuesRule : public css::Rule
 {
 public:
   virtual bool IsCCLeaf() const override;
 
-  int32_t GetType() const final override { return Rule::FONT_FEATURE_VALUES_RULE; }
+  int32_t GetType() const final { return Rule::FONT_FEATURE_VALUES_RULE; }
   virtual already_AddRefed<mozilla::css::Rule> Clone() const override = 0;
 
   // WebIDL interfaces
-  uint16_t Type() const final override { return CSSRuleBinding::FONT_FEATURE_VALUES_RULE; }
+  uint16_t Type() const final { return CSSRuleBinding::FONT_FEATURE_VALUES_RULE; }
   virtual void GetCssText(nsAString& aCssText) const override = 0;
   virtual void GetFontFamily(nsAString& aFamily) = 0;
   virtual void SetFontFamily(const nsAString& aFamily, mozilla::ErrorResult& aRv) = 0;
   virtual void GetValueText(nsAString& aValueText) = 0;
   virtual void SetValueText(const nsAString& aValueText, mozilla::ErrorResult& aRv) = 0;
 
   virtual size_t
   SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override = 0;
--- a/layout/style/CSSImportRule.h
+++ b/layout/style/CSSImportRule.h
@@ -14,25 +14,25 @@ namespace dom {
 
 class CSSImportRule : public css::Rule
 {
 protected:
   using Rule::Rule;
   virtual ~CSSImportRule() {}
 
 public:
-  bool IsCCLeaf() const final override;
+  bool IsCCLeaf() const final;
 
-  int32_t GetType() const final override { return css::Rule::IMPORT_RULE; }
+  int32_t GetType() const final { return css::Rule::IMPORT_RULE; }
 
   size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf)
     const override = 0;
 
   // WebIDL interface
-  uint16_t Type() const final override { return CSSRuleBinding::IMPORT_RULE; }
+  uint16_t Type() const final { return CSSRuleBinding::IMPORT_RULE; }
   virtual void GetHref(nsAString& aHref) const = 0;
   virtual dom::MediaList* GetMedia() const = 0;
   virtual StyleSheet* GetStyleSheet() const = 0;
 
   JSObject* WrapObject(JSContext* aCx,
                        JS::Handle<JSObject*> aGivenProto) override;
 };
 
--- a/layout/style/CSSKeyframeRule.h
+++ b/layout/style/CSSKeyframeRule.h
@@ -16,26 +16,26 @@ namespace dom {
 
 class CSSKeyframeRule : public css::Rule
 {
 protected:
   using css::Rule::Rule;
   virtual ~CSSKeyframeRule() {}
 
 public:
-  int32_t GetType() const final override { return Rule::KEYFRAME_RULE; }
+  int32_t GetType() const final { return Rule::KEYFRAME_RULE; }
   bool IsCCLeaf() const override { return Rule::IsCCLeaf(); }
 
   // WebIDL interface
-  uint16_t Type() const final override { return CSSRuleBinding::KEYFRAME_RULE; }
+  uint16_t Type() const final { return CSSRuleBinding::KEYFRAME_RULE; }
   virtual void GetKeyText(nsAString& aKey) = 0;
   virtual void SetKeyText(const nsAString& aKey) = 0;
   virtual nsICSSDeclaration* Style() = 0;
 
   size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override = 0;
 
-  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final override;
+  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_CSSKeyframeRule_h
--- a/layout/style/CSSKeyframesRule.h
+++ b/layout/style/CSSKeyframesRule.h
@@ -15,33 +15,33 @@ namespace dom {
 
 class CSSKeyframesRule : public css::GroupRule
 {
 protected:
   using css::GroupRule::GroupRule;
   virtual ~CSSKeyframesRule() {}
 
 public:
-  int32_t GetType() const final override { return Rule::KEYFRAMES_RULE; }
+  int32_t GetType() const final { return Rule::KEYFRAMES_RULE; }
 
   // WebIDL interface
-  uint16_t Type() const final override { return CSSRuleBinding::KEYFRAMES_RULE; }
+  uint16_t Type() const final { return CSSRuleBinding::KEYFRAMES_RULE; }
   virtual void GetName(nsAString& aName) const = 0;
   virtual void SetName(const nsAString& aName) = 0;
   virtual CSSRuleList* CssRules() = 0;
   virtual void AppendRule(const nsAString& aRule) = 0;
   virtual void DeleteRule(const nsAString& aKey) = 0;
   virtual CSSKeyframeRule* FindRule(const nsAString& aKey) = 0;
 
 #ifdef MOZ_OLD_STYLE
   bool UseForPresentation(nsPresContext* aPresContext,
-                          nsMediaQueryResultCacheKey& aKey) final override;
+                          nsMediaQueryResultCacheKey& aKey) final;
 #endif
 
   size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override = 0;
 
-  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final override;
+  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_CSSKeyframesRule_h
--- a/layout/style/CSSMozDocumentRule.h
+++ b/layout/style/CSSMozDocumentRule.h
@@ -15,26 +15,26 @@ namespace dom {
 
 class CSSMozDocumentRule : public css::ConditionRule
 {
 protected:
   using ConditionRule::ConditionRule;
   virtual ~CSSMozDocumentRule() {}
 
 public:
-  int32_t GetType() const final override { return css::Rule::DOCUMENT_RULE; }
+  int32_t GetType() const final { return css::Rule::DOCUMENT_RULE; }
 
   static bool Match(nsIDocument* aDoc,
                     nsIURI* aDocURI,
                     const nsACString& aDocURISpec,
                     const nsACString& aPattern,
                     css::URLMatchingFunction aUrlMatchingFunction);
 
   // WebIDL interface
-  uint16_t Type() const final override { return CSSRuleBinding::DOCUMENT_RULE; }
+  uint16_t Type() const final { return CSSRuleBinding::DOCUMENT_RULE; }
 
   JSObject* WrapObject(JSContext* aCx,
                        JS::Handle<JSObject*> aGivenProto) override;
 };
 
 } // namespace dom
 } // namespace mozilla
 
--- a/layout/style/CSSNamespaceRule.h
+++ b/layout/style/CSSNamespaceRule.h
@@ -16,39 +16,39 @@ namespace mozilla {
 namespace dom {
 
 class CSSNamespaceRule : public css::Rule
 {
 protected:
   using Rule::Rule;
 
 public:
-  bool IsCCLeaf() const final override {
+  bool IsCCLeaf() const final {
     return Rule::IsCCLeaf();
   }
-  int32_t GetType() const final override {
+  int32_t GetType() const final {
     return Rule::NAMESPACE_RULE;
   }
 
   virtual nsAtom* GetPrefix() const = 0;
   virtual void GetURLSpec(nsString& aURLSpec) const = 0;
 
   // WebIDL interfaces
-  uint16_t Type() const final override { return CSSRuleBinding::NAMESPACE_RULE; }
+  uint16_t Type() const final { return CSSRuleBinding::NAMESPACE_RULE; }
   void GetNamespaceURI(nsString& aNamespaceURI) {
     GetURLSpec(aNamespaceURI);
   }
   void GetPrefix(DOMString& aPrefix) {
     aPrefix.SetKnownLiveAtom(GetPrefix(), DOMString::eTreatNullAsEmpty);
   }
 
   size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override = 0;
 
   JSObject* WrapObject(JSContext* aCx,
-                       JS::Handle<JSObject*> aGivenProto) final override {
+                       JS::Handle<JSObject*> aGivenProto) final {
     return CSSNamespaceRuleBinding::Wrap(aCx, this, aGivenProto);
   }
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_CSSNamespaceRule_h
--- a/layout/style/CSSPageRule.h
+++ b/layout/style/CSSPageRule.h
@@ -18,20 +18,20 @@ class CSSPageRule : public css::Rule
 {
 protected:
   using Rule::Rule;
   virtual ~CSSPageRule() {};
 
 public:
   virtual bool IsCCLeaf() const override = 0;
 
-  int32_t GetType() const final override { return Rule::PAGE_RULE; }
+  int32_t GetType() const final { return Rule::PAGE_RULE; }
 
   // WebIDL interfaces
-  uint16_t Type() const final override { return CSSRuleBinding::PAGE_RULE; }
+  uint16_t Type() const final { return CSSRuleBinding::PAGE_RULE; }
   virtual void GetCssText(nsAString& aCssText) const override = 0;
   virtual nsICSSDeclaration* Style() = 0;
 
   virtual size_t
   SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override = 0;
 
   JSObject*
   WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
--- a/layout/style/CSSRuleList.h
+++ b/layout/style/CSSRuleList.h
@@ -17,17 +17,17 @@ namespace dom {
 class CSSRuleList : public nsISupports
                   , public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(CSSRuleList)
 
   virtual StyleSheet* GetParentObject() = 0;
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override final;
+  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;
 
   // WebIDL API
   css::Rule* Item(uint32_t aIndex)
   {
     bool unused;
     return IndexedGetter(aIndex, unused);
   }
 
--- a/layout/style/CSSStyleSheet.h
+++ b/layout/style/CSSStyleSheet.h
@@ -113,17 +113,17 @@ public:
 
   nsXMLNameSpaceMap* GetNameSpaceMap() const {
     return Inner()->mNameSpaceMap;
   }
 
   already_AddRefed<StyleSheet> Clone(StyleSheet* aCloneParent,
     dom::CSSImportRule* aCloneOwnerRule,
     nsIDocument* aCloneDocument,
-    nsINode* aCloneOwningNode) const final override;
+    nsINode* aCloneOwningNode) const final;
 
   nsresult AddRuleProcessor(nsCSSRuleProcessor* aProcessor);
   nsresult DropRuleProcessor(nsCSSRuleProcessor* aProcessor);
 
   // nsICSSLoaderObserver interface
   NS_IMETHOD StyleSheetLoaded(StyleSheet* aSheet, bool aWasAlternate,
                               nsresult aStatus) override;
 
--- a/layout/style/CounterStyleManager.cpp
+++ b/layout/style/CounterStyleManager.cpp
@@ -578,17 +578,17 @@ class BuiltinCounterStyle : public Count
 {
 public:
   constexpr BuiltinCounterStyle(int32_t aStyle, nsStaticAtom** aName)
     : CounterStyle(aStyle)
     , mName(aName)
   {
   }
 
-  virtual nsStaticAtom* GetStyleName() const final override;
+  nsStaticAtom* GetStyleName() const final;
   virtual void GetPrefix(nsAString& aResult) override;
   virtual void GetSuffix(nsAString& aResult) override;
   virtual void GetSpokenCounterText(CounterValue aOrdinal,
                                     WritingMode aWritingMode,
                                     nsAString& aResult,
                                     bool& aIsBullet) override;
   virtual bool IsBullet() override;
 
--- a/layout/style/ImportRule.h
+++ b/layout/style/ImportRule.h
@@ -49,19 +49,19 @@ public:
   virtual already_AddRefed<Rule> Clone() const override;
 
   void SetSheet(CSSStyleSheet*);
 
   virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
 
   // WebIDL interface
   void GetCssText(nsAString& aCssText) const override;
-  void GetHref(nsAString& aHref) const final override;
-  dom::MediaList* GetMedia() const final override;
-  StyleSheet* GetStyleSheet() const final override;
+  void GetHref(nsAString& aHref) const final;
+  dom::MediaList* GetMedia() const final;
+  StyleSheet* GetStyleSheet() const final;
 
 private:
   nsString  mURLSpec;
   RefPtr<nsMediaList> mMedia;
   RefPtr<CSSStyleSheet> mChildSheet;
 };
 
 } // namespace css
--- a/layout/style/MediaList.h
+++ b/layout/style/MediaList.h
@@ -45,17 +45,17 @@ public:
    */
   static already_AddRefed<MediaList> Create(StyleBackendType,
                                             const nsAString& aMedia,
                                             CallerType aCallerType =
                                               CallerType::NonSystem);
 
   virtual already_AddRefed<MediaList> Clone() = 0;
 
-  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final override;
+  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;
   nsISupports* GetParentObject() const { return nullptr; }
 
   virtual void GetText(nsAString& aMediaText) = 0;
   virtual void SetText(const nsAString& aMediaText) = 0;
   virtual bool Matches(nsPresContext* aPresContext) const = 0;
 
 #ifdef DEBUG
   virtual bool IsServo() const = 0;
--- a/layout/style/NameSpaceRule.h
+++ b/layout/style/NameSpaceRule.h
@@ -37,23 +37,23 @@ public:
 
   NS_DECL_ISUPPORTS_INHERITED
 
 #ifdef DEBUG
   virtual void List(FILE* out = stdout, int32_t aIndent = 0) const override;
 #endif
   virtual already_AddRefed<Rule> Clone() const override;
 
-  nsAtom* GetPrefix() const final override { return mPrefix; }
-  void GetURLSpec(nsString& aURLSpec) const final override { aURLSpec = mURLSpec; }
+  nsAtom* GetPrefix() const final { return mPrefix; }
+  void GetURLSpec(nsString& aURLSpec) const final { aURLSpec = mURLSpec; }
 
   // WebIDL interface
   void GetCssText(nsAString& aCssText) const override;
 
-  size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final override;
+  size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final;
 
 private:
   RefPtr<nsAtom> mPrefix;
   nsString          mURLSpec;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(NameSpaceRule, NS_CSS_NAMESPACE_RULE_IMPL_CID)
 
--- a/layout/style/ServoCSSRuleList.h
+++ b/layout/style/ServoCSSRuleList.h
@@ -33,20 +33,20 @@ public:
                    ServoStyleSheet* aDirectOwnerStyleSheet);
   css::GroupRule* GetParentRule() const { return mParentRule; }
   void SetParentRule(css::GroupRule* aParentRule);
   void SetStyleSheet(StyleSheet* aSheet);
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ServoCSSRuleList, dom::CSSRuleList)
 
-  ServoStyleSheet* GetParentObject() final override { return mStyleSheet; }
+  ServoStyleSheet* GetParentObject() final { return mStyleSheet; }
 
-  css::Rule* IndexedGetter(uint32_t aIndex, bool& aFound) final override;
-  uint32_t Length() final override { return mRules.Length(); }
+  css::Rule* IndexedGetter(uint32_t aIndex, bool& aFound) final;
+  uint32_t Length() final { return mRules.Length(); }
 
   void DropReference();
 
   css::Rule* GetRule(uint32_t aIndex);
   nsresult InsertRule(const nsAString& aRule, uint32_t aIndex);
   nsresult DeleteRule(uint32_t aIndex);
 
   uint16_t GetDOMCSSRuleType(uint32_t aIndex) const;
--- a/layout/style/ServoDocumentRule.h
+++ b/layout/style/ServoDocumentRule.h
@@ -20,29 +20,29 @@ public:
   ServoDocumentRule(RefPtr<RawServoDocumentRule> aRawRule,
                     uint32_t aLine, uint32_t aColumn);
 
   NS_DECL_ISUPPORTS_INHERITED
 
   already_AddRefed<css::Rule> Clone() const override;
 #ifdef MOZ_OLD_STYLE
   bool UseForPresentation(nsPresContext* aPresContext,
-                          nsMediaQueryResultCacheKey& aKey) final override;
+                          nsMediaQueryResultCacheKey& aKey) final;
 #endif
 #ifdef DEBUG
-  void List(FILE* out = stdout, int32_t aIndent = 0) const final override;
+  void List(FILE* out = stdout, int32_t aIndent = 0) const final;
 #endif
 
   RawServoDocumentRule* Raw() const { return mRawRule; }
 
   // WebIDL interface
-  void GetCssText(nsAString& aCssText) const final override;
-  void GetConditionText(nsAString& aConditionText) final override;
+  void GetCssText(nsAString& aCssText) const final;
+  void GetConditionText(nsAString& aConditionText) final;
   void SetConditionText(const nsAString& aConditionText,
-                        ErrorResult& aRv) final override;
+                        ErrorResult& aRv) final;
 
   size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf)
     const override;
 
 private:
   virtual ~ServoDocumentRule();
 
   RefPtr<RawServoDocumentRule> mRawRule;
--- a/layout/style/ServoFontFeatureValuesRule.h
+++ b/layout/style/ServoFontFeatureValuesRule.h
@@ -19,28 +19,28 @@ class ServoFontFeatureValuesRule final :
 public:
   ServoFontFeatureValuesRule(RefPtr<RawServoFontFeatureValuesRule> aRawRule,
                              uint32_t aLine, uint32_t aColumn);
 
   RawServoFontFeatureValuesRule* Raw() const { return mRawRule; }
 
   // WebIDL interface
   void GetCssText(nsAString& aCssText) const override;
-  void GetFontFamily(nsAString& aFamily) final override;
-  void SetFontFamily(const nsAString& aFamily, mozilla::ErrorResult& aRv) final override;
-  void GetValueText(nsAString& aValueText) final override;
-  void SetValueText(const nsAString& aValueText, mozilla::ErrorResult& aRv) final override;
+  void GetFontFamily(nsAString& aFamily) final;
+  void SetFontFamily(const nsAString& aFamily, mozilla::ErrorResult& aRv) final;
+  void GetValueText(nsAString& aValueText) final;
+  void SetValueText(const nsAString& aValueText, mozilla::ErrorResult& aRv) final;
 
   // Methods of mozilla::css::Rule
-  already_AddRefed<css::Rule> Clone() const final override;
+  already_AddRefed<css::Rule> Clone() const final;
   size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf)
-    const final override;
+    const final;
 
   #ifdef DEBUG
-    void List(FILE* out = stdout, int32_t aIndent = 0) const final override;
+    void List(FILE* out = stdout, int32_t aIndent = 0) const final;
   #endif
 
 private:
   ~ServoFontFeatureValuesRule();
 
   RefPtr<RawServoFontFeatureValuesRule> mRawRule;
 };
 
--- a/layout/style/ServoImportRule.h
+++ b/layout/style/ServoImportRule.h
@@ -22,26 +22,26 @@ class ServoImportRule final : public dom
 public:
   ServoImportRule(RefPtr<RawServoImportRule> aRawRule,
                   uint32_t aLine, uint32_t aColumn);
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ServoImportRule, dom::CSSImportRule)
 
 #ifdef DEBUG
-  void List(FILE* out = stdout, int32_t aIndent = 0) const final override;
+  void List(FILE* out = stdout, int32_t aIndent = 0) const final;
 #endif
-  already_AddRefed<css::Rule> Clone() const final override;
-  size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final override;
+  already_AddRefed<css::Rule> Clone() const final;
+  size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final;
 
   // WebIDL interface
   void GetCssText(nsAString& aCssText) const override;
-  void GetHref(nsAString& aHref) const final override;
-  dom::MediaList* GetMedia() const final override;
-  StyleSheet* GetStyleSheet() const final override;
+  void GetHref(nsAString& aHref) const final;
+  dom::MediaList* GetMedia() const final;
+  StyleSheet* GetStyleSheet() const final;
 
 private:
   ~ServoImportRule();
 
   RefPtr<RawServoImportRule> mRawRule;
   RefPtr<ServoStyleSheet> mChildSheet;
 };
 
--- a/layout/style/ServoKeyframeRule.cpp
+++ b/layout/style/ServoKeyframeRule.cpp
@@ -26,57 +26,57 @@ public:
     mDecls = new ServoDeclarationBlock(
       Servo_Keyframe_GetStyle(aRule->Raw()).Consume());
   }
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(
     ServoKeyframeDeclaration, nsICSSDeclaration)
 
-  css::Rule* GetParentRule() final override { return mRule; }
+  css::Rule* GetParentRule() final { return mRule; }
 
   void DropReference() {
     mRule = nullptr;
     mDecls->SetOwningRule(nullptr);
   }
 
-  DeclarationBlock* GetCSSDeclaration(Operation aOperation) final override
+  DeclarationBlock* GetCSSDeclaration(Operation aOperation) final
   {
     return mDecls;
   }
-  nsresult SetCSSDeclaration(DeclarationBlock* aDecls) final override
+  nsresult SetCSSDeclaration(DeclarationBlock* aDecls) final
   {
     if (!mRule) {
       return NS_OK;
     }
     mRule->UpdateRule([this, aDecls]() {
       if (mDecls != aDecls) {
         mDecls->SetOwningRule(nullptr);
         mDecls = aDecls->AsServo();
         mDecls->SetOwningRule(mRule);
         Servo_Keyframe_SetStyle(mRule->Raw(), mDecls->Raw());
       }
     });
     return NS_OK;
   }
   void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv,
-                                nsIPrincipal* aSubjectPrincipal) final override
+                                nsIPrincipal* aSubjectPrincipal) final
   {
     MOZ_ASSERT_UNREACHABLE("GetCSSParsingEnvironment "
                            "shouldn't be calling for a Servo rule");
     GetCSSParsingEnvironmentForRule(mRule, aCSSParseEnv);
   }
   ServoCSSParsingEnvironment GetServoCSSParsingEnvironment(
-      nsIPrincipal* aSubjectPrincipal) const final override
+      nsIPrincipal* aSubjectPrincipal) const final
   {
     return GetServoCSSParsingEnvironmentForRule(mRule);
   }
-  nsIDocument* DocToUpdate() final override { return nullptr; }
+  nsIDocument* DocToUpdate() final { return nullptr; }
 
-  nsINode* GetParentObject() final override
+  nsINode* GetParentObject() final
   {
     return mRule ? mRule->GetDocument() : nullptr;
   }
 
   size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
   {
     size_t n = aMallocSizeOf(this);
     // TODO we may want to add size of mDecls as well
--- a/layout/style/ServoKeyframeRule.h
+++ b/layout/style/ServoKeyframeRule.h
@@ -24,31 +24,31 @@ public:
                     uint32_t aLine, uint32_t aColumn)
     : CSSKeyframeRule(aLine, aColumn)
     , mRaw(aRaw) {}
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ServoKeyframeRule,
                                            dom::CSSKeyframeRule)
 
-  bool IsCCLeaf() const final override;
+  bool IsCCLeaf() const final;
 #ifdef DEBUG
-  void List(FILE* out = stdout, int32_t aIndent = 0) const final override;
+  void List(FILE* out = stdout, int32_t aIndent = 0) const final;
 #endif
-  already_AddRefed<mozilla::css::Rule> Clone() const final override;
+  already_AddRefed<mozilla::css::Rule> Clone() const final;
 
   RawServoKeyframe* Raw() const { return mRaw; }
 
   // WebIDL interface
-  void GetCssText(nsAString& aCssText) const final override;
-  void GetKeyText(nsAString& aKeyText) final override;
-  void SetKeyText(const nsAString& aKeyText) final override;
-  nsICSSDeclaration* Style() final override;
+  void GetCssText(nsAString& aCssText) const final;
+  void GetKeyText(nsAString& aKeyText) final;
+  void SetKeyText(const nsAString& aKeyText) final;
+  nsICSSDeclaration* Style() final;
 
-  size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const final override;
+  size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const final;
 
 private:
   virtual ~ServoKeyframeRule();
 
   friend class ServoKeyframeDeclaration;
 
   template<typename Func>
   void UpdateRule(Func aCallback);
--- a/layout/style/ServoKeyframesRule.cpp
+++ b/layout/style/ServoKeyframesRule.cpp
@@ -44,34 +44,34 @@ public:
     mStyleSheet = aSheet;
     for (css::Rule* rule : mRules) {
       if (rule) {
         rule->SetStyleSheet(aSheet);
       }
     }
   }
 
-  ServoStyleSheet* GetParentObject() final override { return mStyleSheet; }
+  ServoStyleSheet* GetParentObject() final { return mStyleSheet; }
 
   ServoKeyframeRule* GetRule(uint32_t aIndex) {
     if (!mRules[aIndex]) {
       uint32_t line = 0, column = 0;
       RefPtr<RawServoKeyframe> rule =
         Servo_KeyframesRule_GetKeyframeAt(mRawRule, aIndex,
                                           &line, &column).Consume();
       ServoKeyframeRule* ruleObj =
         new ServoKeyframeRule(rule.forget(), line, column);
       mRules.ReplaceObjectAt(ruleObj, aIndex);
       ruleObj->SetStyleSheet(mStyleSheet);
       ruleObj->SetParentRule(mParentRule);
     }
     return static_cast<ServoKeyframeRule*>(mRules[aIndex]);
   }
 
-  ServoKeyframeRule* IndexedGetter(uint32_t aIndex, bool& aFound) final override
+  ServoKeyframeRule* IndexedGetter(uint32_t aIndex, bool& aFound) final
   {
     if (aIndex >= mRules.Length()) {
       aFound = false;
       return nullptr;
     }
     aFound = true;
     return GetRule(aIndex);
   }
@@ -79,17 +79,17 @@ public:
   void AppendRule() {
     mRules.AppendObject(nullptr);
   }
 
   void RemoveRule(uint32_t aIndex) {
     mRules.RemoveObjectAt(aIndex);
   }
 
-  uint32_t Length() final override { return mRules.Length(); }
+  uint32_t Length() final { return mRules.Length(); }
 
   void DropReference()
   {
     mStyleSheet = nullptr;
     mParentRule = nullptr;
     for (css::Rule* rule : mRules) {
       if (rule) {
         rule->SetStyleSheet(nullptr);
--- a/layout/style/ServoKeyframesRule.h
+++ b/layout/style/ServoKeyframesRule.h
@@ -18,34 +18,34 @@ class ServoKeyframesRule final : public 
 {
 public:
   ServoKeyframesRule(RefPtr<RawServoKeyframesRule> aRawRule,
                      uint32_t aLine, uint32_t aColumn);
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ServoKeyframesRule,
                                            dom::CSSKeyframesRule)
-  bool IsCCLeaf() const final override;
+  bool IsCCLeaf() const final;
 
-  already_AddRefed<css::Rule> Clone() const final override;
+  already_AddRefed<css::Rule> Clone() const final;
 #ifdef DEBUG
-  void List(FILE* out = stdout, int32_t aIndent = 0) const final override;
+  void List(FILE* out = stdout, int32_t aIndent = 0) const final;
 #endif
-  void SetStyleSheet(StyleSheet* aSheet) final override;
+  void SetStyleSheet(StyleSheet* aSheet) final;
 
   // WebIDL interface
-  void GetCssText(nsAString& aCssText) const final override;
-  void GetName(nsAString& aName) const final override;
-  void SetName(const nsAString& aName) final override;
-  dom::CSSRuleList* CssRules() final override;
-  void AppendRule(const nsAString& aRule) final override;
-  void DeleteRule(const nsAString& aKey) final override;
-  dom::CSSKeyframeRule* FindRule(const nsAString& aKey) final override;
+  void GetCssText(nsAString& aCssText) const final;
+  void GetName(nsAString& aName) const final;
+  void SetName(const nsAString& aName) final;
+  dom::CSSRuleList* CssRules() final;
+  void AppendRule(const nsAString& aRule) final;
+  void DeleteRule(const nsAString& aKey) final;
+  dom::CSSKeyframeRule* FindRule(const nsAString& aKey) final;
 
-  size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final override;
+  size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final;
 
 private:
   uint32_t FindRuleIndexForKey(const nsAString& aKey);
 
   template<typename Func>
   void UpdateRule(Func aCallback);
 
   virtual ~ServoKeyframesRule();
--- a/layout/style/ServoMediaList.h
+++ b/layout/style/ServoMediaList.h
@@ -17,36 +17,36 @@ namespace mozilla {
 class ServoMediaList final : public dom::MediaList
 {
 public:
   explicit ServoMediaList(already_AddRefed<RawServoMediaList> aRawList)
     : mRawList(aRawList) {}
   ServoMediaList(const nsAString& aMedia, dom::CallerType);
   ServoMediaList();
 
-  already_AddRefed<dom::MediaList> Clone() final override;
+  already_AddRefed<dom::MediaList> Clone() final;
 
-  void GetText(nsAString& aMediaText) final override;
-  void SetText(const nsAString& aMediaText) final override;
+  void GetText(nsAString& aMediaText) final;
+  void SetText(const nsAString& aMediaText) final;
 
-  uint32_t Length() final override;
+  uint32_t Length() final;
   void IndexedGetter(uint32_t aIndex, bool& aFound,
-                     nsAString& aReturn) final override;
+                     nsAString& aReturn) final;
 
-  bool Matches(nsPresContext*) const final override;
+  bool Matches(nsPresContext*) const final;
 
 #ifdef DEBUG
-  bool IsServo() const final override { return true; }
+  bool IsServo() const final { return true; }
 #endif
 
   RawServoMediaList& RawList() { return *mRawList; }
 
 protected:
-  nsresult Delete(const nsAString& aOldMedium) final override;
-  nsresult Append(const nsAString& aNewMedium) final override;
+  nsresult Delete(const nsAString& aOldMedium) final;
+  nsresult Append(const nsAString& aNewMedium) final;
   void SetTextInternal(const nsAString& aMediaText, dom::CallerType);
 
   ~ServoMediaList() {}
 
 private:
   RefPtr<RawServoMediaList> mRawList;
 };
 
--- a/layout/style/ServoMediaRule.h
+++ b/layout/style/ServoMediaRule.h
@@ -23,31 +23,31 @@ public:
                  uint32_t aLine, uint32_t aColumn);
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ServoMediaRule, dom::CSSMediaRule)
 
   already_AddRefed<css::Rule> Clone() const override;
 #ifdef MOZ_OLD_STYLE
   bool UseForPresentation(nsPresContext* aPresContext,
-                          nsMediaQueryResultCacheKey& aKey) final override;
+                          nsMediaQueryResultCacheKey& aKey) final;
 #endif
   void SetStyleSheet(StyleSheet* aSheet) override;
 #ifdef DEBUG
-  void List(FILE* out = stdout, int32_t aIndent = 0) const final override;
+  void List(FILE* out = stdout, int32_t aIndent = 0) const final;
 #endif
 
   RawServoMediaRule* Raw() const { return mRawRule; }
 
   // WebIDL interface
-  void GetCssText(nsAString& aCssText) const final override;
-  void GetConditionText(nsAString& aConditionText) final override;
+  void GetCssText(nsAString& aCssText) const final;
+  void GetConditionText(nsAString& aConditionText) final;
   void SetConditionText(const nsAString& aConditionText,
-                        ErrorResult& aRv) final override;
-  dom::MediaList* Media() final override;
+                        ErrorResult& aRv) final;
+  dom::MediaList* Media() final;
 
   size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf)
     const override;
 
 private:
   virtual ~ServoMediaRule();
 
   RefPtr<RawServoMediaRule> mRawRule;
--- a/layout/style/ServoNamespaceRule.h
+++ b/layout/style/ServoNamespaceRule.h
@@ -21,27 +21,27 @@ public:
     , mRawRule(Move(aRule))
   {
   }
 
   NS_INLINE_DECL_REFCOUNTING_INHERITED(ServoNamespaceRule,
                                        dom::CSSNamespaceRule)
 
 #ifdef DEBUG
-  void List(FILE* out = stdout, int32_t aIndent = 0) const final override;
+  void List(FILE* out = stdout, int32_t aIndent = 0) const final;
 #endif
-  already_AddRefed<Rule> Clone() const final override;
+  already_AddRefed<Rule> Clone() const final;
 
-  nsAtom* GetPrefix() const final override;
-  void GetURLSpec(nsString& aURLSpec) const final override;
+  nsAtom* GetPrefix() const final;
+  void GetURLSpec(nsString& aURLSpec) const final;
 
   // WebIDL interface
-  void GetCssText(nsAString& aCssText) const final override;
+  void GetCssText(nsAString& aCssText) const final;
 
-  size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const final override;
+  size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const final;
 
 private:
   ~ServoNamespaceRule();
 
   RefPtr<RawServoNamespaceRule> mRawRule;
 };
 
 } // namespace mozilla
--- a/layout/style/ServoPageRule.h
+++ b/layout/style/ServoPageRule.h
@@ -23,27 +23,27 @@ class DocGroup;
 class ServoDeclarationBlock;
 class ServoPageRule;
 
 class ServoPageRuleDeclaration final : public nsDOMCSSDeclaration
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
 
-  css::Rule* GetParentRule() final override;
-  nsINode* GetParentObject() final override;
+  css::Rule* GetParentRule() final;
+  nsINode* GetParentObject() final;
 
 protected:
-  DeclarationBlock* GetCSSDeclaration(Operation aOperation) final override;
-  nsresult SetCSSDeclaration(DeclarationBlock* aDecl) final override;
-  nsIDocument* DocToUpdate() final override;
+  DeclarationBlock* GetCSSDeclaration(Operation aOperation) final;
+  nsresult SetCSSDeclaration(DeclarationBlock* aDecl) final;
+  nsIDocument* DocToUpdate() final;
   void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv,
-                                nsIPrincipal* aSubjectPrincipal) final override;
+                                nsIPrincipal* aSubjectPrincipal) final;
   nsDOMCSSDeclaration::ServoCSSParsingEnvironment
-  GetServoCSSParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final override;
+  GetServoCSSParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final;
 
 private:
   // For accessing the constructor.
   friend class ServoPageRule;
 
   explicit ServoPageRuleDeclaration(
     already_AddRefed<RawServoDeclarationBlock> aDecls);
   ~ServoPageRuleDeclaration();
@@ -59,31 +59,31 @@ class ServoPageRule final : public dom::
 public:
   ServoPageRule(RefPtr<RawServoPageRule> aRawRule,
                 uint32_t aLine, uint32_t aColumn);
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(
     ServoPageRule, dom::CSSPageRule
   )
-  bool IsCCLeaf() const final override;
+  bool IsCCLeaf() const final;
 
   RawServoPageRule* Raw() const { return mRawRule; }
 
   // WebIDL interface
-  void GetCssText(nsAString& aCssText) const final override;
-  nsICSSDeclaration* Style() final override;
+  void GetCssText(nsAString& aCssText) const final;
+  nsICSSDeclaration* Style() final;
 
   // Methods of mozilla::css::Rule
-  already_AddRefed<css::Rule> Clone() const final override;
+  already_AddRefed<css::Rule> Clone() const final;
   size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf)
-    const final override;
+    const final;
 
 #ifdef DEBUG
-  void List(FILE* out = stdout, int32_t aIndent = 0) const final override;
+  void List(FILE* out = stdout, int32_t aIndent = 0) const final;
 #endif
 
 private:
   virtual ~ServoPageRule();
 
   // For computing the offset of mDecls.
   friend class ServoPageRuleDeclaration;
 
--- a/layout/style/ServoStyleRule.h
+++ b/layout/style/ServoStyleRule.h
@@ -24,27 +24,27 @@ class DocGroup;
 class ServoDeclarationBlock;
 class ServoStyleRule;
 
 class ServoStyleRuleDeclaration final : public nsDOMCSSDeclaration
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
 
-  css::Rule* GetParentRule() final override;
-  nsINode* GetParentObject() final override;
+  css::Rule* GetParentRule() final;
+  nsINode* GetParentObject() final;
 
 protected:
-  DeclarationBlock* GetCSSDeclaration(Operation aOperation) final override;
-  nsresult SetCSSDeclaration(DeclarationBlock* aDecl) final override;
-  nsIDocument* DocToUpdate() final override;
+  DeclarationBlock* GetCSSDeclaration(Operation aOperation) final;
+  nsresult SetCSSDeclaration(DeclarationBlock* aDecl) final;
+  nsIDocument* DocToUpdate() final;
   void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv,
-                                nsIPrincipal* aSubjectPrincipal) final override;
+                                nsIPrincipal* aSubjectPrincipal) final;
   ServoCSSParsingEnvironment
-  GetServoCSSParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final override;
+  GetServoCSSParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final;
 
 private:
   // For accessing the constructor.
   friend class ServoStyleRule;
 
   explicit ServoStyleRuleDeclaration(
     already_AddRefed<RawServoDeclarationBlock> aDecls);
   ~ServoStyleRuleDeclaration();
@@ -60,46 +60,46 @@ class ServoStyleRule final : public Bind
 {
 public:
   ServoStyleRule(already_AddRefed<RawServoStyleRule> aRawRule,
                  uint32_t aLine, uint32_t aColumn);
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(ServoStyleRule,
                                                          css::Rule)
-  bool IsCCLeaf() const final override MOZ_MUST_OVERRIDE;
+  bool IsCCLeaf() const final MOZ_MUST_OVERRIDE;
 
   MOZ_DECLARE_WEAKREFERENCE_TYPENAME(ServoStyleRule)
 
   uint32_t GetSelectorCount() override;
   nsresult GetSelectorText(uint32_t aSelectorIndex,
                            nsAString& aText) override;
   nsresult GetSpecificity(uint32_t aSelectorIndex,
                           uint64_t* aSpecificity) override;
   nsresult SelectorMatchesElement(dom::Element* aElement,
                                   uint32_t aSelectorIndex,
                                   const nsAString& aPseudo,
                                   bool* aMatches) override;
   NotNull<DeclarationBlock*> GetDeclarationBlock() const override;
 
   // WebIDL interface
-  uint16_t Type() const final override;
-  void GetCssText(nsAString& aCssText) const final override;
-  void GetSelectorText(nsAString& aSelectorText) final override;
-  void SetSelectorText(const nsAString& aSelectorText) final override;
-  nsICSSDeclaration* Style() final override;
+  uint16_t Type() const final;
+  void GetCssText(nsAString& aCssText) const final;
+  void GetSelectorText(nsAString& aSelectorText) final;
+  void SetSelectorText(const nsAString& aSelectorText) final;
+  nsICSSDeclaration* Style() final;
 
   RawServoStyleRule* Raw() const { return mRawRule; }
 
   // Methods of mozilla::css::Rule
-  int32_t GetType() const final override { return css::Rule::STYLE_RULE; }
-  already_AddRefed<Rule> Clone() const final override;
-  size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const final override;
+  int32_t GetType() const final { return css::Rule::STYLE_RULE; }
+  already_AddRefed<Rule> Clone() const final;
+  size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const final;
 #ifdef DEBUG
-  void List(FILE* out = stdout, int32_t aIndent = 0) const final override;
+  void List(FILE* out = stdout, int32_t aIndent = 0) const final;
 #endif
 
 private:
   ~ServoStyleRule() {}
 
   // For computing the offset of mDecls.
   friend class ServoStyleRuleDeclaration;
 
--- a/layout/style/ServoStyleSheet.h
+++ b/layout/style/ServoStyleSheet.h
@@ -107,21 +107,21 @@ public:
 
   URLExtraData* URLData() const { return Inner()->mURLData; }
 
   void DidDirty() override {}
 
   already_AddRefed<StyleSheet> Clone(StyleSheet* aCloneParent,
     dom::CSSImportRule* aCloneOwnerRule,
     nsIDocument* aCloneDocument,
-    nsINode* aCloneOwningNode) const final override;
+    nsINode* aCloneOwningNode) const final;
 
   // nsICSSLoaderObserver interface
   NS_IMETHOD StyleSheetLoaded(StyleSheet* aSheet, bool aWasAlternate,
-                              nsresult aStatus) final override;
+                              nsresult aStatus) final;
 
   // Internal GetCssRules methods which do not have security check and
   // completeness check.
   ServoCSSRuleList* GetCssRulesInternal();
 
   // Returns the stylesheet's Servo origin as an OriginFlags value.
   OriginFlags GetOrigin();
 
--- a/layout/style/ServoSupportsRule.h
+++ b/layout/style/ServoSupportsRule.h
@@ -20,29 +20,29 @@ public:
   ServoSupportsRule(RefPtr<RawServoSupportsRule> aRawRule,
                     uint32_t aLine, uint32_t aColumn);
 
   NS_DECL_ISUPPORTS_INHERITED
 
   already_AddRefed<css::Rule> Clone() const override;
 #ifdef MOZ_OLD_STYLE
   bool UseForPresentation(nsPresContext* aPresContext,
-                          nsMediaQueryResultCacheKey& aKey) final override;
+                          nsMediaQueryResultCacheKey& aKey) final;
 #endif
 #ifdef DEBUG
-  void List(FILE* out = stdout, int32_t aIndent = 0) const final override;
+  void List(FILE* out = stdout, int32_t aIndent = 0) const final;
 #endif
 
   RawServoSupportsRule* Raw() const { return mRawRule; }
 
   // WebIDL interface
-  void GetCssText(nsAString& aCssText) const final override;
-  void GetConditionText(nsAString& aConditionText) final override;
+  void GetCssText(nsAString& aCssText) const final;
+  void GetConditionText(nsAString& aConditionText) final;
   void SetConditionText(const nsAString& aConditionText,
-                        ErrorResult& aRv) final override;
+                        ErrorResult& aRv) final;
 
   size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf)
     const override;
 
 private:
   virtual ~ServoSupportsRule();
 
   RefPtr<RawServoSupportsRule> mRawRule;
--- a/layout/style/StyleRule.cpp
+++ b/layout/style/StyleRule.cpp
@@ -1057,23 +1057,23 @@ protected:
   virtual ~DOMCSSDeclarationImpl(void);
 
   // But we need to allow UniquePtr to delete us.
   friend class mozilla::DefaultDelete<DOMCSSDeclarationImpl>;
 
 public:
   explicit DOMCSSDeclarationImpl(css::StyleRule *aRule);
 
-  css::Rule* GetParentRule() final override { return mRule; }
+  css::Rule* GetParentRule() final { return mRule; }
   virtual DeclarationBlock* GetCSSDeclaration(Operation aOperation) override;
   virtual nsresult SetCSSDeclaration(DeclarationBlock* aDecl) override;
   virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv,
                                         nsIPrincipal* aSubjectPrincipal) override;
   nsDOMCSSDeclaration::ServoCSSParsingEnvironment
-  GetServoCSSParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final override;
+  GetServoCSSParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final;
   virtual nsIDocument* DocToUpdate() override;
 
   // Override |AddRef| and |Release| for being owned by StyleRule.  Also, we
   // need to forward QI for cycle collection things to StyleRule.
   NS_DECL_ISUPPORTS_INHERITED
 
   virtual nsINode *GetParentObject() override
   {
--- a/layout/style/StyleRule.h
+++ b/layout/style/StyleRule.h
@@ -341,18 +341,18 @@ public:
                                   uint32_t aSelectorIndex,
                                   const nsAString& aPseudo,
                                   bool* aMatches) override;
   mozilla::NotNull<DeclarationBlock*> GetDeclarationBlock() const override;
 
   // WebIDL interface
   uint16_t Type() const override;
   void GetCssText(nsAString& aCssText) const override;
-  void GetSelectorText(nsAString& aSelectorText) final override;
-  void SetSelectorText(const nsAString& aSelectorText) final override;
+  void GetSelectorText(nsAString& aSelectorText) final;
+  void SetSelectorText(const nsAString& aSelectorText) final;
   nsICSSDeclaration* Style() override;
 
   // null for style attribute
   nsCSSSelectorList* Selector() { return mSelector; }
 
   Declaration* GetDeclaration() const { return mDeclaration; }
 
   void SetDeclaration(Declaration* aDecl);
--- a/layout/style/StyleSheet.h
+++ b/layout/style/StyleSheet.h
@@ -241,17 +241,17 @@ public:
                       ErrorResult& aRv);
   void DeleteRule(uint32_t aIndex,
                   nsIPrincipal& aSubjectPrincipal,
                   ErrorResult& aRv);
 
   // WebIDL miscellaneous bits
   inline dom::ParentObject GetParentObject() const;
   JSObject* WrapObject(JSContext* aCx,
-                       JS::Handle<JSObject*> aGivenProto) final override;
+                       JS::Handle<JSObject*> aGivenProto) final;
 
   // Changes to sheets should be inside of a WillDirty-DidDirty pair.
   // However, the calls do not need to be matched; it's ok to call
   // WillDirty and then make no change and skip the DidDirty call.
   void WillDirty();
   virtual void DidDirty() {}
 
   // Called when a rule changes from CSSOM.
--- a/layout/style/nsCSSRules.h
+++ b/layout/style/nsCSSRules.h
@@ -70,21 +70,21 @@ public:
   // rest of GroupRule
   virtual bool UseForPresentation(nsPresContext* aPresContext,
                                     nsMediaQueryResultCacheKey& aKey) override;
 
   // @media rule methods
   nsresult SetMedia(nsMediaList* aMedia);
 
   // WebIDL interface
-  void GetCssText(nsAString& aCssText) const final override;
-  void GetConditionText(nsAString& aConditionText) final override;
+  void GetCssText(nsAString& aCssText) const final;
+  void GetConditionText(nsAString& aConditionText) final;
   void SetConditionText(const nsAString& aConditionText,
-                        ErrorResult& aRv) final override;
-  dom::MediaList* Media() final override;
+                        ErrorResult& aRv) final;
+  dom::MediaList* Media() final;
 
   virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf)
     const override MOZ_MUST_OVERRIDE;
 
 protected:
   void AppendConditionText(nsAString& aOutput) const;
 
   RefPtr<nsMediaList> mMedia;
@@ -127,20 +127,20 @@ public:
     {
     }
     ~URL();
   };
 
   void SetURLs(URL *aURLs) { mURLs = aURLs; }
 
   // WebIDL interface
-  void GetCssText(nsAString& aCssText) const final override;
-  void GetConditionText(nsAString& aConditionText) final override;
+  void GetCssText(nsAString& aCssText) const final;
+  void GetConditionText(nsAString& aConditionText) final;
   void SetConditionText(const nsAString& aConditionText,
-                        ErrorResult& aRv) final override;
+                        ErrorResult& aRv) final;
 
   virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf)
     const override MOZ_MUST_OVERRIDE;
 
 protected:
   void AppendConditionText(nsAString& aOutput) const;
 
   nsAutoPtr<URL> mURLs; // linked list of |struct URL| above.
@@ -162,42 +162,42 @@ public:
     // copy everything except our reference count
     : mozilla::dom::CSSFontFeatureValuesRule(aCopy),
       mFamilyList(aCopy.mFamilyList),
       mFeatureValues(aCopy.mFeatureValues)
   {
   }
 
 #ifdef DEBUG
-  void List(FILE* out = stdout, int32_t aIndent = 0) const final override;
+  void List(FILE* out = stdout, int32_t aIndent = 0) const final;
 #endif
-  already_AddRefed<mozilla::css::Rule> Clone() const final override;
+  already_AddRefed<mozilla::css::Rule> Clone() const final;
 
   // WebIDL interface
-  void GetCssText(nsAString& aCssText) const final override;
-  void GetFontFamily(nsAString& aFamily) final override;
-  void SetFontFamily(const nsAString& aFamily, mozilla::ErrorResult& aRv) final override;
-  void GetValueText(nsAString& aValueText) final override;
-  void SetValueText(const nsAString& aValueText, mozilla::ErrorResult& aRv) final override;
+  void GetCssText(nsAString& aCssText) const final;
+  void GetFontFamily(nsAString& aFamily) final;
+  void SetFontFamily(const nsAString& aFamily, mozilla::ErrorResult& aRv) final;
+  void GetValueText(nsAString& aValueText) final;
+  void SetValueText(const nsAString& aValueText, mozilla::ErrorResult& aRv) final;
 
   mozilla::SharedFontList* GetFamilyList() const { return mFamilyList; }
   void SetFamilyList(mozilla::SharedFontList* aFamilyList)
   {
     mFamilyList = aFamilyList;
   }
 
   void AddValueList(int32_t aVariantAlternate,
                     nsTArray<gfxFontFeatureValueSet::ValueList>& aValueList);
 
   const nsTArray<gfxFontFeatureValueSet::FeatureValues>& GetFeatureValues()
   {
     return mFeatureValues;
   }
 
-  size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final override;
+  size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final;
 
 protected:
   ~nsCSSFontFeatureValuesRule() {}
 
   RefPtr<mozilla::SharedFontList> mFamilyList;
   nsTArray<gfxFontFeatureValueSet::FeatureValues> mFeatureValues;
 };
 
@@ -210,17 +210,17 @@ public:
 
   mozilla::css::Rule* GetParentRule() override;
   void DropReference() { mRule = nullptr; }
   virtual mozilla::DeclarationBlock* GetCSSDeclaration(Operation aOperation) override;
   virtual nsresult SetCSSDeclaration(mozilla::DeclarationBlock* aDecl) override;
   virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv,
                                         nsIPrincipal* aSubjectPrincipal) override;
   nsDOMCSSDeclaration::ServoCSSParsingEnvironment
-  GetServoCSSParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final override;
+  GetServoCSSParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final;
   virtual nsIDocument* DocToUpdate() override;
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(nsCSSKeyframeStyleDeclaration,
                                                          nsICSSDeclaration)
 
   virtual nsINode* GetParentObject() override;
 
@@ -255,20 +255,20 @@ public:
   virtual bool IsCCLeaf() const override;
 
 #ifdef DEBUG
   virtual void List(FILE* out = stdout, int32_t aIndent = 0) const override;
 #endif
   virtual already_AddRefed<mozilla::css::Rule> Clone() const override;
 
   // WebIDL interface
-  void GetCssText(nsAString& aCssText) const final override;
-  void GetKeyText(nsAString& aKeyText) final override;
-  void SetKeyText(const nsAString& aKeyText) final override;
-  nsICSSDeclaration* Style() final override;
+  void GetCssText(nsAString& aCssText) const final;
+  void GetKeyText(nsAString& aKeyText) final;
+  void SetKeyText(const nsAString& aKeyText) final;
+  nsICSSDeclaration* Style() final;
 
   const nsTArray<float>& GetKeys() const     { return mKeys; }
   mozilla::css::Declaration* Declaration()   { return mDeclaration; }
 
   void ChangeDeclaration(mozilla::css::Declaration* aDeclaration);
 
   virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
 
@@ -296,23 +296,23 @@ private:
 public:
   // Rule methods
 #ifdef DEBUG
   virtual void List(FILE* out = stdout, int32_t aIndent = 0) const override;
 #endif
   virtual already_AddRefed<mozilla::css::Rule> Clone() const override;
 
   // WebIDL interface
-  void GetCssText(nsAString& aCssText) const final override;
-  void GetName(nsAString& aName) const final override;
-  void SetName(const nsAString& aName) final override;
-  mozilla::dom::CSSRuleList* CssRules() final override { return GroupRule::CssRules(); }
-  void AppendRule(const nsAString& aRule) final override;
-  void DeleteRule(const nsAString& aKey) final override;
-  nsCSSKeyframeRule* FindRule(const nsAString& aKey) final override;
+  void GetCssText(nsAString& aCssText) const final;
+  void GetName(nsAString& aName) const final;
+  void SetName(const nsAString& aName) final;
+  mozilla::dom::CSSRuleList* CssRules() final { return GroupRule::CssRules(); }
+  void AppendRule(const nsAString& aRule) final;
+  void DeleteRule(const nsAString& aKey) final;
+  nsCSSKeyframeRule* FindRule(const nsAString& aKey) final;
 
   const nsAtom* GetName() const { return mName; }
 
   virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
 
 private:
   uint32_t FindRuleIndexForKey(const nsAString& aKey);
 
@@ -328,17 +328,17 @@ public:
 
   mozilla::css::Rule* GetParentRule() override;
   void DropReference() { mRule = nullptr; }
   virtual mozilla::DeclarationBlock* GetCSSDeclaration(Operation aOperation) override;
   virtual nsresult SetCSSDeclaration(mozilla::DeclarationBlock* aDecl) override;
   virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv,
                                         nsIPrincipal* aSubjectPrincipal) override;
   nsDOMCSSDeclaration::ServoCSSParsingEnvironment
-  GetServoCSSParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final override;
+  GetServoCSSParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final;
   virtual nsIDocument* DocToUpdate() override;
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(nsCSSPageStyleDeclaration,
                                                          nsICSSDeclaration)
 
   virtual nsINode *GetParentObject() override;
 
@@ -405,20 +405,20 @@ public:
   virtual already_AddRefed<mozilla::css::Rule> Clone() const override;
   virtual bool UseForPresentation(nsPresContext* aPresContext,
                                   nsMediaQueryResultCacheKey& aKey) override;
 
   NS_INLINE_DECL_REFCOUNTING_INHERITED(CSSSupportsRule,
                                        dom::CSSSupportsRule)
 
   // WebIDL interface
-  void GetCssText(nsAString& aCssText) const final override;
-  void GetConditionText(nsAString& aConditionText) final override;
+  void GetCssText(nsAString& aCssText) const final;
+  void GetConditionText(nsAString& aConditionText) final;
   void SetConditionText(const nsAString& aConditionText,
-                        ErrorResult& aRv) final override;
+                        ErrorResult& aRv) final;
 
   virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
 
 protected:
   virtual ~CSSSupportsRule();
 
   bool mUseGroup;
   nsString mCondition;
--- a/layout/style/nsComputedDOMStyle.h
+++ b/layout/style/nsComputedDOMStyle.h
@@ -137,17 +137,17 @@ public:
   // on a nsComputedDOMStyle object, but must be defined to avoid
   // compile errors.
   virtual mozilla::DeclarationBlock* GetCSSDeclaration(Operation) override;
   virtual nsresult SetCSSDeclaration(mozilla::DeclarationBlock*) override;
   virtual nsIDocument* DocToUpdate() override;
   virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv,
                                         nsIPrincipal* aSubjectPrincipal) override;
   nsDOMCSSDeclaration::ServoCSSParsingEnvironment
-  GetServoCSSParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final override;
+  GetServoCSSParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final;
 
   static already_AddRefed<nsROCSSPrimitiveValue>
     MatrixToCSSValue(const mozilla::gfx::Matrix4x4& aMatrix);
 
   static void RegisterPrefChangeCallbacks();
   static void UnregisterPrefChangeCallbacks();
 
   // nsIMutationObserver
--- a/layout/style/nsDOMCSSAttrDeclaration.h
+++ b/layout/style/nsDOMCSSAttrDeclaration.h
@@ -32,17 +32,17 @@ public:
                                                                    nsICSSDeclaration)
 
   // If GetCSSDeclaration returns non-null, then the decl it returns
   // is owned by our current style rule.
   virtual mozilla::DeclarationBlock* GetCSSDeclaration(Operation aOperation) override;
   virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv,
                                         nsIPrincipal* aSubjectPrincipal) override;
   nsDOMCSSDeclaration::ServoCSSParsingEnvironment
-  GetServoCSSParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final override;
+  GetServoCSSParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final;
   mozilla::css::Rule* GetParentRule() override;
 
   virtual nsINode* GetParentObject() override;
 
   nsresult SetPropertyValue(const nsCSSPropertyID aPropID,
                             const nsAString& aValue,
                             nsIPrincipal* aSubjectPrincipal) override;
 
--- a/layout/style/nsDOMCSSRGBColor.h
+++ b/layout/style/nsDOMCSSRGBColor.h
@@ -47,18 +47,17 @@ public:
     return mAlpha;
   }
 
   nsISupports* GetParentObject() const
   {
     return nullptr;
   }
 
-  virtual JSObject *WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto)
-    override final;
+  JSObject *WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto) final;
 
 private:
   virtual ~nsDOMCSSRGBColor(void);
 
   RefPtr<nsROCSSPrimitiveValue> mRed;
   RefPtr<nsROCSSPrimitiveValue> mGreen;
   RefPtr<nsROCSSPrimitiveValue> mBlue;
   RefPtr<nsROCSSPrimitiveValue> mAlpha;
--- a/layout/style/nsDOMCSSRect.h
+++ b/layout/style/nsDOMCSSRect.h
@@ -29,18 +29,17 @@ public:
 
   nsROCSSPrimitiveValue* Top() const { return mTop; }
   nsROCSSPrimitiveValue* Right() const { return mRight; }
   nsROCSSPrimitiveValue* Bottom() const { return mBottom; }
   nsROCSSPrimitiveValue* Left() const { return mLeft; }
 
   nsISupports* GetParentObject() const { return nullptr; }
 
-  virtual JSObject* WrapObject(JSContext* cx, JS::Handle<JSObject*> aGivenProto)
-    override final;
+  JSObject* WrapObject(JSContext* cx, JS::Handle<JSObject*> aGivenProto) final;
 
 protected:
   virtual ~nsDOMCSSRect(void);
 
 private:
   RefPtr<nsROCSSPrimitiveValue> mTop;
   RefPtr<nsROCSSPrimitiveValue> mRight;
   RefPtr<nsROCSSPrimitiveValue> mBottom;
--- a/layout/style/nsDOMCSSValueList.h
+++ b/layout/style/nsDOMCSSValueList.h
@@ -21,21 +21,19 @@ public:
   // nsDOMCSSValueList
   nsDOMCSSValueList(bool aCommaDelimited, bool aReadonly);
 
   /**
    * Adds a value to this list.
    */
   void AppendCSSValue(already_AddRefed<CSSValue> aValue);
 
-  virtual void GetCssText(nsString& aText, mozilla::ErrorResult& aRv)
-    override final;
-  virtual void SetCssText(const nsAString& aText,
-                          mozilla::ErrorResult& aRv) override final;
-  virtual uint16_t CssValueType() const override final;
+  void GetCssText(nsString& aText, mozilla::ErrorResult& aRv) final;
+  void SetCssText(const nsAString& aText, mozilla::ErrorResult& aRv) final;
+  uint16_t CssValueType() const final;
 
   void GetCssText(nsAString& aText);
 
   CSSValue* IndexedGetter(uint32_t aIdx, bool& aFound) const
   {
     aFound = aIdx <= Length();
     return Item(aIdx);
   }
--- a/layout/style/nsMediaList.h
+++ b/layout/style/nsMediaList.h
@@ -247,48 +247,48 @@ private:
   nsTArray<nsMediaExpression> mExpressions;
 };
 
 class nsMediaList final : public mozilla::dom::MediaList
 {
 public:
   nsMediaList();
 
-  void GetText(nsAString& aMediaText) final override;
-  void SetText(const nsAString& aMediaText) final override;
+  void GetText(nsAString& aMediaText) final;
+  void SetText(const nsAString& aMediaText) final;
 
-  bool Matches(nsPresContext* aPresContext) const final override {
+  bool Matches(nsPresContext* aPresContext) const final {
     return Matches(aPresContext, nullptr);
   }
 
   // Does this query apply to the presentation?
   // If |aKey| is non-null, add cache information to it.
   bool Matches(nsPresContext* aPresContext,
                nsMediaQueryResultCacheKey* aKey) const;
 
 #ifdef DEBUG
-  bool IsServo() const final override { return false; }
+  bool IsServo() const final { return false; }
 #endif
 
   void AppendQuery(nsAutoPtr<nsMediaQuery>& aQuery) {
     // Takes ownership of aQuery
     mArray.AppendElement(aQuery.forget());
   }
 
-  already_AddRefed<mozilla::dom::MediaList> Clone() final override;
+  already_AddRefed<mozilla::dom::MediaList> Clone() final;
 
   nsMediaQuery* MediumAt(int32_t aIndex) { return mArray[aIndex]; }
   void Clear() { mArray.Clear(); }
 
   // WebIDL
-  uint32_t Length() final override { return mArray.Length(); }
+  uint32_t Length() final { return mArray.Length(); }
   void IndexedGetter(uint32_t aIndex, bool& aFound,
-                     nsAString& aReturn) final override;
+                     nsAString& aReturn) final;
 
 protected:
   ~nsMediaList();
 
-  nsresult Delete(const nsAString & aOldMedium) final override;
-  nsresult Append(const nsAString & aOldMedium) final override;
+  nsresult Delete(const nsAString & aOldMedium) final;
+  nsresult Append(const nsAString & aOldMedium) final;
 
   InfallibleTArray<nsAutoPtr<nsMediaQuery> > mArray;
 };
 #endif /* !defined(nsMediaList_h_) */
--- a/layout/style/nsROCSSPrimitiveValue.h
+++ b/layout/style/nsROCSSPrimitiveValue.h
@@ -27,19 +27,19 @@ class nsDOMCSSRGBColor;
  */
 class nsROCSSPrimitiveValue final : public mozilla::dom::CSSValue
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsROCSSPrimitiveValue)
 
   // CSSValue
-  virtual void GetCssText(nsString& aText, mozilla::ErrorResult& aRv) override final;
-  virtual void SetCssText(const nsAString& aText, mozilla::ErrorResult& aRv) override final;
-  virtual uint16_t CssValueType() const override final;
+  void GetCssText(nsString& aText, mozilla::ErrorResult& aRv) final;
+  void SetCssText(const nsAString& aText, mozilla::ErrorResult& aRv) final;
+  uint16_t CssValueType() const final;
 
   // CSSPrimitiveValue
   uint16_t PrimitiveType();
   void SetFloatValue(uint16_t aUnitType, float aValue,
                      mozilla::ErrorResult& aRv);
   float GetFloatValue(uint16_t aUnitType, mozilla::ErrorResult& aRv);
   void GetStringValue(nsString& aString, mozilla::ErrorResult& aRv);
   void SetStringValue(uint16_t aUnitType, const nsAString& aString,
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -2086,17 +2086,17 @@ public:
     : mozilla::Runnable("StyleImageRequestCleanupTask")
     , mModeFlags(aModeFlags)
     , mRequestProxy(aRequestProxy)
     , mImageValue(aImageValue)
     , mImageTracker(aImageTracker)
   {
   }
 
-  NS_IMETHOD Run() final override
+  NS_IMETHOD Run() final
   {
     MOZ_ASSERT(!mRequestProxy || NS_IsMainThread(),
                "If mRequestProxy is non-null, we need to run on main thread!");
 
     if (!mRequestProxy) {
       return NS_OK;
     }
 
@@ -2269,17 +2269,17 @@ const mozilla::Maybe<nsSize>&
 CachedBorderImageData::GetCachedSVGViewportSize()
 {
   return mCachedSVGViewportSize;
 }
 
 struct PurgeCachedImagesTask : mozilla::Runnable
 {
   PurgeCachedImagesTask() : mozilla::Runnable("PurgeCachedImagesTask") {}
-  NS_IMETHOD Run() final override
+  NS_IMETHOD Run() final
   {
     mSubImages.Clear();
     return NS_OK;
   }
 
   nsCOMArray<imgIContainer> mSubImages;
 };
 
--- a/mozglue/build/WindowsDllServices.h
+++ b/mozglue/build/WindowsDllServices.h
@@ -37,17 +37,17 @@ public:
    */
   virtual void DispatchDllLoadNotification(PCUNICODE_STRING aDllName) = 0;
 
   void SetAuthenticodeImpl(Authenticode* aAuthenticode)
   {
     mAuthenticode = aAuthenticode;
   }
 
-  virtual UniquePtr<wchar_t[]> GetBinaryOrgName(const wchar_t* aFilePath) override final
+  UniquePtr<wchar_t[]> GetBinaryOrgName(const wchar_t* aFilePath) final
   {
     if (!mAuthenticode) {
       return nullptr;
     }
 
     return mAuthenticode->GetBinaryOrgName(aFilePath);
   }
 
@@ -80,17 +80,17 @@ private:
 
 } // namespace detail
 
 #if defined(MOZILLA_INTERNAL_API)
 
 class DllServices : public detail::DllServicesBase
 {
 public:
-  virtual void DispatchDllLoadNotification(PCUNICODE_STRING aDllName) override final
+  void DispatchDllLoadNotification(PCUNICODE_STRING aDllName) final
   {
     nsDependentSubstring strDllName(aDllName->Buffer,
                                     aDllName->Length / sizeof(wchar_t));
 
     nsCOMPtr<nsIRunnable> runnable(
       NewRunnableMethod<bool, nsString>("DllServices::NotifyDllLoad",
                                         this, &DllServices::NotifyDllLoad,
                                         NS_IsMainThread(), strDllName));
--- a/netwerk/base/nsSocketTransport2.h
+++ b/netwerk/base/nsSocketTransport2.h
@@ -151,17 +151,17 @@ public:
     // unlayered, simple, stream sockets.
     nsresult InitWithFilename(const char *filename);
 #endif
 
     // nsASocketHandler methods:
     void OnSocketReady(PRFileDesc *, int16_t outFlags) override;
     void OnSocketDetached(PRFileDesc *) override;
     void IsLocal(bool *aIsLocal) override;
-    void OnKeepaliveEnabledPrefChange(bool aEnabled) override final;
+    void OnKeepaliveEnabledPrefChange(bool aEnabled) final;
 
     // called when a socket event is handled
     void OnSocketEvent(uint32_t type, nsresult status, nsISupports *param);
 
     uint64_t ByteCountReceived() override { return mInput.ByteCount(); }
     uint64_t ByteCountSent() override { return mOutput.ByteCount(); }
     static void CloseSocket(PRFileDesc *aFd, bool aTelemetryEnabled);
     static void SendPRBlockingTelemetry(PRIntervalTime aStart,
--- a/netwerk/protocol/http/ASpdySession.h
+++ b/netwerk/protocol/http/ASpdySession.h
@@ -41,17 +41,17 @@ public:
   // or it might just need to wait longer for one of them to become free.
   //
   // return true if the session takes back ownership of the transaction from
   // the connection manager.
   virtual bool MaybeReTunnel(nsAHttpTransaction *) = 0;
 
   virtual void PrintDiagnostics (nsCString &log) = 0;
 
-  bool ResponseTimeoutEnabled() const override final {
+  bool ResponseTimeoutEnabled() const final {
     return true;
   }
 
   virtual void SendPing() = 0;
 
   const static uint32_t kSendingChunkSize = 4095;
   const static uint32_t kTCPSendBufferSize = 131072;
 
--- a/netwerk/protocol/http/Http2Session.h
+++ b/netwerk/protocol/http/Http2Session.h
@@ -245,21 +245,21 @@ public:
   void DecrementServerSessionWindow (uint32_t bytes) { mServerSessionWindow -= bytes; }
   uint32_t InitialRwin() { return mInitialRwin; }
 
   void SendPing() override;
   MOZ_MUST_USE bool MaybeReTunnel(nsAHttpTransaction *) override;
   bool UseH2Deps() { return mUseH2Deps; }
 
   // overload of nsAHttpTransaction
-  MOZ_MUST_USE nsresult ReadSegmentsAgain(nsAHttpSegmentReader *, uint32_t, uint32_t *, bool *) override final;
-  MOZ_MUST_USE nsresult WriteSegmentsAgain(nsAHttpSegmentWriter *, uint32_t , uint32_t *, bool *) override final;
-  MOZ_MUST_USE bool Do0RTT() override final { return true; }
-  MOZ_MUST_USE nsresult Finish0RTT(bool aRestart, bool aAlpnChanged) override final;
-  void SetFastOpenStatus(uint8_t aStatus) override final;
+  MOZ_MUST_USE nsresult ReadSegmentsAgain(nsAHttpSegmentReader *, uint32_t, uint32_t *, bool *) final;
+  MOZ_MUST_USE nsresult WriteSegmentsAgain(nsAHttpSegmentWriter *, uint32_t , uint32_t *, bool *) final;
+  MOZ_MUST_USE bool Do0RTT() final { return true; }
+  MOZ_MUST_USE nsresult Finish0RTT(bool aRestart, bool aAlpnChanged) final;
+  void SetFastOpenStatus(uint8_t aStatus) final;
 
   // For use by an HTTP2Stream
   void Received421(nsHttpConnectionInfo *ci);
 
   void SendPriorityFrame(uint32_t streamID, uint32_t dependsOn, uint8_t weight);
 
 private:
 
--- a/netwerk/protocol/http/NullHttpTransaction.h
+++ b/netwerk/protocol/http/NullHttpTransaction.h
@@ -38,20 +38,20 @@ public:
   NullHttpTransaction(nsHttpConnectionInfo *ci,
                       nsIInterfaceRequestor *callbacks,
                       uint32_t caps);
 
   MOZ_MUST_USE bool Claim();
   void Unclaim();
 
   // Overload of nsAHttpTransaction methods
-  bool IsNullTransaction() override final { return true; }
-  NullHttpTransaction *QueryNullTransaction() override final { return this; }
-  bool ResponseTimeoutEnabled() const override final {return true; }
-  PRIntervalTime ResponseTimeout() override final
+  bool IsNullTransaction() final { return true; }
+  NullHttpTransaction *QueryNullTransaction() final { return this; }
+  bool ResponseTimeoutEnabled() const final {return true; }
+  PRIntervalTime ResponseTimeout() final
   {
     return PR_SecondsToInterval(15);
   }
 
   // We have to override this function because |mTransaction| in nsHalfOpenSocket
   // could be either nsHttpTransaction or NullHttpTransaction.
   // NullHttpTransaction will be activated on the connection immediately after
   // creation and be never put in a pending queue, so it's OK to just return 0.
--- a/netwerk/protocol/http/TunnelUtils.h
+++ b/netwerk/protocol/http/TunnelUtils.h
@@ -195,22 +195,22 @@ public:
   // A transaction is forced into plaintext when it is intended to be used as a CONNECT
   // tunnel but the setup fails. The plaintext only carries the CONNECT error.
   void ForcePlainText();
   void MapStreamToHttpConnection(nsISocketTransport *aTransport,
                                  nsHttpConnectionInfo *aConnInfo);
 
   MOZ_MUST_USE nsresult ReadSegments(nsAHttpSegmentReader *reader,
                                      uint32_t count,
-                                     uint32_t *countRead) override final;
+                                     uint32_t *countRead) final;
   MOZ_MUST_USE nsresult WriteSegments(nsAHttpSegmentWriter *writer,
                                       uint32_t count,
-                                      uint32_t *countWritten) override final;
-  nsHttpRequestHead *RequestHead() override final;
-  void Close(nsresult reason) override final;
+                                      uint32_t *countWritten) final;
+  nsHttpRequestHead *RequestHead() final;
+  void Close(nsresult reason) final;
 
   // ConnectedReadyForInput() tests whether the spdy connect transaction is attached to
   // an nsHttpConnection that can properly deal with flow control, etc..
   bool ConnectedReadyForInput();
 
 private:
   friend class InputStreamShim;
   friend class OutputStreamShim;
--- a/netwerk/protocol/http/nsHttpTransaction.h
+++ b/netwerk/protocol/http/nsHttpTransaction.h
@@ -214,17 +214,17 @@ private:
                                                     const char *, uint32_t,
                                                     uint32_t, uint32_t *);
     static MOZ_MUST_USE nsresult WritePipeSegment(nsIOutputStream *, void *,
                                                   char *, uint32_t, uint32_t,
                                                   uint32_t *);
 
     bool TimingEnabled() const { return mCaps & NS_HTTP_TIMING_ENABLED; }
 
-    bool ResponseTimeoutEnabled() const final override;
+    bool ResponseTimeoutEnabled() const final;
 
     void DisableSpdy() override;
     void ReuseConnectionOnRestartOK(bool reuseOk) override { mReuseOnRestart = reuseOk; }
 
     // Called right after we parsed the response head.  Checks for connection based
     // authentication schemes in reponse headers for WWW and Proxy authentication.
     // If such is found in any of them, NS_HTTP_STICKY_CONNECTION is set in mCaps.
     // We need the sticky flag be set early to keep the connection from very start
--- a/security/manager/ssl/CryptoTask.h
+++ b/security/manager/ssl/CryptoTask.h
@@ -50,17 +50,17 @@ protected:
   virtual nsresult CalculateResult() = 0;
 
   /**
    * Called on the main thread with the result from CalculateResult().
    */
   virtual void CallCallback(nsresult rv) = 0;
 
 private:
-  NS_IMETHOD Run() override final;
+  NS_IMETHOD Run() final;
 
   nsresult mRv;
   nsCOMPtr<nsIThread> mThread;
 };
 
 } // namespace mozilla
 
 #endif // mozilla__CryptoTask_h
--- a/security/manager/ssl/DataStorage.cpp
+++ b/security/manager/ssl/DataStorage.cpp
@@ -42,17 +42,17 @@ class DataStorageMemoryReporter final : 
 {
   MOZ_DEFINE_MALLOC_SIZE_OF(MallocSizeOf)
   ~DataStorageMemoryReporter() = default;
 
 public:
   NS_DECL_ISUPPORTS
 
   NS_IMETHOD CollectReports(nsIHandleReportCallback* aHandleReport,
-                            nsISupports* aData, bool aAnonymize) final override
+                            nsISupports* aData, bool aAnonymize) final
   {
     nsTArray<nsString> fileNames;
     DataStorage::GetAllFileNames(fileNames);
     for (const auto& file: fileNames) {
       RefPtr<DataStorage> ds = DataStorage::GetFromRawFileName(file);
       size_t amount = ds->SizeOfIncludingThis(MallocSizeOf);
       nsPrintfCString path("explicit/data-storage/%s",
                            NS_ConvertUTF16toUTF8(file).get());
--- a/taskcluster/ci/source-test/mozlint.yml
+++ b/taskcluster/ci/source-test/mozlint.yml
@@ -33,16 +33,29 @@ codespell:
             - '**/*.cpp'
             - '**/*.c'
             - '**/*.h'
             - '**/*.configure'
             - '**/*.py'
             - '**/*.properties'
             - '**/*.rst'
 
+cpp-virtual-final:
+    description: lint C++ virtual function declarations
+    platform: lint/opt
+    treeherder:
+        symbol: Cvf
+    run:
+        mach: lint -l cpp-virtual-final -f treeherder
+    when:
+        files-changed:
+            - '**/*.cpp'
+            - '**/*.h'
+            - '**/*.mm'
+
 eslint:
     description: JS lint check
     platform: lint/opt
     treeherder:
         symbol: ES
     run:
         using: run-task
         command: >
--- a/toolkit/components/extensions/ExtensionStorage.jsm
+++ b/toolkit/components/extensions/ExtensionStorage.jsm
@@ -44,17 +44,17 @@ class SerializeableMap extends Map {
    * JSON serialization fails.
    *
    * @returns {object}
    */
   toJSONSafe() {
     let result = {};
     for (let [key, value] of this) {
       try {
-        void JSON.serialize(value);
+        void JSON.stringify(value);
 
         result[key] = value;
       } catch (e) {
         Cu.reportError(new Error(`Failed to serialize browser.storage key "${key}": ${e}`));
       }
     }
     return result;
   }
--- a/toolkit/components/places/tests/gtest/mock_Link.h
+++ b/toolkit/components/places/tests/gtest/mock_Link.h
@@ -43,17 +43,17 @@ public:
   }
 
   virtual size_t SizeOfExcludingThis(mozilla::SizeOfState& aState)
     const override
   {
     return 0;   // the value shouldn't matter
   }
 
-  virtual void NodeInfoChanged(nsIDocument* aOldDoc) final override {}
+  void NodeInfoChanged(nsIDocument* aOldDoc) final {}
 
 protected:
   ~mock_Link() {
     // Run the next test if we are supposed to.
     if (mRunNextTest) {
       run_next_test();
     }
   }
--- a/toolkit/components/telemetry/TelemetryScalar.cpp
+++ b/toolkit/components/telemetry/TelemetryScalar.cpp
@@ -306,24 +306,24 @@ ScalarBase::HandleUnsupported() const
 class ScalarUnsigned : public ScalarBase
 {
 public:
   using ScalarBase::SetValue;
 
   ScalarUnsigned() : mStorage(0) {};
   ~ScalarUnsigned() override = default;
 
-  ScalarResult SetValue(nsIVariant* aValue) final override;
-  void SetValue(uint32_t aValue) final override;
-  ScalarResult AddValue(nsIVariant* aValue) final override;
-  void AddValue(uint32_t aValue) final override;
-  ScalarResult SetMaximum(nsIVariant* aValue) final override;
-  void SetMaximum(uint32_t aValue) final override;
-  nsresult GetValue(nsCOMPtr<nsIVariant>& aResult) const final override;
-  size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final override;
+  ScalarResult SetValue(nsIVariant* aValue) final;
+  void SetValue(uint32_t aValue) final;
+  ScalarResult AddValue(nsIVariant* aValue) final;
+  void AddValue(uint32_t aValue) final;
+  ScalarResult SetMaximum(nsIVariant* aValue) final;
+  void SetMaximum(uint32_t aValue) final;
+  nsresult GetValue(nsCOMPtr<nsIVariant>& aResult) const final;
+  size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final;
 
 private:
   uint32_t mStorage;
 
   ScalarResult CheckInput(nsIVariant* aValue);
 
   // Prevent copying.
   ScalarUnsigned(const ScalarUnsigned& aOther) = delete;
@@ -446,20 +446,20 @@ ScalarUnsigned::CheckInput(nsIVariant* a
 class ScalarString : public ScalarBase
 {
 public:
   using ScalarBase::SetValue;
 
   ScalarString() : mStorage(EmptyString()) {};
   ~ScalarString() override = default;
 
-  ScalarResult SetValue(nsIVariant* aValue) final override;
-  ScalarResult SetValue(const nsAString& aValue) final override;
-  nsresult GetValue(nsCOMPtr<nsIVariant>& aResult) const final override;
-  size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final override;
+  ScalarResult SetValue(nsIVariant* aValue) final;
+  ScalarResult SetValue(const nsAString& aValue) final;
+  nsresult GetValue(nsCOMPtr<nsIVariant>& aResult) const final;
+  size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final;
 
 private:
   nsString mStorage;
 
   // Prevent copying.
   ScalarString(const ScalarString& aOther) = delete;
   void operator=(const ScalarString& aOther) = delete;
 };
@@ -527,20 +527,20 @@ ScalarString::SizeOfIncludingThis(mozill
 class ScalarBoolean : public ScalarBase
 {
 public:
   using ScalarBase::SetValue;
 
   ScalarBoolean() : mStorage(false) {};
   ~ScalarBoolean() override = default;
 
-  ScalarResult SetValue(nsIVariant* aValue) final override;
-  void SetValue(bool aValue) final override;
-  nsresult GetValue(nsCOMPtr<nsIVariant>& aResult) const final override;
-  size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final override;
+  ScalarResult SetValue(nsIVariant* aValue) final;
+  void SetValue(bool aValue) final;
+  nsresult GetValue(nsCOMPtr<nsIVariant>& aResult) const final;
+  size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final;
 
 private:
   bool mStorage;
 
   // Prevent copying.
   ScalarBoolean(const ScalarBoolean& aOther) = delete;
   void operator=(const ScalarBoolean& aOther) = delete;
 };
new file mode 100644
--- /dev/null
+++ b/tools/lint/cpp-virtual-final.yml
@@ -0,0 +1,31 @@
+---
+cpp-virtual-final:
+    description: "Virtual function declarations should specify only one of
+                  `virtual`, `final`, or `override`"
+    level: warning
+    include: ['.']
+    exclude:
+        # Third-party code with cpp-virtual-final warnings:
+        - gfx/angle
+        - gfx/skia
+        - media/webrtc/trunk
+        - security/sandbox/chromium
+    extensions: ['cpp', 'h', 'mm']
+    type: regex
+    #
+    # This lint warns about:
+    #
+    #   virtual void Bad1() final
+    #   void Bad2() final override
+    #   void Bad3() override final
+    #
+    # Caveats: This lint ...
+    #
+    #   * Doesn't warn about `virtual void NotBad() override` at this time
+    #     because there are 8000+ instances.
+    #
+    #   * Doesn't warn about function declarations that span multiple lines
+    #     because the regex can't match across line breaks.
+    #
+    #           virtual    )    final  |  final  override  |  override  final
+    payload: ^ *virtual .+\).+\bfinal\b|\bfinal +override\b|\boverride +final\b
--- a/tools/profiler/gecko/ThreadResponsiveness.cpp
+++ b/tools/profiler/gecko/ThreadResponsiveness.cpp
@@ -101,17 +101,17 @@ public:
       }
       mTimer->InitWithCallback(this, 16, nsITimer::TYPE_ONE_SHOT);
     }
 
     return NS_OK;
   }
 
   // Should always fire on the thread being profiled
-  NS_IMETHOD Notify(nsITimer* aTimer) final override
+  NS_IMETHOD Notify(nsITimer* aTimer) final
   {
     Run();
     return NS_OK;
   }
 
   // Can be called on any thread.
   void Terminate() {
     mStop = true;
--- a/widget/android/nsDeviceContextAndroid.h
+++ b/widget/android/nsDeviceContextAndroid.h
@@ -11,17 +11,17 @@
 class nsDeviceContextSpecAndroid final : public nsIDeviceContextSpec
 {
 private:
     ~nsDeviceContextSpecAndroid() {}
 
 public:
     NS_DECL_ISUPPORTS
 
-    virtual already_AddRefed<PrintTarget> MakePrintTarget() final override;
+    already_AddRefed<PrintTarget> MakePrintTarget() final;
 
     NS_IMETHOD Init(nsIWidget* aWidget,
                     nsIPrintSettings* aPS,
                     bool aIsPrintPreview) override;
     NS_IMETHOD BeginDocument(const nsAString& aTitle,
                              const nsAString& aPrintToFileName,
                              int32_t aStartPage,
                              int32_t aEndPage) override;
--- a/widget/android/nsLookAndFeel.h
+++ b/widget/android/nsLookAndFeel.h
@@ -9,17 +9,17 @@
 #include "AndroidBridge.h"
 
 class nsLookAndFeel final : public nsXPLookAndFeel
 {
 public:
     nsLookAndFeel();
     virtual ~nsLookAndFeel();
 
-    virtual void NativeInit() final override;
+    void NativeInit() final;
     virtual void RefreshImpl() override;
     virtual nsresult NativeGetColor(ColorID aID, nscolor &aResult) override;
     virtual nsresult GetIntImpl(IntID aID, int32_t &aResult) override;
     virtual nsresult GetFloatImpl(FloatID aID, float &aResult) override;
     virtual bool GetFontImpl(FontID aID, nsString& aName, gfxFontStyle& aStyle,
                              float aDevPixPerCSSPixel) override;
     virtual bool GetEchoPasswordImpl() override;
     virtual uint32_t GetPasswordMaskDelayImpl() override;
--- a/widget/cocoa/nsChildView.h
+++ b/widget/cocoa/nsChildView.h
@@ -338,17 +338,17 @@ public:
   // Returns the "backing scale factor" of the view's window, which is the
   // ratio of pixels in the window's backing store to Cocoa points. Prior to
   // HiDPI support in OS X 10.7, this was always 1.0, but in HiDPI mode it
   // will be 2.0 (and might potentially other values as screen resolutions
   // evolve). This gives the relationship between what Gecko calls "device
   // pixels" and the Cocoa "points" coordinate system.
   CGFloat                 BackingScaleFactor() const;
 
-  mozilla::DesktopToLayoutDeviceScale GetDesktopToDeviceScale() final override {
+  mozilla::DesktopToLayoutDeviceScale GetDesktopToDeviceScale() final {
     return mozilla::DesktopToLayoutDeviceScale(BackingScaleFactor());
   }
 
   // Call if the window's backing scale factor changes - i.e., it is moved
   // between HiDPI and non-HiDPI screens
   void                    BackingScaleFactorChanged();
 
   virtual double          GetDefaultScaleInternal() override;
--- a/widget/cocoa/nsCocoaWindow.h
+++ b/widget/cocoa/nsCocoaWindow.h
@@ -252,20 +252,20 @@ public:
 
     void WillEnterFullScreen(bool aFullScreen);
     void EnteredFullScreen(bool aFullScreen, bool aNativeMode = true);
     virtual bool PrepareForFullscreenTransition(nsISupports** aData) override;
     virtual void PerformFullscreenTransition(FullscreenTransitionStage aStage,
                                              uint16_t aDuration,
                                              nsISupports* aData,
                                              nsIRunnable* aCallback) override;
-    virtual nsresult MakeFullScreen(
-      bool aFullScreen, nsIScreen* aTargetScreen = nullptr) override final;
-    virtual nsresult MakeFullScreenWithNativeTransition(
-      bool aFullScreen, nsIScreen* aTargetScreen = nullptr) override final;
+    nsresult MakeFullScreen(
+      bool aFullScreen, nsIScreen* aTargetScreen = nullptr) final;
+    nsresult MakeFullScreenWithNativeTransition(
+      bool aFullScreen, nsIScreen* aTargetScreen = nullptr) final;
     NSAnimation* FullscreenTransitionAnimation() const { return mFullscreenTransitionAnimation; }
     void ReleaseFullscreenTransitionAnimation()
     {
       MOZ_ASSERT(mFullscreenTransitionAnimation,
                  "Should only be called when there is animation");
       [mFullscreenTransitionAnimation release];
       mFullscreenTransitionAnimation = nil;
     }
@@ -281,17 +281,17 @@ public:
                                       uint32_t aHotspotX, uint32_t aHotspotY)
                                       override;
 
     CGFloat                 BackingScaleFactor();
     void                    BackingScaleFactorChanged();
     virtual double          GetDefaultScaleInternal() override;
     virtual int32_t         RoundsWidgetCoordinatesTo() override;
 
-    mozilla::DesktopToLayoutDeviceScale GetDesktopToDeviceScale() final override {
+    mozilla::DesktopToLayoutDeviceScale GetDesktopToDeviceScale() final {
       return mozilla::DesktopToLayoutDeviceScale(BackingScaleFactor());
     }
 
     virtual nsresult        SetTitle(const nsAString& aTitle) override;
 
     virtual void Invalidate(const LayoutDeviceIntRect& aRect) override;
     virtual nsresult ConfigureChildren(const nsTArray<Configuration>& aConfigurations) override;
     virtual LayerManager* GetLayerManager(PLayerTransactionChild* aShadowManager = nullptr,
--- a/widget/cocoa/nsDeviceContextSpecX.h
+++ b/widget/cocoa/nsDeviceContextSpecX.h
@@ -13,17 +13,17 @@
 class nsDeviceContextSpecX : public nsIDeviceContextSpec
 {
 public:
     NS_DECL_ISUPPORTS
 
     nsDeviceContextSpecX();
 
     NS_IMETHOD Init(nsIWidget *aWidget, nsIPrintSettings* aPS, bool aIsPrintPreview) override;
-    virtual already_AddRefed<PrintTarget> MakePrintTarget() final override;
+    already_AddRefed<PrintTarget> MakePrintTarget() final;
     NS_IMETHOD BeginDocument(const nsAString& aTitle,
                              const nsAString& aPrintToFileName,
                              int32_t          aStartPage,
                              int32_t          aEndPage) override;
     NS_IMETHOD EndDocument() override;
     NS_IMETHOD BeginPage() override {
       return NS_OK;
     };
--- a/widget/cocoa/nsLookAndFeel.h
+++ b/widget/cocoa/nsLookAndFeel.h
@@ -8,17 +8,17 @@
 #include "nsXPLookAndFeel.h"
 
 class nsLookAndFeel final : public nsXPLookAndFeel
 {
 public:
   nsLookAndFeel();
   virtual ~nsLookAndFeel();
 
-  virtual void NativeInit() final override;
+  void NativeInit() final;
   virtual void RefreshImpl() override;
   virtual nsresult NativeGetColor(ColorID aID, nscolor &aResult) override;
   virtual nsresult GetIntImpl(IntID aID, int32_t &aResult) override;
   virtual nsresult GetFloatImpl(FloatID aID, float &aResult) override;
   virtual bool GetFontImpl(FontID aID, nsString& aFontName,
                            gfxFontStyle& aFontStyle,
                            float aDevPixPerCSSPixel) override;
 
--- a/widget/gtk/WindowSurfaceWayland.h
+++ b/widget/gtk/WindowSurfaceWayland.h
@@ -103,17 +103,17 @@ private:
 // WindowSurfaceWayland is an abstraction for wl_surface
 // and related management
 class WindowSurfaceWayland : public WindowSurface {
 public:
   WindowSurfaceWayland(nsWindow *aWindow);
   ~WindowSurfaceWayland();
 
   already_AddRefed<gfx::DrawTarget> Lock(const LayoutDeviceIntRegion& aRegion) override;
-  void                      Commit(const LayoutDeviceIntRegion& aInvalidRegion) final override;
+  void                      Commit(const LayoutDeviceIntRegion& aInvalidRegion) final;
   void                      FrameCallbackHandler();
 
 private:
   WindowBackBuffer*         GetBufferToDraw(int aWidth, int aHeight);
 
   // TODO: Do we need to hold a reference to nsWindow object?
   nsWindow*                 mWindow;
   nsWaylandDisplay*         mWaylandDisplay;
--- a/widget/gtk/nsDeviceContextSpecG.h
+++ b/widget/gtk/nsDeviceContextSpecG.h
@@ -25,17 +25,17 @@ class nsPrintSettingsGTK;
 
 class nsDeviceContextSpecGTK : public nsIDeviceContextSpec
 {
 public:
   nsDeviceContextSpecGTK();
 
   NS_DECL_ISUPPORTS
 
-  virtual already_AddRefed<PrintTarget> MakePrintTarget() final override;
+  already_AddRefed<PrintTarget> MakePrintTarget() final;
 
   NS_IMETHOD Init(nsIWidget *aWidget, nsIPrintSettings* aPS,
                   bool aIsPrintPreview) override;
   NS_IMETHOD BeginDocument(const nsAString& aTitle,
                            const nsAString& aPrintToFileName,
                            int32_t aStartPage, int32_t aEndPage) override;
   NS_IMETHOD EndDocument() override;
   NS_IMETHOD BeginPage() override { return NS_OK; }
--- a/widget/gtk/nsLookAndFeel.h
+++ b/widget/gtk/nsLookAndFeel.h
@@ -15,17 +15,17 @@
 struct _GtkStyle;
 
 class nsLookAndFeel final : public nsXPLookAndFeel
 {
 public:
     nsLookAndFeel();
     virtual ~nsLookAndFeel();
 
-    virtual void NativeInit() final override;
+    void NativeInit() final;
     virtual void RefreshImpl() override;
     virtual nsresult NativeGetColor(ColorID aID, nscolor &aResult) override;
     virtual nsresult GetIntImpl(IntID aID, int32_t &aResult) override;
     virtual nsresult GetFloatImpl(FloatID aID, float &aResult) override;
     virtual bool GetFontImpl(FontID aID, nsString& aFontName,
                              gfxFontStyle& aFontStyle,
                              float aDevPixPerCSSPixel) override;
 
--- a/widget/headless/HeadlessLookAndFeel.h
+++ b/widget/headless/HeadlessLookAndFeel.h
@@ -19,17 +19,17 @@ namespace widget {
 // mode, so we use an implementation with hardcoded values.
 
 class HeadlessLookAndFeel: public nsXPLookAndFeel {
 public:
   HeadlessLookAndFeel();
   virtual ~HeadlessLookAndFeel();
 
   virtual nsresult NativeGetColor(ColorID aID, nscolor &aResult) override;
-  virtual void NativeInit() final override {};
+  void NativeInit() final {};
   virtual nsresult GetIntImpl(IntID aID, int32_t &aResult) override;
   virtual nsresult GetFloatImpl(FloatID aID, float &aResult) override;
   virtual bool GetFontImpl(FontID aID,
                            nsString& aFontName,
                            gfxFontStyle& aFontStyle,
                            float aDevPixPerCSSPixel) override;
 
   virtual void RefreshImpl() override;
--- a/widget/nsBaseWidget.h
+++ b/widget/nsBaseWidget.h
@@ -265,18 +265,18 @@ public:
                                           int32_t aHorizontal,
                                           int32_t aVertical) override
                           { return NS_ERROR_NOT_IMPLEMENTED; }
   virtual MOZ_MUST_USE nsresult
                           BeginMoveDrag(mozilla::WidgetMouseEvent* aEvent) override
                           { return NS_ERROR_NOT_IMPLEMENTED; }
   virtual nsresult        ActivateNativeMenuItemAt(const nsAString& indexString) override { return NS_ERROR_NOT_IMPLEMENTED; }
   virtual nsresult        ForceUpdateNativeMenuAt(const nsAString& indexString) override { return NS_ERROR_NOT_IMPLEMENTED; }
-  virtual nsresult        NotifyIME(const IMENotification& aIMENotification)
-                            override final;
+  nsresult                NotifyIME(const IMENotification& aIMENotification)
+                            final;
   virtual MOZ_MUST_USE nsresult
                           StartPluginIME(const mozilla::WidgetKeyboardEvent& aKeyboardEvent,
                                          int32_t aPanelX, int32_t aPanelY,
                                          nsString& aCommitted) override
                           { return NS_ERROR_NOT_IMPLEMENTED; }
   virtual void            SetPluginFocused(bool& aFocused) override {}
   virtual void            SetCandidateWindowForPlugin(
                             const mozilla::widget::CandidateWindowPosition&
@@ -293,17 +293,17 @@ public:
   CreateChild(const LayoutDeviceIntRect& aRect,
               nsWidgetInitData* aInitData = nullptr,
               bool aForceUseIWidgetParent = false) override;
   virtual void            AttachViewToTopLevel(bool aUseAttachedEvents) override;
   virtual nsIWidgetListener* GetAttachedWidgetListener() override;
   virtual void               SetAttachedWidgetListener(nsIWidgetListener* aListener) override;
   virtual nsIWidgetListener* GetPreviouslyAttachedWidgetListener() override;
   virtual void               SetPreviouslyAttachedWidgetListener(nsIWidgetListener* aListener) override;
-  virtual TextEventDispatcher* GetTextEventDispatcher() override final;
+  TextEventDispatcher* GetTextEventDispatcher() final;
   virtual TextEventDispatcherListener*
     GetNativeTextEventDispatcherListener() override;
   virtual void ZoomToRect(const uint32_t& aPresShellId,
                           const FrameMetrics::ViewID& aViewId,
                           const CSSRect& aRect,
                           const uint32_t& aFlags) override;
   // Dispatch an event that must be first be routed through APZ.
   nsEventStatus DispatchInputEvent(mozilla::WidgetInputEvent* aEvent) override;
--- a/widget/nsDeviceContextSpecProxy.h
+++ b/widget/nsDeviceContextSpecProxy.h
@@ -23,38 +23,38 @@ class RemotePrintJobChild;
 }
 
 class nsDeviceContextSpecProxy final : public nsIDeviceContextSpec
 {
 public:
   NS_DECL_ISUPPORTS
 
   NS_IMETHOD Init(nsIWidget* aWidget, nsIPrintSettings* aPrintSettings,
-                 bool aIsPrintPreview) final override;
+                 bool aIsPrintPreview) final;
 
-  virtual already_AddRefed<PrintTarget> MakePrintTarget() final override;
+  already_AddRefed<PrintTarget> MakePrintTarget() final;
 
-  NS_IMETHOD GetDrawEventRecorder(mozilla::gfx::DrawEventRecorder** aDrawEventRecorder) final override;
+  NS_IMETHOD GetDrawEventRecorder(mozilla::gfx::DrawEventRecorder** aDrawEventRecorder) final;
 
-  float GetDPI() final override;
+  float GetDPI() final;
 
-  float GetPrintingScale() final override;
+  float GetPrintingScale() final;
 
 
   NS_IMETHOD BeginDocument(const nsAString& aTitle,
                            const nsAString& aPrintToFileName,
-                           int32_t aStartPage, int32_t aEndPage) final override;
+                           int32_t aStartPage, int32_t aEndPage) final;
 
-  NS_IMETHOD EndDocument() final override;
+  NS_IMETHOD EndDocument() final;
 
-  NS_IMETHOD AbortDocument() final override;
+  NS_IMETHOD AbortDocument() final;
 
-  NS_IMETHOD BeginPage() final override;
+  NS_IMETHOD BeginPage() final;
 
-  NS_IMETHOD EndPage() final override;
+  NS_IMETHOD EndPage() final;
 
 private:
   ~nsDeviceContextSpecProxy() {}
 
   nsCOMPtr<nsIPrintSettings> mPrintSettings;
   nsCOMPtr<nsIPrintSession> mPrintSession;
   nsCOMPtr<nsIDeviceContextSpec> mRealDeviceContextSpec;
   RefPtr<mozilla::layout::RemotePrintJobChild> mRemotePrintJob;
--- a/widget/uikit/nsLookAndFeel.h
+++ b/widget/uikit/nsLookAndFeel.h
@@ -9,17 +9,17 @@
 #include "nsXPLookAndFeel.h"
 
 class nsLookAndFeel final : public nsXPLookAndFeel
 {
 public:
     nsLookAndFeel();
     virtual ~nsLookAndFeel();
 
-    virtual void NativeInit() final override;
+    void NativeInit() final;
     virtual void RefreshImpl();
     virtual nsresult NativeGetColor(const ColorID aID, nscolor &aResult);
     virtual nsresult GetIntImpl(IntID aID, int32_t &aResult);
     virtual nsresult GetFloatImpl(FloatID aID, float &aResult);
     virtual bool GetFontImpl(FontID aID, nsString& aFontName,
                              gfxFontStyle& aFontStyle,
                              float aDevPixPerCSSPixel);
     virtual char16_t GetPasswordCharacterImpl()
--- a/widget/windows/nsAppShell.h
+++ b/widget/windows/nsAppShell.h
@@ -31,17 +31,17 @@ public:
   typedef mozilla::Mutex Mutex;
 
   nsresult Init();
   void DoProcessMoreGeckoEvents();
 
   static UINT GetTaskbarButtonCreatedMessage();
 
   NS_IMETHOD AfterProcessNextEvent(nsIThreadInternal* thread,
-                                   bool eventWasProcessed) final override;
+                                   bool eventWasProcessed) final;
 
 protected:
   NS_IMETHOD Run() override;
   NS_IMETHOD Exit() override;
 
 #if defined(ACCESSIBILITY)
   NS_IMETHOD Observe(nsISupports* aSubject, const char* aTopic,
                      const char16_t* aData) override;
--- a/widget/windows/nsDeviceContextSpecWin.h
+++ b/widget/windows/nsDeviceContextSpecWin.h
@@ -19,30 +19,30 @@ class nsIWidget;
 
 class nsDeviceContextSpecWin : public nsIDeviceContextSpec
 {
 public:
   nsDeviceContextSpecWin();
 
   NS_DECL_ISUPPORTS
 
-  virtual already_AddRefed<PrintTarget> MakePrintTarget() final override;
+  already_AddRefed<PrintTarget> MakePrintTarget() final;
   NS_IMETHOD BeginDocument(const nsAString& aTitle,
                            const nsAString& aPrintToFileName,
                            int32_t          aStartPage,
                            int32_t          aEndPage) override { return NS_OK; }
   NS_IMETHOD EndDocument() override { return NS_OK; }
   NS_IMETHOD BeginPage() override { return NS_OK; }
   NS_IMETHOD EndPage() override { return NS_OK; }
 
   NS_IMETHOD Init(nsIWidget* aWidget, nsIPrintSettings* aPS, bool aIsPrintPreview) override;
 
-  float GetDPI() final override;
+  float GetDPI() final;
 
-  float GetPrintingScale() final override;
+  float GetPrintingScale() final;
 
   void GetDriverName(nsAString& aDriverName) const { aDriverName = mDriverName; }
   void GetDeviceName(nsAString& aDeviceName) const { aDeviceName = mDeviceName; }
 
   // The GetDevMode will return a pointer to a DevMode
   // whether it is from the Global memory handle or just the DevMode
   // To get the DevMode from the Global memory Handle it must lock it 
   // So this call must be paired with a call to UnlockGlobalHandle
--- a/widget/windows/nsLookAndFeel.h
+++ b/widget/windows/nsLookAndFeel.h
@@ -44,17 +44,17 @@
 
 class nsLookAndFeel final : public nsXPLookAndFeel
 {
   static OperatingSystemVersion GetOperatingSystemVersion();
 public:
   nsLookAndFeel();
   virtual ~nsLookAndFeel();
 
-  void NativeInit() final override;
+  void NativeInit() final;
   void RefreshImpl() override;
   nsresult NativeGetColor(ColorID aID, nscolor &aResult) override;
   nsresult GetIntImpl(IntID aID, int32_t &aResult) override;
   nsresult GetFloatImpl(FloatID aID, float &aResult) override;
   bool GetFontImpl(FontID aID, nsString& aFontName,
                    gfxFontStyle& aFontStyle,
                    float aDevPixPerCSSPixel) override;
   char16_t GetPasswordCharacterImpl() override;
--- a/widget/windows/nsWindow.h
+++ b/widget/windows/nsWindow.h
@@ -107,19 +107,19 @@ public:
                                        nsNativeWidget aNativeParent,
                                        const LayoutDeviceIntRect& aRect,
                                        nsWidgetInitData* aInitData = nullptr)
                                        override;
   virtual void            Destroy() override;
   virtual void            SetParent(nsIWidget *aNewParent) override;
   virtual nsIWidget*      GetParent(void) override;
   virtual float           GetDPI() override;
-  double                  GetDefaultScaleInternal() final override;
-  int32_t                 LogToPhys(double aValue) final override;
-  mozilla::DesktopToLayoutDeviceScale GetDesktopToDeviceScale() final override
+  double                  GetDefaultScaleInternal() final;
+  int32_t                 LogToPhys(double aValue) final;
+  mozilla::DesktopToLayoutDeviceScale GetDesktopToDeviceScale() final
   {
     if (mozilla::widget::WinUtils::IsPerMonitorDPIAware()) {
       return mozilla::DesktopToLayoutDeviceScale(1.0);
     } else {
       return mozilla::DesktopToLayoutDeviceScale(GetDefaultScaleInternal());
     }
   }
 
--- a/widget/windows/nsWindowBase.h
+++ b/widget/windows/nsWindowBase.h
@@ -20,17 +20,17 @@
 class nsWindowBase : public nsBaseWidget
 {
 public:
   typedef mozilla::WidgetEventTime WidgetEventTime;
 
   /*
    * Return the HWND or null for this widget.
    */
-  virtual HWND GetWindowHandle() final {
+  HWND GetWindowHandle() {
     return static_cast<HWND>(GetNativeData(NS_NATIVE_WINDOW));
   }
 
   /*
    * Return the parent window, if it exists.
    */
   virtual nsWindowBase* GetParentWindowBase(bool aIncludeOwner) = 0;
 
--- a/xpcom/ds/nsExpirationTracker.h
+++ b/xpcom/ds/nsExpirationTracker.h
@@ -509,18 +509,18 @@ class nsExpirationTracker : protected ::
     NotifyExpired(aObject);
   }
 
   /**
    * Since there are no users of these callbacks in the single threaded case,
    * we mark them as final with the hope that the compiler can optimize the
    * method calls out entirely.
    */
-  void NotifyHandlerEndLocked(const AutoLock&) final override { }
-  void NotifyHandlerEnd() final override { }
+  void NotifyHandlerEndLocked(const AutoLock&) final { }
+  void NotifyHandlerEnd() final { }
 
 protected:
   virtual void NotifyExpired(T* aObj) = 0;
 
 public:
   nsExpirationTracker(uint32_t aTimerPeriod,
                       const char* aName,
                       nsIEventTarget* aEventTarget = nullptr)
--- a/xpcom/tests/gtest/TestAtoms.cpp
+++ b/xpcom/tests/gtest/TestAtoms.cpp
@@ -153,17 +153,17 @@ TEST(Atoms, Table)
   EXPECT_EQ(NS_GetNumberOfAtoms(), count + 1);
 }
 
 class nsAtomRunner final : public nsIRunnable
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
 
-  NS_IMETHOD Run() final override
+  NS_IMETHOD Run() final
   {
     for (int i = 0; i < 10000; i++) {
       RefPtr<nsAtom> atom = NS_Atomize(u"A Testing Atom");
     }
     return NS_OK;
   }
 
 private:
--- a/xpcom/tests/gtest/TestAutoRefCnt.cpp
+++ b/xpcom/tests/gtest/TestAutoRefCnt.cpp
@@ -13,17 +13,17 @@
 
 using namespace mozilla;
 
 class nsThreadSafeAutoRefCntRunner final : public nsIRunnable
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
 
-  NS_IMETHOD Run() final override
+  NS_IMETHOD Run() final
   {
     for (int i = 0; i < 10000; i++) {
       if (++sRefCnt == 1) {
         sIncToOne++;
       }
       if (--sRefCnt == 0) {
         sDecToZero++;
       }
--- a/xpcom/tests/gtest/TestDeadlockDetector.cpp
+++ b/xpcom/tests/gtest/TestDeadlockDetector.cpp
@@ -51,22 +51,22 @@ extern unsigned int _gdb_sleep_duration;
 
 /**
  * Simple test fixture that makes sure the gdb sleep setup in the
  * ah crap handler is bypassed during the death tests.
  */
 class TESTNAME(DeadlockDetectorTest) : public ::testing::Test
 {
 protected:
-  void SetUp() final override {
+  void SetUp() final {
     mOldSleepDuration = ::_gdb_sleep_duration;
     ::_gdb_sleep_duration = 0;
   }
 
-  void TearDown() final override {
+  void TearDown() final {
     ::_gdb_sleep_duration = mOldSleepDuration;
   }
 
 private:
   unsigned int mOldSleepDuration;
 };
 
 void DisableCrashReporter()
--- a/xpcom/threads/CPUUsageWatcher.h
+++ b/xpcom/threads/CPUUsageWatcher.h
@@ -56,17 +56,17 @@ public:
 
   void Uninit();
 
   // Updates necessary values to allow AnnotateHang to function. This must be
   // called on some semi-regular basis, as it will calculate the mean CPU
   // usage values between now and the last time it was called.
   Result<Ok, CPUUsageWatcherError> CollectCPUUsage();
 
-  void AnnotateHang(HangMonitor::HangAnnotations& aAnnotations) final override;
+  void AnnotateHang(HangMonitor::HangAnnotations& aAnnotations) final;
 private:
 #ifdef CPU_USAGE_WATCHER_ACTIVE
   bool mInitialized;
   // The threshold above which we will mark a hang as occurring under high
   // external CPU usage conditions
   float mExternalUsageThreshold;
   // The CPU usage (0-1) external to our process, averaged between the two
   // most recent monitor thread runs
--- a/xpcom/threads/EventQueue.h
+++ b/xpcom/threads/EventQueue.h
@@ -20,30 +20,30 @@ class EventQueue final : public Abstract
 public:
   static const bool SupportsPrioritization = false;
 
   EventQueue() {}
   explicit EventQueue(EventPriority aPriority);
 
   void PutEvent(already_AddRefed<nsIRunnable>&& aEvent,
                 EventPriority aPriority,
-                const MutexAutoLock& aProofOfLock) final override;
+                const MutexAutoLock& aProofOfLock) final;
   already_AddRefed<nsIRunnable> GetEvent(EventPriority* aPriority,
-                                         const MutexAutoLock& aProofOfLock) final override;
+                                         const MutexAutoLock& aProofOfLock) final;
 
-  bool IsEmpty(const MutexAutoLock& aProofOfLock) final override;
-  bool HasReadyEvent(const MutexAutoLock& aProofOfLock) final override;
+  bool IsEmpty(const MutexAutoLock& aProofOfLock) final;
+  bool HasReadyEvent(const MutexAutoLock& aProofOfLock) final;
 
-  size_t Count(const MutexAutoLock& aProofOfLock) const final override;
+  size_t Count(const MutexAutoLock& aProofOfLock) const final;
   already_AddRefed<nsIRunnable> PeekEvent(const MutexAutoLock& aProofOfLock);
 
-  void EnableInputEventPrioritization(const MutexAutoLock& aProofOfLock) final override {}
-  void FlushInputEventPrioritization(const MutexAutoLock& aProofOfLock) final override {}
-  void SuspendInputEventPrioritization(const MutexAutoLock& aProofOfLock) final override {}
-  void ResumeInputEventPrioritization(const MutexAutoLock& aProofOfLock) final override {}
+  void EnableInputEventPrioritization(const MutexAutoLock& aProofOfLock) final {}
+  void FlushInputEventPrioritization(const MutexAutoLock& aProofOfLock) final {}
+  void SuspendInputEventPrioritization(const MutexAutoLock& aProofOfLock) final {}
+  void ResumeInputEventPrioritization(const MutexAutoLock& aProofOfLock) final {}
 
 private:
   mozilla::Queue<nsCOMPtr<nsIRunnable>> mQueue;
 };
 
 } // namespace mozilla
 
 #endif // mozilla_EventQueue_h
--- a/xpcom/threads/LabeledEventQueue.h
+++ b/xpcom/threads/LabeledEventQueue.h
@@ -31,28 +31,28 @@ class SchedulerGroup;
 class LabeledEventQueue final : public AbstractEventQueue
 {
 public:
   explicit LabeledEventQueue(EventPriority aPriority);
   ~LabeledEventQueue();
 
   void PutEvent(already_AddRefed<nsIRunnable>&& aEvent,
                 EventPriority aPriority,
-                const MutexAutoLock& aProofOfLock) final override;
+                const MutexAutoLock& aProofOfLock) final;
   already_AddRefed<nsIRunnable> GetEvent(EventPriority* aPriority,
-                                         const MutexAutoLock& aProofOfLock) final override;
+                                         const MutexAutoLock& aProofOfLock) final;
 
-  bool IsEmpty(const MutexAutoLock& aProofOfLock) final override;
-  size_t Count(const MutexAutoLock& aProofOfLock) const final override;
-  bool HasReadyEvent(const MutexAutoLock& aProofOfLock) final override;
+  bool IsEmpty(const MutexAutoLock& aProofOfLock) final;
+  size_t Count(const MutexAutoLock& aProofOfLock) const final;
+  bool HasReadyEvent(const MutexAutoLock& aProofOfLock) final;
 
-  void EnableInputEventPrioritization(const MutexAutoLock& aProofOfLock) final override {}
-  void FlushInputEventPrioritization(const MutexAutoLock& aProofOfLock) final override {}
-  void SuspendInputEventPrioritization(const MutexAutoLock& aProofOfLock) final override {}
-  void ResumeInputEventPrioritization(const MutexAutoLock& aProofOfLock) final override {}
+  void EnableInputEventPrioritization(const MutexAutoLock& aProofOfLock) final {}
+  void FlushInputEventPrioritization(const MutexAutoLock& aProofOfLock) final {}
+  void SuspendInputEventPrioritization(const MutexAutoLock& aProofOfLock) final {}
+  void ResumeInputEventPrioritization(const MutexAutoLock& aProofOfLock) final {}
 
 private:
 
   // The basic problem here is to keep track of the ordering relationships
   // between events. As long as there are only labeled events, there can be one
   // queue per SchedulerGroup. However, if an unlabeled event is pushed, we must
   // remember that it should run after all the labeled events currently in the
   // queue. To do this, the queues are arranged in "epochs". Each time the tail
--- a/xpcom/threads/PrioritizedEventQueue.h
+++ b/xpcom/threads/PrioritizedEventQueue.h
@@ -45,41 +45,41 @@ public:
   PrioritizedEventQueue(UniquePtr<InnerQueueT> aHighQueue,
                         UniquePtr<InnerQueueT> aInputQueue,
                         UniquePtr<InnerQueueT> aNormalQueue,
                         UniquePtr<InnerQueueT> aIdleQueue,
                         already_AddRefed<nsIIdlePeriod> aIdlePeriod);
 
   void PutEvent(already_AddRefed<nsIRunnable>&& aEvent,
                 EventPriority aPriority,
-                const MutexAutoLock& aProofOfLock) final override;
+                const MutexAutoLock& aProofOfLock) final;
   already_AddRefed<nsIRunnable> GetEvent(EventPriority* aPriority,
-                                         const MutexAutoLock& aProofOfLock) final override;
+                                         const MutexAutoLock& aProofOfLock) final;
 
-  bool IsEmpty(const MutexAutoLock& aProofOfLock) final override;
-  size_t Count(const MutexAutoLock& aProofOfLock) const final override;
-  bool HasReadyEvent(const MutexAutoLock& aProofOfLock) final override;
+  bool IsEmpty(const MutexAutoLock& aProofOfLock) final;
+  size_t Count(const MutexAutoLock& aProofOfLock) const final;
+  bool HasReadyEvent(const MutexAutoLock& aProofOfLock) final;
 
   // When checking the idle deadline, we need to drop whatever mutex protects
   // this queue. This method allows that mutex to be stored so that we can drop
   // it and reacquire it when checking the idle deadline. The mutex must live at
   // least as long as the queue.
   void SetMutexRef(Mutex& aMutex) { mMutex = &aMutex; }
 
 #ifndef RELEASE_OR_BETA
   // nsThread.cpp sends telemetry containing the most recently computed idle
   // deadline. We store a reference to a field in nsThread where this deadline
   // will be stored so that it can be fetched quickly for telemetry.
   void SetNextIdleDeadlineRef(TimeStamp& aDeadline) { mNextIdleDeadline = &aDeadline; }
 #endif
 
-  void EnableInputEventPrioritization(const MutexAutoLock& aProofOfLock) final override;
-  void FlushInputEventPrioritization(const MutexAutoLock& aProofOfLock) final override;
-  void SuspendInputEventPrioritization(const MutexAutoLock& aProofOfLock) final override;
-  void ResumeInputEventPrioritization(const MutexAutoLock& aProofOfLock) final override;
+  void EnableInputEventPrioritization(const MutexAutoLock& aProofOfLock) final;
+  void FlushInputEventPrioritization(const MutexAutoLock& aProofOfLock) final;
+  void SuspendInputEventPrioritization(const MutexAutoLock& aProofOfLock) final;
+  void ResumeInputEventPrioritization(const MutexAutoLock& aProofOfLock) final;
 
 private:
   EventPriority SelectQueue(bool aUpdateState, const MutexAutoLock& aProofOfLock);
 
   // Returns a null TimeStamp if we're not in the idle period.
   mozilla::TimeStamp GetIdleDeadline();
 
   UniquePtr<InnerQueueT> mHighQueue;
--- a/xpcom/threads/Scheduler.cpp
+++ b/xpcom/threads/Scheduler.cpp
@@ -39,35 +39,35 @@ public:
   explicit SchedulerEventQueue(UniquePtr<AbstractEventQueue> aQueue)
     : mLock("Scheduler")
     , mNonCooperativeCondVar(mLock, "SchedulerNonCoop")
     , mQueue(Move(aQueue))
     , mScheduler(nullptr)
   {}
 
   bool PutEvent(already_AddRefed<nsIRunnable>&& aEvent,
-                EventPriority aPriority) final override;
+                EventPriority aPriority) final;
 
-  void Disconnect(const MutexAutoLock& aProofOfLock) final override {}
+  void Disconnect(const MutexAutoLock& aProofOfLock) final {}
 
   already_AddRefed<nsIRunnable> GetEvent(bool aMayWait,
-                                         EventPriority* aPriority) final override;
-  bool HasPendingEvent() final override;
+                                         EventPriority* aPriority) final;
+  bool HasPendingEvent() final;
   bool HasPendingEvent(const MutexAutoLock& aProofOfLock);
 
-  bool ShutdownIfNoPendingEvents() final override;
+  bool ShutdownIfNoPendingEvents() final;
 
-  already_AddRefed<nsIThreadObserver> GetObserver() final override;
-  already_AddRefed<nsIThreadObserver> GetObserverOnThread() final override;
-  void SetObserver(nsIThreadObserver* aObserver) final override;
+  already_AddRefed<nsIThreadObserver> GetObserver() final;
+  already_AddRefed<nsIThreadObserver> GetObserverOnThread() final;
+  void SetObserver(nsIThreadObserver* aObserver) final;
 
-  void EnableInputEventPrioritization() final override;
-  void FlushInputEventPrioritization() final override;
-  void SuspendInputEventPrioritization() final override;
-  void ResumeInputEventPrioritization() final override;
+  void EnableInputEventPrioritization() final;
+  void FlushInputEventPrioritization() final;
+  void SuspendInputEventPrioritization() final;
+  void ResumeInputEventPrioritization() final;
 
   bool UseCooperativeScheduling() const;
   void SetScheduler(SchedulerImpl* aScheduler);
 
   Mutex& MutexRef() { return mLock; }
 
 private:
   Mutex mLock;
--- a/xpcom/threads/ThreadEventQueue.cpp
+++ b/xpcom/threads/ThreadEventQueue.cpp
@@ -23,22 +23,22 @@ class ThreadEventQueue<InnerQueueT>::Nes
 public:
   NestedSink(EventQueue* aQueue, ThreadEventQueue* aOwner)
     : mQueue(aQueue)
     , mOwner(aOwner)
   {
   }
 
   bool PutEvent(already_AddRefed<nsIRunnable>&& aEvent,
-                EventPriority aPriority) final override
+                EventPriority aPriority) final
   {
     return mOwner->PutEventInternal(Move(aEvent), aPriority, this);
   }
 
-  void Disconnect(const MutexAutoLock& aProofOfLock) final override
+  void Disconnect(const MutexAutoLock& aProofOfLock) final
   {
     mQueue = nullptr;
   }
 
 private:
   friend class ThreadEventQueue;
 
   // This is a non-owning reference. It must live at least until Disconnect is
--- a/xpcom/threads/ThreadEventQueue.h
+++ b/xpcom/threads/ThreadEventQueue.h
@@ -35,30 +35,30 @@ class ThreadEventTarget;
 // is a template parameter to avoid virtual dispatch overhead.
 template<class InnerQueueT>
 class ThreadEventQueue final : public SynchronizedEventQueue
 {
 public:
   explicit ThreadEventQueue(UniquePtr<InnerQueueT> aQueue);
 
   bool PutEvent(already_AddRefed<nsIRunnable>&& aEvent,
-                EventPriority aPriority) final override;
+                EventPriority aPriority) final;
 
   already_AddRefed<nsIRunnable> GetEvent(bool aMayWait,
-                                         EventPriority* aPriority) final override;
-  bool HasPendingEvent() final override;
+                                         EventPriority* aPriority) final;
+  bool HasPendingEvent() final;
 
-  bool ShutdownIfNoPendingEvents() final override;
+  bool ShutdownIfNoPendingEvents() final;
 
-  void Disconnect(const MutexAutoLock& aProofOfLock) final override {}
+  void Disconnect(const MutexAutoLock& aProofOfLock) final {}
 
-  void EnableInputEventPrioritization() final override;
-  void FlushInputEventPrioritization() final override;
-  void SuspendInputEventPrioritization() final override;
-  void ResumeInputEventPrioritization() final override;
+  void EnableInputEventPrioritization() final;
+  void FlushInputEventPrioritization() final;
+  void SuspendInputEventPrioritization() final;
+  void ResumeInputEventPrioritization() final;
 
   /**
    * This method causes any events currently enqueued on the thread to be
    * suppressed until PopEventQueue is called, and any event dispatched to this
    * thread's nsIEventTarget will queue as well. Calls to PushEventQueue may be
    * nested and must each be paired with a call to PopEventQueue in order to
    * restore the original state of the thread. The returned nsIEventTarget may
    * be used to push events onto the nested queue. Dispatching will be disabled
@@ -72,19 +72,19 @@ public:
    * Revert a call to PushEventQueue. When an event queue is popped, any events
    * remaining in the queue are appended to the elder queue. This also causes
    * the nsIEventTarget returned from PushEventQueue to stop dispatching events.
    * Must only be called on the target thread, and with the innermost event
    * queue.
    */
   void PopEventQueue(nsIEventTarget* aTarget);
 
-  already_AddRefed<nsIThreadObserver> GetObserver() final override;
-  already_AddRefed<nsIThreadObserver> GetObserverOnThread() final override;
-  void SetObserver(nsIThreadObserver* aObserver) final override;
+  already_AddRefed<nsIThreadObserver> GetObserver() final;
+  already_AddRefed<nsIThreadObserver> GetObserverOnThread() final;
+  void SetObserver(nsIThreadObserver* aObserver) final;
 
   Mutex& MutexRef() { return mLock; }
 
 private:
   class NestedSink;
 
   virtual ~ThreadEventQueue();