Bug 1428535 - Part 1: Add missing override specifiers to overridden virtual functions. r?froydnj draft
authorChris Peterson <cpeterson@mozilla.com>
Sun, 05 Nov 2017 19:37:28 -0800
changeset 716775 7ab278ea02b412a030ee4dc60e285031b5ca24ee
parent 716638 9099a6ed993f0113c47c0d9e800bf0ff6e1a1dc1
child 716776 69cdd9c3ddd1a8c8499b9484e31ae787b857fbae
push id94499
push usercpeterson@mozilla.com
push dateSat, 06 Jan 2018 08:56:35 +0000
reviewersfroydnj
bugs1428535
milestone59.0a1
Bug 1428535 - Part 1: Add missing override specifiers to overridden virtual functions. r?froydnj MozReview-Commit-ID: DCPTnyBooIe
accessible/base/nsAccessibilityService.cpp
build/clang-plugin/tests/TestNeedsNoVTableType.cpp
caps/BasePrincipal.h
caps/nsJSPrincipals.h
devtools/shared/heapsnapshot/DeserializedNode.h
devtools/shared/heapsnapshot/HeapSnapshot.cpp
docshell/base/nsDocShellEnumerator.h
docshell/shistory/nsSHistory.h
dom/base/FragmentOrElement.h
dom/base/ShadowRoot.h
dom/base/nsContentPermissionHelper.cpp
dom/base/nsDocument.cpp
dom/base/nsDocument.h
dom/base/nsDocumentEncoder.cpp
dom/base/nsFrameMessageManager.h
dom/base/nsGenericDOMDataNode.h
dom/base/nsGlobalWindowCommands.cpp
dom/base/nsWrapperCache.cpp
dom/bindings/IterableIterator.h
dom/canvas/CanvasImageCache.cpp
dom/canvas/CanvasRenderingContext2D.cpp
dom/canvas/CanvasRenderingContextHelper.cpp
dom/canvas/OffscreenCanvas.cpp
dom/clients/manager/ClientSourceParent.cpp
dom/events/DOMEventTargetHelper.h
dom/html/HTMLMediaElement.cpp
dom/html/HTMLMenuItemElement.cpp
dom/html/TextTrackManager.cpp
dom/html/VideoDocument.cpp
dom/indexedDB/ActorsParent.cpp
dom/ipc/ContentChild.cpp
dom/ipc/FilePickerParent.h
dom/ipc/URLClassifierParent.h
dom/jsurl/nsJSProtocolHandler.h
dom/media/MediaDecoderStateMachine.cpp
dom/media/MediaDevices.cpp
dom/media/MediaQueue.h
dom/media/MediaStreamGraph.cpp
dom/media/VideoFrameContainer.cpp
dom/media/mediasink/AudioSink.cpp
dom/media/mp4/MoofParser.h
dom/media/ogg/OggCodecState.h
dom/media/platforms/wmf/WMFVideoMFTManager.cpp
dom/media/systemservices/CamerasParent.h
dom/media/webaudio/MediaBufferDecoder.cpp
dom/media/webrtc/MediaEngineTabVideoSource.h
dom/network/ConnectionWorker.cpp
dom/notification/Notification.cpp
dom/plugins/ipc/PluginMessageUtils.cpp
dom/promise/Promise.cpp
dom/quota/ActorsParent.cpp
dom/security/nsCSPUtils.h
dom/storage/LocalStorageCache.h
dom/storage/StorageIPC.cpp
dom/storage/StorageIPC.h
dom/svg/SVGRect.h
dom/time/DateCacheCleaner.cpp
dom/time/TimeChangeObserver.cpp
dom/url/URLWorker.cpp
dom/webauthn/WebAuthnTransactionChild.h
dom/workers/ServiceWorkerManager.cpp
dom/workers/ServiceWorkerPrivate.cpp
dom/workers/WorkerPrivate.cpp
dom/xhr/XMLHttpRequestWorker.cpp
dom/xslt/xpath/XPathEvaluator.cpp
dom/xslt/xpath/txExprResult.h
dom/xslt/xpath/txIXPathContext.h
dom/xslt/xpath/txXPathOptimizer.cpp
dom/xslt/xslt/txInstructions.h
dom/xslt/xslt/txMozillaStylesheetCompiler.cpp
dom/xslt/xslt/txMozillaXSLTProcessor.cpp
dom/xslt/xslt/txStylesheetCompiler.h
dom/xslt/xslt/txToplevelItems.h
dom/xslt/xslt/txXMLEventHandler.h
dom/xslt/xslt/txXSLTNumberCounters.cpp
dom/xul/nsXULElement.h
editor/libeditor/EditorUtils.h
editor/libeditor/HTMLEditRules.cpp
editor/txmgr/nsTransactionStack.cpp
extensions/cookie/nsPermissionManager.cpp
extensions/universalchardet/src/base/CharDistribution.h
extensions/universalchardet/src/base/JpCntx.h
extensions/universalchardet/src/base/nsEUCJPProber.h
extensions/universalchardet/src/base/nsEscCharsetProber.h
extensions/universalchardet/src/base/nsLatin1Prober.h
extensions/universalchardet/src/base/nsMBCSGroupProber.h
extensions/universalchardet/src/base/nsSJISProber.h
extensions/universalchardet/src/base/nsUTF8Prober.h
gfx/2d/2D.h
gfx/2d/DrawCommand.h
gfx/2d/DrawEventRecorder.h
gfx/2d/DrawTargetCairo.h
gfx/2d/DrawTargetRecording.cpp
gfx/2d/DrawTargetSkia.cpp
gfx/2d/DrawTargetTiled.h
gfx/2d/DrawTargetWrapAndRecord.cpp
gfx/2d/FilterNodeD2D1.h
gfx/2d/GradientStopsD2D.h
gfx/2d/InlineTranslator.h
gfx/2d/NativeFontResourceDWrite.h
gfx/2d/NativeFontResourceFontconfig.h
gfx/2d/NativeFontResourceGDI.h
gfx/2d/NativeFontResourceMac.h
gfx/2d/PathAnalysis.h
gfx/2d/PathCairo.h
gfx/2d/PathD2D.h
gfx/2d/PathRecording.h
gfx/2d/PathSkia.h
gfx/2d/RecordedEventImpl.h
gfx/2d/ScaledFontBase.h
gfx/2d/ScaledFontCairo.h
gfx/2d/SourceSurfaceCairo.h
gfx/2d/SourceSurfaceD2D1.h
gfx/2d/SourceSurfaceDual.h
gfx/2d/SourceSurfaceSkia.h
gfx/angle/src/compiler/translator/IntermTraverse.h
gfx/angle/src/tests/perf_tests/MultiviewPerf.cpp
gfx/gl/GLTextureImage.h
gfx/gl/SkiaGLGlue.h
gfx/gl/TextureImageEGL.h
gfx/layers/AxisPhysicsMSDModel.h
gfx/layers/Effects.h
gfx/layers/basic/BasicImages.cpp
gfx/layers/basic/BasicLayersImpl.h
gfx/layers/client/ClientBorderLayer.cpp
gfx/layers/client/ClientColorLayer.cpp
gfx/layers/client/ClientContainerLayer.h
gfx/layers/client/ContentClient.cpp
gfx/layers/composite/ContentHost.h
gfx/layers/composite/LayerManagerComposite.h
gfx/layers/d3d11/CompositorD3D11.h
gfx/skia/skia/include/gpu/GrFragmentProcessor.h
gfx/skia/skia/src/core/SkMD5.h
gfx/skia/skia/src/gpu/GrClip.h
gfx/skia/skia/src/gpu/GrClipStackClip.h
gfx/skia/skia/src/gpu/GrPrimitiveProcessor.h
gfx/skia/skia/src/gpu/SkGpuDevice.h
gfx/skia/skia/src/gpu/ops/GrDrawPathOp.h
gfx/skia/skia/src/gpu/ops/GrMeshDrawOp.h
gfx/skia/skia/src/pdf/SkPDFTypes.h
gfx/src/nsFontMetrics.cpp
gfx/src/nsThebesFontEnumerator.cpp
gfx/thebes/PrintTargetCG.h
gfx/thebes/PrintTargetSkPDF.h
gfx/thebes/PrintTargetThebes.h
gfx/thebes/gfxAndroidPlatform.cpp
gfx/thebes/gfxBlur.cpp
gfx/thebes/gfxDWriteFontList.h
gfx/thebes/gfxDrawable.h
gfx/thebes/gfxFcPlatformFontList.h
gfx/thebes/gfxGDIFontList.h
gfx/thebes/gfxGradientCache.cpp
gfx/thebes/gfxPlatformFontList.h
gfx/thebes/gfxTextRun.h
gfx/thebes/gfxUserFontSet.cpp
image/ClippedImage.cpp
image/RasterImage.h
image/VectorImage.cpp
ipc/chromium/src/base/histogram.h
ipc/chromium/src/base/message_pump_default.h
ipc/chromium/src/base/message_pump_glib.h
ipc/chromium/src/base/thread.h
ipc/chromium/src/base/waitable_event_posix.cc
ipc/chromium/src/chrome/common/child_process_host.h
ipc/chromium/src/chrome/common/child_thread.h
ipc/chromium/src/chrome/common/ipc_channel_posix.h
ipc/chromium/src/chrome/common/process_watcher_posix_sigchld.cc
ipc/glue/BrowserProcessSubThread.h
ipc/glue/GeckoChildProcessHost.h
ipc/glue/ProtocolUtils.h
ipc/mscom/MainThreadInvoker.cpp
ipc/testshell/TestShellChild.h
ipc/testshell/TestShellParent.h
js/ipc/CrossProcessObjectWrappers.h
js/ipc/JavaScriptBase.h
js/ipc/JavaScriptShared.h
js/ipc/WrapperOwner.h
js/public/UbiNode.h
js/src/frontend/Parser.h
js/src/gdb/gdb-tests.h
js/src/irregexp/NativeRegExpMacroAssembler.h
js/src/irregexp/RegExpAST.h
js/src/irregexp/RegExpEngine.h
js/src/irregexp/RegExpMacroAssembler.h
js/src/jit/BaselineIC.h
js/src/jit/CodeGenerator.cpp
js/src/jit/CodeGenerator.h
js/src/jit/IonCode.h
js/src/jit/LIR.h
js/src/jit/Lowering.h
js/src/jit/MOpcodes.h
js/src/jit/MacroAssembler.h
js/src/jit/ScalarReplacement.cpp
js/src/jit/SharedIC.h
js/src/jit/TypePolicy.h
js/src/jit/arm/CodeGenerator-arm.cpp
js/src/jit/arm/CodeGenerator-arm.h
js/src/jit/arm/LIR-arm.h
js/src/jit/arm/Lowering-arm.h
js/src/jit/arm64/CodeGenerator-arm64.cpp
js/src/jit/arm64/CodeGenerator-arm64.h
js/src/jit/arm64/LIR-arm64.h
js/src/jit/arm64/Lowering-arm64.h
js/src/jit/arm64/vixl/Debugger-vixl.cpp
js/src/jit/arm64/vixl/Debugger-vixl.h
js/src/jit/arm64/vixl/Disasm-vixl.h
js/src/jit/arm64/vixl/Instrument-vixl.h
js/src/jit/arm64/vixl/Simulator-vixl.h
js/src/jit/none/LIR-none.h
js/src/jit/none/Lowering-none.h
js/src/jit/shared/CodeGenerator-shared.cpp
js/src/jit/shared/CodeGenerator-shared.h
js/src/jit/shared/LIR-shared.h
js/src/jit/x64/CodeGenerator-x64.h
js/src/jit/x64/LIR-x64.h
js/src/jit/x64/Lowering-x64.h
js/src/jit/x86-shared/CodeGenerator-x86-shared.cpp
js/src/jit/x86-shared/CodeGenerator-x86-shared.h
js/src/jit/x86-shared/LIR-x86-shared.h
js/src/jit/x86-shared/Lowering-x86-shared.h
js/src/jit/x86/CodeGenerator-x86.cpp
js/src/jit/x86/CodeGenerator-x86.h
js/src/jit/x86/LIR-x86.h
js/src/jit/x86/Lowering-x86.h
js/src/jsapi.h
js/src/jsscript.h
js/src/jsweakmap.h
js/src/shell/js.cpp
js/src/shell/jsoptparse.h
js/src/vm/Debugger.cpp
js/src/vm/Debugger.h
js/src/vm/MatchPairs.h
js/src/vm/Printer.cpp
js/src/vm/RegExpShared.h
js/src/vm/SavedStacks.cpp
js/src/vm/Scope.h
js/src/vm/Shape.h
js/src/vm/TypeInference.cpp
js/src/vm/UbiNodeCensus.cpp
js/src/wasm/WasmBaselineCompile.cpp
js/xpconnect/loader/ScriptPreloader.h
js/xpconnect/loader/mozJSSubScriptLoader.cpp
js/xpconnect/src/ExportHelpers.cpp
js/xpconnect/src/XPCJSRuntime.cpp
js/xpconnect/src/xpcprivate.h
layout/base/nsIPresShell.h
layout/base/nsPresContext.cpp
layout/forms/nsSelectsAreaFrame.cpp
layout/generic/nsGfxScrollFrame.cpp
layout/generic/nsTextFrame.cpp
layout/generic/nsTextFrame.h
layout/generic/nsTextRunTransformations.h
layout/painting/ActiveLayerTracker.cpp
layout/printing/DrawEventRecorder.h
layout/printing/PrintTranslator.h
layout/printing/ipc/RemotePrintJobChild.h
layout/printing/ipc/RemotePrintJobParent.h
layout/style/CSSFontFeatureValuesRule.h
layout/style/CSSImportRule.h
layout/style/CSSKeyframeRule.h
layout/style/CSSKeyframesRule.h
layout/style/CSSMediaRule.h
layout/style/CSSMozDocumentRule.h
layout/style/CSSNamespaceRule.h
layout/style/CSSPageRule.h
layout/style/CSSStyleSheet.h
layout/style/CSSSupportsRule.h
layout/style/CounterStyleManager.cpp
layout/style/FontFace.cpp
layout/style/ImportRule.h
layout/style/MediaList.h
layout/style/NameSpaceRule.h
layout/style/ServoCSSRuleList.h
layout/style/ServoDocumentRule.h
layout/style/ServoFontFeatureValuesRule.h
layout/style/ServoImportRule.h
layout/style/ServoKeyframeRule.cpp
layout/style/ServoKeyframeRule.h
layout/style/ServoKeyframesRule.cpp
layout/style/ServoKeyframesRule.h
layout/style/ServoMediaList.h
layout/style/ServoMediaRule.h
layout/style/ServoNamespaceRule.h
layout/style/ServoPageRule.h
layout/style/ServoStyleRule.h
layout/style/ServoStyleSheet.h
layout/style/ServoSupportsRule.h
layout/style/StyleRule.cpp
layout/style/StyleSheet.h
layout/style/nsCSSRules.h
layout/style/nsComputedDOMStyle.h
layout/style/nsDOMCSSAttrDeclaration.h
layout/style/nsMediaList.h
layout/style/nsStyleStruct.cpp
layout/xul/nsBox.h
layout/xul/nsGroupBoxFrame.cpp
media/mtransport/runnable_utils.h
media/mtransport/sigslot.h
media/mtransport/test/buffered_stun_socket_unittest.cpp
media/mtransport/test/dummysocket.h
media/mtransport/test/gtest_ringbuffer_dumper.h
media/webrtc/signaling/src/common/browser_logging/WebRtcLog.cpp
media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.h
media/webrtc/signaling/src/mediapipeline/MediaPipeline.h
media/webrtc/signaling/src/sdp/SdpAttribute.h
media/webrtc/trunk/webrtc/modules/desktop_capture/mock_desktop_capturer_callback.h
memory/replace/dmd/test/SmokeDMD.cpp
mfbt/tests/TestJSONWriter.cpp
netwerk/base/PrivateBrowsingChannel.h
netwerk/base/nsPACMan.h
netwerk/base/nsSecCheckWrapChannel.h
netwerk/base/nsURLParsers.h
netwerk/cache/nsCacheService.cpp
netwerk/cache/nsCacheUtils.h
netwerk/cache/nsDiskCacheDevice.cpp
netwerk/cache/nsDiskCacheDevice.h
netwerk/cache/nsMemoryCacheDevice.h
netwerk/cache2/CacheIndexContextIterator.h
netwerk/protocol/data/nsDataChannel.h
netwerk/protocol/ftp/FTPChannelChild.cpp
netwerk/protocol/ftp/FTPChannelParent.cpp
netwerk/protocol/http/HttpChannelChild.cpp
netwerk/protocol/http/HttpChannelParent.cpp
netwerk/protocol/http/nsHttpConnectionInfo.h
netwerk/protocol/http/nsHttpConnectionMgr.cpp
netwerk/protocol/http/nsHttpConnectionMgr.h
netwerk/protocol/http/nsHttpTransaction.h
netwerk/protocol/res/SubstitutingProtocolHandler.h
netwerk/protocol/websocket/WebSocketChannelChild.cpp
netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp
netwerk/streamconv/converters/nsUnknownDecoder.h
parser/html/nsHtml5SVGLoadDispatcher.h
parser/html/nsHtml5Speculation.h
parser/html/nsHtml5StreamParser.cpp
parser/html/nsHtml5TreeOpStage.h
rdf/base/nsCompositeDataSource.cpp
security/manager/ssl/DataStorage.cpp
security/manager/ssl/SSLServerCertVerification.cpp
security/manager/ssl/SharedSSLState.cpp
security/manager/ssl/nsNSSCallbacks.cpp
security/manager/ssl/nsNSSIOLayer.cpp
security/sandbox/chromium/sandbox/win/src/sandbox_policy_base.h
storage/Variant.h
storage/mozStorageBindingParams.h
toolkit/components/filewatcher/NativeFileWatcherWin.cpp
toolkit/components/places/Helpers.h
toolkit/components/places/nsFaviconService.cpp
toolkit/components/places/nsNavBookmarks.cpp
toolkit/components/places/nsNavHistory.cpp
toolkit/components/places/nsNavHistoryResult.h
toolkit/components/printingui/ipc/PrintingParent.h
toolkit/components/telemetry/ScalarInfo.h
toolkit/components/telemetry/TelemetryScalar.cpp
toolkit/crashreporter/InjectCrashReporter.h
toolkit/crashreporter/nsExceptionHandler.cpp
toolkit/crashreporter/test/nsTestCrasher.cpp
toolkit/xre/nsNativeAppSupportCocoa.mm
toolkit/xre/nsNativeAppSupportUnix.cpp
toolkit/xre/nsNativeAppSupportWin.cpp
tools/profiler/gecko/ProfilerIOInterposeObserver.h
tools/profiler/gecko/ThreadResponsiveness.cpp
tools/profiler/gecko/nsProfiler.cpp
tools/profiler/lul/LulDwarf.cpp
tools/profiler/lul/LulDwarfExt.h
uriloader/exthandler/mac/nsLocalHandlerAppMac.h
uriloader/exthandler/mac/nsMIMEInfoMac.h
uriloader/exthandler/mac/nsOSHelperAppService.h
uriloader/exthandler/nsMIMEInfoImpl.h
uriloader/exthandler/uikit/nsLocalHandlerAppUIKit.h
uriloader/exthandler/uikit/nsMIMEInfoUIKit.h
uriloader/exthandler/unix/nsMIMEInfoUnix.h
uriloader/exthandler/unix/nsOSHelperAppService.h
uriloader/exthandler/win/nsMIMEInfoWin.h
uriloader/exthandler/win/nsOSHelperAppService.h
widget/android/nsDeviceContextAndroid.h
widget/android/nsLookAndFeel.h
widget/cocoa/nsAppShell.h
widget/cocoa/nsChildView.h
widget/cocoa/nsCocoaWindow.h
widget/cocoa/nsDeviceContextSpecX.h
widget/cocoa/nsDragService.h
widget/cocoa/nsLookAndFeel.h
widget/gtk/nsAppShell.h
widget/gtk/nsDeviceContextSpecG.h
widget/gtk/nsLookAndFeel.h
widget/gtk/nsPrintOptionsGTK.h
widget/headless/HeadlessLookAndFeel.h
widget/nsBaseFilePicker.h
widget/nsDeviceContextSpecProxy.h
widget/tests/TestAppShellSteadyState.cpp
widget/uikit/GfxInfo.h
widget/uikit/nsAppShell.h
widget/uikit/nsLookAndFeel.h
widget/uikit/nsScreenManager.h
widget/windows/nsAppShell.cpp
widget/windows/nsAppShell.h
widget/windows/nsColorPicker.h
widget/windows/nsDeviceContextSpecWin.h
widget/windows/nsDragService.h
widget/windows/nsFilePicker.h
widget/windows/nsLookAndFeel.h
widget/windows/nsWindow.h
widget/xremoteclient/DBusRemoteClient.h
widget/xremoteclient/XRemoteClient.h
xpcom/base/CycleCollectedJSRuntime.h
xpcom/base/nsAgg.h
xpcom/base/nsCycleCollector.cpp
xpcom/base/nsDebugImpl.cpp
xpcom/base/nsDumpUtils.h
xpcom/base/nsMemoryInfoDumper.cpp
xpcom/base/nsQueryObject.h
xpcom/build/LateWriteChecks.cpp
xpcom/build/MainThreadIOLogger.cpp
xpcom/ds/nsHashPropertyBag.cpp
xpcom/io/nsAppFileLocationProvider.cpp
xpcom/io/nsLocalFileWin.cpp
xpcom/reflect/xptcall/md/test/invoke_test.cpp
xpcom/reflect/xptcall/md/test/stub_test.cpp
xpcom/tests/gtest/TestAtoms.cpp
xpcom/tests/gtest/TestAutoRefCnt.cpp
xpcom/tests/gtest/TestDeadlockDetector.cpp
xpcom/tests/gtest/TestExpirationTracker.cpp
xpcom/tests/windows/TestCOM.cpp
xpcom/threads/CPUUsageWatcher.h
xpcom/threads/EventQueue.h
xpcom/threads/LabeledEventQueue.h
xpcom/threads/PrioritizedEventQueue.h
xpcom/threads/Scheduler.cpp
xpcom/threads/SystemGroup.cpp
xpcom/threads/ThreadEventQueue.cpp
xpcom/threads/ThreadEventQueue.h
xpcom/threads/nsThreadUtils.h
xpfe/appshell/nsAppShellWindowEnumerator.h
--- a/accessible/base/nsAccessibilityService.cpp
+++ b/accessible/base/nsAccessibilityService.cpp
@@ -477,17 +477,17 @@ class PluginTimerCallBack final : public
 {
   ~PluginTimerCallBack() {}
 
 public:
   explicit PluginTimerCallBack(nsIContent* aContent) : mContent(aContent) {}
 
   NS_DECL_ISUPPORTS
 
-  NS_IMETHOD Notify(nsITimer* aTimer) final
+  NS_IMETHOD Notify(nsITimer* aTimer) final override
   {
     if (!mContent->IsInUncomposedDoc())
       return NS_OK;
 
     nsIPresShell* ps = mContent->OwnerDoc()->GetShell();
     if (ps) {
       DocAccessible* doc = ps->GetDocAccessible();
       if (doc) {
@@ -501,17 +501,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
+  NS_IMETHOD GetName(nsACString& aName) final override
   {
     aName.AssignLiteral("PluginTimerCallBack");
     return NS_OK;
   }
 
 private:
   nsCOMPtr<nsIContent> mContent;
 };
--- 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;
+  virtual void e() final override;
 };
 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;
-  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 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 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;
-  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;
+  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;
 
   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 { return mOriginAttributes; }
+  const OriginAttributes& OriginAttributesRef() final override { 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;
+  bool write(JSContext* aCx, JSStructuredCloneWriter* aWriter) final override;
 
   /*
    * 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 { return get().coarseType; }
+  CoarseType coarseType() const final override { 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 { return get().scriptFilename; }
+  const char* scriptFilename() const final override { 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,17 +1250,17 @@ public:
   bool init() {
     return framesAlreadySerialized.init() &&
            twoByteStringsAlreadySerialized.init() &&
            oneByteStringsAlreadySerialized.init();
   }
 
   ~StreamWriter() override { }
 
-  virtual bool writeMetadata(uint64_t timestamp) final {
+  virtual bool writeMetadata(uint64_t timestamp) final override {
     protobuf::Metadata metadata;
     metadata.set_timestamp(timestamp);
     return writeMessage(metadata);
   }
 
   virtual bool writeNode(const JS::ubi::Node& ubiNode,
                          EdgePolicy includeEdges) override final {
     // NB: de-duplicated string properties must be written in the same order
--- a/docshell/base/nsDocShellEnumerator.h
+++ b/docshell/base/nsDocShellEnumerator.h
@@ -83,25 +83,25 @@ class nsDocShellForwardsEnumerator : pub
 public:
   nsDocShellForwardsEnumerator()
     : nsDocShellEnumerator(enumerateForwards)
   {
   }
 
 protected:
   virtual nsresult BuildArrayRecursive(nsIDocShellTreeItem* aItem,
-                                       nsTArray<nsWeakPtr>& aItemArray);
+                                       nsTArray<nsWeakPtr>& aItemArray) override;
 };
 
 class nsDocShellBackwardsEnumerator : public nsDocShellEnumerator
 {
 public:
   nsDocShellBackwardsEnumerator()
     : nsDocShellEnumerator(enumerateBackwards)
   {
   }
 
 protected:
   virtual nsresult BuildArrayRecursive(nsIDocShellTreeItem* aItem,
-                                       nsTArray<nsWeakPtr>& aItemArray);
+                                       nsTArray<nsWeakPtr>& aItemArray) override;
 };
 
 #endif // nsDocShellEnumerator_h___
--- a/docshell/shistory/nsSHistory.h
+++ b/docshell/shistory/nsSHistory.h
@@ -44,17 +44,17 @@ public:
                             nsIEventTarget* aEventTarget)
       : nsExpirationTracker(1000 * aTimeout / 2, "HistoryTracker", aEventTarget)
     {
       MOZ_ASSERT(aSHistory);
       mSHistory = aSHistory;
     }
 
   protected:
-    virtual void NotifyExpired(nsSHEntryShared* aObj)
+    virtual void NotifyExpired(nsSHEntryShared* aObj) override
     {
       RemoveObject(aObj);
       mSHistory->EvictExpiredContentViewerForEntry(aObj);
     }
 
   private:
     // HistoryTracker is owned by nsSHistory; it always outlives HistoryTracker
     // so it's safe to use raw pointer here.
--- a/dom/base/FragmentOrElement.h
+++ b/dom/base/FragmentOrElement.h
@@ -238,18 +238,18 @@ public:
    */
 
   class nsExtendedDOMSlots final : public nsIContent::nsExtendedContentSlots
   {
   public:
     nsExtendedDOMSlots();
     ~nsExtendedDOMSlots() final;
 
-    void Traverse(nsCycleCollectionTraversalCallback&) final;
-    void Unlink() final;
+    void Traverse(nsCycleCollectionTraversalCallback&) final override;
+    void Unlink() final override;
 
     /**
      * SMIL Overridde style rules (for SMIL animation of CSS properties)
      * @see Element::GetSMILOverrideStyle
      */
     nsCOMPtr<nsICSSDeclaration> mSMILOverrideStyle;
 
     /**
@@ -290,18 +290,18 @@ public:
   };
 
   class nsDOMSlots final : public nsIContent::nsContentSlots
   {
   public:
     nsDOMSlots();
     ~nsDOMSlots() final;
 
-    void Traverse(nsCycleCollectionTraversalCallback&) final;
-    void Unlink() final;
+    void Traverse(nsCycleCollectionTraversalCallback&) final override;
+    void Unlink() final override;
 
     size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
 
     /**
      * The .style attribute (an interface that forwards to the actual
      * style rules)
      * @see nsGenericHTMLElement::GetStyle
      */
@@ -335,17 +335,17 @@ protected:
   void SetInnerHTMLInternal(const nsAString& aInnerHTML, ErrorResult& aError);
 
   // Override from nsINode
   nsIContent::nsContentSlots* CreateSlots() override
   {
     return new nsDOMSlots();
   }
 
-  nsIContent::nsExtendedContentSlots* CreateExtendedSlots() final
+  nsIContent::nsExtendedContentSlots* CreateExtendedSlots() final override
   {
     return new nsExtendedDOMSlots();
   }
 
   nsDOMSlots* DOMSlots()
   {
     return static_cast<nsDOMSlots*>(Slots());
   }
--- a/dom/base/ShadowRoot.h
+++ b/dom/base/ShadowRoot.h
@@ -180,9 +180,8 @@ protected:
   nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult,
                  bool aPreallocateChildren) const override;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_shadowroot_h__
-
--- a/dom/base/nsContentPermissionHelper.cpp
+++ b/dom/base/nsContentPermissionHelper.cpp
@@ -138,20 +138,20 @@ class ContentPermissionRequestParent : p
 
   nsCOMPtr<nsIPrincipal> mPrincipal;
   nsCOMPtr<Element> mElement;
   bool mIsHandlingUserInput;
   RefPtr<nsContentPermissionRequestProxy> mProxy;
   nsTArray<PermissionRequest> mRequests;
 
  private:
-  virtual mozilla::ipc::IPCResult Recvprompt();
-  virtual mozilla::ipc::IPCResult RecvNotifyVisibility(const bool& aIsVisible);
-  virtual mozilla::ipc::IPCResult RecvDestroy();
-  virtual void ActorDestroy(ActorDestroyReason why);
+  virtual mozilla::ipc::IPCResult Recvprompt() override;
+  virtual mozilla::ipc::IPCResult RecvNotifyVisibility(const bool& aIsVisible) override;
+  virtual mozilla::ipc::IPCResult RecvDestroy() override;
+  virtual void ActorDestroy(ActorDestroyReason why) override;
 };
 
 ContentPermissionRequestParent::ContentPermissionRequestParent(const nsTArray<PermissionRequest>& aRequests,
                                                                Element* aElement,
                                                                const IPC::Principal& aPrincipal,
                                                                const bool aIsHandlingUserInput)
 {
   MOZ_COUNT_CTOR(ContentPermissionRequestParent);
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -12071,17 +12071,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;
+  NS_IMETHOD Run() final override;
 
 private:
   nsWeakPtr mElement;
   nsWeakPtr mDocument;
   bool mUserInputOrChromeCaller;
 };
 
 static const char*
--- a/dom/base/nsDocument.h
+++ b/dom/base/nsDocument.h
@@ -418,17 +418,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;
+    final override;
   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;
--- a/dom/base/nsDocumentEncoder.cpp
+++ b/dom/base/nsDocumentEncoder.cpp
@@ -1249,24 +1249,24 @@ NS_NewTextEncoder(nsIDocumentEncoder** a
 
 class nsHTMLCopyEncoder : public nsDocumentEncoder
 {
 public:
 
   nsHTMLCopyEncoder();
   virtual ~nsHTMLCopyEncoder();
 
-  NS_IMETHOD Init(nsIDOMDocument* aDocument, const nsAString& aMimeType, uint32_t aFlags);
+  NS_IMETHOD Init(nsIDOMDocument* aDocument, const nsAString& aMimeType, uint32_t aFlags) override;
 
   // overridden methods from nsDocumentEncoder
-  NS_IMETHOD SetSelection(nsISelection* aSelection);
+  NS_IMETHOD SetSelection(nsISelection* aSelection) override;
   NS_IMETHOD EncodeToStringWithContext(nsAString& aContextString,
                                        nsAString& aInfoString,
-                                       nsAString& aEncodedString);
-  NS_IMETHOD EncodeToString(nsAString& aOutputString);
+                                       nsAString& aEncodedString) override;
+  NS_IMETHOD EncodeToString(nsAString& aOutputString) override;
 
 protected:
 
   enum Endpoint
   {
     kStart,
     kEnd
   };
@@ -1279,19 +1279,19 @@ protected:
                             nsCOMPtr<nsIDOMNode> *outNode, int32_t *outOffset, nsIDOMNode *aCommon);
   nsCOMPtr<nsIDOMNode> GetChildAt(nsIDOMNode *aParent, int32_t aOffset);
   bool IsMozBR(nsIDOMNode* aNode);
   nsresult GetNodeLocation(nsIDOMNode *inChild, nsCOMPtr<nsIDOMNode> *outParent, int32_t *outOffset);
   bool IsRoot(nsIDOMNode* aNode);
   bool IsFirstNode(nsIDOMNode *aNode);
   bool IsLastNode(nsIDOMNode *aNode);
   bool IsEmptyTextContent(nsIDOMNode* aNode);
-  virtual bool IncludeInContext(nsINode *aNode);
+  virtual bool IncludeInContext(nsINode *aNode) override;
   virtual int32_t
-  GetImmediateContextCount(const nsTArray<nsINode*>& aAncestorArray);
+  GetImmediateContextCount(const nsTArray<nsINode*>& aAncestorArray) override;
 
   bool mIsTextWidget;
 };
 
 nsHTMLCopyEncoder::nsHTMLCopyEncoder()
 {
   mIsTextWidget = false;
 }
--- a/dom/base/nsFrameMessageManager.h
+++ b/dom/base/nsFrameMessageManager.h
@@ -307,17 +307,17 @@ private:
                                  bool* aValid);
 };
 
 /* A helper class for taking care of many details for async message sending
    within a single process.  Intended to be used like so:
 
    class MyAsyncMessage : public nsSameProcessAsyncMessageBase, public Runnable
    {
-     NS_IMETHOD Run() override {
+     NS_IMETHOD Run() {
        ReceiveMessage(..., ...);
        return NS_OK;
      }
    };
 
 
    RefPtr<nsSameProcessAsyncMessageBase> ev = new MyAsyncMessage();
    nsresult rv = ev->Init(...);
--- a/dom/base/nsGenericDOMDataNode.h
+++ b/dom/base/nsGenericDOMDataNode.h
@@ -140,17 +140,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;
+  virtual bool ThreadSafeTextIsOnlyWhitespace() const final override;
   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/nsGlobalWindowCommands.cpp
+++ b/dom/base/nsGlobalWindowCommands.cpp
@@ -132,47 +132,47 @@ protected:
   // no member variables, please, we're stateless!
 };
 
 // this class implements commands whose behavior depends on the 'browse with caret' setting
 class nsSelectMoveScrollCommand : public nsSelectionCommandsBase
 {
 public:
 
-  NS_IMETHOD DoCommand(const char * aCommandName, nsISupports *aCommandContext);
+  NS_IMETHOD DoCommand(const char * aCommandName, nsISupports *aCommandContext) override;
 
   // no member variables, please, we're stateless!
 };
 
 // this class implements physical-movement versions of the above
 class nsPhysicalSelectMoveScrollCommand : public nsSelectionCommandsBase
 {
 public:
 
-  NS_IMETHOD DoCommand(const char * aCommandName, nsISupports *aCommandContext);
+  NS_IMETHOD DoCommand(const char * aCommandName, nsISupports *aCommandContext) override;
 
   // no member variables, please, we're stateless!
 };
 
 // this class implements other selection commands
 class nsSelectCommand : public nsSelectionCommandsBase
 {
 public:
 
-  NS_IMETHOD DoCommand(const char * aCommandName, nsISupports *aCommandContext);
+  NS_IMETHOD DoCommand(const char * aCommandName, nsISupports *aCommandContext) override;
 
   // no member variables, please, we're stateless!
 };
 
 // this class implements physical-movement versions of selection commands
 class nsPhysicalSelectCommand : public nsSelectionCommandsBase
 {
 public:
 
-  NS_IMETHOD DoCommand(const char * aCommandName, nsISupports *aCommandContext);
+  NS_IMETHOD DoCommand(const char * aCommandName, nsISupports *aCommandContext) override;
 
   // no member variables, please, we're stateless!
 };
 
 #if 0
 #pragma mark -
 #endif
 
@@ -692,19 +692,21 @@ nsSelectionCommand::GetContentViewerEdit
 #endif
 
 #define NS_DECL_CLIPBOARD_COMMAND(_cmd)                                                     \
 class _cmd : public nsSelectionCommand                                                      \
 {                                                                                           \
 protected:                                                                                  \
                                                                                             \
   virtual nsresult    IsClipboardCommandEnabled(const char* aCommandName,                   \
-                                  nsIContentViewerEdit* aEdit, bool *outCmdEnabled);        \
+                                                nsIContentViewerEdit* aEdit,                \
+                                                bool *outCmdEnabled) override;              \
   virtual nsresult    DoClipboardCommand(const char* aCommandName,                          \
-                                  nsIContentViewerEdit* aEdit, nsICommandParams* aParams);  \
+                                         nsIContentViewerEdit* aEdit,                       \
+                                         nsICommandParams* aParams) override;               \
   /* no member variables, please, we're stateless! */                                       \
 };
 
 NS_DECL_CLIPBOARD_COMMAND(nsClipboardCopyLinkCommand)
 NS_DECL_CLIPBOARD_COMMAND(nsClipboardImageCommands)
 NS_DECL_CLIPBOARD_COMMAND(nsClipboardSelectAllNoneCommands)
 NS_DECL_CLIPBOARD_COMMAND(nsClipboardGetContentsCommand)
 
