Bug 1436263 - Part 3: Remove `virtual` from final virtual function declarations. r=froydnj
authorChris Peterson <cpeterson@mozilla.com>
Thu, 08 Feb 2018 21:22:43 -0800
changeset 448877 b7634d84216c16379ff045db5c155894457506fb
parent 448876 6064b17b6be60caaf9a1ddfa84df95c41b9ce0fb
child 448878 8f706e7a3934ab8b58b98a04361ef9503c828987
push id140
push userfmarier@mozilla.com
push dateTue, 20 Feb 2018 00:21:38 +0000
reviewersfroydnj
bugs1436263
milestone60.0a1
Bug 1436263 - Part 3: Remove `virtual` from final virtual function declarations. r=froydnj MozReview-Commit-ID: 8pjYjEvQF42
accessible/aom/AccessibleNode.h
accessible/generic/BaseAccessibles.h
accessible/ipc/DocAccessibleParent.h
accessible/windows/msaa/IUnknownImpl.h
accessible/xpcom/xpcAccessibleGeneric.h
accessible/xul/XULTreeGridAccessible.h
build/clang-plugin/tests/TestNeedsNoVTableType.cpp
devtools/shared/heapsnapshot/HeapSnapshot.cpp
dom/base/Element.h
dom/base/StyleSheetList.h
dom/base/nsContentList.h
dom/base/nsDOMCaretPosition.h
dom/base/nsGenericDOMDataNode.h
dom/base/nsGlobalWindowOuter.h
dom/base/nsRange.h
dom/bindings/IterableIterator.h
dom/events/Event.h
dom/html/HTMLAnchorElement.h
dom/html/HTMLAreaElement.h
dom/html/HTMLLinkElement.h
dom/html/HTMLMediaElement.h
dom/html/HTMLTitleElement.h
dom/svg/SVGAElement.h
dom/svg/SVGAnimatedEnumeration.h
dom/svg/SVGAnimatedInteger.h
dom/svg/SVGAnimatedNumber.h
dom/svg/SVGGeometryElement.h
dom/svg/SVGRect.h
dom/svg/nsSVGElement.h
dom/workers/WorkerRunnable.h
dom/xhr/XMLHttpRequestWorker.cpp
editor/composer/nsComposerCommands.h
gfx/2d/GradientStopsD2D.h
gfx/2d/InlineTranslator.h
gfx/layers/d3d11/CompositorD3D11.h
gfx/thebes/PrintTargetCG.h
gfx/thebes/PrintTargetSkPDF.h
gfx/thebes/PrintTargetThebes.h
image/Image.h
ipc/chromium/src/base/message_pump_libevent.h
js/src/frontend/TokenStream.h
layout/style/CSSRuleList.h
layout/style/CounterStyleManager.cpp
layout/style/nsDOMCSSRGBColor.h
layout/style/nsDOMCSSRect.h
layout/style/nsDOMCSSValueList.h
layout/style/nsROCSSPrimitiveValue.h
mozglue/build/WindowsDllServices.h
toolkit/components/places/tests/gtest/mock_Link.h
widget/android/nsDeviceContextAndroid.h
widget/android/nsLookAndFeel.h
widget/cocoa/nsCocoaWindow.h
widget/cocoa/nsDeviceContextSpecX.h
widget/cocoa/nsLookAndFeel.h
widget/gtk/nsDeviceContextSpecG.h
widget/gtk/nsLookAndFeel.h
widget/headless/HeadlessLookAndFeel.h
widget/nsBaseWidget.h
widget/nsDeviceContextSpecProxy.h
widget/uikit/nsLookAndFeel.h
widget/windows/nsDeviceContextSpecWin.h
--- a/accessible/aom/AccessibleNode.h
+++ b/accessible/aom/AccessibleNode.h
@@ -28,17 +28,17 @@ 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) final;
+  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;
   virtual dom::ParentObject GetParentObject() const final;
 
   void GetRole(nsAString& aRole);
   void GetStates(nsTArray<nsString>& aStates);
   void GetAttributes(nsTArray<nsString>& aAttributes);
   nsINode* GetDOMNode();
 
   bool Is(const Sequence<nsString>& aFlavors);
--- 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) final;
-  virtual bool RemoveChild(Accessible* aChild) 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() final;
-  virtual uint64_t NativeInteractiveState() const final;
-  virtual uint64_t NativeLinkState() const final;
-  virtual bool NativelyUnavailable() const final;
-  virtual void ApplyARIAState(uint64_t* aState) const 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) 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) 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) 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/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;
+  Accessible* ToInternalAccessible() const final;
 
   // xpcAccessibleGeneric
   virtual void Shutdown();
 
 protected:
   virtual ~xpcAccessibleGeneric();
 
   AccessibleOrProxy mIntl;