--- a/dom/base/nsWrapperCache.cpp
+++ b/dom/base/nsWrapperCache.cpp
@@ -62,40 +62,40 @@ public:
   explicit DebugWrapperTraversalCallback(JSObject* aWrapper)
     : mFound(false)
     , mWrapper(JS::GCCellPtr(aWrapper))
   {
     mFlags = WANT_ALL_TRACES;
   }
 
   NS_IMETHOD_(void) DescribeRefCountedNode(nsrefcnt aRefCount,
-                                           const char* aObjName)
+                                           const char* aObjName) override
   {
   }
   NS_IMETHOD_(void) DescribeGCedNode(bool aIsMarked,
                                      const char* aObjName,
-                                     uint64_t aCompartmentAddress)
+                                     uint64_t aCompartmentAddress) override
   {
   }
 
-  NS_IMETHOD_(void) NoteJSChild(const JS::GCCellPtr& aChild)
+  NS_IMETHOD_(void) NoteJSChild(const JS::GCCellPtr& aChild) override
   {
     if (aChild == mWrapper) {
       mFound = true;
     }
   }
-  NS_IMETHOD_(void) NoteXPCOMChild(nsISupports* aChild)
+  NS_IMETHOD_(void) NoteXPCOMChild(nsISupports* aChild) override
   {
   }
   NS_IMETHOD_(void) NoteNativeChild(void* aChild,
-                                    nsCycleCollectionParticipant* aHelper)
+                                    nsCycleCollectionParticipant* aHelper) override
   {
   }
 
-  NS_IMETHOD_(void) NoteNextEdgeName(const char* aName)
+  NS_IMETHOD_(void) NoteNextEdgeName(const char* aName) override
   {
   }
 
   bool mFound;
 
 private:
   JS::GCCellPtr mWrapper;
 };
--- 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
+  virtual void UnlinkHelper() final override
   {
     mIterableObj = nullptr;
   }
 
   virtual void TraverseHelper(nsCycleCollectionTraversalCallback& cb) override
   {
     IterableIterator<T>* tmp = this;
     NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mIterableObj);
--- a/dom/canvas/CanvasImageCache.cpp
+++ b/dom/canvas/CanvasImageCache.cpp
@@ -161,17 +161,17 @@ class ImageCacheObserver;
 class ImageCache final : public nsExpirationTracker<ImageCacheEntryData,4>
 {
 public:
   // We use 3 generations of 1 second each to get a 2-3 seconds timeout.
   enum { GENERATION_MS = 1000 };
   ImageCache();
   ~ImageCache();
 
-  virtual void NotifyExpired(ImageCacheEntryData* aObject)
+  virtual void NotifyExpired(ImageCacheEntryData* aObject) override
   {
     mTotal -= aObject->SizeInBytes();
     RemoveObject(aObject);
 
     // Remove from the all canvas cache entry first since nsExpirationTracker
     // will delete aObject.
     mAllCanvasCache.RemoveEntry(AllCanvasImageCacheKey(aObject->mImage, aObject->mIsAccelerated));
 
--- a/dom/canvas/CanvasRenderingContext2D.cpp
+++ b/dom/canvas/CanvasRenderingContext2D.cpp
@@ -4284,17 +4284,17 @@ struct MOZ_STACK_CLASS CanvasBidiProcess
     // notify front-end code if we encountered missing glyphs in any script
     if (mMissingFonts) {
       mMissingFonts->Flush();
     }
   }
 
   typedef CanvasRenderingContext2D::ContextState ContextState;
 
-  virtual void SetText(const char16_t* aText, int32_t aLength, nsBidiDirection aDirection)
+  virtual void SetText(const char16_t* aText, int32_t aLength, nsBidiDirection aDirection) override
   {
     mFontgrp->UpdateUserFonts(); // ensure user font generation is current
     // adjust flags for current direction run
     gfx::ShapedTextFlags flags = mTextRunFlags;
     if (aDirection == NSBIDI_RTL) {
       flags |= gfx::ShapedTextFlags::TEXT_IS_RTL;
     } else {
       flags &= ~gfx::ShapedTextFlags::TEXT_IS_RTL;
@@ -4303,17 +4303,17 @@ struct MOZ_STACK_CLASS CanvasBidiProcess
                                      aLength,
                                      mDrawTarget,
                                      mAppUnitsPerDevPixel,
                                      flags,
                                      nsTextFrameUtils::Flags(),
                                      mMissingFonts);
   }
 
-  virtual nscoord GetWidth()
+  virtual nscoord GetWidth() override
   {
     gfxTextRun::Metrics textRunMetrics = mTextRun->MeasureText(
         mDoMeasureBoundingBox ? gfxFont::TIGHT_INK_EXTENTS
                               : gfxFont::LOOSE_INK_EXTENTS, mDrawTarget);
 
     // this only measures the height; the total width is gotten from the
     // the return value of ProcessText.
     if (mDoMeasureBoundingBox) {
@@ -4376,17 +4376,17 @@ struct MOZ_STACK_CLASS CanvasBidiProcess
   already_AddRefed<gfxPattern> GetPatternFor(Style aStyle)
   {
     const CanvasPattern* pat = mCtx->CurrentState().patternStyles[aStyle];
     RefPtr<gfxPattern> pattern = new gfxPattern(pat->mSurface, Matrix());
     pattern->SetExtend(CvtCanvasRepeatToGfxRepeat(pat->mRepeat));
     return pattern.forget();
   }
 
-  virtual void DrawText(nscoord aXOffset, nscoord aWidth)
+  virtual void DrawText(nscoord aXOffset, nscoord aWidth) override
   {
     gfx::Point point = mPt;
     bool rtl = mTextRun->IsRightToLeft();
     bool verticalRun = mTextRun->IsVertical();
     RefPtr<gfxPattern> pattern;
 
     float& inlineCoord = verticalRun ? point.y : point.x;
     inlineCoord += aXOffset;
--- a/dom/canvas/CanvasRenderingContextHelper.cpp
+++ b/dom/canvas/CanvasRenderingContextHelper.cpp
@@ -32,17 +32,17 @@ CanvasRenderingContextHelper::ToBlob(JSC
   class EncodeCallback : public EncodeCompleteCallback
   {
   public:
     EncodeCallback(nsIGlobalObject* aGlobal, BlobCallback* aCallback)
       : mGlobal(aGlobal)
       , mBlobCallback(aCallback) {}
 
     // This is called on main thread.
-    nsresult ReceiveBlob(already_AddRefed<Blob> aBlob)
+    nsresult ReceiveBlob(already_AddRefed<Blob> aBlob) override
     {
       RefPtr<Blob> blob = aBlob;
 
       RefPtr<Blob> newBlob = Blob::Create(mGlobal, blob->Impl());
 
       ErrorResult rv;
       mBlobCallback->Call(newBlob, rv);
 
--- a/dom/canvas/OffscreenCanvas.cpp
+++ b/dom/canvas/OffscreenCanvas.cpp
@@ -259,17 +259,17 @@ OffscreenCanvas::ToBlob(JSContext* aCx,
   class EncodeCallback : public EncodeCompleteCallback
   {
   public:
     EncodeCallback(nsIGlobalObject* aGlobal, Promise* aPromise)
       : mGlobal(aGlobal)
       , mPromise(aPromise) {}
 
     // This is called on main thread.
-    nsresult ReceiveBlob(already_AddRefed<Blob> aBlob)
+    nsresult ReceiveBlob(already_AddRefed<Blob> aBlob) override
     {
       RefPtr<Blob> blob = aBlob;
 
       if (mPromise) {
         RefPtr<Blob> newBlob = Blob::Create(mGlobal, blob->Impl());
         mPromise->MaybeResolve(newBlob);
       }
 
--- a/dom/clients/manager/ClientSourceParent.cpp
+++ b/dom/clients/manager/ClientSourceParent.cpp
@@ -38,17 +38,17 @@ public:
   explicit KillContentParentRunnable(RefPtr<ContentParent>&& aContentParent)
     : Runnable("KillContentParentRunnable")
     , mContentParent(Move(aContentParent))
   {
     MOZ_ASSERT(mContentParent);
   }
 
   NS_IMETHOD
-  Run()
+  Run() override
   {
     MOZ_ASSERT(NS_IsMainThread());
     mContentParent->KillHard("invalid ClientSourceParent actor");
     mContentParent = nullptr;
     return NS_OK;
   }
 };
 
--- a/dom/events/DOMEventTargetHelper.h
+++ b/dom/events/DOMEventTargetHelper.h
@@ -235,29 +235,29 @@ NS_DEFINE_STATIC_IID_ACCESSOR(DOMEventTa
   }
 
 /* Use this macro to declare functions that forward the behavior of this
  * interface to another object.
  * This macro doesn't forward GetEventTargetParent because sometimes subclasses
  * want to override it.
  */
 #define NS_FORWARD_NSIDOMEVENTTARGET_NOGETEVENTTARGETPARENT(_to) \
-  NS_IMETHOD AddEventListener(const nsAString & type, nsIDOMEventListener *listener, bool useCapture, bool wantsUntrusted, uint8_t _argc) { \
+  NS_IMETHOD AddEventListener(const nsAString & type, nsIDOMEventListener *listener, bool useCapture, bool wantsUntrusted, uint8_t _argc) override { \
     return _to AddEventListener(type, listener, useCapture, wantsUntrusted, _argc); \
   } \
-  NS_IMETHOD AddSystemEventListener(const nsAString & type, nsIDOMEventListener *listener, bool aUseCapture, bool aWantsUntrusted, uint8_t _argc) { \
+  NS_IMETHOD AddSystemEventListener(const nsAString & type, nsIDOMEventListener *listener, bool aUseCapture, bool aWantsUntrusted, uint8_t _argc) override { \
     return _to AddSystemEventListener(type, listener, aUseCapture, aWantsUntrusted, _argc); \
   } \
-  NS_IMETHOD RemoveEventListener(const nsAString & type, nsIDOMEventListener *listener, bool useCapture) { \
+  NS_IMETHOD RemoveEventListener(const nsAString & type, nsIDOMEventListener *listener, bool useCapture) override { \
     return _to RemoveEventListener(type, listener, useCapture); \
   } \
-  NS_IMETHOD RemoveSystemEventListener(const nsAString & type, nsIDOMEventListener *listener, bool aUseCapture) { \
+  NS_IMETHOD RemoveSystemEventListener(const nsAString & type, nsIDOMEventListener *listener, bool aUseCapture) override { \
     return _to RemoveSystemEventListener(type, listener, aUseCapture); \
   } \
-  NS_IMETHOD DispatchEvent(nsIDOMEvent *evt, bool *_retval) { \
+  NS_IMETHOD DispatchEvent(nsIDOMEvent *evt, bool *_retval) override { \
     return _to DispatchEvent(evt, _retval); \
   } \
   virtual mozilla::dom::EventTarget* GetTargetForDOMEvent() { \
     return _to GetTargetForDOMEvent(); \
   } \
   virtual mozilla::dom::EventTarget* GetTargetForEventTargetChain() { \
     return _to GetTargetForEventTargetChain(); \
   } \
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -250,17 +250,17 @@ public:
   explicit nsMediaEvent(const char* aName, HTMLMediaElement* aElement)
     : Runnable(aName)
     , mElement(aElement)
     , mLoadID(mElement->GetCurrentLoadID())
   {
   }
   ~nsMediaEvent() {}
 
-  NS_IMETHOD Run() = 0;
+  NS_IMETHOD Run() override = 0;
 
 protected:
   bool IsCancelled() {
     return mElement->GetCurrentLoadID() != mLoadID;
   }
 
   RefPtr<HTMLMediaElement> mElement;
   uint32_t mLoadID;
@@ -5269,17 +5269,17 @@ private:
 
 class HTMLMediaElement::MediaStreamTracksAvailableCallback:
   public OnTracksAvailableCallback
 {
 public:
   explicit MediaStreamTracksAvailableCallback(HTMLMediaElement* aElement):
       OnTracksAvailableCallback(), mElement(aElement)
     {}
-  virtual void NotifyTracksAvailable(DOMMediaStream* aStream)
+  virtual void NotifyTracksAvailable(DOMMediaStream* aStream) override
   {
     NS_ASSERTION(NS_IsMainThread(), "Should be on main thread.");
 
     if (!mElement) {
       return;
     }
     mElement->NotifyMediaStreamTracksAvailable(aStream);
   }
--- a/dom/html/HTMLMenuItemElement.cpp
+++ b/dom/html/HTMLMenuItemElement.cpp
@@ -58,17 +58,17 @@ public:
 
 // Find the selected radio, see GetSelectedRadio().
 class GetCheckedVisitor : public Visitor
 {
 public:
   explicit GetCheckedVisitor(HTMLMenuItemElement** aResult)
     : mResult(aResult)
     { }
-  virtual bool Visit(HTMLMenuItemElement* aMenuItem)
+  virtual bool Visit(HTMLMenuItemElement* aMenuItem) override
   {
     if (aMenuItem->IsChecked()) {
       *mResult = aMenuItem;
       return false;
     }
     return true;
   }
 protected:
@@ -77,17 +77,17 @@ protected:
 
 // Deselect all radios except the one passed to the constructor.
 class ClearCheckedVisitor : public Visitor
 {
 public:
   explicit ClearCheckedVisitor(HTMLMenuItemElement* aExcludeMenuItem)
     : mExcludeMenuItem(aExcludeMenuItem)
     { }
-  virtual bool Visit(HTMLMenuItemElement* aMenuItem)
+  virtual bool Visit(HTMLMenuItemElement* aMenuItem) override
   {
     if (aMenuItem != mExcludeMenuItem && aMenuItem->IsChecked()) {
       aMenuItem->ClearChecked();
     }
     return true;
   }
 protected:
   HTMLMenuItemElement* mExcludeMenuItem;
@@ -98,17 +98,17 @@ protected:
 class GetCheckedDirtyVisitor : public Visitor
 {
 public:
   GetCheckedDirtyVisitor(bool* aCheckedDirty,
                          HTMLMenuItemElement* aExcludeMenuItem)
     : mCheckedDirty(aCheckedDirty),
       mExcludeMenuItem(aExcludeMenuItem)
     { }
-  virtual bool Visit(HTMLMenuItemElement* aMenuItem)
+  virtual bool Visit(HTMLMenuItemElement* aMenuItem) override
   {
     if (aMenuItem == mExcludeMenuItem) {
       return true;
     }
     *mCheckedDirty = aMenuItem->IsCheckedDirty();
     return false;
   }
 protected:
@@ -117,33 +117,33 @@ protected:
 };
 
 // Set checked dirty to true on all radios in the group.
 class SetCheckedDirtyVisitor : public Visitor
 {
 public:
   SetCheckedDirtyVisitor()
     { }
-  virtual bool Visit(HTMLMenuItemElement* aMenuItem)
+  virtual bool Visit(HTMLMenuItemElement* aMenuItem) override
   {
     aMenuItem->SetCheckedDirty();
     return true;
   }
 };
 
 // A helper visitor that is used to combine two operations (visitors) to avoid
 // iterating over radios twice.
 class CombinedVisitor : public Visitor
 {
 public:
   CombinedVisitor(Visitor* aVisitor1, Visitor* aVisitor2)
     : mVisitor1(aVisitor1), mVisitor2(aVisitor2),
       mContinue1(true), mContinue2(true)
     { }
-  virtual bool Visit(HTMLMenuItemElement* aMenuItem)
+  virtual bool Visit(HTMLMenuItemElement* aMenuItem) override
   {
     if (mContinue1) {
       mContinue1 = mVisitor1->Visit(aMenuItem);
     }
     if (mContinue2) {
       mContinue2 = mVisitor2->Visit(aMenuItem);
     }
     return mContinue1 || mContinue2;
--- a/dom/html/TextTrackManager.cpp
+++ b/dom/html/TextTrackManager.cpp
@@ -493,17 +493,17 @@ public:
                        TextTrackCue* aCue)
     : Runnable("dom::SimpleTextTrackEvent")
     , mName(aEventName)
     , mTime(aTime)
     , mTrack(aTrack)
     , mCue(aCue)
   {}
 
-  NS_IMETHOD Run() {
+  NS_IMETHOD Run() override {
     WEBVTT_LOGV("SimpleTextTrackEvent cue %p mName %s mTime %lf",
       mCue.get(), NS_ConvertUTF16toUTF8(mName).get(), mTime);
     mCue->DispatchTrustedEvent(mName);
     return NS_OK;
   }
 
   void Dispatch() {
     if (nsCOMPtr<nsIGlobalObject> global = mCue->GetOwnerGlobal()) {
--- a/dom/html/VideoDocument.cpp
+++ b/dom/html/VideoDocument.cpp
@@ -20,20 +20,20 @@ class VideoDocument final : public Media
 {
 public:
   virtual nsresult StartDocumentLoad(const char*         aCommand,
                                      nsIChannel*         aChannel,
                                      nsILoadGroup*       aLoadGroup,
                                      nsISupports*        aContainer,
                                      nsIStreamListener** aDocListener,
                                      bool                aReset = true,
-                                     nsIContentSink*     aSink = nullptr);
-  virtual void SetScriptGlobalObject(nsIScriptGlobalObject* aScriptGlobalObject);
+                                     nsIContentSink*     aSink = nullptr) override;
+  virtual void SetScriptGlobalObject(nsIScriptGlobalObject* aScriptGlobalObject) override;
 
-  virtual void Destroy()
+  virtual void Destroy() override
   {
     if (mStreamListener) {
       mStreamListener->DropDocumentRef();
     }
     MediaDocument::Destroy();
   }
 
 protected:
--- a/dom/indexedDB/ActorsParent.cpp
+++ b/dom/indexedDB/ActorsParent.cpp
@@ -7548,17 +7548,17 @@ protected:
   // Should only be called by Run().
   virtual void
   SendResults() = 0;
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // Common nsIRunnable implementation that subclasses may not override.
   NS_IMETHOD
-  Run() final;
+  Run() final override;
 
   // OpenDirectoryListener overrides.
   void
   DirectoryLockAcquired(DirectoryLock* aLock) override;
 
   void
   DirectoryLockFailed() override;
 
@@ -7891,17 +7891,17 @@ protected:
   virtual nsresult
   DoDatabaseWork() = 0;
 
   virtual void
   SendResults() = 0;
 
   // Common nsIRunnable implementation that subclasses may not override.
   NS_IMETHOD
-  Run() final;
+  Run() final override;
 
   // IPDL methods.
   void
   ActorDestroy(ActorDestroyReason aWhy) override;
 };
 
 class CreateFileOp final
   : public DatabaseOp
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -467,17 +467,17 @@ ConsoleListener::Observe(nsIConsoleMessa
  * The singleton of this class is registered with the HangMonitor as an
  * annotator, so that the hang monitor can record whether or not there were
  * pending input events when the thread hung.
  */
 class PendingInputEventHangAnnotator final
   : public HangMonitor::Annotator
 {
 public:
-  virtual void AnnotateHang(HangMonitor::HangAnnotations& aAnnotations)
+  virtual void AnnotateHang(HangMonitor::HangAnnotations& aAnnotations) override
   {
     int32_t pending = ContentChild::GetSingleton()->GetPendingInputEvents();
     if (pending > 0) {
       aAnnotations.AddAnnotation(NS_LITERAL_STRING("PendingInput"), pending);
     }
   }
 
   static PendingInputEventHangAnnotator sSingleton;
--- a/dom/ipc/FilePickerParent.h
+++ b/dom/ipc/FilePickerParent.h
@@ -87,17 +87,17 @@ class FilePickerParent : public PFilePic
     bool mIsDirectory;
 
   public:
     IORunnable(FilePickerParent *aFPParent,
                nsTArray<nsCOMPtr<nsIFile>>& aFiles,
                bool aIsDirectory);
 
     bool Dispatch();
-    NS_IMETHOD Run();
+    NS_IMETHOD Run() override;
     void Destroy();
   };
 
   RefPtr<IORunnable> mRunnable;
   RefPtr<FilePickerShownCallback> mCallback;
   nsCOMPtr<nsIFilePicker> mFilePicker;
 
   nsString mTitle;
--- a/dom/ipc/URLClassifierParent.h
+++ b/dom/ipc/URLClassifierParent.h
@@ -18,17 +18,17 @@ template<typename BaseProtocol>
 class URLClassifierParentBase : public nsIURIClassifierCallback,
                                 public BaseProtocol
 {
 public:
   // nsIURIClassifierCallback.
   NS_IMETHOD OnClassifyComplete(nsresult aErrorCode,
                                 const nsACString& aList,
                                 const nsACString& aProvider,
-                                const nsACString& aFullHash)
+                                const nsACString& aFullHash) override
   {
     if (mIPCOpen) {
       ClassifierInfo info = ClassifierInfo(nsCString(aList),
                                            nsCString(aProvider),
                                            nsCString(aFullHash));
       Unused << BaseProtocol::Send__delete__(this, info, aErrorCode);
     }
     return NS_OK;
--- a/dom/jsurl/nsJSProtocolHandler.h
+++ b/dom/jsurl/nsJSProtocolHandler.h
@@ -88,17 +88,17 @@ public:
     NS_IMETHOD Write(nsIObjectOutputStream* aStream) override;
 
     // nsIIPCSerializableURI overrides
     NS_DECL_NSIIPCSERIALIZABLEURI
 
     // Override the nsIClassInfo method GetClassIDNoAlloc to make sure our
     // nsISerializable impl works right.
     NS_IMETHOD GetClassIDNoAlloc(nsCID *aClassIDNoAlloc) override;
-    //NS_IMETHOD QueryInterface( const nsIID& aIID, void** aInstancePtr );
+    //NS_IMETHOD QueryInterface( const nsIID& aIID, void** aInstancePtr ) override;
 
 protected:
     virtual ~nsJSURI() {}
 
     virtual nsresult EqualsInternal(nsIURI* other,
                                     RefHandlingEnum refHandlingMode,
                                     bool* result) override;
 private:
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -3898,17 +3898,17 @@ class VideoQueueMemoryFunctor : public n
 public:
   VideoQueueMemoryFunctor()
     : mSize(0)
   {
   }
 
   MOZ_DEFINE_MALLOC_SIZE_OF(MallocSizeOf);
 
-  virtual void operator()(void* aObject)
+  virtual void operator()(void* aObject) override
   {
     const VideoData* v = static_cast<const VideoData*>(aObject);
     mSize += v->SizeOfIncludingThis(MallocSizeOf);
   }
 
   size_t mSize;
 };
 
@@ -3917,17 +3917,17 @@ class AudioQueueMemoryFunctor : public n
 public:
   AudioQueueMemoryFunctor()
     : mSize(0)
   {
   }
 
   MOZ_DEFINE_MALLOC_SIZE_OF(MallocSizeOf);
 
-  virtual void operator()(void* aObject)
+  virtual void operator()(void* aObject) override
   {
     const AudioData* audioData = static_cast<const AudioData*>(aObject);
     mSize += audioData->SizeOfIncludingThis(MallocSizeOf);
   }
 
   size_t mSize;
 };
 
--- 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
+  NS_IMETHOD Notify(nsITimer* aTimer) final override
   {
     mMediaDevices->DispatchTrustedEvent(NS_LITERAL_STRING("devicechange"));
     return NS_OK;
   }
 
   NS_IMETHOD GetName(nsACString& aName) override
   {
     aName.AssignLiteral("FuzzTimerCallBack");
--- a/dom/media/MediaQueue.h
+++ b/dom/media/MediaQueue.h
@@ -13,17 +13,17 @@
 #include "MediaEventSource.h"
 #include "TimeUnits.h"
 
 namespace mozilla {
 
 // Thread and type safe wrapper around nsDeque.
 template <class T>
 class MediaQueueDeallocator : public nsDequeFunctor {
-  virtual void operator()(void* aObject)
+  virtual void operator()(void* aObject) override
   {
     RefPtr<T> releaseMe = dont_AddRef(static_cast<T*>(aObject));
   }
 };
 
 template <class T>
 class MediaQueue : private nsDeque {
 public:
--- a/dom/media/MediaStreamGraph.cpp
+++ b/dom/media/MediaStreamGraph.cpp
@@ -1416,17 +1416,17 @@ MediaStreamGraphImpl::GetName(nsACString
 namespace {
 
 class MediaStreamGraphShutDownRunnable : public Runnable {
 public:
   explicit MediaStreamGraphShutDownRunnable(MediaStreamGraphImpl* aGraph)
     : Runnable("MediaStreamGraphShutDownRunnable")
     , mGraph(aGraph)
   {}
-  NS_IMETHOD Run()
+  NS_IMETHOD Run() override
   {
     MOZ_ASSERT(NS_IsMainThread());
     MOZ_ASSERT(mGraph->mDetectedNotRunning && mGraph->mDriver,
                  "We should know the graph thread control loop isn't running!");
 
     LOG(LogLevel::Debug, ("Shutting down graph %p", mGraph.get()));
 
     // We've asserted the graph isn't running.  Use mDriver instead of CurrentDriver
--- a/dom/media/VideoFrameContainer.cpp
+++ b/dom/media/VideoFrameContainer.cpp
@@ -99,17 +99,17 @@ SetImageToBlackPixel(PlanarYCbCrImage* a
 }
 
 class VideoFrameContainerInvalidateRunnable : public Runnable {
 public:
   explicit VideoFrameContainerInvalidateRunnable(VideoFrameContainer* aVideoFrameContainer)
     : Runnable("VideoFrameContainerInvalidateRunnable")
     , mVideoFrameContainer(aVideoFrameContainer)
   {}
-  NS_IMETHOD Run()
+  NS_IMETHOD Run() override
   {
     MOZ_ASSERT(NS_IsMainThread());
 
     mVideoFrameContainer->Invalidate();
 
     return NS_OK;
   }
 private:
--- a/dom/media/mediasink/AudioSink.cpp
+++ b/dom/media/mediasink/AudioSink.cpp
@@ -239,21 +239,21 @@ AudioSink::GetEndTime() const
 UniquePtr<AudioStream::Chunk>
 AudioSink::PopFrames(uint32_t aFrames)
 {
   class Chunk : public AudioStream::Chunk {
   public:
     Chunk(AudioData* aBuffer, uint32_t aFrames, AudioDataValue* aData)
       : mBuffer(aBuffer), mFrames(aFrames), mData(aData) {}
     Chunk() : mFrames(0), mData(nullptr) {}
-    const AudioDataValue* Data() const { return mData; }
-    uint32_t Frames() const { return mFrames; }
-    uint32_t Channels() const { return mBuffer ? mBuffer->mChannels: 0; }
-    uint32_t Rate() const { return mBuffer ? mBuffer->mRate : 0; }
-    AudioDataValue* GetWritable() const { return mData; }
+    const AudioDataValue* Data() const override { return mData; }
+    uint32_t Frames() const override { return mFrames; }
+    uint32_t Channels() const override { return mBuffer ? mBuffer->mChannels: 0; }
+    uint32_t Rate() const override { return mBuffer ? mBuffer->mRate : 0; }
+    AudioDataValue* GetWritable() const override { return mData; }
   private:
     const RefPtr<AudioData> mBuffer;
     const uint32_t mFrames;
     AudioDataValue* const mData;
   };
 
   bool needPopping = false;
   if (!mCurrentData) {
--- a/dom/media/mp4/MoofParser.h
+++ b/dom/media/mp4/MoofParser.h
@@ -138,17 +138,17 @@ class Edts : public Atom
 {
 public:
   Edts()
     : mMediaStart(0)
     , mEmptyOffset(0)
   {
   }
   explicit Edts(Box& aBox);
-  virtual bool IsValid()
+  virtual bool IsValid() override
   {
     // edts is optional
     return true;
   }
 
   int64_t mMediaStart;
   int64_t mEmptyOffset;
 
--- a/dom/media/ogg/OggCodecState.h
+++ b/dom/media/ogg/OggCodecState.h
@@ -43,17 +43,17 @@ struct OggPacketDeletePolicy
   }
 };
 
 using OggPacketPtr = UniquePtr<ogg_packet, OggPacketDeletePolicy>;
 
 // Deallocates a packet, used in OggPacketQueue below.
 class OggPacketDeallocator : public nsDequeFunctor
 {
-  virtual void operator()(void* aPacket)
+  virtual void operator()(void* aPacket) override
   {
     OggPacketDeletePolicy()(static_cast<ogg_packet*>(aPacket));
   }
 };
 
 // A queue of ogg_packets. When we read a page, we extract the page's packets
 // and buffer them in the owning stream's OggCodecState. This is because
 // if we're skipping up to the next keyframe in very large frame sized videos,
--- a/dom/media/platforms/wmf/WMFVideoMFTManager.cpp
+++ b/dom/media/platforms/wmf/WMFVideoMFTManager.cpp
@@ -868,17 +868,17 @@ public:
     : Runnable("SupportsConfigEvent")
     , mDXVA2Manager(aDXVA2Manager)
     , mMediaType(aMediaType)
     , mFramerate(aFramerate)
     , mSupportsConfig(false)
   {
   }
 
-  NS_IMETHOD Run()
+  NS_IMETHOD Run() override
   {
     MOZ_ASSERT(NS_IsMainThread(), "Must be on main thread.");
     mSupportsConfig = mDXVA2Manager->SupportsConfig(mMediaType, mFramerate);
     return NS_OK;
   }
   DXVA2Manager* mDXVA2Manager;
   IMFMediaType* mMediaType;
   const float mFramerate;
--- a/dom/media/systemservices/CamerasParent.h
+++ b/dom/media/systemservices/CamerasParent.h
@@ -58,17 +58,18 @@ private:
 
 class InputObserver :  public webrtc::VideoInputFeedBack
 {
 public:
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(InputObserver)
 
   explicit InputObserver(CamerasParent* aParent)
     : mParent(aParent) {};
-  virtual void OnDeviceChange();
+
+  virtual void OnDeviceChange() override;
 
   friend CamerasParent;
 
 private:
   ~InputObserver() {}
 
   RefPtr<CamerasParent> mParent;
 };
--- a/dom/media/webaudio/MediaBufferDecoder.cpp
+++ b/dom/media/webaudio/MediaBufferDecoder.cpp
@@ -91,17 +91,17 @@ public:
     , mDecodeJob(aDecodeJob)
     , mPhase(PhaseEnum::Decode)
     , mFirstFrameDecoded(false)
   {
     MOZ_ASSERT(aBuffer);
     MOZ_ASSERT(NS_IsMainThread());
   }
 
-  NS_IMETHOD Run();
+  NS_IMETHOD Run() override;
   bool CreateReader();
   MediaFormatReader* Reader()
   {
     MOZ_ASSERT(mDecoderReader);
     return mDecoderReader;
   }
 
 private:
--- a/dom/media/webrtc/MediaEngineTabVideoSource.h
+++ b/dom/media/webrtc/MediaEngineTabVideoSource.h
@@ -60,47 +60,47 @@ class MediaEngineTabVideoSource : public
     void Draw();
 
     class StartRunnable : public Runnable {
     public:
       explicit StartRunnable(MediaEngineTabVideoSource *videoSource)
         : Runnable("MediaEngineTabVideoSource::StartRunnable")
         , mVideoSource(videoSource)
       {}
-      NS_IMETHOD Run();
+      NS_IMETHOD Run() override;
       RefPtr<MediaEngineTabVideoSource> mVideoSource;
     };
 
     class StopRunnable : public Runnable {
     public:
       explicit StopRunnable(MediaEngineTabVideoSource *videoSource)
         : Runnable("MediaEngineTabVideoSource::StopRunnable")
         , mVideoSource(videoSource)
       {}
-      NS_IMETHOD Run();
+      NS_IMETHOD Run() override;
       RefPtr<MediaEngineTabVideoSource> mVideoSource;
     };
 
     class InitRunnable : public Runnable {
     public:
       explicit InitRunnable(MediaEngineTabVideoSource *videoSource)
         : Runnable("MediaEngineTabVideoSource::InitRunnable")
         , mVideoSource(videoSource)
       {}
-      NS_IMETHOD Run();
+      NS_IMETHOD Run() override;
       RefPtr<MediaEngineTabVideoSource> mVideoSource;
     };
 
     class DestroyRunnable : public Runnable {
     public:
       explicit DestroyRunnable(MediaEngineTabVideoSource* videoSource)
         : Runnable("MediaEngineTabVideoSource::DestroyRunnable")
         , mVideoSource(videoSource)
       {}
-      NS_IMETHOD Run();
+      NS_IMETHOD Run() override;
       RefPtr<MediaEngineTabVideoSource> mVideoSource;
     };
 
 protected:
     ~MediaEngineTabVideoSource() {}
 
 private:
     int32_t mBufWidthMax;
--- a/dom/network/ConnectionWorker.cpp
+++ b/dom/network/ConnectionWorker.cpp
@@ -91,17 +91,17 @@ public:
     , mProxy(aProxy)
     , mNetworkInfo(aNetworkInfo)
   {
     MOZ_ASSERT(aProxy);
     aWorkerPrivate->AssertIsOnWorkerThread();
   }
 
   bool
-  MainThreadRun()
+  MainThreadRun() override
   {
     MOZ_ASSERT(NS_IsMainThread());
     hal::RegisterNetworkObserver(mProxy);
     hal::GetCurrentNetworkInformation(&mNetworkInfo);
     return true;
   }
 };
 
@@ -118,17 +118,17 @@ public:
                                NS_LITERAL_CSTRING("ConnectionWorker :: Shutdown"))
     , mProxy(aProxy)
   {
     MOZ_ASSERT(aProxy);
     aWorkerPrivate->AssertIsOnWorkerThread();
   }
 
   bool
-  MainThreadRun()
+  MainThreadRun() override
   {
     MOZ_ASSERT(NS_IsMainThread());
     hal::UnregisterNetworkObserver(mProxy);
     return true;
   }
 };
 
 class NotifyRunnable : public WorkerRunnable
--- a/dom/notification/Notification.cpp
+++ b/dom/notification/Notification.cpp
@@ -88,17 +88,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
+                    const nsAString& aServiceWorkerRegistrationScope) final override
   {
     AssertIsOnMainThread();
     MOZ_ASSERT(!aID.IsEmpty());
 
     // Skip scopes that don't match when called from getNotifications().
     if (!mScope.IsEmpty() && !mScope.Equals(aServiceWorkerRegistrationScope)) {
       return NS_OK;
     }
@@ -141,17 +141,17 @@ public:
       mWindow(aWindow),
       mPromise(aPromise)
   {
     AssertIsOnMainThread();
     MOZ_ASSERT(aWindow);
     MOZ_ASSERT(aPromise);
   }
 
-  NS_IMETHOD Done() final
+  NS_IMETHOD Done() final override
   {
     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,
@@ -1628,17 +1628,17 @@ Notification::IsInPrivateBrowsing()
 }
 
 namespace {
   struct StringWriteFunc : public JSONWriteFunc
   {
     nsAString& mBuffer; // This struct must not outlive this buffer
     explicit StringWriteFunc(nsAString& buffer) : mBuffer(buffer) {}
 
-    void Write(const char* aStr)
+    void Write(const char* aStr) override
     {
       mBuffer.Append(NS_ConvertUTF8toUTF16(aStr));
     }
   };
 }
 
 void
 Notification::ShowInternal()
@@ -2101,17 +2101,17 @@ public:
 
   WorkerGetCallback(PromiseWorkerProxy* aProxy, const nsAString& aScope)
     : ScopeCheckingGetCallback(aScope), mPromiseProxy(aProxy)
   {
     AssertIsOnMainThread();
     MOZ_ASSERT(aProxy);
   }
 
-  NS_IMETHOD Done() final
+  NS_IMETHOD Done() final override
   {
     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/plugins/ipc/PluginMessageUtils.cpp
+++ b/dom/plugins/ipc/PluginMessageUtils.cpp
@@ -25,17 +25,17 @@ public:
   DeferNPObjectReleaseRunnable(const NPNetscapeFuncs* f, NPObject* o)
     : Runnable("DeferNPObjectReleaseRunnable")
     , mFuncs(f)
     , mObject(o)
   {
     NS_ASSERTION(o, "no release null objects");
   }
 
-  NS_IMETHOD Run();
+  NS_IMETHOD Run() override;
 
 private:
   const NPNetscapeFuncs* mFuncs;
   NPObject* mObject;
 };
 
 NS_IMETHODIMP
 DeferNPObjectReleaseRunnable::Run()
--- a/dom/promise/Promise.cpp
+++ b/dom/promise/Promise.cpp
@@ -651,17 +651,17 @@ public:
     , mPromiseWorkerProxy(aPromiseWorkerProxy)
     , mFunc(aFunc)
   {
     MOZ_ASSERT(NS_IsMainThread());
     MOZ_ASSERT(mPromiseWorkerProxy);
   }
 
   virtual bool
-  WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate)
+  WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override
   {
     MOZ_ASSERT(aWorkerPrivate);
     aWorkerPrivate->AssertIsOnWorkerThread();
     MOZ_ASSERT(aWorkerPrivate == mWorkerPrivate);
 
     MOZ_ASSERT(mPromiseWorkerProxy);
     RefPtr<Promise> workerPromise = mPromiseWorkerProxy->WorkerPromise();
 
--- a/dom/quota/ActorsParent.cpp
+++ b/dom/quota/ActorsParent.cpp
@@ -382,17 +382,17 @@ public:
   void
   Invalidate()
   {
     AssertIsOnOwningThread();
 
     mInvalidated = true;
   }
 
-  NS_INLINE_DECL_REFCOUNTING(DirectoryLockImpl)
+  NS_INLINE_DECL_REFCOUNTING(DirectoryLockImpl, override)
 
 private:
   ~DirectoryLockImpl();
 };
 
 class QuotaManager::CreateRunnable final
   : public BackgroundThreadObject
   , public Runnable
--- a/dom/security/nsCSPUtils.h
+++ b/dom/security/nsCSPUtils.h
@@ -246,38 +246,38 @@ class nsCSPBaseSrc {
 /* =============== nsCSPSchemeSrc ============ */
 
 class nsCSPSchemeSrc : public nsCSPBaseSrc {
   public:
     explicit nsCSPSchemeSrc(const nsAString& aScheme);
     virtual ~nsCSPSchemeSrc();
 
     bool permits(nsIURI* aUri, const nsAString& aNonce, bool aWasRedirected,
-                 bool aReportOnly, bool aUpgradeInsecure, bool aParserCreated) const;
-    bool visit(nsCSPSrcVisitor* aVisitor) const;
-    void toString(nsAString& outStr) const;
+                 bool aReportOnly, bool aUpgradeInsecure, bool aParserCreated) const override;
+    bool visit(nsCSPSrcVisitor* aVisitor) const override;
+    void toString(nsAString& outStr) const override;
 
     inline void getScheme(nsAString& outStr) const
       { outStr.Assign(mScheme); };
 
   private:
     nsString mScheme;
 };
 
 /* =============== nsCSPHostSrc ============== */
 
 class nsCSPHostSrc : public nsCSPBaseSrc {
   public:
     explicit nsCSPHostSrc(const nsAString& aHost);
     virtual ~nsCSPHostSrc();
 
     bool permits(nsIURI* aUri, const nsAString& aNonce, bool aWasRedirected,
-                 bool aReportOnly, bool aUpgradeInsecure, bool aParserCreated) const;
-    bool visit(nsCSPSrcVisitor* aVisitor) const;
-    void toString(nsAString& outStr) const;
+                 bool aReportOnly, bool aUpgradeInsecure, bool aParserCreated) const override;
+    bool visit(nsCSPSrcVisitor* aVisitor) const override;
+    void toString(nsAString& outStr) const override;
 
     void setScheme(const nsAString& aScheme);
     void setPort(const nsAString& aPort);
     void appendPath(const nsAString &aPath);
 
     inline void setGeneratedFromSelfKeyword() const
       { mGeneratedFromSelfKeyword = true; }
 
@@ -312,26 +312,26 @@ class nsCSPHostSrc : public nsCSPBaseSrc
 /* =============== nsCSPKeywordSrc ============ */
 
 class nsCSPKeywordSrc : public nsCSPBaseSrc {
   public:
     explicit nsCSPKeywordSrc(CSPKeyword aKeyword);
     virtual ~nsCSPKeywordSrc();
 
     bool allows(enum CSPKeyword aKeyword, const nsAString& aHashOrNonce,
-                bool aParserCreated) const;
+                bool aParserCreated) const override;
     bool permits(nsIURI* aUri, const nsAString& aNonce, bool aWasRedirected,
-                 bool aReportOnly, bool aUpgradeInsecure, bool aParserCreated) const;
-    bool visit(nsCSPSrcVisitor* aVisitor) const;
-    void toString(nsAString& outStr) const;
+                 bool aReportOnly, bool aUpgradeInsecure, bool aParserCreated) const override;
+    bool visit(nsCSPSrcVisitor* aVisitor) const override;
+    void toString(nsAString& outStr) const override;
 
     inline CSPKeyword getKeyword() const
       { return mKeyword; };
 
-    inline void invalidate() const
+    inline void invalidate() const override
     {
       // keywords that need to invalidated
       if (mKeyword == CSP_SELF || mKeyword == CSP_UNSAFE_INLINE) {
         mInvalidated = true;
       }
     }
 
   private:
@@ -341,26 +341,26 @@ class nsCSPKeywordSrc : public nsCSPBase
 /* =============== nsCSPNonceSource =========== */
 
 class nsCSPNonceSrc : public nsCSPBaseSrc {
   public:
     explicit nsCSPNonceSrc(const nsAString& aNonce);
     virtual ~nsCSPNonceSrc();
 
     bool permits(nsIURI* aUri, const nsAString& aNonce, bool aWasRedirected,
-                 bool aReportOnly, bool aUpgradeInsecure, bool aParserCreated) const;
+                 bool aReportOnly, bool aUpgradeInsecure, bool aParserCreated) const override;
     bool allows(enum CSPKeyword aKeyword, const nsAString& aHashOrNonce,
-                bool aParserCreated) const;
-    bool visit(nsCSPSrcVisitor* aVisitor) const;
-    void toString(nsAString& outStr) const;
+                bool aParserCreated) const override;
+    bool visit(nsCSPSrcVisitor* aVisitor) const override;
+    void toString(nsAString& outStr) const override;
 
     inline void getNonce(nsAString& outStr) const
       { outStr.Assign(mNonce); };
 
-    inline void invalidate() const
+    inline void invalidate() const override
     {
       // overwrite nsCSPBaseSRC::invalidate() and explicitily
       // do *not* invalidate, because 'strict-dynamic' should
       // not invalidate nonces.
     }
 
   private:
     nsString mNonce;
@@ -369,27 +369,27 @@ class nsCSPNonceSrc : public nsCSPBaseSr
 /* =============== nsCSPHashSource ============ */
 
 class nsCSPHashSrc : public nsCSPBaseSrc {
   public:
     nsCSPHashSrc(const nsAString& algo, const nsAString& hash);
     virtual ~nsCSPHashSrc();
 
     bool allows(enum CSPKeyword aKeyword, const nsAString& aHashOrNonce,
-                bool aParserCreated) const;
-    void toString(nsAString& outStr) const;
-    bool visit(nsCSPSrcVisitor* aVisitor) const;
+                bool aParserCreated) const override;
+    void toString(nsAString& outStr) const override;
+    bool visit(nsCSPSrcVisitor* aVisitor) const override;
 
     inline void getAlgorithm(nsAString& outStr) const
       { outStr.Assign(mAlgorithm); };
 
     inline void getHash(nsAString& outStr) const
       { outStr.Assign(mHash); };
 
-    inline void invalidate() const
+    inline void invalidate() const override
     {
       // overwrite nsCSPBaseSRC::invalidate() and explicitily
       // do *not* invalidate, because 'strict-dynamic' should
       // not invalidate hashes.
     }
 
   private:
     nsString mAlgorithm;
@@ -398,32 +398,32 @@ class nsCSPHashSrc : public nsCSPBaseSrc
 
 /* =============== nsCSPReportURI ============ */
 
 class nsCSPReportURI : public nsCSPBaseSrc {
   public:
     explicit nsCSPReportURI(nsIURI* aURI);
     virtual ~nsCSPReportURI();
 
-    bool visit(nsCSPSrcVisitor* aVisitor) const;
-    void toString(nsAString& outStr) const;
+    bool visit(nsCSPSrcVisitor* aVisitor) const override;
+    void toString(nsAString& outStr) const override;
 
   private:
     nsCOMPtr<nsIURI> mReportURI;
 };
 
 /* =============== nsCSPSandboxFlags ================== */
 
 class nsCSPSandboxFlags : public nsCSPBaseSrc {
   public:
     explicit nsCSPSandboxFlags(const nsAString& aFlags);
     virtual ~nsCSPSandboxFlags();
 
-    bool visit(nsCSPSrcVisitor* aVisitor) const;
-    void toString(nsAString& outStr) const;
+    bool visit(nsCSPSrcVisitor* aVisitor) const override;
+    void toString(nsAString& outStr) const override;
 
   private:
     nsString mFlags;
 };
 
 /* =============== nsCSPSrcVisitor ================== */
 
 class nsCSPSrcVisitor {
@@ -490,19 +490,19 @@ class nsCSPChildSrcDirective : public ns
     virtual ~nsCSPChildSrcDirective();
 
     void setRestrictFrames()
       { mRestrictFrames = true; }
 
     void setRestrictWorkers()
       { mRestrictWorkers = true; }
 
-    virtual bool restrictsContentType(nsContentPolicyType aContentType) const;
+    virtual bool restrictsContentType(nsContentPolicyType aContentType) const override;
 
-    virtual bool equals(CSPDirective aDirective) const;
+    virtual bool equals(CSPDirective aDirective) const override;
 
   private:
     bool mRestrictFrames;
     bool mRestrictWorkers;
 };
 
 /* =============== nsCSPScriptSrcDirective ============= */
 
@@ -514,45 +514,45 @@ class nsCSPChildSrcDirective : public ns
 class nsCSPScriptSrcDirective : public nsCSPDirective {
   public:
     explicit nsCSPScriptSrcDirective(CSPDirective aDirective);
     virtual ~nsCSPScriptSrcDirective();
 
     void setRestrictWorkers()
       { mRestrictWorkers = true; }
 
-    virtual bool restrictsContentType(nsContentPolicyType aContentType) const;
+    virtual bool restrictsContentType(nsContentPolicyType aContentType) const override;
 
-    virtual bool equals(CSPDirective aDirective) const;
+    virtual bool equals(CSPDirective aDirective) const override;
 
   private:
     bool mRestrictWorkers;
 };
 
 /* =============== nsBlockAllMixedContentDirective === */
 
 class nsBlockAllMixedContentDirective : public nsCSPDirective {
   public:
     explicit nsBlockAllMixedContentDirective(CSPDirective aDirective);
     ~nsBlockAllMixedContentDirective();
 
     bool permits(nsIURI* aUri, const nsAString& aNonce, bool aWasRedirected,
-                 bool aReportOnly, bool aUpgradeInsecure, bool aParserCreated) const
+                 bool aReportOnly, bool aUpgradeInsecure, bool aParserCreated) const override
       { return false; }
 
     bool permits(nsIURI* aUri) const
       { return false; }
 
     bool allows(enum CSPKeyword aKeyword, const nsAString& aHashOrNonce,
-                bool aParserCreated) const
+                bool aParserCreated) const override
       { return false; }
 
-    void toString(nsAString& outStr) const;
+    void toString(nsAString& outStr) const override;
 
-    void addSrcs(const nsTArray<nsCSPBaseSrc*>& aSrcs)
+    void addSrcs(const nsTArray<nsCSPBaseSrc*>& aSrcs) override
       {  MOZ_ASSERT(false, "block-all-mixed-content does not hold any srcs"); }
 };
 
 /* =============== nsUpgradeInsecureDirective === */
 
 /*
  * Upgrading insecure requests includes the following actors:
  * (1) CSP:
@@ -583,47 +583,47 @@ class nsBlockAllMixedContentDirective : 
  *     gets upgraded from ws to wss.
  */
 class nsUpgradeInsecureDirective : public nsCSPDirective {
   public:
     explicit nsUpgradeInsecureDirective(CSPDirective aDirective);
     ~nsUpgradeInsecureDirective();
 
     bool permits(nsIURI* aUri, const nsAString& aNonce, bool aWasRedirected,
-                 bool aReportOnly, bool aUpgradeInsecure, bool aParserCreated) const
+                 bool aReportOnly, bool aUpgradeInsecure, bool aParserCreated) const override
       { return false; }
 
     bool permits(nsIURI* aUri) const
       { return false; }
 
     bool allows(enum CSPKeyword aKeyword, const nsAString& aHashOrNonce,
-                bool aParserCreated) const
+                bool aParserCreated) const override
       { return false; }
 
-    void toString(nsAString& outStr) const;
+    void toString(nsAString& outStr) const override;
 
-    void addSrcs(const nsTArray<nsCSPBaseSrc*>& aSrcs)
+    void addSrcs(const nsTArray<nsCSPBaseSrc*>& aSrcs) override
       {  MOZ_ASSERT(false, "upgrade-insecure-requests does not hold any srcs"); }
 };
 
 /* ===== nsRequireSRIForDirective ========================= */
 
 class nsRequireSRIForDirective : public nsCSPDirective {
   public:
     explicit nsRequireSRIForDirective(CSPDirective aDirective);
     ~nsRequireSRIForDirective();
 
-    void toString(nsAString& outStr) const;
+    void toString(nsAString& outStr) const override;
 
     void addType(nsContentPolicyType aType)
       { mTypes.AppendElement(aType); }
     bool hasType(nsContentPolicyType aType) const;
-    bool restrictsContentType(nsContentPolicyType aType) const;
+    bool restrictsContentType(nsContentPolicyType aType) const override;
     bool allows(enum CSPKeyword aKeyword, const nsAString& aHashOrNonce,
-                bool aParserCreated) const;
+                bool aParserCreated) const override;
 
   private:
     nsTArray<nsContentPolicyType> mTypes;
 };
 
 /* =============== nsCSPPolicy ================== */
 
 class nsCSPPolicy {
--- a/dom/storage/LocalStorageCache.h
+++ b/dom/storage/LocalStorageCache.h
@@ -71,17 +71,17 @@ protected:
 
 // Implementation of scope cache that is responsible for preloading data
 // for persistent storage (localStorage) and hold data for non-private,
 // private and session-only cookie modes.  It is also responsible for
 // persisting data changes using the database, works as a write-back cache.
 class LocalStorageCache : public LocalStorageCacheBridge
 {
 public:
-  NS_IMETHOD_(void) Release(void);
+  NS_IMETHOD_(void) Release(void) override;
 
   enum MutationSource {
     // The mutation is a result of an explicit JS mutation in this process.
     // The mutation should be sent to the sDatabase. Quota will be checked and
     // QuotaExceededError may be returned without the mutation being applied.
     ContentMutation,
     // The mutation initially was triggered in a different process and is being
     // propagated to this cache via LocalStorage::ApplyEvent.  The mutation should
@@ -128,24 +128,24 @@ public:
                       const MutationSource aSource=ContentMutation);
   nsresult Clear(const LocalStorage* aStorage,
                  const MutationSource aSource=ContentMutation);
 
   void GetKeys(const LocalStorage* aStorage, nsTArray<nsString>& aKeys);
 
   // LocalStorageCacheBridge
 
-  virtual const nsCString Origin() const;
-  virtual const nsCString& OriginNoSuffix() const { return mOriginNoSuffix; }
-  virtual const nsCString& OriginSuffix() const { return mOriginSuffix; }
-  virtual bool Loaded() { return mLoaded; }
-  virtual uint32_t LoadedCount();
-  virtual bool LoadItem(const nsAString& aKey, const nsString& aValue);
-  virtual void LoadDone(nsresult aRv);
-  virtual void LoadWait();
+  const nsCString Origin() const override;
+  const nsCString& OriginNoSuffix() const override { return mOriginNoSuffix; }
+  const nsCString& OriginSuffix() const override { return mOriginSuffix; }
+  bool Loaded() override { return mLoaded; }
+  uint32_t LoadedCount() override;
+  bool LoadItem(const nsAString& aKey, const nsString& aValue) override;
+  void LoadDone(nsresult aRv) override;
+  void LoadWait() override;
 
   // Cache keeps 3 sets of data: regular, private and session-only.
   // This class keeps keys and values for a set and also caches
   // size of the data for quick per-origin quota checking.
   class Data
   {
   public:
     Data() : mOriginQuotaUsage(0) {}
@@ -274,18 +274,18 @@ class StorageUsage : public StorageUsage
 {
 public:
   explicit StorageUsage(const nsACString& aOriginScope);
 
   bool CheckAndSetETLD1UsageDelta(uint32_t aDataSetIndex, int64_t aUsageDelta,
                                   const LocalStorageCache::MutationSource aSource);
 
 private:
-  virtual const nsCString& OriginScope() { return mOriginScope; }
-  virtual void LoadUsage(const int64_t aUsage);
+  const nsCString& OriginScope() override { return mOriginScope; }
+  void LoadUsage(const int64_t aUsage) override;
 
   nsCString mOriginScope;
   int64_t mUsage[LocalStorageCache::kDataSetCount];
 };
 
 } // namespace dom
 } // namespace mozilla
 
--- a/dom/storage/StorageIPC.cpp
+++ b/dom/storage/StorageIPC.cpp
@@ -653,52 +653,52 @@ public:
   , mRv(rv)
   , mLoaded(false)
   , mLoadedCount(aAlreadyLoadedCount)
   {
     // Precaution
     *mRv = NS_ERROR_UNEXPECTED;
   }
 
-  virtual const nsCString Origin() const
+  virtual const nsCString Origin() const override
   {
     return LocalStorageManager::CreateOrigin(mSuffix, mOrigin);
   }
-  virtual const nsCString& OriginNoSuffix() const { return mOrigin; }
-  virtual const nsCString& OriginSuffix() const { return mSuffix; }
-  virtual bool Loaded() { return mLoaded; }
-  virtual uint32_t LoadedCount() { return mLoadedCount; }
-  virtual bool LoadItem(const nsAString& aKey, const nsString& aValue)
+  virtual const nsCString& OriginNoSuffix() const override { return mOrigin; }
+  virtual const nsCString& OriginSuffix() const override { return mSuffix; }
+  virtual bool Loaded() override { return mLoaded; }
+  virtual uint32_t LoadedCount() override { return mLoadedCount; }
+  virtual bool LoadItem(const nsAString& aKey, const nsString& aValue) override
   {
     // Called on the aCache background thread
     MOZ_ASSERT(!mLoaded);
     if (mLoaded) {
       return false;
     }
 
     ++mLoadedCount;
     mKeys->AppendElement(aKey);
     mValues->AppendElement(aValue);
     return true;
   }
 
-  virtual void LoadDone(nsresult aRv)
+  virtual void LoadDone(nsresult aRv) override
   {
     // Called on the aCache background thread
     MonitorAutoLock monitor(mMonitor);
     MOZ_ASSERT(!mLoaded && mRv);
     mLoaded = true;
     if (mRv) {
       *mRv = aRv;
       mRv = nullptr;
     }
     monitor.Notify();
   }
 
-  virtual void LoadWait()
+  virtual void LoadWait() override
   {
     // Called on the main thread, exits after LoadDone() call
     MonitorAutoLock monitor(mMonitor);
     while (!mLoaded) {
       monitor.Wait();
     }
   }
 
--- a/dom/storage/StorageIPC.h
+++ b/dom/storage/StorageIPC.h
@@ -90,28 +90,28 @@ public:
     MOZ_CRASH("Shouldn't be called!");
   }
 
   virtual bool ShouldPreloadOrigin(const nsACString& aOriginNoSuffix);
 
 private:
   mozilla::ipc::IPCResult RecvObserve(const nsCString& aTopic,
                                       const nsString& aOriginAttributesPattern,
-                                      const nsCString& aOriginScope);
+                                      const nsCString& aOriginScope) override;
   mozilla::ipc::IPCResult RecvLoadItem(const nsCString& aOriginSuffix,
                                        const nsCString& aOriginNoSuffix,
                                        const nsString& aKey,
-                                       const nsString& aValue);
+                                       const nsString& aValue) override;
   mozilla::ipc::IPCResult RecvLoadDone(const nsCString& aOriginSuffix,
                                        const nsCString& aOriginNoSuffix,
-                                       const nsresult& aRv);
-  mozilla::ipc::IPCResult RecvOriginsHavingData(nsTArray<nsCString>&& aOrigins);
+                                       const nsresult& aRv) override;
+  mozilla::ipc::IPCResult RecvOriginsHavingData(nsTArray<nsCString>&& aOrigins) override;
   mozilla::ipc::IPCResult RecvLoadUsage(const nsCString& aOriginNoSuffix,
-                                        const int64_t& aUsage);
-  mozilla::ipc::IPCResult RecvError(const nsresult& aRv);
+                                        const int64_t& aUsage) override;
+  mozilla::ipc::IPCResult RecvError(const nsresult& aRv) override;
 
   nsTHashtable<nsCStringHashKey>& OriginsHavingData();
 
   // Held to get caches to forward answers to.
   RefPtr<LocalStorageManager> mManager;
 
   // Origins having data hash, for optimization purposes only
   nsAutoPtr<nsTHashtable<nsCStringHashKey>> mOriginsHavingData;
@@ -162,32 +162,32 @@ public:
                       const nsACString& aOriginNoSuffix)
       : mOwningEventTarget(GetCurrentThreadSerialEventTarget())
       , mParent(aParentDB)
       , mOriginSuffix(aOriginSuffix), mOriginNoSuffix(aOriginNoSuffix)
       , mLoaded(false), mLoadedCount(0) {}
     virtual ~CacheParentBridge() {}
 
     // LocalStorageCacheBridge
-    virtual const nsCString Origin() const;
-    virtual const nsCString& OriginNoSuffix() const
+    virtual const nsCString Origin() const override;
+    virtual const nsCString& OriginNoSuffix() const override
       { return mOriginNoSuffix; }
-    virtual const nsCString& OriginSuffix() const
+    virtual const nsCString& OriginSuffix() const override
       { return mOriginSuffix; }
-    virtual bool Loaded()
+    virtual bool Loaded() override
       { return mLoaded; }
-    virtual uint32_t LoadedCount()
+    virtual uint32_t LoadedCount() override
       { return mLoadedCount; }
 
-    virtual bool LoadItem(const nsAString& aKey, const nsString& aValue);
-    virtual void LoadDone(nsresult aRv);
-    virtual void LoadWait();
+    virtual bool LoadItem(const nsAString& aKey, const nsString& aValue) override;
+    virtual void LoadDone(nsresult aRv) override;
+    virtual void LoadWait() override;
 
     NS_IMETHOD_(void)
-    Release(void);
+    Release(void) override;
 
   private:
     void
     Destroy();
 
     nsCOMPtr<nsISerialEventTarget> mOwningEventTarget;
     RefPtr<StorageDBParent> mParent;
     nsCString mOriginSuffix, mOriginNoSuffix;
@@ -202,21 +202,21 @@ public:
     UsageParentBridge(StorageDBParent* aParentDB,
                       const nsACString& aOriginScope)
       : mOwningEventTarget(GetCurrentThreadSerialEventTarget())
       , mParent(aParentDB)
       , mOriginScope(aOriginScope) {}
     virtual ~UsageParentBridge() {}
 
     // StorageUsageBridge
-    virtual const nsCString& OriginScope() { return mOriginScope; }
-    virtual void LoadUsage(const int64_t usage);
+    virtual const nsCString& OriginScope() override { return mOriginScope; }
+    virtual void LoadUsage(const int64_t usage) override;
 
     NS_IMETHOD_(MozExternalRefCountType)
-    Release(void);
+    Release(void) override;
 
   private:
     void
     Destroy();
 
     nsCOMPtr<nsISerialEventTarget> mOwningEventTarget;
     RefPtr<StorageDBParent> mParent;
     nsCString mOriginScope;
--- a/dom/svg/SVGRect.h
+++ b/dom/svg/SVGRect.h
@@ -27,47 +27,47 @@ public:
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SVGRect)
 
   // WebIDL
   virtual float X() const override final
   {
     return mX;
   }
 
-  virtual void SetX(float aX, ErrorResult& aRv) final
+  virtual void SetX(float aX, ErrorResult& aRv) final override
   {
     mX = aX;
   }
 
   virtual float Y() const override final
   {
     return mY;
   }
 
-  virtual void SetY(float aY, ErrorResult& aRv) final
+  virtual void SetY(float aY, ErrorResult& aRv) final override
   {
     mY = aY;
   }
 
   virtual float Width() const override final
   {
     return mWidth;
   }
 
-  virtual void SetWidth(float aWidth, ErrorResult& aRv) final
+  virtual void SetWidth(float aWidth, ErrorResult& aRv) final override
   {
     mWidth = aWidth;
   }
 
   virtual float Height() const override final
   {
     return mHeight;
   }
 
-  virtual void SetHeight(float aHeight, ErrorResult& aRv) final
+  virtual void SetHeight(float aHeight, ErrorResult& aRv) final override
   {
     mHeight = aHeight;
   }
 
   virtual nsIContent* GetParentObject() const override
   {
     return mParent;
   }
--- a/dom/time/DateCacheCleaner.cpp
+++ b/dom/time/DateCacheCleaner.cpp
@@ -25,17 +25,18 @@ public:
   {
     RegisterSystemTimezoneChangeObserver(this);
   }
 
   ~DateCacheCleaner()
   {
     UnregisterSystemTimezoneChangeObserver(this);
   }
-  void Notify(const SystemTimezoneChangeInformation& aSystemTimezoneChangeInfo)
+
+  void Notify(const SystemTimezoneChangeInformation& aSystemTimezoneChangeInfo) override
   {
     JS::ResetTimeZone();
   }
 
 };
 
 StaticAutoPtr<DateCacheCleaner> sDateCacheCleaner;
 
--- a/dom/time/TimeChangeObserver.cpp
+++ b/dom/time/TimeChangeObserver.cpp
@@ -26,21 +26,21 @@ class nsSystemTimeChangeObserver : publi
                                    public SystemTimezoneChangeObserver
 {
   typedef nsTObserverArray<nsWeakPtr> ListenerArray;
 public:
   static nsSystemTimeChangeObserver* GetInstance();
   virtual ~nsSystemTimeChangeObserver();
 
   // Implementing hal::SystemClockChangeObserver::Notify()
-  void Notify(const int64_t& aClockDeltaMS);
+  void Notify(const int64_t& aClockDeltaMS) override;
 
   // Implementing hal::SystemTimezoneChangeObserver::Notify()
   void Notify(
-    const mozilla::hal::SystemTimezoneChangeInformation& aSystemTimezoneChangeInfo);
+    const mozilla::hal::SystemTimezoneChangeInformation& aSystemTimezoneChangeInfo) override;
 
   nsresult AddWindowListenerImpl(nsPIDOMWindowInner* aWindow);
   nsresult RemoveWindowListenerImpl(nsPIDOMWindowInner* aWindow);
 
 private:
   nsSystemTimeChangeObserver() { };
   ListenerArray mWindowListeners;
   void FireMozTimeChangeEvent();
--- a/dom/url/URLWorker.cpp
+++ b/dom/url/URLWorker.cpp
@@ -80,17 +80,17 @@ public:
     MOZ_ASSERT(aBlobImpl);
 
     DebugOnly<bool> isMutable;
     MOZ_ASSERT(NS_SUCCEEDED(aBlobImpl->GetMutable(&isMutable)));
     MOZ_ASSERT(!isMutable);
   }
 
   bool
-  MainThreadRun()
+  MainThreadRun() override
   {
     using namespace mozilla::ipc;
 
     AssertIsOnMainThread();
 
     DebugOnly<bool> isMutable;
     MOZ_ASSERT(NS_SUCCEEDED(mBlobImpl->GetMutable(&isMutable)));
     MOZ_ASSERT(!isMutable);
@@ -140,17 +140,17 @@ public:
   RevokeURLRunnable(WorkerPrivate* aWorkerPrivate,
                     const nsAString& aURL)
   : WorkerMainThreadRunnable(aWorkerPrivate,
                              NS_LITERAL_CSTRING("URL :: RevokeURL"))
   , mURL(aURL)
   {}
 
   bool
-  MainThreadRun()
+  MainThreadRun() override
   {
     AssertIsOnMainThread();
 
     NS_ConvertUTF16toUTF8 url(mURL);
 
     nsIPrincipal* urlPrincipal =
       nsHostObjectProtocolHandler::GetDataEntryPrincipal(url);
 
@@ -197,17 +197,17 @@ public:
                      const nsAString& aURL)
   : WorkerMainThreadRunnable(aWorkerPrivate,
                              NS_LITERAL_CSTRING("URL :: IsValidURL"))
   , mURL(aURL)
   , mValid(false)
   {}
 
   bool
-  MainThreadRun()
+  MainThreadRun() override
   {
     AssertIsOnMainThread();
 
     NS_ConvertUTF16toUTF8 url(mURL);
     mValid = nsHostObjectProtocolHandler::HasDataEntry(url);
 
     return true;
   }
@@ -240,17 +240,17 @@ public:
       mBase = aBase.Value();
     } else {
       mBase.SetIsVoid(true);
     }
     mWorkerPrivate->AssertIsOnWorkerThread();
   }
 
   bool
-  MainThreadRun()
+  MainThreadRun() override
   {
     AssertIsOnMainThread();
 
     ErrorResult rv;
     RefPtr<URLMainThread> url;
     if (!mBase.IsVoid()) {
       url = URLMainThread::Constructor(nullptr, mURL, mBase, rv);
     } else {
@@ -284,17 +284,17 @@ class TeardownURLRunnable : public Runna
 {
 public:
   explicit TeardownURLRunnable(URLWorker::URLProxy* aURLProxy)
     : Runnable("dom::TeardownURLRunnable")
     , mURLProxy(aURLProxy)
   {
   }
 
-  NS_IMETHOD Run()
+  NS_IMETHOD Run() override
   {
     AssertIsOnMainThread();
 
     mURLProxy->ReleaseURI();
     mURLProxy = nullptr;
 
     return NS_OK;
   }
@@ -331,17 +331,17 @@ public:
   , mValue(aValue)
   , mType(aType)
   , mURLProxy(aURLProxy)
   {
     mWorkerPrivate->AssertIsOnWorkerThread();
   }
 
   bool
-  MainThreadRun()
+  MainThreadRun() override
   {
     AssertIsOnMainThread();
     ErrorResult rv;
 
     switch (mType) {
       case GetterHref:
         mURLProxy->URL()->GetHref(mValue, rv);
         break;
@@ -431,17 +431,17 @@ public:
   , mType(aType)
   , mURLProxy(aURLProxy)
   , mFailed(false)
   {
     mWorkerPrivate->AssertIsOnWorkerThread();
   }
 
   bool
-  MainThreadRun()
+  MainThreadRun() override
   {
     AssertIsOnMainThread();
     ErrorResult rv;
 
     switch (mType) {
       case SetterHref: {
         mURLProxy->URL()->SetHref(mValue, rv);
         break;
--- a/dom/webauthn/WebAuthnTransactionChild.h
+++ b/dom/webauthn/WebAuthnTransactionChild.h
@@ -23,27 +23,27 @@ namespace dom {
 class WebAuthnTransactionChild final : public PWebAuthnTransactionChild
 {
 public:
   NS_INLINE_DECL_REFCOUNTING(WebAuthnTransactionChild);
   explicit WebAuthnTransactionChild(WebAuthnManagerBase* aManager);
 
   mozilla::ipc::IPCResult
   RecvConfirmRegister(const uint64_t& aTransactionId,
-                      nsTArray<uint8_t>&& aRegBuffer);
+                      nsTArray<uint8_t>&& aRegBuffer) override;
 
   mozilla::ipc::IPCResult
   RecvConfirmSign(const uint64_t& aTransactionId,
                   nsTArray<uint8_t>&& aCredentialId,
-                  nsTArray<uint8_t>&& aBuffer);
+                  nsTArray<uint8_t>&& aBuffer) override;
 
   mozilla::ipc::IPCResult
-  RecvAbort(const uint64_t& aTransactionId, const nsresult& aError);
+  RecvAbort(const uint64_t& aTransactionId, const nsresult& aError) override;
 
-  void ActorDestroy(ActorDestroyReason why);
+  void ActorDestroy(ActorDestroyReason why) override;
 
   void Disconnect();
 
 private:
   ~WebAuthnTransactionChild() = default;
 
   // Nulled by ~WebAuthnManager() when disconnecting.
   WebAuthnManagerBase* mManager;
--- a/dom/workers/ServiceWorkerManager.cpp
+++ b/dom/workers/ServiceWorkerManager.cpp
@@ -1530,33 +1530,33 @@ public:
   explicit UnregisterJobCallback(nsIServiceWorkerUnregisterCallback* aCallback)
     : mCallback(aCallback)
   {
     AssertIsOnMainThread();
     MOZ_ASSERT(mCallback);
   }
 
   void
-  JobFinished(ServiceWorkerJob* aJob, ErrorResult& aStatus)
+  JobFinished(ServiceWorkerJob* aJob, ErrorResult& aStatus) override
   {
     AssertIsOnMainThread();
     MOZ_ASSERT(aJob);
 
     if (aStatus.Failed()) {
       mCallback->UnregisterFailed();
       return;
     }
 
     MOZ_ASSERT(aJob->GetType() == ServiceWorkerJob::Type::Unregister);
     RefPtr<ServiceWorkerUnregisterJob> unregisterJob =
       static_cast<ServiceWorkerUnregisterJob*>(aJob);
     mCallback->UnregisterSucceeded(unregisterJob->GetResult());
   }
 
-  NS_INLINE_DECL_REFCOUNTING(UnregisterJobCallback)
+  NS_INLINE_DECL_REFCOUNTING(UnregisterJobCallback, override)
 };
 
 } // anonymous namespace
 
 NS_IMETHODIMP
 ServiceWorkerManager::Unregister(nsIPrincipal* aPrincipal,
                                  nsIServiceWorkerUnregisterCallback* aCallback,
                                  const nsAString& aScope)
@@ -3054,34 +3054,34 @@ public:
   explicit UpdateJobCallback(ServiceWorkerUpdateFinishCallback* aCallback)
     : mCallback(aCallback)
   {
     AssertIsOnMainThread();
     MOZ_ASSERT(mCallback);
   }
 
   void
-  JobFinished(ServiceWorkerJob* aJob, ErrorResult& aStatus)
+  JobFinished(ServiceWorkerJob* aJob, ErrorResult& aStatus) override
   {
     AssertIsOnMainThread();
     MOZ_ASSERT(aJob);
 
     if (aStatus.Failed()) {
       mCallback->UpdateFailed(aStatus);
       return;
     }
 
     MOZ_DIAGNOSTIC_ASSERT(aJob->GetType() == ServiceWorkerJob::Type::Update);
     RefPtr<ServiceWorkerUpdateJob> updateJob =
       static_cast<ServiceWorkerUpdateJob*>(aJob);
     RefPtr<ServiceWorkerRegistrationInfo> reg = updateJob->GetRegistration();
     mCallback->UpdateSucceeded(reg);
   }
 
-  NS_INLINE_DECL_REFCOUNTING(UpdateJobCallback)
+  NS_INLINE_DECL_REFCOUNTING(UpdateJobCallback, override)
 };
 
 } // anonymous namespace
 
 void
 ServiceWorkerManager::SoftUpdateInternal(const OriginAttributes& aOriginAttributes,
                                          const nsACString& aScope,
                                          ServiceWorkerUpdateFinishCallback* aCallback)
--- a/dom/workers/ServiceWorkerPrivate.cpp
+++ b/dom/workers/ServiceWorkerPrivate.cpp
@@ -603,17 +603,17 @@ public:
                                           nsMainThreadPtrHandle<ServiceWorkerRegistrationInfo>& aRegistration)
     : ExtendableEventWorkerRunnable(aWorkerPrivate, aKeepAliveToken)
     , mRegistration(aRegistration)
   {
     MOZ_DIAGNOSTIC_ASSERT(aRegistration);
   }
 
   void
-  PostRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate, bool aRunResult)
+  PostRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate, bool aRunResult) override
   {
     // Sub-class PreRun() or WorkerRun() methods could clear our mRegistration.
     if (mRegistration) {
       nsCOMPtr<nsIRunnable> runnable =
         new RegistrationUpdateRunnable(mRegistration, true /* time check */);
       aWorkerPrivate->DispatchToMainThread(runnable.forget());
     }
 
--- a/dom/workers/WorkerPrivate.cpp
+++ b/dom/workers/WorkerPrivate.cpp
@@ -1507,34 +1507,34 @@ class CycleCollectRunnable : public Work
 
 public:
   CycleCollectRunnable(WorkerPrivate* aWorkerPrivate, bool aCollectChildren)
   : WorkerControlRunnable(aWorkerPrivate, WorkerThreadUnchangedBusyCount),
     mCollectChildren(aCollectChildren)
   { }
 
   bool
-  WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate)
+  WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override
   {
     aWorkerPrivate->CycleCollectInternal(mCollectChildren);
     return true;
   }
 };
 
 class OfflineStatusChangeRunnable : public WorkerRunnable
 {
 public:
   OfflineStatusChangeRunnable(WorkerPrivate* aWorkerPrivate, bool aIsOffline)
     : WorkerRunnable(aWorkerPrivate),
       mIsOffline(aIsOffline)
   {
   }
 
   bool
-  WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate)
+  WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override
   {
     aWorkerPrivate->OfflineStatusChangeEventInternal(mIsOffline);
     return true;
   }
 
 private:
   bool mIsOffline;
 };
@@ -1542,17 +1542,17 @@ private:
 class MemoryPressureRunnable : public WorkerControlRunnable
 {
 public:
   explicit MemoryPressureRunnable(WorkerPrivate* aWorkerPrivate)
     : WorkerControlRunnable(aWorkerPrivate, WorkerThreadUnchangedBusyCount)
   {}
 
   bool
-  WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate)
+  WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override
   {
     aWorkerPrivate->MemoryPressureInternal();
     return true;
   }
 };
 
 #ifdef DEBUG
 static bool
@@ -1609,17 +1609,17 @@ PRThreadFromThread(nsIThread* aThread)
 
 class SimpleWorkerHolder final : public WorkerHolder
 {
 public:
   SimpleWorkerHolder()
     : WorkerHolder("SimpleWorkerHolder")
   {}
 
-  virtual bool Notify(Status aStatus) { return true; }
+  virtual bool Notify(Status aStatus) override { return true; }
 };
 
 } /* anonymous namespace */
 
 NS_IMPL_ISUPPORTS_INHERITED0(MainThreadReleaseRunnable, Runnable)
 
 NS_IMPL_ISUPPORTS_INHERITED0(TopLevelWorkerFinishedRunnable, Runnable)
 
--- a/dom/xhr/XMLHttpRequestWorker.cpp
+++ b/dom/xhr/XMLHttpRequestWorker.cpp
@@ -336,17 +336,17 @@ public:
     MOZ_ASSERT(aXHRPrivate);
   }
 
 private:
   ~XHRUnpinRunnable()
   { }
 
   bool
-  WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate)
+  WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override
   {
     if (mXMLHttpRequestPrivate->SendInProgress()) {
       mXMLHttpRequestPrivate->Unpin();
     }
 
     return true;
   }
 };
--- a/dom/xslt/xpath/XPathEvaluator.cpp
+++ b/dom/xslt/xpath/XPathEvaluator.cpp
@@ -48,21 +48,21 @@ public:
     {
     }
 
     nsresult getError()
     {
         return mLastError;
     }
 
-    nsresult resolveNamespacePrefix(nsAtom* aPrefix, int32_t& aID);
+    nsresult resolveNamespacePrefix(nsAtom* aPrefix, int32_t& aID) override;
     nsresult resolveFunctionCall(nsAtom* aName, int32_t aID,
-                                 FunctionCall** aFunction);
-    bool caseInsensitiveNameTests();
-    void SetErrorOffset(uint32_t aOffset);
+                                 FunctionCall** aFunction) override;
+    bool caseInsensitiveNameTests() override;
+    void SetErrorOffset(uint32_t aOffset) override;
 
 private:
     XPathNSResolver* mResolver;
     nsINode* mResolverNode;
     nsresult mLastError;
     bool mIsCaseSensitive;
 };
 
--- a/dom/xslt/xpath/txExprResult.h
+++ b/dom/xslt/xpath/txExprResult.h
@@ -82,22 +82,21 @@ public:
     virtual double numberValue()          = 0;
 
 private:
     nsAutoRefCnt mRefCnt;
     RefPtr<txResultRecycler> mRecycler;
 };
 
 #define TX_DECL_EXPRRESULT                                        \