--- a/accessible/xul/XULTreeGridAccessible.h
+++ b/accessible/xul/XULTreeGridAccessible.h
@@ -85,17 +85,17 @@ 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)
+  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>
--- 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;
+  void e() final;
 };
 struct G {
   virtual void e() = 0;
 };
 
 void f() {
   {
     PickyConsumer<A> a1;
--- a/devtools/shared/heapsnapshot/HeapSnapshot.cpp
+++ b/devtools/shared/heapsnapshot/HeapSnapshot.cpp
@@ -1250,23 +1250,23 @@ public:
   bool init() {
     return framesAlreadySerialized.init() &&
            twoByteStringsAlreadySerialized.init() &&
            oneByteStringsAlreadySerialized.init();
   }
 
   ~StreamWriter() override { }
 
-  virtual bool writeMetadata(uint64_t timestamp) final {
+  bool writeMetadata(uint64_t timestamp) final {
     protobuf::Metadata metadata;
     metadata.set_timestamp(timestamp);
     return writeMessage(metadata);
   }
 
-  virtual bool writeNode(const JS::ubi::Node& ubiNode,
+  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());
 
--- 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;
+  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/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) 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/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() 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() 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)
-    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/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;
+  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(
+  nsresult SetFullscreenInternal(
     FullscreenReason aReason, bool aIsFullscreen) final;
-  virtual void FullscreenWillChange(bool aIsFullscreen) final;
-  virtual void FinishFullscreenChange(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) 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/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
+  void UnlinkHelper() final
   {
     mIterableObj = nullptr;
   }
 
   virtual void TraverseHelper(nsCycleCollectionTraversalCallback& cb) override
   {
     IterableIterator<T>* tmp = this;
     NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mIterableObj);
--- 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) 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
+  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
+  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
+  void NodeInfoChanged(nsIDocument* aOldDoc) final
   {
     ClearHasPendingLinkUpdate();
     nsGenericHTMLElement::NodeInfoChanged(aOldDoc);
   }
 
 protected:
   virtual ~HTMLLinkElement();
 
--- a/dom/html/HTMLMediaElement.h
+++ b/dom/html/HTMLMediaElement.h
@@ -168,74 +168,74 @@ public:
   // when it has read the metadata containing video dimensions,
   // etc.
   virtual void MetadataLoaded(
     const MediaInfo* aInfo,
     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;
+  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;
+  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;
+  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;
+  void DecodeWarning(const MediaResult& aError) final;
 
   // Return true if error attribute is not null.
-  virtual bool HasError() const final;
+  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;
+  void LoadAborted() final;
 
   // Called by the video decoder object, on the main thread,
   // when the video playback has ended.
-  virtual void PlaybackEnded() final;
+  void PlaybackEnded() final;
 
   // Called by the video decoder object, on the main thread,
   // when the resource has started seeking.
-  virtual void SeekStarted() final;
+  void SeekStarted() final;
 
   // Called by the video decoder object, on the main thread,
   // when the resource has completed seeking.
-  virtual void SeekCompleted() final;
+  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;
+  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;
+  void DownloadProgressed() final;
 
   // Called by the media decoder to indicate whether the media cache has
   // suspended the channel.
-  virtual void NotifySuspendedByCache(bool aSuspendedByCache) final;
+  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;
+  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;
+  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.
@@ -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;
+  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;
 
@@ -471,17 +471,17 @@ public:
   {
     return mNetworkState;
   }
 
   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;
+  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;
+  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
+  HTMLMediaElement* GetMediaElement() final
   {
     return this;
   }
 
   // Return true if decoding should be paused
-  virtual bool GetPaused() final
+  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)
-    final;
+  JSObject* WrapNode(JSContext* cx, JS::Handle<JSObject*> aGivenProto) final;
 
 private:
   void SendTitleChangeEvent(bool aBound);
 };
 
 } // namespace dom
 } // namespace mozilla
 
--- 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
+  void NodeInfoChanged(nsIDocument* aOldDoc) final
   {
     ClearHasPendingLinkUpdate();
     SVGAElementBase::NodeInfoChanged(aOldDoc);
   }
 
 protected:
   virtual ~SVGAElement();
 
--- a/dom/svg/SVGAnimatedEnumeration.h
+++ b/dom/svg/SVGAnimatedEnumeration.h
@@ -21,17 +21,17 @@ 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)
+  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)
--- a/dom/svg/SVGAnimatedInteger.h
+++ b/dom/svg/SVGAnimatedInteger.h
@@ -21,17 +21,17 @@ 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)
+  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)
--- a/dom/svg/SVGAnimatedNumber.h
+++ b/dom/svg/SVGAnimatedNumber.h
@@ -22,17 +22,17 @@ 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)
+  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)
--- 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() 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 final
+  float X() const final
   {
     return mX;
   }
 