-    virtual short getResultType();                                \
-    virtual void stringValue(nsString& aString);                  \
-    virtual const nsString* stringValuePointer();                 \
-    virtual bool booleanValue();                                \
-    virtual double numberValue();                                 \
-
+    virtual short getResultType() override;                       \
+    virtual void stringValue(nsString& aString) override;         \
+    virtual const nsString* stringValuePointer() override;        \
+    virtual bool booleanValue() override;                         \
+    virtual double numberValue() override;
 
 class BooleanResult : public txAExprResult {
 
 public:
     explicit BooleanResult(bool aValue);
 
     TX_DECL_EXPRRESULT
 
@@ -123,9 +122,8 @@ public:
     StringResult(const nsAString& aValue, txResultRecycler* aRecycler);
 
     TX_DECL_EXPRRESULT
 
     nsString mValue;
 };
 
 #endif
-
--- a/dom/xslt/xpath/txIXPathContext.h
+++ b/dom/xslt/xpath/txIXPathContext.h
@@ -101,21 +101,22 @@ public:
     /*
      * Callback to be used by the expression/pattern if errors are detected.
      */
     virtual void receiveError(const nsAString& aMsg, nsresult aRes) = 0;
 };
 
 #define TX_DECL_MATCH_CONTEXT \
     nsresult getVariable(int32_t aNamespace, nsAtom* aLName, \
-                         txAExprResult*& aResult); \
-    nsresult isStripSpaceAllowed(const txXPathNode& aNode, bool& aAllowed); \
-    void* getPrivateContext(); \
-    txResultRecycler* recycler(); \
-    void receiveError(const nsAString& aMsg, nsresult aRes)
+                         txAExprResult*& aResult) override; \
+    nsresult isStripSpaceAllowed(const txXPathNode& aNode, \
+                                 bool& aAllowed) override; \
+    void* getPrivateContext() override; \
+    txResultRecycler* recycler() override; \
+    void receiveError(const nsAString& aMsg, nsresult aRes) override
 
 class txIEvalContext : public txIMatchContext
 {
 public:
     /*
      * Get the context node.
      */
     virtual const txXPathNode& getContextNode() = 0;
@@ -129,13 +130,13 @@ public:
      * Get the position of the context node in the context node set,
      * starting with 1.
      */
     virtual uint32_t position() = 0;
 };
 
 #define TX_DECL_EVAL_CONTEXT \
     TX_DECL_MATCH_CONTEXT; \
-    const txXPathNode& getContextNode(); \
-    uint32_t size(); \
-    uint32_t position()
+    const txXPathNode& getContextNode() override; \
+    uint32_t size() override; \
+    uint32_t position() override
 
 #endif // __TX_I_XPATH_CONTEXT
--- a/dom/xslt/xpath/txXPathOptimizer.cpp
+++ b/dom/xslt/xpath/txXPathOptimizer.cpp
@@ -17,53 +17,53 @@ class txEarlyEvalContext : public txIEva
 public:
     explicit txEarlyEvalContext(txResultRecycler* aRecycler)
         : mRecycler(aRecycler)
     {
     }
 
     // txIEvalContext
     nsresult getVariable(int32_t aNamespace, nsAtom* aLName,
-                         txAExprResult*& aResult)
+                         txAExprResult*& aResult) override
     {
         MOZ_CRASH("shouldn't depend on this context");
     }
-    nsresult isStripSpaceAllowed(const txXPathNode& aNode, bool& aAllowed)
+    nsresult isStripSpaceAllowed(const txXPathNode& aNode,
+                                 bool& aAllowed) override
     {
         MOZ_CRASH("shouldn't depend on this context");
     }
-    void* getPrivateContext()
+    void* getPrivateContext() override
     {
         MOZ_CRASH("shouldn't depend on this context");
     }
-    txResultRecycler* recycler()
+    txResultRecycler* recycler() override
     {
         return mRecycler;
     }
-    void receiveError(const nsAString& aMsg, nsresult aRes)
+    void receiveError(const nsAString& aMsg, nsresult aRes) override
     {
     }
-    const txXPathNode& getContextNode()
+    const txXPathNode& getContextNode() override
     {
         MOZ_CRASH("shouldn't depend on this context");
     }
-    uint32_t size()
+    uint32_t size() override
     {
         MOZ_CRASH("shouldn't depend on this context");
     }
-    uint32_t position()
+    uint32_t position() override
     {
         MOZ_CRASH("shouldn't depend on this context");
     }
 
 private:
     txResultRecycler* mRecycler;
 };
 
-
 nsresult
 txXPathOptimizer::optimize(Expr* aInExpr, Expr** aOutExpr)
 {
     *aOutExpr = nullptr;
     nsresult rv = NS_OK;
 
     // First check if the expression will produce the same result
     // under any context.
--- a/dom/xslt/xslt/txInstructions.h
+++ b/dom/xslt/xslt/txInstructions.h
@@ -33,17 +33,17 @@ public:
     }
 
     virtual nsresult execute(txExecutionState& aEs) = 0;
 
     nsAutoPtr<txInstruction> mNext;
 };
 
 #define TX_DECL_TXINSTRUCTION  \
-    virtual nsresult execute(txExecutionState& aEs);
+    virtual nsresult execute(txExecutionState& aEs) override;
 
 
 class txApplyDefaultElementTemplate : public txInstruction
 {
 public:
     TX_DECL_TXINSTRUCTION
 };
 
--- a/dom/xslt/xslt/txMozillaStylesheetCompiler.cpp
+++ b/dom/xslt/xslt/txMozillaStylesheetCompiler.cpp
@@ -366,17 +366,17 @@ txStylesheetSink::GetInterface(const nsI
 
 class txCompileObserver final : public txACompileObserver
 {
 public:
     txCompileObserver(txMozillaXSLTProcessor* aProcessor,
                       nsIDocument* aLoaderDocument);
 
     TX_DECL_ACOMPILEOBSERVER
-    NS_INLINE_DECL_REFCOUNTING(txCompileObserver)
+    NS_INLINE_DECL_REFCOUNTING(txCompileObserver, override)
 
     nsresult startLoad(nsIURI* aUri, txStylesheetCompiler* aCompiler,
                        nsIPrincipal* aSourcePrincipal,
                        ReferrerPolicy aReferrerPolicy);
 
 private:
     RefPtr<txMozillaXSLTProcessor> mProcessor;
     nsCOMPtr<nsIDocument> mLoaderDocument;
@@ -583,17 +583,17 @@ handleNode(nsINode* aNode, txStylesheetC
 }
 
 class txSyncCompileObserver final : public txACompileObserver
 {
 public:
     explicit txSyncCompileObserver(txMozillaXSLTProcessor* aProcessor);
 
     TX_DECL_ACOMPILEOBSERVER
-    NS_INLINE_DECL_REFCOUNTING(txSyncCompileObserver)
+    NS_INLINE_DECL_REFCOUNTING(txSyncCompileObserver, override)
 
 private:
     // Private destructor, to discourage deletion outside of Release():
     ~txSyncCompileObserver()
     {
     }
 
     RefPtr<txMozillaXSLTProcessor> mProcessor;
--- a/dom/xslt/xslt/txMozillaXSLTProcessor.cpp
+++ b/dom/xslt/xslt/txMozillaXSLTProcessor.cpp
@@ -242,17 +242,17 @@ public:
     explicit txVariable(nsIVariant* aValue) : mValue(aValue)
     {
         NS_ASSERTION(aValue, "missing value");
     }
     explicit txVariable(txAExprResult* aValue) : mTxValue(aValue)
     {
         NS_ASSERTION(aValue, "missing value");
     }
-    nsresult getValue(txAExprResult** aValue)
+    nsresult getValue(txAExprResult** aValue) override
     {
         NS_ASSERTION(mValue || mTxValue, "variablevalue is null");
 
         if (!mTxValue) {
             nsresult rv = Convert(mValue, getter_AddRefs(mTxValue));
             NS_ENSURE_SUCCESS(rv, rv);
         }
 
@@ -423,68 +423,68 @@ public:
                        txResultRecycler* aRecycler)
         : mResolver(aResolver),
           mContext(aContext),
           mRecycler(aRecycler)
     {
     }
 
     // txIParseContext
-    nsresult resolveNamespacePrefix(nsAtom* aPrefix, int32_t& aID)
+    nsresult resolveNamespacePrefix(nsAtom* aPrefix, int32_t& aID) override
     {
         aID = mResolver->lookupNamespace(aPrefix);
         return aID == kNameSpaceID_Unknown ? NS_ERROR_DOM_NAMESPACE_ERR :
                                              NS_OK;
     }
     nsresult resolveFunctionCall(nsAtom* aName, int32_t aID,
-                                 FunctionCall** aFunction)
+                                 FunctionCall** aFunction) override
     {
         return NS_ERROR_XPATH_UNKNOWN_FUNCTION;
     }
-    bool caseInsensitiveNameTests()
+    bool caseInsensitiveNameTests() override
     {
         return false;
     }
-    void SetErrorOffset(uint32_t aOffset)
+    void SetErrorOffset(uint32_t aOffset) override
     {
     }
 
     // txIEvalContext
     nsresult getVariable(int32_t aNamespace, nsAtom* aLName,
-                         txAExprResult*& aResult)
+                         txAExprResult*& aResult) override
     {
         aResult = nullptr;
         return NS_ERROR_INVALID_ARG;
     }
-    nsresult isStripSpaceAllowed(const txXPathNode& aNode, bool& aAllowed)
+    nsresult isStripSpaceAllowed(const txXPathNode& aNode, bool& aAllowed) override
     {
         aAllowed = false;
 
         return NS_OK;
     }
-    void* getPrivateContext()
+    void* getPrivateContext() override
     {
         return nullptr;
     }
-    txResultRecycler* recycler()
+    txResultRecycler* recycler() override
     {
         return mRecycler;
     }
-    void receiveError(const nsAString& aMsg, nsresult aRes)
+    void receiveError(const nsAString& aMsg, nsresult aRes) override
     {
     }
-    const txXPathNode& getContextNode()
+    const txXPathNode& getContextNode() override
     {
       return mContext;
     }
-    uint32_t size()
+    uint32_t size() override
     {
       return 1;
     }
-    uint32_t position()
+    uint32_t position() override
     {
       return 1;
     }
 
 private:
     txNamespaceMap *mResolver;
     const txXPathNode& mContext;
     txResultRecycler* mRecycler;
--- a/dom/xslt/xslt/txStylesheetCompiler.h
+++ b/dom/xslt/xslt/txStylesheetCompiler.h
@@ -56,20 +56,20 @@ public:
                                  nsresult aResult,
                                  const char16_t *aErrorText = nullptr,
                                  const char16_t *aParam = nullptr) = 0;
 };
 
 #define TX_DECL_ACOMPILEOBSERVER \
   nsresult loadURI(const nsAString& aUri, const nsAString& aReferrerUri, \
                    mozilla::net::ReferrerPolicy aReferrerPolicy, \
-                   txStylesheetCompiler* aCompiler); \
+                   txStylesheetCompiler* aCompiler) override; \
   void onDoneCompiling(txStylesheetCompiler* aCompiler, nsresult aResult, \
                        const char16_t *aErrorText = nullptr, \
-                       const char16_t *aParam = nullptr);
+                       const char16_t *aParam = nullptr) override;
 
 class txStylesheetCompilerState : public txIParseContext
 {
 public:
     explicit txStylesheetCompilerState(txACompileObserver* aObserver);
     ~txStylesheetCompilerState();
 
     nsresult init(const nsAString& aStylesheetURI,
@@ -228,17 +228,17 @@ public:
     nsresult doneLoading();
 
     void cancel(nsresult aError, const char16_t *aErrorText = nullptr,
                 const char16_t *aParam = nullptr);
 
     txStylesheet* getStylesheet();
 
     TX_DECL_ACOMPILEOBSERVER
-    NS_INLINE_DECL_REFCOUNTING(txStylesheetCompiler)
+    NS_INLINE_DECL_REFCOUNTING(txStylesheetCompiler, override)
 
 private:
     // Private destructor, to discourage deletion outside of Release():
     ~txStylesheetCompiler()
     {
     }
 
     nsresult startElementInternal(int32_t aNamespaceID, nsAtom* aLocalName,
--- a/dom/xslt/xslt/txToplevelItems.h
+++ b/dom/xslt/xslt/txToplevelItems.h
@@ -36,17 +36,17 @@ public:
         stripSpace, //also used for preserve-space
         templ,
         variable
     };
 
     virtual type getType() = 0;
 };
 
-#define TX_DECL_TOPLEVELITEM virtual type getType();
+#define TX_DECL_TOPLEVELITEM virtual type getType() override;
 #define TX_IMPL_GETTYPE(_class, _type) \
 txToplevelItem::type \
 _class::getType() { return _type;}
 
 class txInstructionContainer : public txToplevelItem
 {
 public:
     nsAutoPtr<txInstruction> mFirstInstruction;
--- a/dom/xslt/xslt/txXMLEventHandler.h
+++ b/dom/xslt/xslt/txXMLEventHandler.h
@@ -115,50 +115,50 @@ public:
     virtual nsresult startElement(nsAtom* aPrefix,
                                   const nsAString& aLocalName,
                                   const int32_t aNsID) = 0;
 };
 
 #define TX_DECL_TXAXMLEVENTHANDLER                                           \
     virtual nsresult attribute(nsAtom* aPrefix, nsAtom* aLocalName,        \
                                nsAtom* aLowercaseLocalName, int32_t aNsID,  \
-                               const nsString& aValue);                      \
+                               const nsString& aValue) override;             \
     virtual nsresult attribute(nsAtom* aPrefix,                             \
                                const nsAString& aLocalName,                  \
                                const int32_t aNsID,                          \
-                               const nsString& aValue);                      \
-    virtual nsresult characters(const nsAString& aData, bool aDOE);          \
-    virtual nsresult comment(const nsString& aData);                         \
-    virtual nsresult endDocument(nsresult aResult = NS_OK);                  \
-    virtual nsresult endElement();                                           \
+                               const nsString& aValue) override;             \
+    virtual nsresult characters(const nsAString& aData, bool aDOE) override; \
+    virtual nsresult comment(const nsString& aData) override;                \
+    virtual nsresult endDocument(nsresult aResult = NS_OK) override;         \
+    virtual nsresult endElement() override;                                  \
     virtual nsresult processingInstruction(const nsString& aTarget,          \
-                                           const nsString& aData);           \
-    virtual nsresult startDocument();                                        \
+                                           const nsString& aData) override;  \
+    virtual nsresult startDocument() override;                               \
     virtual nsresult startElement(nsAtom* aPrefix,                          \
                                   nsAtom* aLocalName,                       \
                                   nsAtom* aLowercaseLocalName,              \
-                                  int32_t aNsID);                            \
+                                  int32_t aNsID) override;                   \
     virtual nsresult startElement(nsAtom* aPrefix,                          \
                                   const nsAString& aName,                    \
-                                  const int32_t aNsID);
+                                  const int32_t aNsID) override;
 
 
 class txAOutputXMLEventHandler : public txAXMLEventHandler
 {
 public:
     /**
      * Gets the Mozilla output document
      *
      * @param aDocument the Mozilla output document
      */
     virtual void getOutputDocument(nsIDOMDocument** aDocument) = 0;
 };
 
 #define TX_DECL_TXAOUTPUTXMLEVENTHANDLER                        \
-    virtual void getOutputDocument(nsIDOMDocument** aDocument);
+    virtual void getOutputDocument(nsIDOMDocument** aDocument) override;
 
 /**
  * Interface used to create the appropriate outputhandler
  */
 class txAOutputHandlerFactory
 {
 public:
     virtual ~txAOutputHandlerFactory() {}
@@ -184,15 +184,15 @@ public:
     createHandlerWith(txOutputFormat* aFormat,
                       const nsAString& aName,
                       int32_t aNsID,
                       txAXMLEventHandler** aHandler) = 0;
 };
 
 #define TX_DECL_TXAOUTPUTHANDLERFACTORY                        \
     nsresult createHandlerWith(txOutputFormat* aFormat,        \
-                               txAXMLEventHandler** aHandler); \
+                               txAXMLEventHandler** aHandler) override; \
     nsresult createHandlerWith(txOutputFormat* aFormat,        \
                                const nsAString& aName,         \
                                int32_t aNsID,                  \
-                               txAXMLEventHandler** aHandler);
+                               txAXMLEventHandler** aHandler) override;
 
 #endif
--- a/dom/xslt/xslt/txXSLTNumberCounters.cpp
+++ b/dom/xslt/xslt/txXSLTNumberCounters.cpp
@@ -11,43 +11,43 @@ class txDecimalCounter : public txFormat
 public:
     txDecimalCounter() : mMinLength(1), mGroupSize(50)
     {
     }
 
     txDecimalCounter(int32_t aMinLength, int32_t aGroupSize,
                      const nsAString& mGroupSeparator);
 
-    virtual void appendNumber(int32_t aNumber, nsAString& aDest);
+    virtual void appendNumber(int32_t aNumber, nsAString& aDest) override;
 
 private:
     int32_t mMinLength;
     int32_t mGroupSize;
     nsString mGroupSeparator;
 };
 
 class txAlphaCounter : public txFormattedCounter {
 public:
     explicit txAlphaCounter(char16_t aOffset) : mOffset(aOffset)
     {
     }
 
-    virtual void appendNumber(int32_t aNumber, nsAString& aDest);
+    virtual void appendNumber(int32_t aNumber, nsAString& aDest) override;
 
 private:
     char16_t mOffset;
 };
 
 class txRomanCounter : public txFormattedCounter {
 public:
     explicit txRomanCounter(bool aUpper) : mTableOffset(aUpper ? 30 : 0)
     {
     }
 
-    void appendNumber(int32_t aNumber, nsAString& aDest);
+    void appendNumber(int32_t aNumber, nsAString& aDest) override;
 
 private:
     int32_t mTableOffset;
 };
 
 
 nsresult
 txFormattedCounter::getCounterFor(const nsString& aToken,
--- a/dom/xul/nsXULElement.h
+++ b/dom/xul/nsXULElement.h
@@ -375,17 +375,17 @@ public:
     {
     }
 #endif
 
     virtual bool PerformAccesskey(bool aKeyCausesActivation,
                                   bool aIsTrustedEvent) override;
     void ClickWithInputSource(uint16_t aInputSource, bool aIsTrustedEvent);
 
-    nsIContent* GetBindingParent() const final
+    nsIContent* GetBindingParent() const final override
     {
       return mBindingParent;
     }
 
     virtual bool IsNodeOfType(uint32_t aFlags) const override;
     virtual bool IsFocusableInternal(int32_t* aTabIndex, bool aWithMouse) override;
 
     NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker) override;
--- a/editor/libeditor/EditorUtils.h
+++ b/editor/libeditor/EditorUtils.h
@@ -517,17 +517,17 @@ public:
 
   nsresult Init(nsRange& aRange);
 };
 
 class TrivialFunctor final : public BoolDomIterFunctor
 {
 public:
   // Used to build list of all nodes iterator covers
-  virtual bool operator()(nsINode* aNode) const
+  virtual bool operator()(nsINode* aNode) const override
   {
     return true;
   }
 };
 
 class EditorUtils final
 {
 public:
--- a/editor/libeditor/HTMLEditRules.cpp
+++ b/editor/libeditor/HTMLEditRules.cpp
@@ -128,40 +128,40 @@ ParagraphSeparatorElement(ParagraphSepar
       return *nsGkAtoms::br;
   }
 }
 
 class TableCellAndListItemFunctor final : public BoolDomIterFunctor
 {
 public:
   // Used to build list of all li's, td's & th's iterator covers
-  virtual bool operator()(nsINode* aNode) const
+  virtual bool operator()(nsINode* aNode) const override
   {
     return HTMLEditUtils::IsTableCell(aNode) ||
            HTMLEditUtils::IsListItem(aNode);
   }
 };
 
 class BRNodeFunctor final : public BoolDomIterFunctor
 {
 public:
-  virtual bool operator()(nsINode* aNode) const
+  virtual bool operator()(nsINode* aNode) const override
   {
     return aNode->IsHTMLElement(nsGkAtoms::br);
   }
 };
 
 class EmptyEditableFunctor final : public BoolDomIterFunctor
 {
 public:
   explicit EmptyEditableFunctor(HTMLEditor* aHTMLEditor)
     : mHTMLEditor(aHTMLEditor)
   {}
 
-  virtual bool operator()(nsINode* aNode) const
+  virtual bool operator()(nsINode* aNode) const override
   {
     if (mHTMLEditor->IsEditable(aNode) &&
         (HTMLEditUtils::IsListItem(aNode) ||
          HTMLEditUtils::IsTableCellOrCaption(*aNode))) {
       bool bIsEmptyNode;
       nsresult rv =
         mHTMLEditor->IsEmptyNode(aNode, &bIsEmptyNode, false, false);
       NS_ENSURE_SUCCESS(rv, false);
@@ -6111,17 +6111,17 @@ class UniqueFunctor final : public BoolD
 {
 public:
   explicit UniqueFunctor(nsTArray<OwningNonNull<nsINode>>& aArray)
     : mArray(aArray)
   {
   }
 
   // Used to build list of all nodes iterator covers.
-  virtual bool operator()(nsINode* aNode) const
+  virtual bool operator()(nsINode* aNode) const override
   {
     return !mArray.Contains(aNode);
   }
 
 private:
   nsTArray<OwningNonNull<nsINode>>& mArray;
 };
 
--- a/editor/txmgr/nsTransactionStack.cpp
+++ b/editor/txmgr/nsTransactionStack.cpp
@@ -6,17 +6,17 @@
 #include "nsCOMPtr.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsISupportsUtils.h"
 #include "nsTransactionItem.h"
 #include "nsTransactionStack.h"
 #include "nscore.h"
 
 class nsTransactionStackDeallocator : public nsDequeFunctor {
-  virtual void operator()(void* aObject)
+  virtual void operator()(void* aObject) override
   {
     RefPtr<nsTransactionItem> releaseMe = dont_AddRef(static_cast<nsTransactionItem*>(aObject));
   }
 };
 
 nsTransactionStack::nsTransactionStack(Type aType)
   : nsDeque(new nsTransactionStackDeallocator())
   , mType(aType)
--- a/extensions/cookie/nsPermissionManager.cpp
+++ b/extensions/cookie/nsPermissionManager.cpp
@@ -369,17 +369,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
+         int64_t aModificationTime) final override
   {
     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);
@@ -419,17 +419,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
+         int64_t aModificationTime) final override
   {
     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);
@@ -454,17 +454,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
+         int64_t aModificationTime) final override
   {
     // 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/extensions/universalchardet/src/base/CharDistribution.h
+++ b/extensions/universalchardet/src/base/CharDistribution.h
@@ -89,71 +89,75 @@ class EUCTWDistributionAnalysis: public 
 public:
   EUCTWDistributionAnalysis();
 protected:
 
   //for euc-TW encoding, we are interested
   //  first  byte range: 0xc4 -- 0xfe
   //  second byte range: 0xa1 -- 0xfe
   //no validation needed here. State machine has done that
-  int32_t GetOrder(const char* str)
-  { if ((unsigned char)*str >= (unsigned char)0xc4)
+  int32_t GetOrder(const char* str) override
+  {
+    if ((unsigned char)*str >= (unsigned char)0xc4)
       return 94*((unsigned char)str[0]-(unsigned char)0xc4) + (unsigned char)str[1] - (unsigned char)0xa1;
     else
       return -1;
   }
 };
 
 
 class EUCKRDistributionAnalysis : public CharDistributionAnalysis
 {
 public:
   EUCKRDistributionAnalysis();
 protected:
   //for euc-KR encoding, we are interested
   //  first  byte range: 0xb0 -- 0xfe
   //  second byte range: 0xa1 -- 0xfe
   //no validation needed here. State machine has done that
-  int32_t GetOrder(const char* str)
-  { if ((unsigned char)*str >= (unsigned char)0xb0)
+  int32_t GetOrder(const char* str) override
+  {
+    if ((unsigned char)*str >= (unsigned char)0xb0)
       return 94*((unsigned char)str[0]-(unsigned char)0xb0) + (unsigned char)str[1] - (unsigned char)0xa1;
     else
       return -1;
   }
 };
 
 class GB2312DistributionAnalysis : public CharDistributionAnalysis
 {
 public:
   GB2312DistributionAnalysis();
 protected:
   //for GB2312 encoding, we are interested
   //  first  byte range: 0xb0 -- 0xfe
   //  second byte range: 0xa1 -- 0xfe
   //no validation needed here. State machine has done that
-  int32_t GetOrder(const char* str)
-  { if ((unsigned char)*str >= (unsigned char)0xb0 && (unsigned char)str[1] >= (unsigned char)0xa1)
+  int32_t GetOrder(const char* str) override
+  {
+    if ((unsigned char)*str >= (unsigned char)0xb0 && (unsigned char)str[1] >= (unsigned char)0xa1)
       return 94*((unsigned char)str[0]-(unsigned char)0xb0) + (unsigned char)str[1] - (unsigned char)0xa1;
     else
       return -1;
   }
 };
 
 
 class Big5DistributionAnalysis : public CharDistributionAnalysis
 {
 public:
   Big5DistributionAnalysis();
 protected:
   //for big5 encoding, we are interested
   //  first  byte range: 0xa4 -- 0xfe
   //  second byte range: 0x40 -- 0x7e , 0xa1 -- 0xfe
   //no validation needed here. State machine has done that
-  int32_t GetOrder(const char* str)
-  { if ((unsigned char)*str >= (unsigned char)0xa4)
+  int32_t GetOrder(const char* str) override
+  {
+    if ((unsigned char)*str >= (unsigned char)0xa4)
       if ((unsigned char)str[1] >= (unsigned char)0xa1)
         return 157*((unsigned char)str[0]-(unsigned char)0xa4) + (unsigned char)str[1] - (unsigned char)0xa1 +63;
       else
         return 157*((unsigned char)str[0]-(unsigned char)0xa4) + (unsigned char)str[1] - (unsigned char)0x40;
     else
       return -1;
   }
 };
@@ -162,17 +166,17 @@ class SJISDistributionAnalysis : public 
 {
 public:
   SJISDistributionAnalysis();
 protected:
   //for sjis encoding, we are interested
   //  first  byte range: 0x81 -- 0x9f , 0xe0 -- 0xfe
   //  second byte range: 0x40 -- 0x7e,  0x81 -- oxfe
   //no validation needed here. State machine has done that
-  int32_t GetOrder(const char* str)
+  int32_t GetOrder(const char* str) override
   {
     int32_t order;
     if ((unsigned char)*str >= (unsigned char)0x81 && (unsigned char)*str <= (unsigned char)0x9f)
       order = 188 * ((unsigned char)str[0]-(unsigned char)0x81);
     else if ((unsigned char)*str >= (unsigned char)0xe0 && (unsigned char)*str <= (unsigned char)0xef)
       order = 188 * ((unsigned char)str[0]-(unsigned char)0xe0 + 31);
     else
       return -1;
@@ -187,18 +191,18 @@ class EUCJPDistributionAnalysis : public
 {
 public:
   EUCJPDistributionAnalysis();
 protected:
   //for euc-JP encoding, we are interested
   //  first  byte range: 0xa0 -- 0xfe
   //  second byte range: 0xa1 -- 0xfe
   //no validation needed here. State machine has done that
-  int32_t GetOrder(const char* str)
-  { if ((unsigned char)*str >= (unsigned char)0xa0)
+  int32_t GetOrder(const char* str) override
+  {
+    if ((unsigned char)*str >= (unsigned char)0xa0)
       return 94*((unsigned char)str[0]-(unsigned char)0xa1) + (unsigned char)str[1] - (unsigned char)0xa1;
     else
       return -1;
   }
 };
 
 #endif //CharDistribution_h__
-
--- a/extensions/universalchardet/src/base/JpCntx.h
+++ b/extensions/universalchardet/src/base/JpCntx.h
@@ -70,34 +70,34 @@ protected:
   bool     mDone;
 };
 
 
 class SJISContextAnalysis : public JapaneseContextAnalysis
 {
   //SJISContextAnalysis(){};
 protected:
-  int32_t GetOrder(const char* str, uint32_t *charLen);
+  int32_t GetOrder(const char* str, uint32_t *charLen) override;
 
-  int32_t GetOrder(const char* str)
+  int32_t GetOrder(const char* str) override
   {
     //We only interested in Hiragana, so first byte is '\202'
     if (*str == '\202' &&
           (unsigned char)*(str+1) >= (unsigned char)0x9f &&
           (unsigned char)*(str+1) <= (unsigned char)0xf1)
       return (unsigned char)*(str+1) - (unsigned char)0x9f;
     return -1;
   }
 };
 
 class EUCJPContextAnalysis : public JapaneseContextAnalysis
 {
 protected:
-  int32_t GetOrder(const char* str, uint32_t *charLen);
-  int32_t GetOrder(const char* str)
+  int32_t GetOrder(const char* str, uint32_t *charLen) override;
+  int32_t GetOrder(const char* str) override
     //We only interested in Hiragana, so first byte is '\244'
   {
     if (*str == '\244' &&
           (unsigned char)*(str+1) >= (unsigned char)0xa1 &&
           (unsigned char)*(str+1) <= (unsigned char)0xf3)
       return (unsigned char)*(str+1) - (unsigned char)0xa1;
     return -1;
   }
--- a/extensions/universalchardet/src/base/nsEUCJPProber.h
+++ b/extensions/universalchardet/src/base/nsEUCJPProber.h
@@ -17,27 +17,26 @@
 #include "CharDistribution.h"
 
 class nsEUCJPProber: public nsCharSetProber {
 public:
   nsEUCJPProber()
   {mCodingSM = new nsCodingStateMachine(&EUCJPSMModel);
     Reset();}
   virtual ~nsEUCJPProber(void){delete mCodingSM;}
-  nsProbingState HandleData(const char* aBuf, uint32_t aLen);
-  const char* GetCharSetName() {return "EUC-JP";}
-  nsProbingState GetState(void) {return mState;}
-  void      Reset(void);
-  float     GetConfidence(void);
+  nsProbingState HandleData(const char* aBuf, uint32_t aLen) override;
+  const char* GetCharSetName() override {return "EUC-JP";}
+  nsProbingState GetState(void) override {return mState;}
+  void      Reset(void) override;
+  float     GetConfidence(void) override;
 
 protected:
   nsCodingStateMachine* mCodingSM;
   nsProbingState mState;
 
   EUCJPContextAnalysis mContextAnalyser;
   EUCJPDistributionAnalysis mDistributionAnalyser;
 
   char mLastChar[2];
 };
 
-
 #endif /* nsEUCJPProber_h__ */
 
--- a/extensions/universalchardet/src/base/nsEscCharsetProber.h
+++ b/extensions/universalchardet/src/base/nsEscCharsetProber.h
@@ -9,21 +9,21 @@
 #include "nsCharSetProber.h"
 #include "nsCodingStateMachine.h"
 #include "nsAutoPtr.h"
 
 class nsEscCharSetProber: public nsCharSetProber {
 public:
   nsEscCharSetProber();
   virtual ~nsEscCharSetProber(void);
-  nsProbingState HandleData(const char* aBuf, uint32_t aLen);
-  const char* GetCharSetName() {return mDetectedCharset;}
-  nsProbingState GetState(void) {return mState;}
-  void      Reset(void);
-  float     GetConfidence(void){return (float)0.99;}
+  nsProbingState HandleData(const char* aBuf, uint32_t aLen) override;
+  const char* GetCharSetName() override {return mDetectedCharset;}
+  nsProbingState GetState(void) override {return mState;}
+  void      Reset(void) override;
+  float     GetConfidence(void) override {return (float)0.99;}
 
 protected:
   void      GetDistribution(uint32_t aCharLen, const char* aStr);
 
   nsAutoPtr<nsCodingStateMachine> mCodingSM;
   nsProbingState mState;
   const char *  mDetectedCharset;
 };
--- a/extensions/universalchardet/src/base/nsLatin1Prober.h
+++ b/extensions/universalchardet/src/base/nsLatin1Prober.h
@@ -9,28 +9,27 @@
 #include "nsCharSetProber.h"
 
 #define FREQ_CAT_NUM    4
 
 class nsLatin1Prober: public nsCharSetProber {
 public:
   nsLatin1Prober(void){Reset();}
   virtual ~nsLatin1Prober(void){}
-  nsProbingState HandleData(const char* aBuf, uint32_t aLen);
-  const char* GetCharSetName() {return "windows-1252";}
-  nsProbingState GetState(void) {return mState;}
-  void      Reset(void);
-  float     GetConfidence(void);
+  nsProbingState HandleData(const char* aBuf, uint32_t aLen) override;
+  const char* GetCharSetName() override {return "windows-1252";}
+  nsProbingState GetState(void) override {return mState;}
+  void      Reset(void) override;
+  float     GetConfidence(void) override;
 
 #ifdef DEBUG_chardet
   virtual void  DumpStatus();
 #endif
 
 protected:
 
   nsProbingState mState;
   char mLastCharClass;
   uint32_t mFreqCounter[FREQ_CAT_NUM];
 };
 
-
 #endif /* nsLatin1Prober_h__ */
 
--- a/extensions/universalchardet/src/base/nsMBCSGroupProber.h
+++ b/extensions/universalchardet/src/base/nsMBCSGroupProber.h
@@ -11,21 +11,21 @@
 #include "nsEUCJPProber.h"
 
 #define NUM_OF_PROBERS    3
 
 class nsMBCSGroupProber: public nsCharSetProber {
 public:
   nsMBCSGroupProber();
   virtual ~nsMBCSGroupProber();
-  nsProbingState HandleData(const char* aBuf, uint32_t aLen);
-  const char* GetCharSetName();
-  nsProbingState GetState(void) {return mState;}
-  void      Reset(void);
-  float     GetConfidence(void);
+  nsProbingState HandleData(const char* aBuf, uint32_t aLen) override;
+  const char* GetCharSetName() override;
+  nsProbingState GetState(void) override {return mState;}
+  void      Reset(void) override;
+  float     GetConfidence(void) override;
 
 #ifdef DEBUG_chardet
   void  DumpStatus();
 #endif
 #ifdef DEBUG_jgmyers
   void GetDetectorState(nsUniversalDetector::DetectorState (&states)[nsUniversalDetector::NumDetectors], uint32_t &offset);
 #endif
 
@@ -34,9 +34,8 @@ protected:
   nsCharSetProber* mProbers[NUM_OF_PROBERS];
   bool            mIsActive[NUM_OF_PROBERS];
   int32_t mBestGuess;
   uint32_t mActiveNum;
   uint32_t mKeepNext;
 };
 
 #endif /* nsMBCSGroupProber_h__ */
-
--- a/extensions/universalchardet/src/base/nsSJISProber.h
+++ b/extensions/universalchardet/src/base/nsSJISProber.h
@@ -18,27 +18,25 @@
 
 
 class nsSJISProber: public nsCharSetProber {
 public:
   nsSJISProber()
   {mCodingSM = new nsCodingStateMachine(&SJISSMModel);
     Reset();}
   virtual ~nsSJISProber(void){delete mCodingSM;}
-  nsProbingState HandleData(const char* aBuf, uint32_t aLen);
-  const char* GetCharSetName() {return "Shift_JIS";}
-  nsProbingState GetState(void) {return mState;}
-  void      Reset(void);
-  float     GetConfidence(void);
+  nsProbingState HandleData(const char* aBuf, uint32_t aLen) override;
+  const char* GetCharSetName() override {return "Shift_JIS";}
+  nsProbingState GetState(void) override {return mState;}
+  void      Reset(void) override;
+  float     GetConfidence(void) override;
 
 protected:
   nsCodingStateMachine* mCodingSM;
   nsProbingState mState;
 
   SJISContextAnalysis mContextAnalyser;
   SJISDistributionAnalysis mDistributionAnalyser;
 
   char mLastChar[2];
 };
 
-
 #endif /* nsSJISProber_h__ */
-
--- a/extensions/universalchardet/src/base/nsUTF8Prober.h
+++ b/extensions/universalchardet/src/base/nsUTF8Prober.h
@@ -10,22 +10,21 @@
 #include "nsCodingStateMachine.h"
 
 class nsUTF8Prober: public nsCharSetProber {
 public:
   nsUTF8Prober(){mNumOfMBChar = 0;
                 mCodingSM = new nsCodingStateMachine(&UTF8SMModel);
                 Reset(); }
   virtual ~nsUTF8Prober(){delete mCodingSM;}
-  nsProbingState HandleData(const char* aBuf, uint32_t aLen);
-  const char* GetCharSetName() {return "UTF-8";}
-  nsProbingState GetState(void) {return mState;}
-  void      Reset(void);
-  float     GetConfidence(void);
+  nsProbingState HandleData(const char* aBuf, uint32_t aLen) override;
+  const char* GetCharSetName() override {return "UTF-8";}
+  nsProbingState GetState(void) override {return mState;}
+  void      Reset(void) override;
+  float     GetConfidence(void) override;
 
 protected:
   nsCodingStateMachine* mCodingSM;
   nsProbingState mState;
   uint32_t mNumOfMBChar;
 };
 
 #endif /* nsUTF8Prober_h__ */
-
--- a/gfx/2d/2D.h
+++ b/gfx/2d/2D.h
@@ -690,17 +690,17 @@ protected:
 };
 
 /** The PathBuilder class allows path creation. Once finish is called on the
  * pathbuilder it may no longer be written to.
  */
 class PathBuilder : public PathSink
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathBuilder)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathBuilder, override)
   /** Finish writing to the path and return a Path object that can be used for
    * drawing. Future use of the builder results in a crash!
    */
   virtual already_AddRefed<Path> Finish() = 0;
 
   virtual BackendType GetBackendType() const = 0;
 };
 
@@ -1429,17 +1429,17 @@ protected:
   bool mPermitSubpixelAA : 1;
 
   SurfaceFormat mFormat;
 };
 
 class DrawTargetCapture : public DrawTarget
 {
 public:
-  virtual bool IsCaptureDT() const { return true; }
+  virtual bool IsCaptureDT() const override { return true; }
 
   /**
    * Returns true if the recording only contains FillGlyph calls with
    * a single font and color. Returns the list of Glyphs along with
    * the font and color as outparams if so.
    */
   virtual bool ContainsOnlyColoredGlyphs(RefPtr<ScaledFont>& aScaledFont,
                                          Color& aColor,
--- a/gfx/2d/DrawCommand.h
+++ b/gfx/2d/DrawCommand.h
@@ -167,21 +167,22 @@ public:
                      const DrawOptions& aOptions)
     : DrawingCommand(CommandType::DRAWSURFACE)
     , mSurface(aSurface), mDest(aDest)
     , mSource(aSource), mSurfOptions(aSurfOptions)
     , mOptions(aOptions)
   {
   }
 
-  void CloneInto(CaptureCommandList* aList) {
+  void CloneInto(CaptureCommandList* aList) override
+  {
     CLONE_INTO(DrawSurfaceCommand)(mSurface, mDest, mSource, mSurfOptions, mOptions);
   }
 
-  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
   {
     aDT->DrawSurface(mSurface, mDest, mSource, mSurfOptions, mOptions);
   }
 
   static const bool AffectsSnapshot = true;
 
 private:
   RefPtr<SourceSurface> mSurface;
@@ -205,21 +206,22 @@ public:
       mDest(aDest),
       mColor(aColor),
       mOffset(aOffset),
       mSigma(aSigma),
       mOperator(aOperator)
   {
   }
 
-  void CloneInto(CaptureCommandList* aList) {
+  void CloneInto(CaptureCommandList* aList) override
+  {
     CLONE_INTO(DrawSurfaceWithShadowCommand)(mSurface, mDest, mColor, mOffset, mSigma, mOperator);
   }
 
-  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
   {
     aDT->DrawSurfaceWithShadow(mSurface, mDest, mColor, mOffset, mSigma, mOperator);
   }
 
   static const bool AffectsSnapshot = true;
 
 private:
   RefPtr<SourceSurface> mSurface;
@@ -236,21 +238,22 @@ public:
   DrawFilterCommand(FilterNode* aFilter, const Rect& aSourceRect,
                     const Point& aDestPoint, const DrawOptions& aOptions)
     : DrawingCommand(CommandType::DRAWSURFACE)
     , mFilter(aFilter), mSourceRect(aSourceRect)
     , mDestPoint(aDestPoint), mOptions(aOptions)
   {
   }
 
-  void CloneInto(CaptureCommandList* aList) {
+  void CloneInto(CaptureCommandList* aList) override
+  {
     CLONE_INTO(DrawFilterCommand)(mFilter, mSourceRect, mDestPoint, mOptions);
   }
 
-  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
   {
     RefPtr<FilterNode> filter = mFilter;
     if (mFilter->GetBackendType() == FilterBackend::FILTER_BACKEND_CAPTURE) {
       filter = static_cast<FilterNodeCapture*>(filter.get())->Validate(aDT);
     }
     aDT->DrawFilter(filter, mSourceRect, mDestPoint, mOptions);
   }
 
@@ -267,21 +270,22 @@ class ClearRectCommand : public DrawingC
 {
 public:
   explicit ClearRectCommand(const Rect& aRect)
     : DrawingCommand(CommandType::CLEARRECT)
     , mRect(aRect)
   {
   }
 
-  void CloneInto(CaptureCommandList* aList) {
+  void CloneInto(CaptureCommandList* aList) override
+  {
     CLONE_INTO(ClearRectCommand)(mRect);
   }
 
-  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
   {
     aDT->ClearRect(mRect);
   }
 
   static const bool AffectsSnapshot = true;
 
 private:
   Rect mRect;
@@ -295,21 +299,22 @@ public:
                      const IntPoint& aDestination)
     : DrawingCommand(CommandType::COPYSURFACE)
     , mSurface(aSurface)
     , mSourceRect(aSourceRect)
     , mDestination(aDestination)
   {
   }
 
-  void CloneInto(CaptureCommandList* aList) {
+  void CloneInto(CaptureCommandList* aList) override
+  {
     CLONE_INTO(CopySurfaceCommand)(mSurface, mSourceRect, mDestination);
   }
 
-  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix* aTransform) const
+  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix* aTransform) const override
   {
     MOZ_ASSERT(!aTransform || !aTransform->HasNonIntegerTranslation());
     Point dest(Float(mDestination.x), Float(mDestination.y));
     if (aTransform) {
       dest = aTransform->TransformPoint(dest);
     }
     aDT->CopySurface(mSurface, mSourceRect, IntPoint(uint32_t(dest.x), uint32_t(dest.y)));
   }
@@ -330,26 +335,27 @@ public:
                   const DrawOptions& aOptions)
     : DrawingCommand(CommandType::FILLRECT)
     , mRect(aRect)
     , mPattern(aPattern)
     , mOptions(aOptions)
   {
   }
 
-  void CloneInto(CaptureCommandList* aList) {
+  void CloneInto(CaptureCommandList* aList) override
+  {
     CLONE_INTO(FillRectCommand)(mRect, mPattern, mOptions);
   }
 
-  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
   {
     aDT->FillRect(mRect, mPattern, mOptions);
   }
 
-  bool GetAffectedRect(Rect& aDeviceRect, const Matrix& aTransform) const
+  bool GetAffectedRect(Rect& aDeviceRect, const Matrix& aTransform) const override
   {
     aDeviceRect = aTransform.TransformBounds(mRect);
     return true;
   }
 
   static const bool AffectsSnapshot = true;
 
 private:
@@ -367,21 +373,22 @@ public:
                     const DrawOptions& aOptions)
     : StrokeOptionsCommand(CommandType::STROKERECT, aStrokeOptions)
     , mRect(aRect)
     , mPattern(aPattern)
     , mOptions(aOptions)
   {
   }
 
-  void CloneInto(CaptureCommandList* aList) {
+  void CloneInto(CaptureCommandList* aList) override
+  {
     CLONE_INTO(StrokeRectCommand)(mRect, mPattern, mStrokeOptions, mOptions);
   }
 
-  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
   {
     aDT->StrokeRect(mRect, mPattern, mStrokeOptions, mOptions);
   }
 
   static const bool AffectsSnapshot = true;
 
 private:
   Rect mRect;
@@ -400,21 +407,22 @@ public:
     : StrokeOptionsCommand(CommandType::STROKELINE, aStrokeOptions)
     , mStart(aStart)
     , mEnd(aEnd)
     , mPattern(aPattern)
     , mOptions(aOptions)
   {
   }
 
-  void CloneInto(CaptureCommandList* aList) {
+  void CloneInto(CaptureCommandList* aList) override
+  {
     CLONE_INTO(StrokeLineCommand)(mStart, mEnd, mPattern, mStrokeOptions, mOptions);
   }
 
-  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
   {
     aDT->StrokeLine(mStart, mEnd, mPattern, mStrokeOptions, mOptions);
   }
 
   static const bool AffectsSnapshot = true;
 
 private:
   Point mStart;
@@ -431,26 +439,27 @@ public:
               const DrawOptions& aOptions)
     : DrawingCommand(CommandType::FILL)
     , mPath(const_cast<Path*>(aPath))
     , mPattern(aPattern)
     , mOptions(aOptions)
   {
   }
 
-  void CloneInto(CaptureCommandList* aList) {
+  void CloneInto(CaptureCommandList* aList) override
+  {
     CLONE_INTO(FillCommand)(mPath, mPattern, mOptions);
   }
 
-  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
   {
     aDT->Fill(mPath, mPattern, mOptions);
   }
 
-  bool GetAffectedRect(Rect& aDeviceRect, const Matrix& aTransform) const
+  bool GetAffectedRect(Rect& aDeviceRect, const Matrix& aTransform) const override
   {
     aDeviceRect = mPath->GetBounds(aTransform);
     return true;
   }
 
   static const bool AffectsSnapshot = true;
 
 private:
@@ -509,26 +518,27 @@ public:
                 const DrawOptions& aOptions)
     : StrokeOptionsCommand(CommandType::STROKE, aStrokeOptions)
     , mPath(const_cast<Path*>(aPath))
     , mPattern(aPattern)
     , mOptions(aOptions)
   {
   }
 
-  void CloneInto(CaptureCommandList* aList) {
+  void CloneInto(CaptureCommandList* aList) override
+  {
     CLONE_INTO(StrokeCommand)(mPath, mPattern, mStrokeOptions, mOptions);
   }
 
-  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
   {
     aDT->Stroke(mPath, mPattern, mStrokeOptions, mOptions);
   }
 
-  bool GetAffectedRect(Rect& aDeviceRect, const Matrix& aTransform) const
+  bool GetAffectedRect(Rect& aDeviceRect, const Matrix& aTransform) const override
   {
     aDeviceRect = PathExtentsToMaxStrokeExtents(mStrokeOptions, mPath->GetBounds(aTransform), aTransform);
     return true;
   }
 
   static const bool AffectsSnapshot = true;
 
 private:
@@ -549,25 +559,26 @@ public:
     , mFont(aFont)
     , mPattern(aPattern)
     , mOptions(aOptions)
   {
     mGlyphs.resize(aBuffer.mNumGlyphs);
     memcpy(&mGlyphs.front(), aBuffer.mGlyphs, sizeof(Glyph) * aBuffer.mNumGlyphs);
   }
 
-  void CloneInto(CaptureCommandList* aList) {
+  void CloneInto(CaptureCommandList* aList) override
+  {
     GlyphBuffer glyphs = {
       mGlyphs.data(),
       (uint32_t)mGlyphs.size(),
     };
     CLONE_INTO(FillGlyphsCommand)(mFont, glyphs, mPattern, mOptions);
   }
 
-  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
   {
     GlyphBuffer buf;
     buf.mNumGlyphs = mGlyphs.size();
     buf.mGlyphs = &mGlyphs.front();
     aDT->FillGlyphs(mFont, buf, mPattern, mOptions);
   }
 
   static const bool AffectsSnapshot = true;
@@ -592,25 +603,26 @@ public:
     , mFont(aFont)
     , mPattern(aPattern)
     , mOptions(aOptions)
   {
     mGlyphs.resize(aBuffer.mNumGlyphs);
     memcpy(&mGlyphs.front(), aBuffer.mGlyphs, sizeof(Glyph) * aBuffer.mNumGlyphs);
   }
 
-  void CloneInto(CaptureCommandList* aList) {
+  void CloneInto(CaptureCommandList* aList) override
+  {
     GlyphBuffer glyphs = {
       mGlyphs.data(),
       (uint32_t)mGlyphs.size(),
     };
     CLONE_INTO(StrokeGlyphsCommand)(mFont, glyphs, mPattern, mStrokeOptions, mOptions);
   }
 
-  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
   {
     GlyphBuffer buf;
     buf.mNumGlyphs = mGlyphs.size();
     buf.mGlyphs = &mGlyphs.front();
     aDT->StrokeGlyphs(mFont, buf, mPattern, mStrokeOptions, mOptions);
   }
 
   static const bool AffectsSnapshot = true;
@@ -630,21 +642,22 @@ public:
               const DrawOptions& aOptions)
     : DrawingCommand(CommandType::MASK)
     , mSource(aSource)
     , mMask(aMask)
     , mOptions(aOptions)
   {
   }
 
-  void CloneInto(CaptureCommandList* aList) {
+  void CloneInto(CaptureCommandList* aList) override
+  {
     CLONE_INTO(MaskCommand)(mSource, mMask, mOptions);
   }
 
-  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
   {
     aDT->Mask(mSource, mMask, mOptions);
   }
 
   static const bool AffectsSnapshot = true;
 
 private:
   StoredPattern mSource;
@@ -662,21 +675,22 @@ public:
     : DrawingCommand(CommandType::MASKSURFACE)
     , mSource(aSource)
     , mMask(const_cast<SourceSurface*>(aMask))
     , mOffset(aOffset)
     , mOptions(aOptions)
   {
   }
 
-  void CloneInto(CaptureCommandList* aList) {
+  void CloneInto(CaptureCommandList* aList) override
+  {
     CLONE_INTO(MaskSurfaceCommand)(mSource, mMask, mOffset, mOptions);
   }
 
-  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
   {
     aDT->MaskSurface(mSource, mMask, mOffset, mOptions);
   }
 
   static const bool AffectsSnapshot = true;
 
 private:
   StoredPattern mSource;
@@ -689,21 +703,22 @@ class PushClipCommand : public DrawingCo
 {
 public:
   explicit PushClipCommand(const Path* aPath)
     : DrawingCommand(CommandType::PUSHCLIP)
     , mPath(const_cast<Path*>(aPath))
   {
   }
 
-  void CloneInto(CaptureCommandList* aList) {
+  void CloneInto(CaptureCommandList* aList) override
+  {
     CLONE_INTO(PushClipCommand)(mPath);
   }
 
-  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
   {
     aDT->PushClip(mPath);
   }
 
   static const bool AffectsSnapshot = false;
 
 private:
   RefPtr<Path> mPath;
@@ -713,21 +728,22 @@ class PushClipRectCommand : public Drawi
 {
 public:
   explicit PushClipRectCommand(const Rect& aRect)
     : DrawingCommand(CommandType::PUSHCLIPRECT)
     , mRect(aRect)
   {
   }
 
-  void CloneInto(CaptureCommandList* aList) {
+  void CloneInto(CaptureCommandList* aList) override
+  {
     CLONE_INTO(PushClipRectCommand)(mRect);
   }
 
-  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
   {
     aDT->PushClipRect(mRect);
   }
 
   static const bool AffectsSnapshot = false;
 
 private:
   Rect mRect;
@@ -747,21 +763,22 @@ public:
     , mOpacity(aOpacity)
     , mMask(aMask)
     , mMaskTransform(aMaskTransform)
     , mBounds(aBounds)
     , mCopyBackground(aCopyBackground)
   {
   }
 
-  void CloneInto(CaptureCommandList* aList) {
+  void CloneInto(CaptureCommandList* aList) override
+  {
     CLONE_INTO(PushLayerCommand)(mOpaque, mOpacity, mMask, mMaskTransform, mBounds, mCopyBackground);
   }
 
-  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
   {
     aDT->PushLayer(mOpaque, mOpacity, mMask,
                    mMaskTransform, mBounds, mCopyBackground);
   }
 
   static const bool AffectsSnapshot = false;
 
 private:
@@ -776,41 +793,43 @@ private:
 class PopClipCommand : public DrawingCommand
 {
 public:
   PopClipCommand()
     : DrawingCommand(CommandType::POPCLIP)
   {
   }
 
-  void CloneInto(CaptureCommandList* aList) {
+  void CloneInto(CaptureCommandList* aList) override
+  {
     CLONE_INTO(PopClipCommand)();
   }
 
-  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
   {
     aDT->PopClip();
   }
 
   static const bool AffectsSnapshot = false;
 };
 
 class PopLayerCommand : public DrawingCommand
 {
 public:
   PopLayerCommand()
     : DrawingCommand(CommandType::POPLAYER)
   {
   }
 
-  void CloneInto(CaptureCommandList* aList) {
+  void CloneInto(CaptureCommandList* aList) override
+  {
     CLONE_INTO(PopLayerCommand)();
   }
 
-  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
   {
     aDT->PopLayer();
   }
 
   static const bool AffectsSnapshot = true;
 };
 
 class SetTransformCommand : public DrawingCommand
@@ -818,21 +837,22 @@ class SetTransformCommand : public Drawi
   friend class DrawTargetCaptureImpl;
 public:
   explicit SetTransformCommand(const Matrix& aTransform)
     : DrawingCommand(CommandType::SETTRANSFORM)
     , mTransform(aTransform)
   {
   }
 
-  void CloneInto(CaptureCommandList* aList) {
+  void CloneInto(CaptureCommandList* aList) override
+  {
     CLONE_INTO(SetTransformCommand)(mTransform);
   }
 
-  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix* aMatrix) const
+  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix* aMatrix) const override
   {
     if (aMatrix) {
       aDT->SetTransform(mTransform * (*aMatrix));
     } else {
       aDT->SetTransform(mTransform);
     }
   }
 
@@ -847,21 +867,22 @@ class SetPermitSubpixelAACommand : publi
   friend class DrawTargetCaptureImpl;
 public:
   explicit SetPermitSubpixelAACommand(bool aPermitSubpixelAA)
     : DrawingCommand(CommandType::SETPERMITSUBPIXELAA)
     , mPermitSubpixelAA(aPermitSubpixelAA)
   {
   }
 
-  void CloneInto(CaptureCommandList* aList) {
+  void CloneInto(CaptureCommandList* aList) override
+  {
     CLONE_INTO(SetPermitSubpixelAACommand)(mPermitSubpixelAA);
   }
 
-  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix* aMatrix) const
+  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix* aMatrix) const override
   {
     aDT->SetPermitSubpixelAA(mPermitSubpixelAA);
   }
 
   static const bool AffectsSnapshot = false;
 
 private:
   bool mPermitSubpixelAA;
@@ -870,41 +891,44 @@ private:
 class FlushCommand : public DrawingCommand
 {
 public:
   explicit FlushCommand()
     : DrawingCommand(CommandType::FLUSH)
   {
   }
 
-  void CloneInto(CaptureCommandList* aList) {
+  void CloneInto(CaptureCommandList* aList) override
+  {
     CLONE_INTO(FlushCommand)();
   }
 
-  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
   {
     aDT->Flush();
   }
 
   static const bool AffectsSnapshot = false;
 };
 
 class BlurCommand : public DrawingCommand
 {
 public:
   explicit BlurCommand(const AlphaBoxBlur& aBlur)
    : DrawingCommand(CommandType::BLUR)
    , mBlur(aBlur)
   {}
 
-  void CloneInto(CaptureCommandList* aList) {
+  void CloneInto(CaptureCommandList* aList) override
+  {
     CLONE_INTO(BlurCommand)(mBlur);
   }
 
-  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const {
+  virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
+  {
     aDT->Blur(mBlur);
   }
 
   static const bool AffectsSnapshot = true;
 
 private:
   AlphaBoxBlur mBlur;
 };
--- a/gfx/2d/DrawEventRecorder.h
+++ b/gfx/2d/DrawEventRecorder.h
@@ -20,20 +20,21 @@
 namespace mozilla {
 namespace gfx {
 
 class PathRecording;
 
 class DrawEventRecorderPrivate : public DrawEventRecorder
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DrawEventRecorderPrivate)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DrawEventRecorderPrivate, override)
+
   DrawEventRecorderPrivate();
   virtual ~DrawEventRecorderPrivate() { }
-  virtual void Finish() { ClearResources(); }
+  virtual void Finish() override { ClearResources(); }
   virtual void FlushItem(IntRect) { }
   void DetatchResources() {
     // The iteration is a bit awkward here because our iterator will
     // be invalidated by the removal
     for (auto font = mStoredFonts.begin(); font != mStoredFonts.end(); ) {
       auto oldFont = font++;
       (*oldFont)->RemoveUserData(reinterpret_cast<UserDataKey*>(this));
     }
--- a/gfx/2d/DrawTargetCairo.h
+++ b/gfx/2d/DrawTargetCairo.h
@@ -16,17 +16,18 @@
 namespace mozilla {
 namespace gfx {
 
 class SourceSurfaceCairo;
 
 class GradientStopsCairo : public GradientStops
 {
   public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(GradientStopsCairo)
+    MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(GradientStopsCairo, override)
+
     GradientStopsCairo(GradientStop* aStops, uint32_t aNumStops,
                        ExtendMode aExtendMode)
      : mExtendMode(aExtendMode)
     {
       for (uint32_t i = 0; i < aNumStops; ++i) {
         mStops.push_back(aStops[i]);
       }
     }
@@ -38,17 +39,17 @@ class GradientStopsCairo : public Gradie
       return mStops;
     }
 
     ExtendMode GetExtendMode() const
     {
       return mExtendMode;
     }
 
-    virtual BackendType GetBackendType() const { return BackendType::CAIRO; }
+    virtual BackendType GetBackendType() const override { return BackendType::CAIRO; }
 
   private:
     std::vector<GradientStop> mStops;
     ExtendMode mExtendMode;
 };
 
 class DrawTargetCairo final : public DrawTarget
 {
--- a/gfx/2d/DrawTargetRecording.cpp
+++ b/gfx/2d/DrawTargetRecording.cpp
@@ -75,33 +75,34 @@ EnsureSurfaceStoredRecording(DrawEventRe
   userData->recorder = aRecorder;
   aSurface->AddUserData(reinterpret_cast<UserDataKey*>(aRecorder),
                         userData, &RecordingSourceSurfaceUserDataFunc);
 }
 
 class SourceSurfaceRecording : public SourceSurface
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SourceSurfaceRecording)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SourceSurfaceRecording, override)
+
   SourceSurfaceRecording(IntSize aSize, SurfaceFormat aFormat, DrawEventRecorderPrivate *aRecorder)
     : mSize(aSize), mFormat(aFormat), mRecorder(aRecorder)
   {
     mRecorder->AddStoredObject(this);
   }
 
   ~SourceSurfaceRecording()
   {
     mRecorder->RemoveStoredObject(this);
     mRecorder->RecordEvent(RecordedSourceSurfaceDestruction(ReferencePtr(this)));
   }
 
-  virtual SurfaceType GetType() const { return SurfaceType::RECORDING; }
-  virtual IntSize GetSize() const { return mSize; }
-  virtual SurfaceFormat GetFormat() const { return mFormat; }
-  virtual already_AddRefed<DataSourceSurface> GetDataSurface() { return nullptr; }
+  virtual SurfaceType GetType() const override { return SurfaceType::RECORDING; }
+  virtual IntSize GetSize() const override { return mSize; }
+  virtual SurfaceFormat GetFormat() const override { return mFormat; }
+  virtual already_AddRefed<DataSourceSurface> GetDataSurface() override { return nullptr; }
 
   IntSize mSize;
   SurfaceFormat mFormat;
   RefPtr<DrawEventRecorderPrivate> mRecorder;
 };
 
 class DataSourceSurfaceRecording : public DataSourceSurface
 {
@@ -144,30 +145,31 @@ public:
   int32_t mStride;
   SurfaceFormat mFormat;
 };
 
 
 class GradientStopsRecording : public GradientStops
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(GradientStopsRecording)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(GradientStopsRecording, override)
+
   explicit GradientStopsRecording(DrawEventRecorderPrivate *aRecorder)
     : mRecorder(aRecorder)
   {
     mRecorder->AddStoredObject(this);
   }
 
   ~GradientStopsRecording()
   {
     mRecorder->RemoveStoredObject(this);
     mRecorder->RecordEvent(RecordedGradientStopsDestruction(ReferencePtr(this)));
   }
 
-  virtual BackendType GetBackendType() const { return BackendType::RECORDING; }
+  virtual BackendType GetBackendType() const override { return BackendType::RECORDING; }
 
   RefPtr<DrawEventRecorderPrivate> mRecorder;
 };
 
 class FilterNodeRecording : public FilterNode
 {
 public:
   MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeRecording, override)
--- a/gfx/2d/DrawTargetSkia.cpp
+++ b/gfx/2d/DrawTargetSkia.cpp
@@ -53,17 +53,18 @@
 using namespace std;
 
 namespace mozilla {
 namespace gfx {
 
 class GradientStopsSkia : public GradientStops
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(GradientStopsSkia)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(GradientStopsSkia, override)
+
   GradientStopsSkia(const std::vector<GradientStop>& aStops, uint32_t aNumStops, ExtendMode aExtendMode)
     : mCount(aNumStops)
     , mExtendMode(aExtendMode)
   {
     if (mCount == 0) {
       return;
     }
 
@@ -88,17 +89,17 @@ public:
       mPositions[i + shift] = SkFloatToScalar(aStops[i].offset);
     }
     if (aStops[aNumStops-1].offset != 1) {
       mColors[mCount-1] = ColorToSkColor(aStops[aNumStops-1].color, 1.0);
       mPositions[mCount-1] = SK_Scalar1;
     }
   }
 
-  BackendType GetBackendType() const { return BackendType::SKIA; }
+  BackendType GetBackendType() const override { return BackendType::SKIA; }
 
   std::vector<SkColor> mColors;
   std::vector<SkScalar> mPositions;
   int mCount;
   ExtendMode mExtendMode;
 };
 
 /**
--- a/gfx/2d/DrawTargetTiled.h
+++ b/gfx/2d/DrawTargetTiled.h
@@ -187,24 +187,24 @@ public:
     : mRect(aRect)
   {
     for (size_t i = 0; i < aTiles.size(); i++) {
       mSnapshots.push_back(aTiles[i].mDrawTarget->Snapshot());
       mOrigins.push_back(aTiles[i].mTileOrigin);
     }
   }
 
-  virtual SurfaceType GetType() const { return SurfaceType::TILED; }
-  virtual IntSize GetSize() const {
+  virtual SurfaceType GetType() const override { return SurfaceType::TILED; }
+  virtual IntSize GetSize() const override {
     MOZ_ASSERT(mRect.Width() > 0 && mRect.Height() > 0);
     return IntSize(mRect.XMost(), mRect.YMost());
   }
-  virtual SurfaceFormat GetFormat() const { return mSnapshots[0]->GetFormat(); }
+  virtual SurfaceFormat GetFormat() const override { return mSnapshots[0]->GetFormat(); }
 
-  virtual already_AddRefed<DataSourceSurface> GetDataSurface()
+  virtual already_AddRefed<DataSourceSurface> GetDataSurface() override
   {
     RefPtr<DataSourceSurface> surf = Factory::CreateDataSourceSurface(GetSize(), GetFormat());
 
     DataSourceSurface::MappedSurface mappedSurf;
     if (!surf->Map(DataSourceSurface::MapType::WRITE, &mappedSurf)) {
       gfxCriticalError() << "DrawTargetTiled::GetDataSurface failed to map surface";
       return nullptr;
     }
--- a/gfx/2d/DrawTargetWrapAndRecord.cpp
+++ b/gfx/2d/DrawTargetWrapAndRecord.cpp
@@ -75,55 +75,57 @@ EnsureSurfaceStored(DrawEventRecorderPri
   userData->recorder = aRecorder;
   aSurface->AddUserData(reinterpret_cast<UserDataKey*>(aRecorder),
                         userData, &WrapAndRecordSourceSurfaceUserDataFunc);
 }
 
 class SourceSurfaceWrapAndRecord : public SourceSurface
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SourceSurfaceWrapAndRecord)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SourceSurfaceWrapAndRecord, override)
+
   SourceSurfaceWrapAndRecord(SourceSurface *aFinalSurface, DrawEventRecorderPrivate *aRecorder)
     : mFinalSurface(aFinalSurface), mRecorder(aRecorder)
   {
     mRecorder->AddStoredObject(this);
   }
 
   ~SourceSurfaceWrapAndRecord()
   {
     mRecorder->RemoveStoredObject(this);
     mRecorder->RecordEvent(RecordedSourceSurfaceDestruction(ReferencePtr(this)));
   }
 
-  virtual SurfaceType GetType() const { return SurfaceType::RECORDING; }
-  virtual IntSize GetSize() const { return mFinalSurface->GetSize(); }
-  virtual SurfaceFormat GetFormat() const { return mFinalSurface->GetFormat(); }
-  virtual already_AddRefed<DataSourceSurface> GetDataSurface() { return mFinalSurface->GetDataSurface(); }
+  virtual SurfaceType GetType() const override { return SurfaceType::RECORDING; }
+  virtual IntSize GetSize() const override { return mFinalSurface->GetSize(); }
+  virtual SurfaceFormat GetFormat() const override { return mFinalSurface->GetFormat(); }
+  virtual already_AddRefed<DataSourceSurface> GetDataSurface() override { return mFinalSurface->GetDataSurface(); }
 
   RefPtr<SourceSurface> mFinalSurface;
   RefPtr<DrawEventRecorderPrivate> mRecorder;
 };
 
 class GradientStopsWrapAndRecord : public GradientStops
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(GradientStopsWrapAndRecord)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(GradientStopsWrapAndRecord, override)
+
   GradientStopsWrapAndRecord(GradientStops *aFinalGradientStops, DrawEventRecorderPrivate *aRecorder)
     : mFinalGradientStops(aFinalGradientStops), mRecorder(aRecorder)
   {
     mRecorder->AddStoredObject(this);
   }
 
   ~GradientStopsWrapAndRecord()
   {
     mRecorder->RemoveStoredObject(this);
     mRecorder->RecordEvent(RecordedGradientStopsDestruction(ReferencePtr(this)));
   }
 
-  virtual BackendType GetBackendType() const { return BackendType::RECORDING; }
+  virtual BackendType GetBackendType() const override { return BackendType::RECORDING; }
 
   RefPtr<GradientStops> mFinalGradientStops;
   RefPtr<DrawEventRecorderPrivate> mRecorder;
 };
 
 static SourceSurface *
 GetSourceSurface(SourceSurface *aSurface)
 {
--- a/gfx/2d/FilterNodeD2D1.h
+++ b/gfx/2d/FilterNodeD2D1.h
@@ -14,17 +14,18 @@
 #include <cguid.h>
 
 namespace mozilla {
 namespace gfx {
 
 class FilterNodeD2D1 : public FilterNode
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeD2D1)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeD2D1, override)
+
   static already_AddRefed<FilterNode> Create(ID2D1DeviceContext *aDC, FilterType aType);
 
   FilterNodeD2D1(ID2D1Effect *aEffect, FilterType aType)
     : mEffect(aEffect)
     , mType(aType)
   {
     InitUnmappedProperties();
   }
--- a/gfx/2d/GradientStopsD2D.h
+++ b/gfx/2d/GradientStopsD2D.h
@@ -12,17 +12,18 @@
 #include <d2d1.h>
 
 namespace mozilla {
 namespace gfx {
 
 class GradientStopsD2D : public GradientStops
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(GradientStopsD2D)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(GradientStopsD2D, override)
+
   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(); }
--- a/gfx/2d/InlineTranslator.h
+++ b/gfx/2d/InlineTranslator.h
@@ -29,52 +29,52 @@ 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
+  DrawTarget* LookupDrawTarget(ReferencePtr aRefPtr) final override
   {
     DrawTarget* result = mDrawTargets.GetWeak(aRefPtr);
     MOZ_ASSERT(result);
     return result;
   }
 
-  Path* LookupPath(ReferencePtr aRefPtr) final
+  Path* LookupPath(ReferencePtr aRefPtr) final override
   {
     Path* result = mPaths.GetWeak(aRefPtr);
     MOZ_ASSERT(result);
     return result;
   }
 
-  SourceSurface* LookupSourceSurface(ReferencePtr aRefPtr) final
+  SourceSurface* LookupSourceSurface(ReferencePtr aRefPtr) final override
   {
     SourceSurface* result = mSourceSurfaces.GetWeak(aRefPtr);
     MOZ_ASSERT(result);
     return result;
   }
 
-  FilterNode* LookupFilterNode(ReferencePtr aRefPtr) final
+  FilterNode* LookupFilterNode(ReferencePtr aRefPtr) final override
   {
     FilterNode* result = mFilterNodes.GetWeak(aRefPtr);
     MOZ_ASSERT(result);
     return result;
   }
 
-  GradientStops* LookupGradientStops(ReferencePtr aRefPtr) final
+  GradientStops* LookupGradientStops(ReferencePtr aRefPtr) final override
   {
     GradientStops* result =  mGradientStops.GetWeak(aRefPtr);
     MOZ_ASSERT(result);
     return result;
   }
 
-  ScaledFont* LookupScaledFont(ReferencePtr aRefPtr) final
+  ScaledFont* LookupScaledFont(ReferencePtr aRefPtr) final override
   {
     ScaledFont* result = mScaledFonts.GetWeak(aRefPtr);
     MOZ_ASSERT(result);
     return result;
   }
 
   UnscaledFont* LookupUnscaledFont(ReferencePtr aRefPtr) override final
   {
@@ -84,108 +84,108 @@ public:
   }
 
   virtual UnscaledFont* LookupUnscaledFontByIndex(size_t index) override final
   {
     UnscaledFont* result = mUnscaledFontTable[index];
     return result;
   }
 
-  NativeFontResource* LookupNativeFontResource(uint64_t aKey) final
+  NativeFontResource* LookupNativeFontResource(uint64_t aKey) final override
   {
     NativeFontResource* result = mNativeFontResources.GetWeak(aKey);
     MOZ_ASSERT(result);
     return result;
   }
 
-  void AddDrawTarget(ReferencePtr aRefPtr, DrawTarget *aDT) final
+  void AddDrawTarget(ReferencePtr aRefPtr, DrawTarget *aDT) final override
   {
     mDrawTargets.Put(aRefPtr, aDT);
   }
 
-  void AddPath(ReferencePtr aRefPtr, Path *aPath) final
+  void AddPath(ReferencePtr aRefPtr, Path *aPath) final override
   {
     mPaths.Put(aRefPtr, aPath);
   }
 
-  void AddSourceSurface(ReferencePtr aRefPtr, SourceSurface *aSurface) final
+  void AddSourceSurface(ReferencePtr aRefPtr, SourceSurface *aSurface) final override
   {
     mSourceSurfaces.Put(aRefPtr, aSurface);
   }
 
-  void AddFilterNode(ReferencePtr aRefPtr, FilterNode *aFilter) final
+  void AddFilterNode(ReferencePtr aRefPtr, FilterNode *aFilter) final override
   {
     mFilterNodes.Put(aRefPtr, aFilter);
   }
 
-  void AddGradientStops(ReferencePtr aRefPtr, GradientStops *aStops) final
+  void AddGradientStops(ReferencePtr aRefPtr, GradientStops *aStops) final override
   {
     mGradientStops.Put(aRefPtr, aStops);
   }
 
-  void AddScaledFont(ReferencePtr aRefPtr, ScaledFont *aScaledFont) final
+  void AddScaledFont(ReferencePtr aRefPtr, ScaledFont *aScaledFont) final override
   {
     mScaledFonts.Put(aRefPtr, aScaledFont);
   }
 
-  void AddUnscaledFont(ReferencePtr aRefPtr, UnscaledFont *aUnscaledFont) final
+  void AddUnscaledFont(ReferencePtr aRefPtr, UnscaledFont *aUnscaledFont) final override
   {
     mUnscaledFontTable.push_back(aUnscaledFont);
     mUnscaledFonts.Put(aRefPtr, aUnscaledFont);
   }
 
   void AddNativeFontResource(uint64_t aKey,
-                             NativeFontResource *aScaledFontResouce) final
+                             NativeFontResource *aScaledFontResouce) final override
   {
     mNativeFontResources.Put(aKey, aScaledFontResouce);
   }
 
-  void RemoveDrawTarget(ReferencePtr aRefPtr) final
+  void RemoveDrawTarget(ReferencePtr aRefPtr) final override
   {
     mDrawTargets.Remove(aRefPtr);
   }
 
-  void RemovePath(ReferencePtr aRefPtr) final
+  void RemovePath(ReferencePtr aRefPtr) final override
   {
     mPaths.Remove(aRefPtr);
   }
 
-  void RemoveSourceSurface(ReferencePtr aRefPtr) final
+  void RemoveSourceSurface(ReferencePtr aRefPtr) final override
   {
     mSourceSurfaces.Remove(aRefPtr);
   }
 
-  void RemoveFilterNode(ReferencePtr aRefPtr) final
+  void RemoveFilterNode(ReferencePtr aRefPtr) final override
   {
     mFilterNodes.Remove(aRefPtr);
   }
 
-  void RemoveGradientStops(ReferencePtr aRefPtr) final
+  void RemoveGradientStops(ReferencePtr aRefPtr) final override
   {
     mGradientStops.Remove(aRefPtr);
   }
 
-  void RemoveScaledFont(ReferencePtr aRefPtr) final
+  void RemoveScaledFont(ReferencePtr aRefPtr) final override
   {
     mScaledFonts.Remove(aRefPtr);
   }
 
-  void RemoveUnscaledFont(ReferencePtr aRefPtr) final
+  void RemoveUnscaledFont(ReferencePtr aRefPtr) final override
   {
     mUnscaledFonts.Remove(aRefPtr);
   }
 
 
   already_AddRefed<DrawTarget> CreateDrawTarget(ReferencePtr aRefPtr,
                                                 const gfx::IntSize &aSize,
-                                                gfx::SurfaceFormat aFormat) final;
+                                                gfx::SurfaceFormat aFormat) final override;
 
-  mozilla::gfx::DrawTarget* GetReferenceDrawTarget() final { return mBaseDT; }
+  mozilla::gfx::DrawTarget* GetReferenceDrawTarget() final override { return mBaseDT; }
 
-  void* GetFontContext() final { return mFontContext; }
+  void* GetFontContext() final override { 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
@@ -13,33 +13,34 @@
 #include "mozilla/AlreadyAddRefed.h"
 
 namespace mozilla {
 namespace gfx {
 
 class NativeFontResourceDWrite final : public NativeFontResource
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(NativeFontResourceDWrite)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(NativeFontResourceDWrite, override)
+
   /**
    * Creates a NativeFontResourceDWrite if data is valid. Note aFontData will be
    * copied if required and so can be released after calling.
    *
    * @param aFontData the SFNT data.
    * @param aDataLength length of data.
    * @param aNeedsCairo whether the ScaledFont created needs a cairo scaled font
    * @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;
+                       uint32_t aInstanceDataLength) final override;
 
 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
@@ -13,24 +13,24 @@
 #include "mozilla/UniquePtr.h"
 
 namespace mozilla {
 namespace gfx {
 
 class NativeFontResourceFontconfig final : public NativeFontResource
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(NativeFontResourceFontconfig)
+  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;
+                       const uint8_t* aInstanceData, uint32_t aInstanceDataLength) final override;
 
   ~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
@@ -14,34 +14,35 @@
 #include "mozilla/Vector.h"
 
 namespace mozilla {
 namespace gfx {
 
 class NativeFontResourceGDI final : public NativeFontResource
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(NativeFontResourceGDI)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(NativeFontResourceGDI, override)
+
   /**
    * Creates a NativeFontResourceGDI if data is valid. Note aFontData will be
    * copied if required and so can be released after calling.
    *
    * @param aFontData the SFNT data.
    * @param aDataLength length of data.
    * @return Referenced NativeFontResourceGDI or nullptr if invalid.
    */
   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;
+                       uint32_t aInstanceDataLength) final override;
 
 private:
   explicit NativeFontResourceGDI(HANDLE aFontResourceHandle)
     : mFontResourceHandle(aFontResourceHandle)
   {}
 
   HANDLE mFontResourceHandle;
 };
--- a/gfx/2d/NativeFontResourceMac.h
+++ b/gfx/2d/NativeFontResourceMac.h
@@ -12,25 +12,25 @@
 #include "ScaledFontMac.h"
 
 namespace mozilla {
 namespace gfx {
 
 class NativeFontResourceMac final : public NativeFontResource
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(NativeFontResourceMac)
+  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;
+                       uint32_t aInstanceDataLength) final override;
 
   ~NativeFontResourceMac()
   {
     CFRelease(mFontRef);
   }
 
 private:
   explicit NativeFontResourceMac(CGFontRef aFontRef) : mFontRef(aFontRef) {}
--- a/gfx/2d/PathAnalysis.h
+++ b/gfx/2d/PathAnalysis.h
@@ -19,34 +19,35 @@ struct FlatPathOp
 
   OpType mType;
   Point mPoint;
 };
 
 class FlattenedPath : public PathSink
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FlattenedPath)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FlattenedPath, override)
+
   FlattenedPath() : mCachedLength(0)
                   , mCalculatedLength(false)
   {
   }
 
-  virtual void MoveTo(const Point &aPoint);
-  virtual void LineTo(const Point &aPoint);
+  virtual void MoveTo(const Point &aPoint) override;
+  virtual void LineTo(const Point &aPoint) override;
   virtual void BezierTo(const Point &aCP1,
                         const Point &aCP2,
-                        const Point &aCP3);
+                        const Point &aCP3) override;
   virtual void QuadraticBezierTo(const Point &aCP1,
-                                 const Point &aCP2);
-  virtual void Close();
+                                 const Point &aCP2) override;
+  virtual void Close() override;
   virtual void Arc(const Point &aOrigin, float aRadius, float aStartAngle,
-                   float aEndAngle, bool aAntiClockwise = false);
+                   float aEndAngle, bool aAntiClockwise = false) override;
 
-  virtual Point CurrentPoint() const { return mPathOps.empty() ? Point() : mPathOps[mPathOps.size() - 1].mPoint; }
+  virtual Point CurrentPoint() const override { return mPathOps.empty() ? Point() : mPathOps[mPathOps.size() - 1].mPoint; }
 
   Float ComputeLength();
   Point ComputePointAtLength(Float aLength, Point *aTangent);
 
 private:
   Float mCachedLength;
   bool mCalculatedLength;
   Point mLastMove;
--- a/gfx/2d/PathCairo.h
+++ b/gfx/2d/PathCairo.h
@@ -14,73 +14,75 @@
 namespace mozilla {
 namespace gfx {
 
 class PathCairo;
 
 class PathBuilderCairo : public PathBuilder
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathBuilderCairo)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathBuilderCairo, override)
+
   explicit PathBuilderCairo(FillRule aFillRule);
 
-  virtual void MoveTo(const Point &aPoint);
-  virtual void LineTo(const Point &aPoint);
+  virtual void MoveTo(const Point &aPoint) override;
+  virtual void LineTo(const Point &aPoint) override;
   virtual void BezierTo(const Point &aCP1,
                         const Point &aCP2,
-                        const Point &aCP3);
+                        const Point &aCP3) override;
   virtual void QuadraticBezierTo(const Point &aCP1,
-                                 const Point &aCP2);
-  virtual void Close();
+                                 const Point &aCP2) override;
+  virtual void Close() override;
   virtual void Arc(const Point &aOrigin, float aRadius, float aStartAngle,
-                   float aEndAngle, bool aAntiClockwise = false);
-  virtual Point CurrentPoint() const;
-  virtual already_AddRefed<Path> Finish();
+                   float aEndAngle, bool aAntiClockwise = false) override;
+  virtual Point CurrentPoint() const override;
+  virtual already_AddRefed<Path> Finish() override;
 
-  virtual BackendType GetBackendType() const { return BackendType::CAIRO; }
+  virtual BackendType GetBackendType() const override { return BackendType::CAIRO; }
 
 private: // data
   friend class PathCairo;
 
   FillRule mFillRule;
   std::vector<cairo_path_data_t> mPathData;
   // It's easiest to track this here, parsing the path data to find the current
   // point is a little tricky.
   Point mCurrentPoint;
   Point mBeginPoint;
 };
 
 class PathCairo : public Path
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathCairo)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathCairo, override)
+
   PathCairo(FillRule aFillRule, std::vector<cairo_path_data_t> &aPathData, const Point &aCurrentPoint);
   explicit PathCairo(cairo_t *aContext);
   ~PathCairo();
 
-  virtual BackendType GetBackendType() const { return BackendType::CAIRO; }
+  virtual BackendType GetBackendType() const override { return BackendType::CAIRO; }
 
-  virtual already_AddRefed<PathBuilder> CopyToBuilder(FillRule aFillRule) const;
+  virtual already_AddRefed<PathBuilder> CopyToBuilder(FillRule aFillRule) const override;
   virtual already_AddRefed<PathBuilder> TransformedCopyToBuilder(const Matrix &aTransform,
-                                                             FillRule aFillRule) const;
+                                                             FillRule aFillRule) const override;
 
-  virtual bool ContainsPoint(const Point &aPoint, const Matrix &aTransform) const;
+  virtual bool ContainsPoint(const Point &aPoint, const Matrix &aTransform) const override;
 
   virtual bool StrokeContainsPoint(const StrokeOptions &aStrokeOptions,
                                    const Point &aPoint,
-                                   const Matrix &aTransform) const;
+                                   const Matrix &aTransform) const override;
 
-  virtual Rect GetBounds(const Matrix &aTransform = Matrix()) const;
+  virtual Rect GetBounds(const Matrix &aTransform = Matrix()) const override;
 
   virtual Rect GetStrokedBounds(const StrokeOptions &aStrokeOptions,
-                                const Matrix &aTransform = Matrix()) const;
+                                const Matrix &aTransform = Matrix()) const override;
 
-  virtual void StreamToSink(PathSink *aSink) const;
+  virtual void StreamToSink(PathSink *aSink) const override;
 
-  virtual FillRule GetFillRule() const { return mFillRule; }
+  virtual FillRule GetFillRule() const override { return mFillRule; }
 
   void SetPathOnContext(cairo_t *aContext) const;
 
   void AppendPathToBuilder(PathBuilderCairo *aBuilder, const Matrix *aTransform = nullptr) const;
 private:
   void EnsureContainingContext(const Matrix &aTransform) const;
 
   FillRule mFillRule;
--- a/gfx/2d/PathD2D.h
+++ b/gfx/2d/PathD2D.h
@@ -14,17 +14,17 @@
 namespace mozilla {
 namespace gfx {
 
 class PathD2D;
 
 class PathBuilderD2D : public PathBuilder
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathBuilderD2D)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathBuilderD2D, override)
   PathBuilderD2D(ID2D1GeometrySink *aSink, ID2D1PathGeometry *aGeom, FillRule aFillRule, BackendType aBackendType)
     : mSink(aSink)
     , mGeometry(aGeom)
     , mFigureActive(false)
     , mFillRule(aFillRule)
     , mBackendType(aBackendType)
   {
   }
@@ -63,17 +63,17 @@ private:
   Point mBeginPoint;
   FillRule mFillRule;
   BackendType mBackendType;
 };
 
 class PathD2D : public Path
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathD2D)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathD2D, override)
   PathD2D(ID2D1PathGeometry *aGeometry, bool aEndedActive,
           const Point &aEndPoint, FillRule aFillRule, BackendType aBackendType)
     : mGeometry(aGeometry)
     , mEndedActive(aEndedActive)
     , mEndPoint(aEndPoint)
     , mFillRule(aFillRule)
     , mBackendType(aBackendType)
   {}