-  virtual void SetX(float aX, ErrorResult& aRv) final
+  void SetX(float aX, ErrorResult& aRv) final
   {
     mX = aX;
   }
 
-  virtual float Y() const final
+  float Y() const final
   {
     return mY;
   }
 
-  virtual void SetY(float aY, ErrorResult& aRv) final
+  void SetY(float aY, ErrorResult& aRv) final
   {
     mY = aY;
   }
 
-  virtual float Width() const final
+  float Width() const final
   {
     return mWidth;
   }
 
-  virtual void SetWidth(float aWidth, ErrorResult& aRv) final
+  void SetWidth(float aWidth, ErrorResult& aRv) final
   {
     mWidth = aWidth;
   }
 
-  virtual float Height() const final
+  float Height() const final
   {
     return mHeight;
   }
 
-  virtual void SetHeight(float aHeight, ErrorResult& aRv) final
+  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 { 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) 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/workers/WorkerRunnable.h
+++ b/dom/workers/WorkerRunnable.h
@@ -194,17 +194,17 @@ protected:
 
 private:
   virtual bool
   IsDebuggerRunnable() const override
   {
     return true;
   }
 
-  virtual bool
+  bool
   PreDispatch(WorkerPrivate* aWorkerPrivate) final
   {
     AssertIsOnMainThread();
 
     return true;
   }
 
   virtual void
@@ -477,30 +477,30 @@ public:
   nsresult
   Cancel() override;
 
 protected:
   virtual ~MainThreadStopSyncLoopRunnable()
   { }
 
 private:
-  virtual bool
+  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
+  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 */) 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/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) final;
+  nsresult GetCurrentState(mozilla::HTMLEditor* aHTMLEditor,
+                           nsICommandParams* aParams) final;
 
   // add/remove the style
-  virtual nsresult ToggleState(mozilla::HTMLEditor* aHTMLEditor) 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) final;
+  nsresult GetCurrentState(mozilla::HTMLEditor* aHTMLEditor,
+                           nsICommandParams* aParams) final;
 
   // add/remove the style
-  virtual nsresult ToggleState(mozilla::HTMLEditor* aHTMLEditor) 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) final;
+  nsresult GetCurrentState(mozilla::HTMLEditor* aHTMLEditor,
+                           nsICommandParams* aParams) final;
 
   // add/remove the style
-  virtual nsresult ToggleState(mozilla::HTMLEditor* aHTMLEditor) 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) final;
-  virtual nsresult SetState(mozilla::HTMLEditor* aHTMLEditor,
-                            nsString& newState) 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) final;
-  virtual nsresult SetState(mozilla::HTMLEditor* aHTMLEditor,
-                            nsString& newState) 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) final;
-  virtual nsresult SetState(mozilla::HTMLEditor* aHTMLEditor,
-                            nsString& newState) 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) final;
-  virtual nsresult GetCurrentState(mozilla::HTMLEditor* aHTMLEditor,
-                                   nsICommandParams* aParams) final;
-  virtual nsresult SetState(mozilla::HTMLEditor* aHTMLEditor,
-                            nsString& newState) 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) final;
-  virtual nsresult SetState(mozilla::HTMLEditor* aHTMLEditor,
-                            nsString& newState) 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) final;
-  virtual nsresult SetState(mozilla::HTMLEditor* aHTMLEditor,
-                            nsString& newState) 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) final;
-  virtual nsresult SetState(mozilla::HTMLEditor* aHTMLEditor,
-                            nsString& newState) 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) final;
-  virtual nsresult GetCurrentState(mozilla::HTMLEditor* aHTMLEditor,
-                                   nsICommandParams* aParams) final;
-  virtual nsresult ToggleState(mozilla::HTMLEditor* aHTMLEditor) 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/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
@@ -78,17 +78,17 @@ public:
 
   UnscaledFont* LookupUnscaledFont(ReferencePtr aRefPtr) final
   {
     UnscaledFont* result = mUnscaledFonts.GetWeak(aRefPtr);
     MOZ_ASSERT(result);
     return result;
   }
 