--- a/gfx/2d/PathRecording.h
+++ b/gfx/2d/PathRecording.h
@@ -35,97 +35,99 @@ struct PathOp
 const int32_t sPointCount[] = { 1, 1, 3, 2, 0, 0 };
 
 class PathRecording;
 class DrawEventRecorderPrivate;
 
 class PathBuilderRecording : public PathBuilder
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathBuilderRecording)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathBuilderRecording, override)
+
   PathBuilderRecording(PathBuilder *aBuilder, FillRule aFillRule)
     : mPathBuilder(aBuilder), mFillRule(aFillRule)
   {
   }
 
   /* Move the current point in the path, any figure currently being drawn will
    * be considered closed during fill operations, however when stroking the
    * closing line segment will not be drawn.
    */
-  virtual void MoveTo(const Point &aPoint);
+  virtual void MoveTo(const Point &aPoint) override;
   /* Add a linesegment to the current figure */
-  virtual void LineTo(const Point &aPoint);
+  virtual void LineTo(const Point &aPoint) override;
   /* Add a cubic bezier curve to the current figure */
   virtual void BezierTo(const Point &aCP1,
                         const Point &aCP2,
-                        const Point &aCP3);
+                        const Point &aCP3) override;
   /* Add a quadratic bezier curve to the current figure */
   virtual void QuadraticBezierTo(const Point &aCP1,
-                                 const Point &aCP2);
+                                 const Point &aCP2) override;
   /* Close the current figure, this will essentially generate a line segment
    * from the current point to the starting point for the current figure
    */
-  virtual void Close();
+  virtual void Close() override;
 
   /* Add an arc to the current figure */
   virtual void Arc(const Point &aOrigin, float aRadius, float aStartAngle,
-                   float aEndAngle, bool aAntiClockwise) {
+                   float aEndAngle, bool aAntiClockwise) override {
     ArcToBezier(this, aOrigin, Size(aRadius, aRadius), aStartAngle, aEndAngle,
                 aAntiClockwise);
   }
 
   /* Point the current subpath is at - or where the next subpath will start
    * if there is no active subpath.
    */
-  virtual Point CurrentPoint() const;
+  virtual Point CurrentPoint() const override;
 
-  virtual already_AddRefed<Path> Finish();
+  virtual already_AddRefed<Path> Finish() override;
 
-  virtual BackendType GetBackendType() const { return BackendType::RECORDING; }
+  virtual BackendType GetBackendType() const override { return BackendType::RECORDING; }
 
 private:
   friend class PathRecording;
 
   RefPtr<PathBuilder> mPathBuilder;
   FillRule mFillRule;
   std::vector<PathOp> mPathOps;
 };
 
 class PathRecording : public Path
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathRecording)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathRecording, override)
+
   PathRecording(Path *aPath, const std::vector<PathOp> aOps, FillRule aFillRule)
     : mPath(aPath), mPathOps(aOps), mFillRule(aFillRule)
   {
   }
 
   ~PathRecording();
 
-  virtual BackendType GetBackendType() const { return BackendType::RECORDING; }
-  virtual already_AddRefed<PathBuilder> CopyToBuilder(FillRule aFillRule) const;
+  virtual BackendType GetBackendType() const override { return BackendType::RECORDING; }
+  virtual already_AddRefed<PathBuilder> CopyToBuilder(FillRule aFillRule) const override;
   virtual already_AddRefed<PathBuilder> TransformedCopyToBuilder(const Matrix &aTransform,
-                                                             FillRule aFillRule) const;
-  virtual bool ContainsPoint(const Point &aPoint, const Matrix &aTransform) const
+                                                             FillRule aFillRule) const override;
+  virtual bool ContainsPoint(const Point &aPoint, const Matrix &aTransform) const override
   { return mPath->ContainsPoint(aPoint, aTransform); }
   virtual bool StrokeContainsPoint(const StrokeOptions &aStrokeOptions,
                                    const Point &aPoint,
-                                   const Matrix &aTransform) const
+                                   const Matrix &aTransform) const override
   { return mPath->StrokeContainsPoint(aStrokeOptions, aPoint, aTransform); }
-  
-  virtual Rect GetBounds(const Matrix &aTransform = Matrix()) const
+
+  virtual Rect GetBounds(const Matrix &aTransform = Matrix()) const override
   { return mPath->GetBounds(aTransform); }
-  
+
   virtual Rect GetStrokedBounds(const StrokeOptions &aStrokeOptions,
-                                const Matrix &aTransform = Matrix()) const
+                                const Matrix &aTransform = Matrix()) const override
   { return mPath->GetStrokedBounds(aStrokeOptions, aTransform); }
 
-  virtual void StreamToSink(PathSink *aSink) const { mPath->StreamToSink(aSink); }
+  virtual void StreamToSink(PathSink *aSink) const override { mPath->StreamToSink(aSink); }
 
-  virtual FillRule GetFillRule() const { return mFillRule; }
+  virtual FillRule GetFillRule() const override { return mFillRule; }
 
   void StorePath(std::ostream &aStream) const;
   static void ReadPathToBuilder(std::istream &aStream, PathBuilder *aBuilder);
 
 private:
   friend class DrawTargetWrapAndRecord;
   friend class DrawTargetRecording;
   friend class RecordedPathCreation;
--- a/gfx/2d/PathSkia.h
+++ b/gfx/2d/PathSkia.h
@@ -13,75 +13,77 @@
 namespace mozilla {
 namespace gfx {
 
 class PathSkia;
 
 class PathBuilderSkia : public PathBuilder
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathBuilderSkia)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathBuilderSkia, override)
+
   PathBuilderSkia(const Matrix& aTransform, const SkPath& aPath, FillRule aFillRule);
   explicit PathBuilderSkia(FillRule aFillRule);
 
-  virtual void MoveTo(const Point &aPoint);
-  virtual void LineTo(const Point &aPoint);
+  virtual void MoveTo(const Point &aPoint) override;
+  virtual void LineTo(const Point &aPoint) override;
   virtual void BezierTo(const Point &aCP1,
                         const Point &aCP2,
-                        const Point &aCP3);
+                        const Point &aCP3) override;
   virtual void QuadraticBezierTo(const Point &aCP1,
-                                 const Point &aCP2);
-  virtual void Close();
+                                 const Point &aCP2) override;
+  virtual void Close() override;
   virtual void Arc(const Point &aOrigin, float aRadius, float aStartAngle,
-                   float aEndAngle, bool aAntiClockwise = false);
-  virtual Point CurrentPoint() const;
-  virtual already_AddRefed<Path> Finish();
+                   float aEndAngle, bool aAntiClockwise = false) override;
+  virtual Point CurrentPoint() const override;
+  virtual already_AddRefed<Path> Finish() override;
 
   void AppendPath(const SkPath &aPath);
 
-  virtual BackendType GetBackendType() const { return BackendType::SKIA; }
+  virtual BackendType GetBackendType() const override { return BackendType::SKIA; }
 
 private:
 
   void SetFillRule(FillRule aFillRule);
 
   SkPath mPath;
   FillRule mFillRule;
 };
 
 class PathSkia : public Path
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathSkia)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathSkia, override)
+
   PathSkia(SkPath& aPath, FillRule aFillRule)
     : mFillRule(aFillRule)
   {
     mPath.swap(aPath);
   }
-  
-  virtual BackendType GetBackendType() const { return BackendType::SKIA; }
 
-  virtual already_AddRefed<PathBuilder> CopyToBuilder(FillRule aFillRule) const;
+  virtual BackendType GetBackendType() const override { return BackendType::SKIA; }
+
+  virtual already_AddRefed<PathBuilder> CopyToBuilder(FillRule aFillRule) const override;
   virtual already_AddRefed<PathBuilder> TransformedCopyToBuilder(const Matrix &aTransform,
-                                                             FillRule aFillRule) const;
+                                                             FillRule aFillRule) const override;
 
-  virtual bool ContainsPoint(const Point &aPoint, const Matrix &aTransform) const;
-  
+  virtual bool ContainsPoint(const Point &aPoint, const Matrix &aTransform) const override;
+
   virtual bool StrokeContainsPoint(const StrokeOptions &aStrokeOptions,
                                    const Point &aPoint,
-                                   const Matrix &aTransform) const;
+                                   const Matrix &aTransform) const override;
 
-  virtual Rect GetBounds(const Matrix &aTransform = Matrix()) const;
-  
+  virtual Rect GetBounds(const Matrix &aTransform = Matrix()) const override;
+
   virtual Rect GetStrokedBounds(const StrokeOptions &aStrokeOptions,
-                                const Matrix &aTransform = Matrix()) const;
+                                const Matrix &aTransform = Matrix()) const override;
 
-  virtual void StreamToSink(PathSink *aSink) const;
+  virtual void StreamToSink(PathSink *aSink) const override;
 
-  virtual FillRule GetFillRule() const { return mFillRule; }
+  virtual FillRule GetFillRule() const override { return mFillRule; }
 
   const SkPath& GetPath() const { return mPath; }
 
 private:
   friend class DrawTargetSkia;
   
   SkPath mPath;
   FillRule mFillRule;
--- a/gfx/2d/RecordedEventImpl.h
+++ b/gfx/2d/RecordedEventImpl.h
@@ -19,69 +19,69 @@
 
 namespace mozilla {
 namespace gfx {
 
 template<class Derived>
 class RecordedEventDerived : public RecordedEvent {
   using RecordedEvent::RecordedEvent;
   public:
-  void RecordToStream(std::ostream &aStream) const {
+  void RecordToStream(std::ostream &aStream) const override {
     static_cast<const Derived*>(this)->Record(aStream);
   }
-  void RecordToStream(EventStream& aStream) const {
+  void RecordToStream(EventStream& aStream) const override {
     static_cast<const Derived*>(this)->Record(aStream);
   }
-  void RecordToStream(MemStream &aStream) const {
+  void RecordToStream(MemStream &aStream) const override {
     SizeCollector size;
     static_cast<const Derived*>(this)->Record(size);
     aStream.Resize(aStream.mLength + size.mTotalSize);
     MemWriter writer(aStream.mData + aStream.mLength - size.mTotalSize);
     static_cast<const Derived*>(this)->Record(writer);
   }
 };
 
 template<class Derived>
 class RecordedDrawingEvent : public RecordedEventDerived<Derived>
 {
 public:
-   virtual ReferencePtr GetDestinedDT() { return mDT; }
+   virtual ReferencePtr GetDestinedDT() override { return mDT; }
 
 protected:
   RecordedDrawingEvent(RecordedEvent::EventType aType, DrawTarget *aTarget)
     : RecordedEventDerived<Derived>(aType), mDT(aTarget)
   {
   }
 
   template<class S>
   RecordedDrawingEvent(RecordedEvent::EventType aType, S &aStream);
   template<class S>
   void Record(S &aStream) const;
 
-  virtual ReferencePtr GetObjectRef() const;
+  virtual ReferencePtr GetObjectRef() const override;
 
   ReferencePtr mDT;
 };
 
 class RecordedDrawTargetCreation : public RecordedEventDerived<RecordedDrawTargetCreation> {
 public:
   RecordedDrawTargetCreation(ReferencePtr aRefPtr, BackendType aType, const IntSize &aSize, SurfaceFormat aFormat,
                              bool aHasExistingData = false, SourceSurface *aExistingData = nullptr)
     : RecordedEventDerived(DRAWTARGETCREATION), mRefPtr(aRefPtr), mBackendType(aType), mSize(aSize), mFormat(aFormat)
     , mHasExistingData(aHasExistingData), mExistingData(aExistingData)
   {}
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S>
   void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "DrawTarget Creation"; }
-  virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "DrawTarget Creation"; }
+  virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
 
   ReferencePtr mRefPtr;
   BackendType mBackendType;
   IntSize mSize;
   SurfaceFormat mFormat;
   bool mHasExistingData;
   RefPtr<SourceSurface> mExistingData;
 
@@ -93,24 +93,24 @@ private:
 };
 
 class RecordedDrawTargetDestruction : public RecordedEventDerived<RecordedDrawTargetDestruction> {
 public:
   MOZ_IMPLICIT RecordedDrawTargetDestruction(ReferencePtr aRefPtr)
     : RecordedEventDerived(DRAWTARGETDESTRUCTION), mRefPtr(aRefPtr)
   {}
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S>
   void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "DrawTarget Destruction"; }
-  virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "DrawTarget Destruction"; }
+  virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
 
   ReferencePtr mRefPtr;
 
   BackendType mBackendType;
 private:
   friend class RecordedEvent;
 
   template<class S>
@@ -121,24 +121,24 @@ class RecordedCreateSimilarDrawTarget : 
 public:
   RecordedCreateSimilarDrawTarget(ReferencePtr aRefPtr, const IntSize &aSize,
                                   SurfaceFormat aFormat)
     : RecordedEventDerived(CREATESIMILARDRAWTARGET)
     , mRefPtr(aRefPtr) , mSize(aSize), mFormat(aFormat)
   {
   }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S>
   void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "CreateSimilarDrawTarget"; }
-  virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "CreateSimilarDrawTarget"; }
+  virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
 
   ReferencePtr mRefPtr;
   IntSize mSize;
   SurfaceFormat mFormat;
 
 private:
   friend class RecordedEvent;
 
@@ -149,23 +149,24 @@ private:
 class RecordedFillRect : public RecordedDrawingEvent<RecordedFillRect> {
 public:
   RecordedFillRect(DrawTarget *aDT, const Rect &aRect, const Pattern &aPattern, const DrawOptions &aOptions)
     : RecordedDrawingEvent(FILLRECT, aDT), mRect(aRect), mOptions(aOptions)
   {
     StorePattern(mPattern, aPattern);
   }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S>
   void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "FillRect"; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "FillRect"; }
+
 private:
   friend class RecordedEvent;
 
   template<class S>
   MOZ_IMPLICIT RecordedFillRect(S &aStream);
 
   Rect mRect;
   PatternStorage mPattern;
@@ -177,23 +178,24 @@ public:
   RecordedStrokeRect(DrawTarget *aDT, const Rect &aRect, const Pattern &aPattern,
                      const StrokeOptions &aStrokeOptions, const DrawOptions &aOptions)
     : RecordedDrawingEvent(STROKERECT, aDT), mRect(aRect),
       mStrokeOptions(aStrokeOptions), mOptions(aOptions)
   {
     StorePattern(mPattern, aPattern);
   }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S>
   void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "StrokeRect"; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "StrokeRect"; }
+
 private:
   friend class RecordedEvent;
 
   template<class S>
   MOZ_IMPLICIT RecordedStrokeRect(S &aStream);
 
   Rect mRect;
   PatternStorage mPattern;
@@ -207,23 +209,24 @@ public:
                      const Pattern &aPattern, const StrokeOptions &aStrokeOptions,
                      const DrawOptions &aOptions)
     : RecordedDrawingEvent(STROKELINE, aDT), mBegin(aBegin), mEnd(aEnd),
       mStrokeOptions(aStrokeOptions), mOptions(aOptions)
   {
     StorePattern(mPattern, aPattern);
   }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S>
   void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "StrokeLine"; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "StrokeLine"; }
+
 private:
   friend class RecordedEvent;
 
   template<class S>
   MOZ_IMPLICIT RecordedStrokeLine(S &aStream);
 
   Point mBegin;
   Point mEnd;
@@ -235,22 +238,23 @@ private:
 class RecordedFill : public RecordedDrawingEvent<RecordedFill> {
 public:
   RecordedFill(DrawTarget *aDT, ReferencePtr aPath, const Pattern &aPattern, const DrawOptions &aOptions)
     : RecordedDrawingEvent(FILL, aDT), mPath(aPath), mOptions(aOptions)
   {
     StorePattern(mPattern, aPattern);
   }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "Fill"; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "Fill"; }
+
 private:
   friend class RecordedEvent;
 
   template<class S>
   MOZ_IMPLICIT RecordedFill(S &aStream);
 
   ReferencePtr mPath;
   PatternStorage mPattern;
@@ -265,22 +269,23 @@ public:
   {
     StorePattern(mPattern, aPattern);
     mNumGlyphs = aNumGlyphs;
     mGlyphs = new Glyph[aNumGlyphs];
     memcpy(mGlyphs, aGlyphs, sizeof(Glyph) * aNumGlyphs);
   }
   virtual ~RecordedFillGlyphs();
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "FillGlyphs"; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "FillGlyphs"; }
+
 private:
   friend class RecordedEvent;
 
   template<class S>
   MOZ_IMPLICIT RecordedFillGlyphs(S &aStream);
 
   ReferencePtr mScaledFont;
   PatternStorage mPattern;
@@ -293,22 +298,23 @@ class RecordedMask : public RecordedDraw
 public:
   RecordedMask(DrawTarget *aDT, const Pattern &aSource, const Pattern &aMask, const DrawOptions &aOptions)
     : RecordedDrawingEvent(MASK, aDT), mOptions(aOptions)
   {
     StorePattern(mSource, aSource);
     StorePattern(mMask, aMask);
   }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "Mask"; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "Mask"; }
+
 private:
   friend class RecordedEvent;
 
   template<class S>
   MOZ_IMPLICIT RecordedMask(S &aStream);
 
   PatternStorage mSource;
   PatternStorage mMask;
@@ -320,22 +326,23 @@ public:
   RecordedStroke(DrawTarget *aDT, ReferencePtr aPath, const Pattern &aPattern,
                      const StrokeOptions &aStrokeOptions, const DrawOptions &aOptions)
     : RecordedDrawingEvent(STROKE, aDT), mPath(aPath),
       mStrokeOptions(aStrokeOptions), mOptions(aOptions)
   {
     StorePattern(mPattern, aPattern);
   }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "Stroke"; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "Stroke"; }
+
 private:
   friend class RecordedEvent;
 
   template<class S>
   MOZ_IMPLICIT RecordedStroke(S &aStream);
 
   ReferencePtr mPath;
   PatternStorage mPattern;
@@ -345,22 +352,23 @@ private:
 
 class RecordedClearRect : public RecordedDrawingEvent<RecordedClearRect> {
 public:
   RecordedClearRect(DrawTarget *aDT, const Rect &aRect)
     : RecordedDrawingEvent(CLEARRECT, aDT), mRect(aRect)
   {
   }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "ClearRect"; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "ClearRect"; }
+
 private:
   friend class RecordedEvent;
 
   template<class S>
   MOZ_IMPLICIT RecordedClearRect(S &aStream);
 
   Rect mRect;
 };
@@ -369,22 +377,23 @@ class RecordedCopySurface : public Recor
 public:
   RecordedCopySurface(DrawTarget *aDT, ReferencePtr aSourceSurface,
                       const IntRect &aSourceRect, const IntPoint &aDest)
     : RecordedDrawingEvent(COPYSURFACE, aDT), mSourceSurface(aSourceSurface),
 	  mSourceRect(aSourceRect), mDest(aDest)
   {
   }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "CopySurface"; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "CopySurface"; }
+
 private:
   friend class RecordedEvent;
 
   template<class S>
   MOZ_IMPLICIT RecordedCopySurface(S &aStream);
 
   ReferencePtr mSourceSurface;
   IntRect mSourceRect;
@@ -393,65 +402,68 @@ private:
 
 class RecordedPushClip : public RecordedDrawingEvent<RecordedPushClip> {
 public:
   RecordedPushClip(DrawTarget *aDT, ReferencePtr aPath)
     : RecordedDrawingEvent(PUSHCLIP, aDT), mPath(aPath)
   {
   }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "PushClip"; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "PushClip"; }
+
 private:
   friend class RecordedEvent;
 
   template<class S>
   MOZ_IMPLICIT RecordedPushClip(S &aStream);
 
   ReferencePtr mPath;
 };
 
 class RecordedPushClipRect : public RecordedDrawingEvent<RecordedPushClipRect> {
 public:
   RecordedPushClipRect(DrawTarget *aDT, const Rect &aRect)
     : RecordedDrawingEvent(PUSHCLIPRECT, aDT), mRect(aRect)
   {
   }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "PushClipRect"; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "PushClipRect"; }
+
 private:
   friend class RecordedEvent;
 
   template<class S>
   MOZ_IMPLICIT RecordedPushClipRect(S &aStream);
 
   Rect mRect;
 };
 
 class RecordedPopClip : public RecordedDrawingEvent<RecordedPopClip> {
 public:
   MOZ_IMPLICIT RecordedPopClip(DrawTarget *aDT)
     : RecordedDrawingEvent(POPCLIP, aDT)
   {}
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "PopClip"; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "PopClip"; }
+
 private:
   friend class RecordedEvent;
 
   template<class S>
   MOZ_IMPLICIT RecordedPopClip(S &aStream);
 };
 
 class RecordedPushLayer : public RecordedDrawingEvent<RecordedPushLayer> {
@@ -460,22 +472,23 @@ public:
                     SourceSurface* aMask, const Matrix& aMaskTransform,
                     const IntRect& aBounds, bool aCopyBackground)
     : RecordedDrawingEvent(PUSHLAYER, aDT), mOpaque(aOpaque)
     , mOpacity(aOpacity), mMask(aMask), mMaskTransform(aMaskTransform)
     , mBounds(aBounds), mCopyBackground(aCopyBackground)
   {
   }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "PushLayer"; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "PushLayer"; }
+
 private:
   friend class RecordedEvent;
 
   template<class S>
   MOZ_IMPLICIT RecordedPushLayer(S &aStream);
 
   bool mOpaque;
   Float mOpacity;
@@ -487,42 +500,43 @@ private:
 
 class RecordedPopLayer : public RecordedDrawingEvent<RecordedPopLayer> {
 public:
   MOZ_IMPLICIT RecordedPopLayer(DrawTarget* aDT)
     : RecordedDrawingEvent(POPLAYER, aDT)
   {
   }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "PopLayer"; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "PopLayer"; }
+
 private:
   friend class RecordedEvent;
 
   template<class S>
   MOZ_IMPLICIT RecordedPopLayer(S &aStream);
 };
 
 class RecordedSetTransform : public RecordedDrawingEvent<RecordedSetTransform> {
 public:
   RecordedSetTransform(DrawTarget *aDT, const Matrix &aTransform)
     : RecordedDrawingEvent(SETTRANSFORM, aDT), mTransform(aTransform)
   {
   }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "SetTransform"; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "SetTransform"; }
 
   Matrix mTransform;
 private:
   friend class RecordedEvent;
 
    template<class S>
   MOZ_IMPLICIT RecordedSetTransform(S &aStream);
 };
@@ -532,22 +546,23 @@ public:
   RecordedDrawSurface(DrawTarget *aDT, ReferencePtr aRefSource, const Rect &aDest,
                       const Rect &aSource, const DrawSurfaceOptions &aDSOptions,
                       const DrawOptions &aOptions)
     : RecordedDrawingEvent(DRAWSURFACE, aDT), mRefSource(aRefSource), mDest(aDest)
     , mSource(aSource), mDSOptions(aDSOptions), mOptions(aOptions)
   {
   }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "DrawSurface"; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "DrawSurface"; }
+
 private:
   friend class RecordedEvent;
 
    template<class S>
   MOZ_IMPLICIT RecordedDrawSurface(S &aStream);
 
   ReferencePtr mRefSource;
   Rect mDest;
@@ -561,22 +576,23 @@ public:
   RecordedDrawSurfaceWithShadow(DrawTarget *aDT, ReferencePtr aRefSource, const Point &aDest,
                                 const Color &aColor, const Point &aOffset,
                                 Float aSigma, CompositionOp aOp)
     : RecordedDrawingEvent(DRAWSURFACEWITHSHADOW, aDT), mRefSource(aRefSource), mDest(aDest)
     , mColor(aColor), mOffset(aOffset), mSigma(aSigma), mOp(aOp)
   {
   }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "DrawSurfaceWithShadow"; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "DrawSurfaceWithShadow"; }
+
 private:
   friend class RecordedEvent;
 
   template<class S>
   MOZ_IMPLICIT RecordedDrawSurfaceWithShadow(S &aStream);
 
   ReferencePtr mRefSource;
   Point mDest;
@@ -592,22 +608,23 @@ public:
                      const Rect &aSourceRect,
                      const Point &aDestPoint,
                      const DrawOptions &aOptions)
     : RecordedDrawingEvent(DRAWFILTER, aDT), mNode(aNode), mSourceRect(aSourceRect)
     , mDestPoint(aDestPoint), mOptions(aOptions)
   {
   }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "DrawFilter"; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "DrawFilter"; }
+
 private:
   friend class RecordedEvent;
 
   template<class S>
   MOZ_IMPLICIT RecordedDrawFilter(S &aStream);
 
   ReferencePtr mNode;
   Rect mSourceRect;
@@ -615,23 +632,24 @@ private:
   DrawOptions mOptions;
 };
 
 class RecordedPathCreation : public RecordedEventDerived<RecordedPathCreation> {
 public:
   MOZ_IMPLICIT RecordedPathCreation(PathRecording *aPath);
   ~RecordedPathCreation();
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "Path Creation"; }
-  virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "Path Creation"; }
+  virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
+
 private:
   friend class RecordedEvent;
 
   ReferencePtr mRefPtr;
   FillRule mFillRule;
   std::vector<PathOp> mPathOps;
 
   template<class S>
@@ -640,23 +658,24 @@ private:
 
 class RecordedPathDestruction : public RecordedEventDerived<RecordedPathDestruction> {
 public:
   MOZ_IMPLICIT RecordedPathDestruction(PathRecording *aPath)
     : RecordedEventDerived(PATHDESTRUCTION), mRefPtr(aPath)
   {
   }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "Path Destruction"; }
-  virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "Path Destruction"; }
+  virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
+
 private:
   friend class RecordedEvent;
 
   ReferencePtr mRefPtr;
 
   template<class S>
   MOZ_IMPLICIT RecordedPathDestruction(S &aStream);
 };
@@ -667,23 +686,24 @@ public:
                                 const IntSize &aSize, SurfaceFormat aFormat)
     : RecordedEventDerived(SOURCESURFACECREATION), mRefPtr(aRefPtr), mData(aData)
     , mStride(aStride), mSize(aSize), mFormat(aFormat), mDataOwned(false)
   {
   }
 
   ~RecordedSourceSurfaceCreation();
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "SourceSurface Creation"; }
-  virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "SourceSurface Creation"; }
+  virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
+
 private:
   friend class RecordedEvent;
 
   ReferencePtr mRefPtr;
   uint8_t *mData;
   int32_t mStride;
   IntSize mSize;
   SurfaceFormat mFormat;
@@ -695,23 +715,24 @@ private:
 
 class RecordedSourceSurfaceDestruction : public RecordedEventDerived<RecordedSourceSurfaceDestruction> {
 public:
   MOZ_IMPLICIT RecordedSourceSurfaceDestruction(ReferencePtr aRefPtr)
     : RecordedEventDerived(SOURCESURFACEDESTRUCTION), mRefPtr(aRefPtr)
   {
   }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "SourceSurface Destruction"; }
-  virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "SourceSurface Destruction"; }
+  virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
+
 private:
   friend class RecordedEvent;
 
   ReferencePtr mRefPtr;
 
   template<class S>
   MOZ_IMPLICIT RecordedSourceSurfaceDestruction(S &aStream);
 };
@@ -720,23 +741,24 @@ class RecordedFilterNodeCreation : publi
 public:
   RecordedFilterNodeCreation(ReferencePtr aRefPtr, FilterType aType)
     : RecordedEventDerived(FILTERNODECREATION), mRefPtr(aRefPtr), mType(aType)
   {
   }
 
   ~RecordedFilterNodeCreation();
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "FilterNode Creation"; }
-  virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "FilterNode Creation"; }
+  virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
+
 private:
   friend class RecordedEvent;
 
   ReferencePtr mRefPtr;
   FilterType mType;
 
   template<class S>
   MOZ_IMPLICIT RecordedFilterNodeCreation(S &aStream);
@@ -744,23 +766,24 @@ private:
 
 class RecordedFilterNodeDestruction : public RecordedEventDerived<RecordedFilterNodeDestruction> {
 public:
   MOZ_IMPLICIT RecordedFilterNodeDestruction(ReferencePtr aRefPtr)
     : RecordedEventDerived(FILTERNODEDESTRUCTION), mRefPtr(aRefPtr)
   {
   }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "FilterNode Destruction"; }
-  virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "FilterNode Destruction"; }
+  virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
+
 private:
   friend class RecordedEvent;
 
   ReferencePtr mRefPtr;
 
   template<class S>
   MOZ_IMPLICIT RecordedFilterNodeDestruction(S &aStream);
 };
@@ -771,23 +794,24 @@ public:
                                 uint32_t aNumStops, ExtendMode aExtendMode)
     : RecordedEventDerived(GRADIENTSTOPSCREATION), mRefPtr(aRefPtr), mStops(aStops)
     , mNumStops(aNumStops), mExtendMode(aExtendMode), mDataOwned(false)
   {
   }
 
   ~RecordedGradientStopsCreation();
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "GradientStops Creation"; }
-  virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "GradientStops Creation"; }
+  virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
+
 private:
   friend class RecordedEvent;
 
   ReferencePtr mRefPtr;
   GradientStop *mStops;
   uint32_t mNumStops;
   ExtendMode mExtendMode;
   bool mDataOwned;
@@ -798,46 +822,48 @@ private:
 
 class RecordedGradientStopsDestruction : public RecordedEventDerived<RecordedGradientStopsDestruction> {
 public:
   MOZ_IMPLICIT RecordedGradientStopsDestruction(ReferencePtr aRefPtr)
     : RecordedEventDerived(GRADIENTSTOPSDESTRUCTION), mRefPtr(aRefPtr)
   {
   }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "GradientStops Destruction"; }
-  virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "GradientStops Destruction"; }
+  virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
+
 private:
   friend class RecordedEvent;
 
   ReferencePtr mRefPtr;
 
   template<class S>
   MOZ_IMPLICIT RecordedGradientStopsDestruction(S &aStream);
 };
 
 class RecordedSnapshot : public RecordedEventDerived<RecordedSnapshot> {
 public:
   RecordedSnapshot(ReferencePtr aRefPtr, DrawTarget *aDT)
     : RecordedEventDerived(SNAPSHOT), mRefPtr(aRefPtr), mDT(aDT)
   {
   }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "Snapshot"; }
-  virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "Snapshot"; }
+  virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
+
 private:
   friend class RecordedEvent;
 
   ReferencePtr mRefPtr;
   ReferencePtr mDT;
 
   template<class S>
   MOZ_IMPLICIT RecordedSnapshot(S &aStream);
@@ -847,23 +873,24 @@ class RecordedIntoLuminanceSource : publ
 public:
   RecordedIntoLuminanceSource(ReferencePtr aRefPtr, DrawTarget *aDT,
                               LuminanceType aLuminanceType, float aOpacity)
     : RecordedEventDerived(SNAPSHOT), mRefPtr(aRefPtr), mDT(aDT),
       mLuminanceType(aLuminanceType), mOpacity(aOpacity)
   {
   }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "IntoLuminanceSource"; }
-  virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "IntoLuminanceSource"; }
+  virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
+
 private:
   friend class RecordedEvent;
 
   ReferencePtr mRefPtr;
   ReferencePtr mDT;
   LuminanceType mLuminanceType;
   float mOpacity;
 
@@ -888,23 +915,23 @@ public:
   {
     mGetFontFileDataSucceeded = aUnscaledFont->GetFontFileData(&FontDataProc, this);
   }
 
   ~RecordedFontData();
 
   bool IsValid() const { return mGetFontFileDataSucceeded; }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "Font Data"; }
-  virtual ReferencePtr GetObjectRef() const { return nullptr; };
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "Font Data"; }
+  virtual ReferencePtr GetObjectRef() const override { return nullptr; };
 
   void SetFontData(const uint8_t *aData, uint32_t aSize, uint32_t aIndex);
 
   bool GetFontDetails(RecordedFontDetails& fontDetails);
 
 private:
   friend class RecordedEvent;
 
@@ -936,23 +963,23 @@ public:
   {
     mHasDesc = aUnscaledFont->GetFontDescriptor(FontDescCb, this);
   }
 
   ~RecordedFontDescriptor();
 
   bool IsValid() const { return mHasDesc; }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "Font Desc"; }
-  virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "Font Desc"; }
+  virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
 
 private:
   friend class RecordedEvent;
 
   void SetFontDescriptor(const uint8_t* aData, uint32_t aSize, uint32_t aIndex);
 
   bool mHasDesc;
 
@@ -978,23 +1005,23 @@ public:
     : RecordedEventDerived(UNSCALEDFONTCREATION)
     , mRefPtr(aUnscaledFont)
     , mFontDataKey(aFontDetails.fontDataKey)
     , mIndex(aFontDetails.index)
   {
     aUnscaledFont->GetFontInstanceData(FontInstanceDataProc, this);
   }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "UnscaledFont Creation"; }
-  virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "UnscaledFont Creation"; }
+  virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
 
   void SetFontInstanceData(const uint8_t *aData, uint32_t aSize);
 
 private:
   friend class RecordedEvent;
 
   ReferencePtr mRefPtr;
   uint64_t mFontDataKey;
@@ -1006,23 +1033,24 @@ private:
 };
 
 class RecordedUnscaledFontDestruction : public RecordedEventDerived<RecordedUnscaledFontDestruction> {
 public:
   MOZ_IMPLICIT RecordedUnscaledFontDestruction(ReferencePtr aRefPtr)
     : RecordedEventDerived(UNSCALEDFONTDESTRUCTION), mRefPtr(aRefPtr)
   {}
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
   template<class S>
   void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "UnscaledFont Destruction"; }
-  virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "UnscaledFont Destruction"; }
+  virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
+
 private:
   friend class RecordedEvent;
 
   ReferencePtr mRefPtr;
 
   template<class S>
   MOZ_IMPLICIT RecordedUnscaledFontDestruction(S &aStream);
 };
@@ -1043,23 +1071,23 @@ public:
     : RecordedEventDerived(SCALEDFONTCREATION)
     , mRefPtr(aScaledFont)
     , mUnscaledFont(aUnscaledFont)
     , mGlyphSize(aScaledFont->GetSize())
   {
     aScaledFont->GetFontInstanceData(FontInstanceDataProc, this);
   }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "ScaledFont Creation"; }
-  virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "ScaledFont Creation"; }
+  virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
 
   void SetFontInstanceData(const uint8_t *aData, uint32_t aSize,
                            const FontVariation* aVariations, uint32_t aNumVariations);
 
 private:
   friend class RecordedEvent;
 
   ReferencePtr mRefPtr;
@@ -1087,23 +1115,23 @@ public:
     : RecordedEventDerived(SCALEDFONTCREATIONBYINDEX)
     , mRefPtr(aScaledFont)
     , mUnscaledFontIndex(aUnscaledFontIndex)
     , mGlyphSize(aScaledFont->GetSize())
   {
     aScaledFont->GetFontInstanceData(FontInstanceDataProc, this);
   }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "ScaledFont Creation"; }
-  virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "ScaledFont Creation"; }
+  virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
 
   void SetFontInstanceData(const uint8_t *aData, uint32_t aSize,
                            const FontVariation* aVariations, uint32_t aNumVariations);
 
 private:
   friend class RecordedEvent;
 
   ReferencePtr mRefPtr;
@@ -1118,24 +1146,25 @@ private:
 
 class RecordedScaledFontDestruction : public RecordedEventDerived<RecordedScaledFontDestruction> {
 public:
   MOZ_IMPLICIT RecordedScaledFontDestruction(ReferencePtr aRefPtr)
     : RecordedEventDerived(SCALEDFONTDESTRUCTION), mRefPtr(aRefPtr)
   {
   }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S>
   void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "ScaledFont Destruction"; }
-  virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "ScaledFont Destruction"; }
+  virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
+
 private:
   friend class RecordedEvent;
 
   ReferencePtr mRefPtr;
 
   template<class S>
   MOZ_IMPLICIT RecordedScaledFontDestruction(S &aStream);
 };
@@ -1145,22 +1174,23 @@ public:
   RecordedMaskSurface(DrawTarget *aDT, const Pattern &aPattern, ReferencePtr aRefMask,
                       const Point &aOffset, const DrawOptions &aOptions)
     : RecordedDrawingEvent(MASKSURFACE, aDT), mRefMask(aRefMask), mOffset(aOffset)
     , mOptions(aOptions)
   {
     StorePattern(mPattern, aPattern);
   }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
 
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "MaskSurface"; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "MaskSurface"; }
+
 private:
   friend class RecordedEvent;
 
   template<class S>
   MOZ_IMPLICIT RecordedMaskSurface(S &aStream);
 
   PatternStorage mPattern;
   ReferencePtr mRefMask;
@@ -1198,23 +1228,22 @@ public:
 
   RecordedFilterNodeSetAttribute(FilterNode *aNode, uint32_t aIndex, const Float *aFloat, uint32_t aSize)
     : RecordedEventDerived(FILTERNODESETATTRIBUTE), mNode(aNode), mIndex(aIndex), mArgType(ARGTYPE_FLOAT_ARRAY)
   {
     mPayload.resize(sizeof(Float) * aSize);
     memcpy(&mPayload.front(), aFloat, sizeof(Float) * aSize);
   }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "SetAttribute"; }
-
-  virtual ReferencePtr GetObjectRef() const { return mNode; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "SetAttribute"; }
+  virtual ReferencePtr GetObjectRef() const override { return mNode; }
 
 private:
   friend class RecordedEvent;
 
   ReferencePtr mNode;
 
   uint32_t mIndex;
   ArgType mArgType;
@@ -1234,23 +1263,22 @@ public:
   }
 
   RecordedFilterNodeSetInput(FilterNode *aNode, uint32_t aIndex, SourceSurface *aInputSurface)
     : RecordedEventDerived(FILTERNODESETINPUT), mNode(aNode), mIndex(aIndex)
     , mInputFilter(nullptr), mInputSurface(aInputSurface)
   {
   }
 
-  virtual bool PlayEvent(Translator *aTranslator) const;
+  virtual bool PlayEvent(Translator *aTranslator) const override;
   template<class S> void Record(S &aStream) const;