-  virtual UnscaledFont* LookupUnscaledFontByIndex(size_t index) final
+  UnscaledFont* LookupUnscaledFontByIndex(size_t index) final
   {
     UnscaledFont* result = mUnscaledFontTable[index];
     return result;
   }
 
   NativeFontResource* LookupNativeFontResource(uint64_t aKey) final
   {
     NativeFontResource* result = mNativeFontResources.GetWeak(aKey);
--- 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;
+  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,24 +19,24 @@ 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;
-  virtual nsresult EndPrinting() final;
-  virtual nsresult AbortPrinting() final;
-  virtual nsresult BeginPage() final;
-  virtual nsresult EndPage() final;
+  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;
 
 private:
   PrintTargetCG(PMPrintSession aPrintSession,
                 PMPageFormat aPageFormat,
                 PMPrintSettings aPrintSettings,
--- 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;
 
-  virtual already_AddRefed<DrawTarget>
-  GetReferenceDrawTarget() 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;
+  already_AddRefed<DrawTarget> GetReferenceDrawTarget() final;
 
 private:
 
   // Only created via CreateOrNull
   explicit PrintTargetThebes(gfxASurface* aSurface);
 
   RefPtr<gfxASurface> mGfxSurface;
 };
--- 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) final
+  void SetProgressTracker(ProgressTracker* aProgressTracker) final
   {
     MOZ_ASSERT(aProgressTracker);
     MOZ_ASSERT(!mProgressTracker);
     mProgressTracker = aProgressTracker;
   }
 
   virtual void IncrementAnimationConsumers() override;
   virtual void DecrementAnimationConsumers() override;
--- 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;
+  void OnFileCanReadWithoutBlocking(int aFd) final;
 
   mozilla::UniquePtr<char[]> mReceiveBuffer;
   int mReceivedIndex;
   int mBufferSize;
   char mTerminator;
 };
 }  // namespace base
 
--- 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 final {
+    const JS::ReadOnlyCompileOptions& options() const final {
         return options_;
     }
 
-    virtual void
+    void
     lineAndColumnAt(size_t offset, uint32_t* line, uint32_t* column) const final;
 
-    virtual void currentLineAndColumn(uint32_t* line, uint32_t* column) const final;
+    void currentLineAndColumn(uint32_t* line, uint32_t* column) const final;
 
-    virtual bool hasTokenizationStarted() const final;
-    virtual void reportErrorNoOffsetVA(unsigned errorNumber, va_list args) final;
+    bool hasTokenizationStarted() const final;
+    void reportErrorNoOffsetVA(unsigned errorNumber, va_list args) final;
 
-    virtual const char* getFilename() const final {
+    const char* getFilename() const final {
         return filename_;
     }
 
   protected:
     // Options used for parsing/tokenizing.
     const ReadOnlyCompileOptions& options_;
 
     Token               tokens[ntokens];    // circular token buffer
--- 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) 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/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;
+  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/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)
-    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)
-    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)
-    final;
-  virtual void SetCssText(const nsAString& aText,
-                          mozilla::ErrorResult& aRv) final;
-  virtual uint16_t CssValueType() const 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/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) final;
-  virtual void SetCssText(const nsAString& aText, mozilla::ErrorResult& aRv) final;
-  virtual uint16_t CssValueType() const 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/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) 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) 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/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 {}
+  void NodeInfoChanged(nsIDocument* aOldDoc) final {}
 
 protected:
   ~mock_Link() {
     // Run the next test if we are supposed to.
     if (mRunNextTest) {
       run_next_test();
     }
   }
--- 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;
+    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;
+    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/nsCocoaWindow.h
+++ b/widget/cocoa/nsCocoaWindow.h
@@ -252,19 +252,19 @@ 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(
+    nsresult MakeFullScreen(
       bool aFullScreen, nsIScreen* aTargetScreen = nullptr) final;
-    virtual nsresult MakeFullScreenWithNativeTransition(
+    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;
--- 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;
+    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;
+  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/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;
+  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;
+    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 {};
+  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,17 +265,17 @@ 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)
+  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(
@@ -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() 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
@@ -25,17 +25,17 @@ class RemotePrintJobChild;
 class nsDeviceContextSpecProxy final : public nsIDeviceContextSpec
 {
 public:
   NS_DECL_ISUPPORTS
 
   NS_IMETHOD Init(nsIWidget* aWidget, nsIPrintSettings* aPrintSettings,
                  bool aIsPrintPreview) final;
 
-  virtual already_AddRefed<PrintTarget> MakePrintTarget() final;
+  already_AddRefed<PrintTarget> MakePrintTarget() final;
 
   NS_IMETHOD GetDrawEventRecorder(mozilla::gfx::DrawEventRecorder** aDrawEventRecorder) final;
 
   float GetDPI() final;
 
   float GetPrintingScale() final;
 
 
--- 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;
+    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/nsDeviceContextSpecWin.h
+++ b/widget/windows/nsDeviceContextSpecWin.h
@@ -19,17 +19,17 @@ class nsIWidget;
 
 class nsDeviceContextSpecWin : public nsIDeviceContextSpec
 {
 public:
   nsDeviceContextSpecWin();
 
   NS_DECL_ISUPPORTS
 
-  virtual already_AddRefed<PrintTarget> MakePrintTarget() final;
+  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; }