-  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
-  virtual std::string GetName() const { return "SetInput"; }
-
-  virtual ReferencePtr GetObjectRef() const { return mNode; }
+  virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+  virtual std::string GetName() const override { return "SetInput"; }
+  virtual ReferencePtr GetObjectRef() const override { return mNode; }
 
 private:
   friend class RecordedEvent;
 
   ReferencePtr mNode;
   uint32_t mIndex;
   ReferencePtr mInputFilter;
   ReferencePtr mInputSurface;
--- a/gfx/2d/ScaledFontBase.h
+++ b/gfx/2d/ScaledFontBase.h
@@ -23,39 +23,40 @@
 #endif
 
 namespace mozilla {
 namespace gfx {
 
 class ScaledFontBase : public ScaledFont
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(ScaledFontBase)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(ScaledFontBase, override)
+
   ScaledFontBase(const RefPtr<UnscaledFont>& aUnscaledFont, Float aSize);
   virtual ~ScaledFontBase();
 
-  virtual already_AddRefed<Path> GetPathForGlyphs(const GlyphBuffer &aBuffer, const DrawTarget *aTarget);
+  virtual already_AddRefed<Path> GetPathForGlyphs(const GlyphBuffer &aBuffer, const DrawTarget *aTarget) override;
 
-  virtual void CopyGlyphsToBuilder(const GlyphBuffer &aBuffer, PathBuilder *aBuilder, const Matrix *aTransformHint);
+  virtual void CopyGlyphsToBuilder(const GlyphBuffer &aBuffer, PathBuilder *aBuilder, const Matrix *aTransformHint) override;
 
-  virtual void GetGlyphDesignMetrics(const uint16_t* aGlyphIndices, uint32_t aNumGlyphs, GlyphMetrics* aGlyphMetrics);
+  virtual void GetGlyphDesignMetrics(const uint16_t* aGlyphIndices, uint32_t aNumGlyphs, GlyphMetrics* aGlyphMetrics) override;
 
-  virtual Float GetSize() const { return mSize; }
+  virtual Float GetSize() const override { return mSize; }
 
 #ifdef USE_SKIA
   virtual SkTypeface* GetSkTypeface() { return mTypeface; }
 #endif
 
   // Not true, but required to instantiate a ScaledFontBase.
-  virtual FontType GetType() const { return FontType::SKIA; }
+  virtual FontType GetType() const override { return FontType::SKIA; }
 
 #ifdef USE_CAIRO_SCALED_FONT
   bool PopulateCairoScaledFont();
-  virtual cairo_scaled_font_t* GetCairoScaledFont() { return mScaledFont; }
-  virtual void SetCairoScaledFont(cairo_scaled_font_t* font);
+  virtual cairo_scaled_font_t* GetCairoScaledFont() override { return mScaledFont; }
+  virtual void SetCairoScaledFont(cairo_scaled_font_t* font) override;
 #endif
 
 protected:
   friend class DrawTargetSkia;
 #ifdef USE_SKIA
   SkTypeface* mTypeface;
   SkPath GetSkiaPathForGlyphs(const GlyphBuffer &aBuffer);
 #endif
--- a/gfx/2d/ScaledFontCairo.h
+++ b/gfx/2d/ScaledFontCairo.h
@@ -12,23 +12,23 @@
 #include "cairo.h"
 
 namespace mozilla {
 namespace gfx {
 
 class ScaledFontCairo : public ScaledFontBase
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(ScaledFontCairo)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(ScaledFontCairo, override)
 
   ScaledFontCairo(cairo_scaled_font_t* aScaledFont,
                   const RefPtr<UnscaledFont>& aUnscaledFont,
                   Float aSize);
 
 #if defined(USE_SKIA) && defined(MOZ_ENABLE_FREETYPE)
-  virtual SkTypeface* GetSkTypeface();
+  virtual SkTypeface* GetSkTypeface() override;
 #endif
 };
 
 } // namespace gfx
 } // namespace mozilla
 
 #endif /* MOZILLA_GFX_SCALEDFONTCAIRO_H_ */
--- a/gfx/2d/SourceSurfaceCairo.h
+++ b/gfx/2d/SourceSurfaceCairo.h
@@ -12,31 +12,32 @@
 namespace mozilla {
 namespace gfx {
 
 class DrawTargetCairo;
 
 class SourceSurfaceCairo : public SourceSurface
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SourceSurfaceCairo)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SourceSurfaceCairo, override)
+
   // Create a SourceSurfaceCairo. The surface will not be copied, but simply
   // referenced.
   // If aDrawTarget is non-nullptr, it is assumed that this is a snapshot source
   // surface, and we'll call DrawTargetCairo::RemoveSnapshot(this) on it when
   // we're destroyed.
   SourceSurfaceCairo(cairo_surface_t* aSurface, const IntSize& aSize,
                      const SurfaceFormat& aFormat,
                      DrawTargetCairo* aDrawTarget = nullptr);
   virtual ~SourceSurfaceCairo();
 
-  virtual SurfaceType GetType() const { return SurfaceType::CAIRO; }
-  virtual IntSize GetSize() const;
-  virtual SurfaceFormat GetFormat() const;
-  virtual already_AddRefed<DataSourceSurface> GetDataSurface();
+  virtual SurfaceType GetType() const override { return SurfaceType::CAIRO; }
+  virtual IntSize GetSize() const override;
+  virtual SurfaceFormat GetFormat() const override;
+  virtual already_AddRefed<DataSourceSurface> GetDataSurface() override;
 
   cairo_surface_t* GetSurface() const;
 
 private: // methods
   friend class DrawTargetCairo;
   void DrawTargetWillChange();
 
 private: // data
@@ -44,25 +45,26 @@ private: // data
   SurfaceFormat mFormat;
   cairo_surface_t* mSurface;
   DrawTargetCairo* mDrawTarget;
 };
 
 class DataSourceSurfaceCairo : public DataSourceSurface
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DataSourceSurfaceCairo)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DataSourceSurfaceCairo, override)
+
   explicit DataSourceSurfaceCairo(cairo_surface_t* imageSurf);
   virtual ~DataSourceSurfaceCairo();
-  virtual unsigned char *GetData();
-  virtual int32_t Stride();
+  virtual unsigned char *GetData() override;
+  virtual int32_t Stride() override;
 
-  virtual SurfaceType GetType() const { return SurfaceType::CAIRO_IMAGE; }
-  virtual IntSize GetSize() const;
-  virtual SurfaceFormat GetFormat() const;
+  virtual SurfaceType GetType() const override { return SurfaceType::CAIRO_IMAGE; }
+  virtual IntSize GetSize() const override;
+  virtual SurfaceFormat GetFormat() const override;
 
   cairo_surface_t* GetSurface() const;
 
 private:
   cairo_surface_t* mImageSurface;
 };
 
 } // namespace gfx
--- a/gfx/2d/SourceSurfaceD2D1.h
+++ b/gfx/2d/SourceSurfaceD2D1.h
@@ -16,27 +16,28 @@
 namespace mozilla {
 namespace gfx {
 
 class DrawTargetD2D1;
 
 class SourceSurfaceD2D1 : public SourceSurface
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SourceSurfaceD2D1)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SourceSurfaceD2D1, override)
+
   SourceSurfaceD2D1(ID2D1Image* aImage, ID2D1DeviceContext *aDC,
                     SurfaceFormat aFormat, const IntSize &aSize,
                     DrawTargetD2D1 *aDT = nullptr);
   ~SourceSurfaceD2D1();
 
-  virtual SurfaceType GetType() const { return SurfaceType::D2D1_1_IMAGE; }
-  virtual IntSize GetSize() const { return mSize; }
-  virtual SurfaceFormat GetFormat() const { return mFormat; }
-  virtual bool IsValid() const;
-  virtual already_AddRefed<DataSourceSurface> GetDataSurface();
+  virtual SurfaceType GetType() const override { return SurfaceType::D2D1_1_IMAGE; }
+  virtual IntSize GetSize() const override { return mSize; }
+  virtual SurfaceFormat GetFormat() const override { return mFormat; }
+  virtual bool IsValid() const override;
+  virtual already_AddRefed<DataSourceSurface> GetDataSurface() override;
 
   ID2D1Image *GetImage() { return mImage; }
 
   void EnsureIndependent() { if (!mDrawTarget) return; DrawTargetWillChange(); }
 
 private:
   friend class DrawTargetD2D1;
 
@@ -63,28 +64,29 @@ private:
   IntSize mSize;
   DrawTargetD2D1* mDrawTarget;
   std::shared_ptr<Mutex> mSnapshotLock;
 };
 
 class DataSourceSurfaceD2D1 : public DataSourceSurface
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DataSourceSurfaceD2D1)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DataSourceSurfaceD2D1, override)
+
   DataSourceSurfaceD2D1(ID2D1Bitmap1 *aMappableBitmap, SurfaceFormat aFormat);
   ~DataSourceSurfaceD2D1();
 
-  virtual SurfaceType GetType() const { return SurfaceType::DATA; }
-  virtual IntSize GetSize() const;
-  virtual SurfaceFormat GetFormat() const { return mFormat; }
-  virtual bool IsValid() const { return !!mBitmap; }
-  virtual uint8_t *GetData();
-  virtual int32_t Stride();
-  virtual bool Map(MapType, MappedSurface *aMappedSurface);
-  virtual void Unmap();
+  virtual SurfaceType GetType() const  override{ return SurfaceType::DATA; }
+  virtual IntSize GetSize() const override;
+  virtual SurfaceFormat GetFormat() const override { return mFormat; }
+  virtual bool IsValid() const override { return !!mBitmap; }
+  virtual uint8_t *GetData() override;
+  virtual int32_t Stride() override;
+  virtual bool Map(MapType, MappedSurface *aMappedSurface) override;
+  virtual void Unmap() override;
 
 private:
   friend class SourceSurfaceD2DTarget;
   void EnsureMapped();
 
   mutable RefPtr<ID2D1Bitmap1> mBitmap;
   SurfaceFormat mFormat;
   D2D1_MAPPED_RECT mMap;
--- a/gfx/2d/SourceSurfaceDual.h
+++ b/gfx/2d/SourceSurfaceDual.h
@@ -13,30 +13,31 @@ namespace mozilla {
 namespace gfx {
 
 class DualSurface;
 class DualPattern;
 
 class SourceSurfaceDual : public SourceSurface
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SourceSurfaceDual)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SourceSurfaceDual, override)
+
   SourceSurfaceDual(DrawTarget *aDTA, DrawTarget *aDTB)
     : mA(aDTA->Snapshot())
     , mB(aDTB->Snapshot())
   { }
 
-  virtual SurfaceType GetType() const { return SurfaceType::DUAL_DT; }
-  virtual IntSize GetSize() const { return mA->GetSize(); }
-  virtual SurfaceFormat GetFormat() const { return mA->GetFormat(); }
+  virtual SurfaceType GetType() const override { return SurfaceType::DUAL_DT; }
+  virtual IntSize GetSize() const override { return mA->GetSize(); }
+  virtual SurfaceFormat GetFormat() const override { return mA->GetFormat(); }
 
   // TODO: This is probably wrong as this was originally only
   // used for debugging purposes, but now has legacy relying on
   // giving the first type only.
-  virtual already_AddRefed<DataSourceSurface> GetDataSurface() {
+  virtual already_AddRefed<DataSourceSurface> GetDataSurface() override {
     return mA->GetDataSurface();
   }
 
   SourceSurface* GetFirstSurface() {
     MOZ_ASSERT(mA->GetType() == mB->GetType());
     return mA;
   }
 
--- a/gfx/2d/SourceSurfaceSkia.h
+++ b/gfx/2d/SourceSurfaceSkia.h
@@ -18,23 +18,24 @@ namespace mozilla {
 namespace gfx {
 
 class DrawTargetSkia;
 class SnapshotLock;
 
 class SourceSurfaceSkia : public DataSourceSurface
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DataSourceSurfaceSkia)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DataSourceSurfaceSkia, override)
+
   SourceSurfaceSkia();
   ~SourceSurfaceSkia();
 
-  virtual SurfaceType GetType() const { return SurfaceType::SKIA; }
-  virtual IntSize GetSize() const;
-  virtual SurfaceFormat GetFormat() const;
+  virtual SurfaceType GetType() const override { return SurfaceType::SKIA; }
+  virtual IntSize GetSize() const override;
+  virtual SurfaceFormat GetFormat() const override;
 
   // This is only ever called by the DT destructor, which can only ever happen
   // from one place at a time. Therefore it doesn't need to hold the ChangeMutex
   // as mSurface is never read to directly and is just there to keep the object
   // alive, which itself is refcounted in a thread-safe manner.
   void GiveSurface(sk_sp<SkSurface> &aSurface) { mSurface = aSurface; mDrawTarget = nullptr; }
 
   sk_sp<SkImage> GetImage();
@@ -43,26 +44,26 @@ public:
                     const IntSize &aSize,
                     int32_t aStride,
                     SurfaceFormat aFormat);
 
   bool InitFromImage(const sk_sp<SkImage>& aImage,
                      SurfaceFormat aFormat = SurfaceFormat::UNKNOWN,
                      DrawTargetSkia* aOwner = nullptr);
 
-  virtual uint8_t* GetData();
+  virtual uint8_t* GetData() override;
 
   /**
    * The caller is responsible for ensuring aMappedSurface is not null.
    */
-  virtual bool Map(MapType, MappedSurface *aMappedSurface);
+  virtual bool Map(MapType, MappedSurface *aMappedSurface) override;
 
-  virtual void Unmap();
+  virtual void Unmap() override;
 
-  virtual int32_t Stride() { return mStride; }
+  virtual int32_t Stride() override { return mStride; }
 
 private:
   friend class DrawTargetSkia;
 
   void DrawTargetWillChange();
 
   sk_sp<SkImage> mImage;
   // This keeps a surface alive if needed because its DrawTarget has gone away.
--- a/gfx/angle/src/compiler/translator/IntermTraverse.h
+++ b/gfx/angle/src/compiler/translator/IntermTraverse.h
@@ -301,20 +301,20 @@ class TLValueTrackingTraverser : public 
   public:
     TLValueTrackingTraverser(bool preVisit,
                              bool inVisit,
                              bool postVisit,
                              TSymbolTable *symbolTable,
                              int shaderVersion);
     virtual ~TLValueTrackingTraverser() {}
 
-    void traverseBinary(TIntermBinary *node) final;
-    void traverseUnary(TIntermUnary *node) final;
-    void traverseFunctionPrototype(TIntermFunctionPrototype *node) final;
-    void traverseAggregate(TIntermAggregate *node) final;
+    void traverseBinary(TIntermBinary *node) final override;
+    void traverseUnary(TIntermUnary *node) final override;
+    void traverseFunctionPrototype(TIntermFunctionPrototype *node) final override;
+    void traverseAggregate(TIntermAggregate *node) final override;
 
   protected:
     bool isLValueRequiredHere() const
     {
         return mOperatorRequiresLValue || mInFunctionCallOutParameter;
     }
 
   private:
--- a/gfx/angle/src/tests/perf_tests/MultiviewPerf.cpp
+++ b/gfx/angle/src/tests/perf_tests/MultiviewPerf.cpp
@@ -116,17 +116,17 @@ class MultiviewBenchmark : public ANGLER
     {
         if (mProgram != 0)
         {
             glDeleteProgram(mProgram);
         }
     }
 
     void initializeBenchmark() override;
-    void drawBenchmark() final;
+    void drawBenchmark() final override;
 
     void overrideWorkaroundsD3D(WorkaroundsD3D *workarounds) override
     {
         workarounds->selectViewInGeometryShader =
             (GetParam().multiviewOption == MultiviewOption::InstancedMultiviewGeometryShader);
     }
 
   protected:
@@ -527,9 +527,9 @@ TEST_P(MultiviewGPUBoundBenchmark, Run)
 
 ANGLE_INSTANTIATE_TEST(MultiviewGPUBoundBenchmark,
                        NoAcceleration(egl_platform::OPENGL(), BigWorkload()),
                        NoAcceleration(egl_platform::D3D11(), BigWorkload()),
                        SelectViewInGeometryShader(BigWorkload()),
                        SelectViewInVertexShader(egl_platform::OPENGL(), BigWorkload()),
                        SelectViewInVertexShader(egl_platform::D3D11(), BigWorkload()));
 
-}  // anonymous namespace
\ No newline at end of file
+}  // anonymous namespace
--- a/gfx/gl/GLTextureImage.h
+++ b/gfx/gl/GLTextureImage.h
@@ -189,24 +189,24 @@ public:
 
     BasicTextureImage(GLuint aTexture,
                       const gfx::IntSize& aSize,
                       GLenum aWrapMode,
                       ContentType aContentType,
                       GLContext* aContext,
                       TextureImage::Flags aFlags = TextureImage::NoFlags);
 
-    virtual void BindTexture(GLenum aTextureUnit);
+    virtual void BindTexture(GLenum aTextureUnit) override;
 
-    virtual bool DirectUpdate(gfx::DataSourceSurface* aSurf, const nsIntRegion& aRegion, const gfx::IntPoint& aFrom = gfx::IntPoint(0,0));
-    virtual GLuint GetTextureID() { return mTexture; }
+    virtual bool DirectUpdate(gfx::DataSourceSurface* aSurf, const nsIntRegion& aRegion, const gfx::IntPoint& aFrom = gfx::IntPoint(0,0)) override;
+    virtual GLuint GetTextureID() override { return mTexture; }
 
-    virtual void MarkValid() { mTextureState = Valid; }
+    virtual void MarkValid() override { mTextureState = Valid; }
 
-    virtual void Resize(const gfx::IntSize& aSize);
+    virtual void Resize(const gfx::IntSize& aSize) override;
 
 protected:
     GLuint mTexture;
     TextureState mTextureState;
     RefPtr<GLContext> mGLContext;
 };
 
 /**
@@ -220,31 +220,31 @@ class TiledTextureImage final
 public:
     TiledTextureImage(GLContext* aGL,
                       gfx::IntSize aSize,
                       TextureImage::ContentType,
                       TextureImage::Flags aFlags = TextureImage::NoFlags,
                       TextureImage::ImageFormat aImageFormat = gfx::SurfaceFormat::UNKNOWN);
     ~TiledTextureImage();
     void DumpDiv();
-    virtual void Resize(const gfx::IntSize& aSize);
-    virtual uint32_t GetTileCount();
-    virtual void BeginBigImageIteration();
-    virtual bool NextTile();
+    virtual void Resize(const gfx::IntSize& aSize) override;
+    virtual uint32_t GetTileCount() override;
+    virtual void BeginBigImageIteration() override;
+    virtual bool NextTile() override;
     virtual void SetIterationCallback(BigImageIterationCallback aCallback,
-                                      void* aCallbackData);
-    virtual gfx::IntRect GetTileRect();
-    virtual GLuint GetTextureID() {
+                                      void* aCallbackData) override;
+    virtual gfx::IntRect GetTileRect() override;
+    virtual GLuint GetTextureID() override {
         return mImages[mCurrentImage]->GetTextureID();
     }
-    virtual bool DirectUpdate(gfx::DataSourceSurface* aSurf, const nsIntRegion& aRegion, const gfx::IntPoint& aFrom = gfx::IntPoint(0,0));
-    virtual void BindTexture(GLenum);
+    virtual bool DirectUpdate(gfx::DataSourceSurface* aSurf, const nsIntRegion& aRegion, const gfx::IntPoint& aFrom = gfx::IntPoint(0,0)) override;
+    virtual void BindTexture(GLenum) override;
 
 protected:
-    virtual gfx::IntRect GetSrcTileRect();
+    virtual gfx::IntRect GetSrcTileRect() override;
 
     unsigned int mCurrentImage;
     BigImageIterationCallback mIterationCallback;
     void* mIterationCallbackData;
     nsTArray< RefPtr<TextureImage> > mImages;
     unsigned int mTileSize;
     unsigned int mRows, mColumns;
     GLContext* mGL;
--- a/gfx/gl/SkiaGLGlue.h
+++ b/gfx/gl/SkiaGLGlue.h
@@ -17,17 +17,18 @@ class GrContext;
 namespace mozilla {
 namespace gl {
 
 class GLContext;
 
 class SkiaGLGlue : public GenericAtomicRefCounted
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SkiaGLGlue)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SkiaGLGlue, override)
+
   explicit SkiaGLGlue(GLContext* context);
   GLContext* GetGLContext() const { return mGLContext.get(); }
   GrContext* GetGrContext() const { return mGrContext.get(); }
 
 protected:
   virtual ~SkiaGLGlue();
 
 private:
--- a/gfx/gl/TextureImageEGL.h
+++ b/gfx/gl/TextureImageEGL.h
@@ -21,30 +21,30 @@ public:
                     ContentType aContentType,
                     GLContext* aContext,
                     Flags aFlags = TextureImage::NoFlags,
                     TextureState aTextureState = Created,
                     TextureImage::ImageFormat aImageFormat = SurfaceFormat::UNKNOWN);
 
     virtual ~TextureImageEGL();
 
-    virtual bool DirectUpdate(gfx::DataSourceSurface* aSurf, const nsIntRegion& aRegion, const gfx::IntPoint& aFrom = gfx::IntPoint(0,0));
+    virtual bool DirectUpdate(gfx::DataSourceSurface* aSurf, const nsIntRegion& aRegion, const gfx::IntPoint& aFrom = gfx::IntPoint(0,0)) override;
 
-    virtual void BindTexture(GLenum aTextureUnit);
+    virtual void BindTexture(GLenum aTextureUnit) override;
 
-    virtual GLuint GetTextureID()
+    virtual GLuint GetTextureID() override
     {
         // Ensure the texture is allocated before it is used.
         if (mTextureState == Created) {
             Resize(mSize);
         }
         return mTexture;
     };
 
-    virtual void Resize(const gfx::IntSize& aSize);
+    virtual void Resize(const gfx::IntSize& aSize) override;
 
     bool BindTexImage();
 
     bool ReleaseTexImage();
 
     virtual bool CreateEGLSurface(gfxASurface* aSurface)
     {
         return false;
--- a/gfx/layers/AxisPhysicsMSDModel.h
+++ b/gfx/layers/AxisPhysicsMSDModel.h
@@ -36,17 +36,17 @@ public:
 
   /**
    * Returns true when the position is close to the destination and the
    * velocity is low.
    */
   bool IsFinished(double aSmallestVisibleIncrement);
 
 protected:
-  virtual double Acceleration(const State &aState);
+  virtual double Acceleration(const State &aState) override;
 
 private:
 
   /**
    * mDestination represents the target position and the resting position of
    * the simulated spring.
    */
   double mDestination;
--- a/gfx/layers/Effects.h
+++ b/gfx/layers/Effects.h
@@ -65,19 +65,19 @@ struct TexturedEffect : public Effect
                  gfx::SamplingFilter aSamplingFilter)
      : Effect(aType)
      , mTextureCoords(0, 0, 1.0f, 1.0f)
      , mTexture(aTexture)
      , mPremultiplied(aPremultiplied)
      , mSamplingFilter(aSamplingFilter)
   {}
 
-  virtual TexturedEffect* AsTexturedEffect() { return this; }
+  virtual TexturedEffect* AsTexturedEffect() override { return this; }
   virtual const char* Name() = 0;
-  virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix);
+  virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
 
   gfx::Rect mTextureCoords;
   TextureSource* mTexture;
   bool mPremultiplied;
   gfx::SamplingFilter mSamplingFilter;
 };
 
 // Support an alpha mask.
@@ -87,47 +87,47 @@ struct EffectMask : public Effect
              gfx::IntSize aSize,
              const gfx::Matrix4x4 &aMaskTransform)
     : Effect(EffectTypes::MASK)
     , mMaskTexture(aMaskTexture)
     , mSize(aSize)
     , mMaskTransform(aMaskTransform)
   {}
 
-  virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix);
+  virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
 
   TextureSource* mMaskTexture;
   gfx::IntSize mSize;
   gfx::Matrix4x4 mMaskTransform;
 };
 
 struct EffectBlendMode : public Effect
 {
   explicit EffectBlendMode(gfx::CompositionOp aBlendMode)
     : Effect(EffectTypes::BLEND_MODE)
     , mBlendMode(aBlendMode)
   { }
 
   virtual const char* Name() { return "EffectBlendMode"; }
-  virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix);
+  virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
 
   gfx::CompositionOp mBlendMode;
 };
 
 // Render to a render target rather than the screen.
 struct EffectRenderTarget : public TexturedEffect
 {
   explicit EffectRenderTarget(CompositingRenderTarget *aRenderTarget)
     : TexturedEffect(EffectTypes::RENDER_TARGET, aRenderTarget, true,
                      gfx::SamplingFilter::LINEAR)
     , mRenderTarget(aRenderTarget)
   {}
 
-  virtual const char* Name() { return "EffectRenderTarget"; }
-  virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix);
+  virtual const char* Name() override { return "EffectRenderTarget"; }
+  virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
 
   RefPtr<CompositingRenderTarget> mRenderTarget;
 
 protected:
   EffectRenderTarget(EffectTypes aType, CompositingRenderTarget *aRenderTarget)
     : TexturedEffect(aType, aRenderTarget, true, gfx::SamplingFilter::LINEAR)
     , mRenderTarget(aRenderTarget)
   {}
@@ -138,80 +138,80 @@ protected:
 struct EffectColorMatrix : public Effect
 {
   explicit EffectColorMatrix(gfx::Matrix5x4 aMatrix)
     : Effect(EffectTypes::COLOR_MATRIX)
     , mColorMatrix(aMatrix)
   {}
 
   virtual const char* Name() { return "EffectColorMatrix"; }
-  virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix);
+  virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
   const gfx::Matrix5x4 mColorMatrix;
 };
 
 
 struct EffectRGB : public TexturedEffect
 {
   EffectRGB(TextureSource *aTexture,
             bool aPremultiplied,
             gfx::SamplingFilter aSamplingFilter,
             bool aFlipped = false)
     : TexturedEffect(EffectTypes::RGB, aTexture, aPremultiplied, aSamplingFilter)
   {}
 
-  virtual const char* Name() { return "EffectRGB"; }
+  virtual const char* Name() override { return "EffectRGB"; }
 };
 
 struct EffectYCbCr : public TexturedEffect
 {
   EffectYCbCr(TextureSource *aSource, YUVColorSpace aYUVColorSpace, uint32_t aBitDepth, gfx::SamplingFilter aSamplingFilter)
     : TexturedEffect(EffectTypes::YCBCR, aSource, false, aSamplingFilter)
     , mYUVColorSpace(aYUVColorSpace)
     , mBitDepth(aBitDepth)
   {}
 
-  virtual const char* Name() { return "EffectYCbCr"; }
+  virtual const char* Name() override { return "EffectYCbCr"; }
 
   YUVColorSpace mYUVColorSpace;
   uint32_t mBitDepth;
 };
 
 struct EffectNV12 : public TexturedEffect
 {
   EffectNV12(TextureSource *aSource, gfx::SamplingFilter aSamplingFilter)
     : TexturedEffect(EffectTypes::NV12, aSource, false, aSamplingFilter)
   {}
 
-  virtual const char* Name() { return "EffectNV12"; }
+  virtual const char* Name() override { return "EffectNV12"; }
 };
 
 struct EffectComponentAlpha : public TexturedEffect
 {
   EffectComponentAlpha(TextureSource *aOnBlack,
                        TextureSource *aOnWhite,
                        gfx::SamplingFilter aSamplingFilter)
     : TexturedEffect(EffectTypes::COMPONENT_ALPHA, nullptr, false, aSamplingFilter)
     , mOnBlack(aOnBlack)
     , mOnWhite(aOnWhite)
   {}
 
-  virtual const char* Name() { return "EffectComponentAlpha"; }
+  virtual const char* Name() override { return "EffectComponentAlpha"; }
 
   TextureSource* mOnBlack;
   TextureSource* mOnWhite;
 };
 
 struct EffectSolidColor : public Effect
 {
   explicit EffectSolidColor(const gfx::Color &aColor)
     : Effect(EffectTypes::SOLID_COLOR)
     , mColor(aColor)
   {}
 
-  virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix);
+  virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
 
   gfx::Color mColor;
 };
 
 struct EffectChain
 {
   EffectChain() : mLayerRef(nullptr) {}
   explicit EffectChain(void* aLayerRef) : mLayerRef(aLayerRef) {}
--- a/gfx/layers/basic/BasicImages.cpp
+++ b/gfx/layers/basic/BasicImages.cpp
@@ -75,17 +75,17 @@ private:
 };
 
 class BasicImageFactory : public ImageFactory
 {
 public:
   BasicImageFactory() {}
 
   virtual RefPtr<PlanarYCbCrImage>
-  CreatePlanarYCbCrImage(const gfx::IntSize& aScaleHint, BufferRecycleBin* aRecycleBin)
+  CreatePlanarYCbCrImage(const gfx::IntSize& aScaleHint, BufferRecycleBin* aRecycleBin) override
   {
     return new BasicPlanarYCbCrImage(aScaleHint, gfxPlatform::GetPlatform()->GetOffscreenFormat(), aRecycleBin);
   }
 };
 
 bool
 BasicPlanarYCbCrImage::CopyData(const Data& aData)
 {
--- a/gfx/layers/basic/BasicLayersImpl.h
+++ b/gfx/layers/basic/BasicLayersImpl.h
@@ -57,17 +57,17 @@ public:
 
 protected:
   virtual ~BasicReadbackLayer()
   {
     MOZ_COUNT_DTOR(BasicReadbackLayer);
   }
 
 public:
-  virtual void SetVisibleRegion(const LayerIntRegion& aRegion)
+  virtual void SetVisibleRegion(const LayerIntRegion& aRegion) override
   {
     NS_ASSERTION(BasicManager()->InConstruction(),
                  "Can only set properties in construction phase");
     ReadbackLayer::SetVisibleRegion(aRegion);
   }
 
 protected:
   BasicLayerManager* BasicManager()
--- a/gfx/layers/client/ClientBorderLayer.cpp
+++ b/gfx/layers/client/ClientBorderLayer.cpp
@@ -29,35 +29,35 @@ public:
 
 protected:
   virtual ~ClientBorderLayer()
   {
     MOZ_COUNT_DTOR(ClientBorderLayer);
   }
 
 public:
-  virtual void SetVisibleRegion(const LayerIntRegion& aRegion)
+  virtual void SetVisibleRegion(const LayerIntRegion& aRegion) override
   {
     NS_ASSERTION(ClientManager()->InConstruction(),
                  "Can only set properties in construction phase");
     BorderLayer::SetVisibleRegion(aRegion);
   }
 
-  virtual void RenderLayer()
+  virtual void RenderLayer() override
   {
     RenderMaskLayers(this);
   }
 
-  virtual void FillSpecificAttributes(SpecificLayerAttributes& aAttrs)
+  virtual void FillSpecificAttributes(SpecificLayerAttributes& aAttrs) override
   {
     aAttrs = BorderLayerAttributes(mRect, mColors, mCorners, mWidths);
   }
 
-  virtual Layer* AsLayer() { return this; }
-  virtual ShadowableLayer* AsShadowableLayer() { return this; }
+  virtual Layer* AsLayer() override { return this; }
+  virtual ShadowableLayer* AsShadowableLayer() override { return this; }
 
 protected:
   ClientLayerManager* ClientManager()
   {
     return static_cast<ClientLayerManager*>(mManager);
   }
 };
 
--- a/gfx/layers/client/ClientColorLayer.cpp
+++ b/gfx/layers/client/ClientColorLayer.cpp
@@ -29,35 +29,35 @@ public:
 
 protected:
   virtual ~ClientColorLayer()
   {
     MOZ_COUNT_DTOR(ClientColorLayer);
   }
 
 public:
-  virtual void SetVisibleRegion(const LayerIntRegion& aRegion)
+  virtual void SetVisibleRegion(const LayerIntRegion& aRegion) override
   {
     NS_ASSERTION(ClientManager()->InConstruction(),
                  "Can only set properties in construction phase");
     ColorLayer::SetVisibleRegion(aRegion);
   }
 
-  virtual void RenderLayer()
+  virtual void RenderLayer() override
   {
     RenderMaskLayers(this);
   }
 
-  virtual void FillSpecificAttributes(SpecificLayerAttributes& aAttrs)
+  virtual void FillSpecificAttributes(SpecificLayerAttributes& aAttrs) override
   {
     aAttrs = ColorLayerAttributes(GetColor(), GetBounds());
   }
 
-  virtual Layer* AsLayer() { return this; }
-  virtual ShadowableLayer* AsShadowableLayer() { return this; }
+  virtual Layer* AsLayer() override { return this; }
+  virtual ShadowableLayer* AsShadowableLayer() override { return this; }
 
 protected:
   ClientLayerManager* ClientManager()
   {
     return static_cast<ClientLayerManager*>(mManager);
   }
 };
 
--- a/gfx/layers/client/ClientContainerLayer.h
+++ b/gfx/layers/client/ClientContainerLayer.h
@@ -147,22 +147,22 @@ public:
 
 protected:
   virtual ~ClientRefLayer()
   {
     MOZ_COUNT_DTOR(ClientRefLayer);
   }
 
 public:
-  virtual Layer* AsLayer() { return this; }
-  virtual ShadowableLayer* AsShadowableLayer() { return this; }
+  virtual Layer* AsLayer() override { return this; }
+  virtual ShadowableLayer* AsShadowableLayer() override { return this; }
 
-  virtual void RenderLayer() { }
+  virtual void RenderLayer() override { }
 
-  virtual void ComputeEffectiveTransforms(const gfx::Matrix4x4& aTransformToSurface)
+  virtual void ComputeEffectiveTransforms(const gfx::Matrix4x4& aTransformToSurface) override
   {