Bug 1754767 - Remove duplicate includes r=media-playback-reviewers,padenot
authorSylvestre Ledru <sledru@mozilla.com>
Fri, 11 Feb 2022 10:01:15 +0000 (2022-02-11)
changeset 607460 b07f125d09fd9f3361398f1f3ac05fd898398a22
parent 607459 df3ebc33eca8d286cf5eef243463aa2aa2078319
child 607461 eb89031cbeda73e8987aec0713190d3fca0c6194
push id39273
push userccozmuta@mozilla.com
push dateFri, 11 Feb 2022 16:43:52 +0000 (2022-02-11)
treeherdermozilla-central@46048399bf0f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmedia-playback-reviewers, padenot
bugs1754767
milestone99.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1754767 - Remove duplicate includes r=media-playback-reviewers,padenot Differential Revision: https://phabricator.services.mozilla.com/D138441
dom/animation/AnimationUtils.cpp
dom/base/ContentProcessMessageManager.h
dom/base/DOMIntersectionObserver.cpp
dom/base/Element.cpp
dom/base/FragmentOrElement.cpp
dom/base/InProcessBrowserChildMessageManager.h
dom/base/Navigator.cpp
dom/base/Selection.cpp
dom/base/nsDOMDataChannel.cpp
dom/base/nsDOMWindowUtils.cpp
dom/base/nsDataDocumentContentPolicy.cpp
dom/base/nsFrameMessageManager.cpp
dom/base/nsGlobalWindowCommands.cpp
dom/base/nsGlobalWindowInner.h
dom/base/nsGlobalWindowOuter.cpp
dom/base/nsGlobalWindowOuter.h
dom/base/nsINode.cpp
dom/base/nsNameSpaceManager.cpp
dom/base/nsObjectLoadingContent.cpp
dom/base/nsScreen.cpp
dom/bindings/BindingUtils.cpp
dom/canvas/CanvasRenderingContext2D.cpp
dom/canvas/WebGLContext.h
dom/canvas/WebGLContextVertices.cpp
dom/events/DOMEventTargetHelper.cpp
dom/gamepad/GamepadServiceTest.cpp
dom/html/HTMLInputElement.cpp
dom/html/HTMLTextAreaElement.cpp
dom/html/nsHTMLDocument.cpp
dom/indexedDB/IDBDatabase.cpp
dom/indexedDB/IDBFactory.cpp
dom/ipc/BrowserChild.h
dom/ipc/ContentChild.cpp
dom/ipc/ContentParent.cpp
dom/ipc/URLClassifierParent.h
dom/ipc/WindowGlobalChild.cpp
dom/ipc/WindowGlobalParent.cpp
dom/media/AudioChannelFormat.h
dom/media/MediaTrackGraph.cpp
dom/media/gmp/GMPVideoEncoderParent.cpp
dom/media/gmp/GMPVideoHost.h
dom/media/mediacapabilities/KeyValueStorage.cpp
dom/media/mp4/DecoderData.h
dom/media/platforms/ffmpeg/FFmpegLibWrapper.cpp
dom/media/webaudio/AudioDestinationNode.cpp
dom/media/webrtc/jsapi/MediaTransportHandler.cpp
dom/media/webrtc/jsapi/RTCStatsReport.h
dom/media/webrtc/libwebrtcglue/WebrtcMediaDataDecoderCodec.cpp
dom/media/webrtc/transport/nricectx.cpp
dom/media/webrtc/transport/test/ice_unittest.cpp
dom/media/webrtc/transport/transportlayerdtls.cpp
dom/media/webrtc/transport/transportlayerice.cpp
dom/media/webrtc/transport/transportlayersrtp.cpp
dom/notification/Notification.cpp
dom/plugins/base/nsPluginTags.cpp
dom/script/ScriptLoadRequest.cpp
dom/security/nsContentSecurityManager.cpp
dom/serviceworkers/ServiceWorker.cpp
dom/storage/StorageUtils.cpp
dom/svg/SVGContentUtils.cpp
dom/webauthn/WebAuthnUtil.cpp
dom/webgpu/Texture.h
dom/websocket/WebSocket.cpp
dom/workers/RuntimeService.cpp
dom/workers/ScriptLoader.cpp
dom/workers/WorkerEventTarget.cpp
dom/workers/WorkerScope.h
dom/worklet/Worklet.cpp
dom/xhr/XMLHttpRequestMainThread.cpp
dom/xslt/xslt/txXSLTPatterns.cpp
--- a/dom/animation/AnimationUtils.cpp
+++ b/dom/animation/AnimationUtils.cpp
@@ -5,17 +5,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "AnimationUtils.h"
 
 #include "mozilla/dom/Animation.h"
 #include "mozilla/dom/Document.h"
 #include "mozilla/dom/KeyframeEffect.h"
 #include "mozilla/EffectSet.h"
-#include "mozilla/dom/Animation.h"
 #include "nsDebug.h"
 #include "nsAtom.h"
 #include "nsIContent.h"
 #include "nsGlobalWindow.h"
 #include "nsString.h"
 #include "xpcpublic.h"  // For xpc::NativeGlobal
 
 using namespace mozilla::dom;
--- a/dom/base/ContentProcessMessageManager.h
+++ b/dom/base/ContentProcessMessageManager.h
@@ -7,17 +7,16 @@
 #ifndef mozilla_dom_ContentProcessMessageManager_h
 #define mozilla_dom_ContentProcessMessageManager_h
 
 #include "mozilla/Attributes.h"
 #include "mozilla/dom/MessageManagerGlobal.h"
 #include "mozilla/dom/MessageManagerCallback.h"
 #include "nsCOMPtr.h"
 #include "nsIScriptContext.h"
-#include "nsIScriptContext.h"
 #include "nsServiceManagerUtils.h"
 #include "nsWeakReference.h"
 #include "nsWrapperCache.h"
 #include "xpcpublic.h"
 
 class nsFrameMessageManager;
 
 namespace mozilla {
--- a/dom/base/DOMIntersectionObserver.cpp
+++ b/dom/base/DOMIntersectionObserver.cpp
@@ -10,17 +10,16 @@
 #include "nsContainerFrame.h"
 #include "nsIScrollableFrame.h"
 #include "nsContentUtils.h"
 #include "nsLayoutUtils.h"
 #include "nsRefreshDriver.h"
 #include "mozilla/PresShell.h"
 #include "mozilla/StaticPrefs_dom.h"
 #include "mozilla/ServoBindings.h"
-#include "mozilla/StaticPrefs_dom.h"
 #include "mozilla/dom/BrowserChild.h"
 #include "mozilla/dom/BrowsingContext.h"
 #include "mozilla/dom/DocumentInlines.h"
 #include "mozilla/dom/HTMLImageElement.h"
 #include "Units.h"
 
 namespace mozilla::dom {
 
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -70,17 +70,16 @@
 #include "mozilla/dom/CustomElementRegistry.h"
 #include "mozilla/dom/DOMRect.h"
 #include "mozilla/dom/DirectionalityUtils.h"
 #include "mozilla/dom/Document.h"
 #include "mozilla/dom/DocumentFragment.h"
 #include "mozilla/dom/DocumentInlines.h"
 #include "mozilla/dom/DocumentTimeline.h"
 #include "mozilla/dom/ElementBinding.h"
-#include "mozilla/dom/ElementInlines.h"
 #include "mozilla/dom/Flex.h"
 #include "mozilla/dom/FromParser.h"
 #include "mozilla/dom/Grid.h"
 #include "mozilla/dom/HTMLDivElement.h"
 #include "mozilla/dom/HTMLElement.h"
 #include "mozilla/dom/HTMLParagraphElement.h"
 #include "mozilla/dom/HTMLPreElement.h"
 #include "mozilla/dom/HTMLSpanElement.h"
--- a/dom/base/FragmentOrElement.cpp
+++ b/dom/base/FragmentOrElement.cpp
@@ -55,17 +55,16 @@
 #include "nsDOMTokenList.h"
 #include "nsError.h"
 #include "nsDOMString.h"
 #include "nsXULElement.h"
 #include "mozilla/InternalMutationEvent.h"
 #include "mozilla/MouseEvents.h"
 #include "nsAttrValueOrString.h"
 #include "nsQueryObject.h"
-#include "nsXULElement.h"
 #include "nsFrameSelection.h"
 #ifdef DEBUG
 #  include "nsRange.h"
 #endif
 
 #include "nsFrameLoader.h"
 #include "nsPIDOMWindow.h"
 #include "nsLayoutUtils.h"
--- a/dom/base/InProcessBrowserChildMessageManager.h
+++ b/dom/base/InProcessBrowserChildMessageManager.h
@@ -10,17 +10,16 @@
 #include "mozilla/Attributes.h"
 #include "mozilla/DOMEventTargetHelper.h"
 #include "mozilla/RefPtr.h"
 #include "mozilla/dom/ContentFrameMessageManager.h"
 #include "mozilla/dom/MessageManagerCallback.h"
 #include "nsCOMPtr.h"
 #include "nsIScriptContext.h"
 #include "nsIScriptObjectPrincipal.h"
-#include "nsIScriptContext.h"
 #include "nsDocShell.h"
 #include "nsCOMArray.h"
 #include "nsWeakReference.h"
 
 class nsFrameMessageManager;
 
 namespace mozilla {
 class EventChainPreVisitor;
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -96,20 +96,16 @@
 
 #include "nsIUploadChannel2.h"
 #include "mozilla/dom/FormData.h"
 #include "nsIDocShell.h"
 
 #include "mozilla/dom/WorkerPrivate.h"
 #include "mozilla/dom/WorkerRunnable.h"
 
-#if defined(XP_LINUX)
-#  include "mozilla/Hal.h"
-#endif
-
 #if defined(XP_WIN)
 #  include "mozilla/WindowsVersion.h"
 #endif
 
 #include "mozilla/EMEUtils.h"
 #include "mozilla/DetailedPromise.h"
 #include "mozilla/Unused.h"
 
--- a/dom/base/Selection.cpp
+++ b/dom/base/Selection.cpp
@@ -53,17 +53,16 @@
 #include <algorithm>
 #include "nsContentUtils.h"
 
 #include "nsGkAtoms.h"
 #include "nsLayoutUtils.h"
 #include "nsBidiPresUtils.h"
 #include "nsTextFrame.h"
 
-#include "nsContentUtils.h"
 #include "nsThreadUtils.h"
 
 #include "nsPresContext.h"
 #include "nsCaret.h"
 
 #include "nsITimer.h"
 #include "mozilla/dom/Document.h"
 #include "nsINamed.h"
--- a/dom/base/nsDOMDataChannel.cpp
+++ b/dom/base/nsDOMDataChannel.cpp
@@ -5,17 +5,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsDOMDataChannel.h"
 
 #include "base/basictypes.h"
 #include "mozilla/Logging.h"
 
 #include "nsDOMDataChannelDeclarations.h"
-#include "nsDOMDataChannel.h"
 #include "mozilla/DOMEventTargetHelper.h"
 #include "mozilla/EventListenerManager.h"
 #include "mozilla/dom/File.h"
 #include "mozilla/dom/MessageEvent.h"
 #include "mozilla/dom/MessageEventBinding.h"
 #include "mozilla/dom/ScriptSettings.h"
 #include "mozilla/dom/ToJSValue.h"
 #include "mozilla/dom/Blob.h"
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -38,17 +38,16 @@
 #include "mozilla/media/MediaUtils.h"
 #include "nsQueryObject.h"
 #include "CubebDeviceEnumerator.h"
 
 #include "nsIScrollableFrame.h"
 
 #include "nsContentUtils.h"
 
-#include "nsIFrame.h"
 #include "nsIWidget.h"
 #include "nsCharsetSource.h"
 #include "nsJSEnvironment.h"
 #include "nsJSUtils.h"
 #include "js/experimental/PCCountProfiling.h"  // JS::{Start,Stop}PCCountProfiling, JS::PurgePCCounts, JS::GetPCCountScript{Count,Summary,Contents}
 #include "js/Object.h"                         // JS::GetClass
 
 #include "mozilla/ChaosMode.h"
--- a/dom/base/nsDataDocumentContentPolicy.cpp
+++ b/dom/base/nsDataDocumentContentPolicy.cpp
@@ -7,17 +7,16 @@
 /*
  * Content policy implementation that prevents all loads of images,
  * subframes, etc from documents loaded as data (eg documents loaded
  * via XMLHttpRequest).
  */
 
 #include "nsContentPolicyUtils.h"
 #include "nsContentUtils.h"
-#include "nsContentPolicyUtils.h"
 #include "nsDataDocumentContentPolicy.h"
 #include "nsNetUtil.h"
 #include "nsIProtocolHandler.h"
 #include "nsScriptSecurityManager.h"
 #include "mozilla/dom/Document.h"
 #include "mozilla/ScopeExit.h"
 #include "nsINode.h"
 #include "nsIURI.h"
--- a/dom/base/nsFrameMessageManager.cpp
+++ b/dom/base/nsFrameMessageManager.cpp
@@ -75,17 +75,16 @@
 #include "nsClassHashtable.h"
 #include "nsComponentManagerUtils.h"
 #include "nsContentUtils.h"
 #include "nsCycleCollectionNoteChild.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsTHashMap.h"
 #include "nsDebug.h"
 #include "nsError.h"
-#include "nsFrameMessageManager.h"
 #include "nsHashKeys.h"
 #include "nsIChannel.h"
 #include "nsIConsoleService.h"
 #include "nsIContentPolicy.h"
 #include "nsIInputStream.h"
 #include "nsILoadInfo.h"
 #include "nsIMemoryReporter.h"
 #include "nsIMessageManager.h"
--- a/dom/base/nsGlobalWindowCommands.cpp
+++ b/dom/base/nsGlobalWindowCommands.cpp
@@ -11,17 +11,16 @@
 #include "nsCommandParams.h"
 #include "nsCRT.h"
 #include "nsString.h"
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/PresShell.h"
 
 #include "nsControllerCommandTable.h"
-#include "nsCommandParams.h"
 
 #include "nsPIDOMWindow.h"
 #include "nsIDocShell.h"
 #include "nsISelectionController.h"
 #include "nsIWebNavigation.h"
 #include "nsIContentViewerEdit.h"
 #include "nsIContentViewer.h"
 #include "nsFocusManager.h"
--- a/dom/base/nsGlobalWindowInner.h
+++ b/dom/base/nsGlobalWindowInner.h
@@ -49,17 +49,16 @@
 #include "nsWrapperCacheInlines.h"
 #include "mozilla/dom/EventTarget.h"
 #include "mozilla/dom/WindowBinding.h"
 #include "mozilla/dom/WindowProxyHolder.h"
 #include "mozilla/glean/bindings/Glean.h"
 #include "mozilla/glean/bindings/GleanPings.h"
 #include "Units.h"
 #include "nsComponentManagerUtils.h"
-#include "nsSize.h"
 #include "nsCheapSets.h"
 #include "mozilla/dom/ImageBitmapBinding.h"
 #include "mozilla/dom/ImageBitmapSource.h"
 #include "mozilla/UniquePtr.h"
 #include "nsRefreshObservers.h"
 #include "nsThreadUtils.h"
 
 class nsIArray;
--- a/dom/base/nsGlobalWindowOuter.cpp
+++ b/dom/base/nsGlobalWindowOuter.cpp
@@ -223,34 +223,32 @@
 #include "mozilla/Services.h"
 #include "mozilla/Telemetry.h"
 #include "mozilla/dom/Location.h"
 #include "nsHTMLDocument.h"
 #include "nsWrapperCacheInlines.h"
 #include "mozilla/DOMEventTargetHelper.h"
 #include "prrng.h"
 #include "nsSandboxFlags.h"
-#include "nsBaseCommandController.h"
 #include "nsXULControllers.h"
 #include "mozilla/dom/AudioContext.h"
 #include "mozilla/dom/BrowserElementDictionariesBinding.h"
 #include "mozilla/dom/BrowsingContextGroup.h"
 #include "mozilla/dom/cache/CacheStorage.h"
 #include "mozilla/dom/Console.h"
 #include "mozilla/dom/Fetch.h"
 #include "mozilla/dom/FunctionBinding.h"
 #include "mozilla/dom/HashChangeEvent.h"
 #include "mozilla/dom/IntlUtils.h"
 #include "mozilla/dom/PopStateEvent.h"
 #include "mozilla/dom/PopupBlockedEvent.h"
 #include "mozilla/dom/PrimitiveConversions.h"
 #include "mozilla/dom/WindowBinding.h"
 #include "nsIBrowserChild.h"
 #include "mozilla/dom/MediaQueryList.h"
-#include "mozilla/dom/ScriptSettings.h"
 #include "mozilla/dom/NavigatorBinding.h"
 #include "mozilla/dom/ImageBitmap.h"
 #include "mozilla/dom/ImageBitmapBinding.h"
 #include "mozilla/dom/ServiceWorkerRegistration.h"
 #include "mozilla/dom/U2F.h"
 #include "mozilla/dom/WebIDLGlobalNameHash.h"
 #include "mozilla/dom/Worklet.h"
 #include "AccessCheck.h"
--- a/dom/base/nsGlobalWindowOuter.h
+++ b/dom/base/nsGlobalWindowOuter.h
@@ -40,17 +40,16 @@
 #include "mozilla/dom/UnionTypes.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/LinkedList.h"
 #include "nsWrapperCacheInlines.h"
 #include "mozilla/dom/EventTarget.h"
 #include "mozilla/dom/WindowBinding.h"
 #include "Units.h"
 #include "nsComponentManagerUtils.h"
-#include "nsSize.h"
 #include "nsCheapSets.h"
 #include "mozilla/dom/ImageBitmapSource.h"
 #include "mozilla/UniquePtr.h"
 #include "mozilla/dom/BrowsingContext.h"
 #include "X11UndefineNone.h"
 
 class nsDocShell;
 class nsIArray;
--- a/dom/base/nsINode.cpp
+++ b/dom/base/nsINode.cpp
@@ -97,17 +97,16 @@
 #include "nsWindowSizes.h"
 #include "mozilla/Preferences.h"
 #include "xpcpublic.h"
 #include "HTMLLegendElement.h"
 #include "nsWrapperCacheInlines.h"
 #include "WrapperFactory.h"
 #include <algorithm>
 #include "nsGlobalWindow.h"
-#include "nsDOMMutationObserver.h"
 #include "GeometryUtils.h"
 #include "nsIAnimationObserver.h"
 #include "nsChildContentList.h"
 #include "mozilla/dom/NodeBinding.h"
 #include "mozilla/dom/BindingDeclarations.h"
 #include "mozilla/dom/AncestorIterator.h"
 #include "xpcprivate.h"
 
--- a/dom/base/nsNameSpaceManager.cpp
+++ b/dom/base/nsNameSpaceManager.cpp
@@ -14,17 +14,16 @@
 #include "nscore.h"
 #include "mozilla/dom/NodeInfo.h"
 #include "nsAtom.h"
 #include "nsCOMArray.h"
 #include "nsContentCreatorFunctions.h"
 #include "nsGkAtoms.h"
 #include "mozilla/dom/Document.h"
 #include "nsString.h"
-#include "mozilla/dom/NodeInfo.h"
 #include "mozilla/ClearOnShutdown.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/Preferences.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 static const char* kPrefSVGDisabled = "svg.disabled";
--- a/dom/base/nsObjectLoadingContent.cpp
+++ b/dom/base/nsObjectLoadingContent.cpp
@@ -85,17 +85,16 @@
 #include "mozilla/IntegerPrintfMacros.h"
 #include "mozilla/dom/HTMLObjectElementBinding.h"
 #include "mozilla/dom/HTMLEmbedElement.h"
 #include "mozilla/dom/HTMLObjectElement.h"
 #include "mozilla/dom/UserActivation.h"
 #include "mozilla/dom/nsCSPContext.h"
 #include "mozilla/net/DocumentChannel.h"
 #include "mozilla/net/UrlClassifierFeatureFactory.h"
-#include "mozilla/LoadInfo.h"
 #include "mozilla/PresShell.h"
 #include "mozilla/ProfilerLabels.h"
 #include "mozilla/StaticPrefs_browser.h"
 #include "mozilla/StaticPrefs_security.h"
 #include "nsChannelClassifier.h"
 #include "nsFocusManager.h"
 #include "ReferrerInfo.h"
 #include "nsIEffectiveTLDService.h"
--- a/dom/base/nsScreen.cpp
+++ b/dom/base/nsScreen.cpp
@@ -3,17 +3,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsContentUtils.h"
 #include "nsScreen.h"
 #include "mozilla/dom/Document.h"
 #include "nsIDocShell.h"
-#include "mozilla/dom/Document.h"
 #include "nsPresContext.h"
 #include "nsCOMPtr.h"
 #include "nsIDocShellTreeItem.h"
 #include "nsLayoutUtils.h"
 #include "nsJSUtils.h"
 #include "nsDeviceContext.h"
 
 using namespace mozilla;
--- a/dom/bindings/BindingUtils.cpp
+++ b/dom/bindings/BindingUtils.cpp
@@ -74,17 +74,16 @@
 #include "mozilla/dom/XULTreeElementBinding.h"
 #include "mozilla/dom/Promise.h"
 #include "mozilla/dom/WebIDLGlobalNameHash.h"
 #include "mozilla/dom/WorkerPrivate.h"
 #include "mozilla/dom/WorkerScope.h"
 #include "mozilla/dom/XrayExpandoClass.h"
 #include "mozilla/dom/WindowProxyHolder.h"
 #include "ipc/ErrorIPCUtils.h"
-#include "mozilla/UseCounter.h"
 #include "mozilla/dom/DocGroup.h"
 #include "nsXULElement.h"
 
 namespace mozilla {
 namespace dom {
 
 // Forward declare GetConstructorObject methods.
 #define HTML_TAG(_tag, _classname, _interfacename)  \
--- a/dom/canvas/CanvasRenderingContext2D.cpp
+++ b/dom/canvas/CanvasRenderingContext2D.cpp
@@ -34,17 +34,16 @@
 #include "nsReadableUtils.h"
 
 #include "nsColor.h"
 #include "nsGfxCIID.h"
 #include "nsIDocShell.h"
 #include "nsPIDOMWindow.h"
 #include "nsDisplayList.h"
 #include "nsFocusManager.h"
-#include "nsContentUtils.h"
 
 #include "nsTArray.h"
 
 #include "ImageEncoder.h"
 #include "ImageRegion.h"
 
 #include "gfxContext.h"
 #include "gfxPlatform.h"
@@ -84,17 +83,16 @@
 #include "mozilla/dom/ImageBitmap.h"
 #include "mozilla/dom/ImageData.h"
 #include "mozilla/dom/PBrowserParent.h"
 #include "mozilla/dom/ToJSValue.h"
 #include "mozilla/dom/TypedArray.h"
 #include "mozilla/EndianUtils.h"
 #include "mozilla/FilterInstance.h"
 #include "mozilla/gfx/2D.h"
-#include "mozilla/gfx/Helpers.h"
 #include "mozilla/gfx/Tools.h"
 #include "mozilla/gfx/PathHelpers.h"
 #include "mozilla/gfx/DataSurfaceHelpers.h"
 #include "mozilla/gfx/PatternHelpers.h"
 #include "mozilla/gfx/Swizzle.h"
 #include "mozilla/layers/PersistentBufferProvider.h"
 #include "mozilla/MathAlgorithms.h"
 #include "mozilla/Preferences.h"
@@ -113,17 +111,16 @@
 #include "mozilla/dom/SVGImageElement.h"
 #include "mozilla/dom/TextMetrics.h"
 #include "mozilla/FloatingPoint.h"
 #include "nsGlobalWindow.h"
 #include "nsDeviceContext.h"
 #include "nsFontMetrics.h"
 #include "nsLayoutUtils.h"
 #include "Units.h"
-#include "CanvasUtils.h"
 #include "mozilla/CycleCollectedJSRuntime.h"
 #include "mozilla/ServoCSSParser.h"
 #include "mozilla/ServoStyleSet.h"
 #include "mozilla/SVGContentUtils.h"
 #include "mozilla/layers/CanvasClient.h"
 #include "mozilla/layers/WebRenderUserData.h"
 #include "mozilla/layers/WebRenderCanvasRenderer.h"
 #include "WindowRenderer.h"
--- a/dom/canvas/WebGLContext.h
+++ b/dom/canvas/WebGLContext.h
@@ -25,29 +25,26 @@
 #include "mozilla/Mutex.h"
 #include "mozilla/UniquePtr.h"
 #include "mozilla/WeakPtr.h"
 #include "nsICanvasRenderingContextInternal.h"
 #include "nsTArray.h"
 #include "SurfaceTypes.h"
 #include "ScopedGLHelpers.h"
 #include "TexUnpackBlob.h"
-#include "mozilla/WeakPtr.h"
 
 // Local
 #include "CacheInvalidator.h"
 #include "WebGLContextLossHandler.h"
 #include "WebGLExtensions.h"
 #include "WebGLObjectModel.h"
 #include "WebGLStrongTypes.h"
 #include "WebGLTypes.h"
 
 // Generated
-#include "nsICanvasRenderingContextInternal.h"
-#include "mozilla/dom/HTMLCanvasElement.h"
 #include "mozilla/dom/WebGLRenderingContextBinding.h"
 #include "mozilla/dom/WebGL2RenderingContextBinding.h"
 
 #include <list>
 
 class nsIDocShell;
 
 // WebGL-only GLenums
--- a/dom/canvas/WebGLContextVertices.cpp
+++ b/dom/canvas/WebGLContextVertices.cpp
@@ -12,17 +12,16 @@
 #include "WebGLFramebuffer.h"
 #include "WebGLProgram.h"
 #include "WebGLRenderbuffer.h"
 #include "WebGLShader.h"
 #include "WebGLTexture.h"
 #include "WebGLTypes.h"
 #include "WebGLVertexArray.h"
 
-#include "mozilla/Casting.h"
 #include "mozilla/ResultVariant.h"
 
 namespace mozilla {
 
 static bool ValidateAttribIndex(WebGLContext& webgl, GLuint index) {
   bool valid = (index < webgl.MaxVertexAttribs());
 
   if (!valid) {
--- a/dom/events/DOMEventTargetHelper.cpp
+++ b/dom/events/DOMEventTargetHelper.cpp
@@ -6,17 +6,16 @@
 
 #include "nsContentUtils.h"
 #include "mozilla/dom/Document.h"
 #include "mozilla/Sprintf.h"
 #include "mozilla/dom/Event.h"
 #include "mozilla/DOMEventTargetHelper.h"
 #include "mozilla/EventDispatcher.h"
 #include "mozilla/EventListenerManager.h"
-#include "mozilla/EventListenerManager.h"
 #include "mozilla/Likely.h"
 #include "MainThreadUtils.h"
 
 namespace mozilla {
 
 using namespace dom;
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(DOMEventTargetHelper)
--- a/dom/gamepad/GamepadServiceTest.cpp
+++ b/dom/gamepad/GamepadServiceTest.cpp
@@ -12,18 +12,16 @@
 #include "mozilla/dom/GamepadManager.h"
 #include "mozilla/dom/GamepadPlatformService.h"
 #include "mozilla/dom/GamepadServiceTestBinding.h"
 #include "mozilla/dom/GamepadTestChannelChild.h"
 
 #include "mozilla/ipc/BackgroundChild.h"
 #include "mozilla/ipc/PBackgroundChild.h"
 
-#include "mozilla/Unused.h"
-
 namespace mozilla::dom {
 
 /*
  * Implementation of the test service. This is just to provide a simple binding
  * of the GamepadService to JavaScript via WebIDL so that we can write
  * Mochitests that add and remove fake gamepads, avoiding the platform-specific
  * backends.
  */
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
@@ -103,26 +103,24 @@
 #include "nsContentCreatorFunctions.h"
 #include "nsContentUtils.h"
 #include "mozilla/dom/DirectionalityUtils.h"
 #include "nsRadioVisitor.h"
 
 #include "mozilla/LookAndFeel.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/MathAlgorithms.h"
-#include "mozilla/TextUtils.h"
 
 #include <limits>
 
 #include "nsIColorPicker.h"
 #include "nsIStringEnumerator.h"
 #include "HTMLSplitOnSpacesTokenizer.h"
 #include "nsIMIMEInfo.h"
 #include "nsFrameSelection.h"
-#include "nsBaseCommandController.h"
 #include "nsXULControllers.h"
 
 // input type=date
 #include "js/Date.h"
 
 NS_IMPL_NS_NEW_HTML_ELEMENT_CHECK_PARSER(Input)
 
 // XXX align=left, hspace, vspace, border? other nav4 attrs
--- a/dom/html/HTMLTextAreaElement.cpp
+++ b/dom/html/HTMLTextAreaElement.cpp
@@ -33,17 +33,16 @@
 #include "nsITextControlFrame.h"
 #include "nsLayoutUtils.h"
 #include "nsLinebreakConverter.h"
 #include "nsMappedAttributes.h"
 #include "nsPIDOMWindow.h"
 #include "nsPresContext.h"
 #include "nsReadableUtils.h"
 #include "nsStyleConsts.h"
-#include "nsBaseCommandController.h"
 #include "nsTextControlFrame.h"
 #include "nsXULControllers.h"
 
 NS_IMPL_NS_NEW_HTML_ELEMENT_CHECK_PARSER(TextArea)
 
 namespace mozilla::dom {
 
 HTMLTextAreaElement::HTMLTextAreaElement(
--- a/dom/html/nsHTMLDocument.cpp
+++ b/dom/html/nsHTMLDocument.cpp
@@ -47,17 +47,16 @@
 #include "nsGenericHTMLElement.h"
 #include "mozilla/css/Loader.h"
 #include "nsFrameSelection.h"
 
 #include "nsContentUtils.h"
 #include "nsJSUtils.h"
 #include "DocumentInlines.h"
 #include "nsICachingChannel.h"
-#include "nsIContentViewer.h"
 #include "nsIScriptElement.h"
 #include "nsArrayUtils.h"
 
 // AHMED 12-2
 #include "nsBidiUtils.h"
 
 #include "mozilla/Encoding.h"
 #include "mozilla/EventListenerManager.h"
--- a/dom/indexedDB/IDBDatabase.cpp
+++ b/dom/indexedDB/IDBDatabase.cpp
@@ -8,17 +8,16 @@
 
 #include "IDBEvents.h"
 #include "IDBFactory.h"
 #include "IDBIndex.h"
 #include "IDBMutableFile.h"
 #include "IDBObjectStore.h"
 #include "IDBRequest.h"
 #include "IDBTransaction.h"
-#include "IDBFactory.h"
 #include "IndexedDatabaseInlines.h"
 #include "IndexedDatabaseManager.h"
 #include "IndexedDBCommon.h"
 #include "mozilla/ErrorResult.h"
 #include "mozilla/EventDispatcher.h"
 #include "MainThreadUtils.h"
 #include "mozilla/ResultExtensions.h"
 #include "mozilla/Services.h"
--- a/dom/indexedDB/IDBFactory.cpp
+++ b/dom/indexedDB/IDBFactory.cpp
@@ -38,20 +38,16 @@
 #include "nsServiceManagerUtils.h"
 #include "ProfilerHelpers.h"
 #include "ReportInternalError.h"
 #include "ThreadLocal.h"
 
 // Include this last to avoid path problems on Windows.
 #include "ActorsChild.h"
 
-#ifdef DEBUG
-#  include "nsContentUtils.h"  // For assertions.
-#endif
-
 namespace mozilla::dom {
 
 using namespace mozilla::dom::indexedDB;
 using namespace mozilla::dom::quota;
 using namespace mozilla::ipc;
 
 namespace {
 
--- a/dom/ipc/BrowserChild.h
+++ b/dom/ipc/BrowserChild.h
@@ -33,17 +33,16 @@
 #include "mozilla/dom/VsyncMainChild.h"
 #include "mozilla/DOMEventTargetHelper.h"
 #include "mozilla/EventDispatcher.h"
 #include "mozilla/EventForwards.h"
 #include "mozilla/layers/CompositorTypes.h"
 #include "mozilla/layers/APZCCallbackHelper.h"
 #include "mozilla/layers/CompositorOptions.h"
 #include "mozilla/layers/GeckoContentControllerTypes.h"
-#include "nsIWebBrowserChrome.h"
 #include "nsITopLevelNavigationDelegate.h"
 #include "mozilla/dom/ipc/IdType.h"
 #include "AudioChannelService.h"
 #include "PuppetWidget.h"
 #include "nsDeque.h"
 #include "nsIRemoteTab.h"
 #include "nsTHashSet.h"
 
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -163,29 +163,27 @@
 #  if defined(MOZ_DEBUG) && defined(ENABLE_TESTS)
 #    include "mozilla/SandboxTestingChild.h"
 #  endif
 #endif
 
 #include "SandboxHal.h"
 #include "mozInlineSpellChecker.h"
 #include "mozilla/GlobalStyleSheetCache.h"
-#include "mozilla/Unused.h"
 #include "nsAnonymousTemporaryFile.h"
 #include "nsClipboardProxy.h"
 #include "nsContentPermissionHelper.h"
 #include "nsDebugImpl.h"
 #include "nsDirectoryService.h"
 #include "nsDirectoryServiceDefs.h"
 #include "nsDirectoryServiceUtils.h"
 #include "nsDocShell.h"
 #include "nsDocShellLoadState.h"
 #include "nsHashPropertyBag.h"
 #include "nsIConsoleListener.h"
-#include "nsIConsoleService.h"
 #include "nsIContentViewer.h"
 #include "nsICycleCollectorListener.h"
 #include "nsIDocShellTreeOwner.h"
 #include "nsIDragService.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsIMemoryInfoDumper.h"
 #include "nsIMemoryReporter.h"
 #include "nsIObserverService.h"
@@ -207,17 +205,16 @@
 #include "base/message_loop.h"
 #include "base/process_util.h"
 #include "base/task.h"
 #include "mozilla/dom/BlobURLProtocolHandler.h"
 #include "mozilla/dom/PCycleCollectWithLogsChild.h"
 #include "mozilla/dom/PerformanceStorage.h"
 #include "nsChromeRegistryContent.h"
 #include "nsFrameMessageManager.h"
-#include "nsIScriptSecurityManager.h"
 #include "nsNetUtil.h"
 #include "nsWindowMemoryReporter.h"
 
 #ifdef MOZ_WEBRTC
 #  include "jsapi/WebrtcGlobalChild.h"
 #endif
 
 #include "PermissionMessageUtils.h"
@@ -261,17 +258,16 @@
 #include "mozilla/ipc/IPCStreamSource.h"
 
 #ifdef MOZ_WEBSPEECH
 #  include "mozilla/dom/PSpeechSynthesisChild.h"
 #endif
 
 #include "ClearOnShutdown.h"
 #include "DomainPolicy.h"
-#include "GMPServiceChild.h"
 #include "GfxInfoBase.h"
 #include "MMPrinter.h"
 #include "mozilla/ipc/ProcessUtils.h"
 #include "mozilla/ipc/URIUtils.h"
 #include "VRManagerChild.h"
 #include "gfxPlatform.h"
 #include "gfxPlatformFontList.h"
 #include "mozilla/RemoteSpellCheckEngineChild.h"
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -32,17 +32,16 @@
 #include "IHistory.h"
 #if defined(XP_WIN) && defined(ACCESSIBILITY)
 #  include "mozilla/a11y/AccessibleWrap.h"
 #  include "mozilla/a11y/Compatibility.h"
 #endif
 #include <map>
 #include <utility>
 
-#include "BrowserParent.h"
 #include "ContentProcessManager.h"
 #include "GeckoProfiler.h"
 #include "Geolocation.h"
 #include "GfxInfoBase.h"
 #include "MMPrinter.h"
 #include "PreallocatedProcessManager.h"
 #include "ProcessPriorityManager.h"
 #include "ProfilerParent.h"
@@ -158,17 +157,16 @@
 #include "mozilla/layers/PAPZParent.h"
 #include "mozilla/loader/ScriptCacheActors.h"
 #include "mozilla/media/MediaParent.h"
 #include "mozilla/mozSpellChecker.h"
 #include "mozilla/net/CookieServiceParent.h"
 #include "mozilla/net/NeckoMessageUtils.h"
 #include "mozilla/net/NeckoParent.h"
 #include "mozilla/net/PCookieServiceParent.h"
-#include "mozilla/Telemetry.h"
 #include "mozilla/TelemetryComms.h"
 #include "mozilla/TelemetryEventEnums.h"
 #include "mozilla/RemoteLazyInputStreamParent.h"
 #include "mozilla/widget/RemoteLookAndFeel.h"
 #include "mozilla/widget/ScreenManager.h"
 #include "nsAnonymousTemporaryFile.h"
 #include "nsAppRunner.h"
 #include "nsCExternalHandlerService.h"
--- a/dom/ipc/URLClassifierParent.h
+++ b/dom/ipc/URLClassifierParent.h
@@ -7,17 +7,16 @@
 #ifndef mozilla_dom_URLClassifierParent_h
 #define mozilla_dom_URLClassifierParent_h
 
 #include "mozilla/dom/PContent.h"
 #include "mozilla/dom/PURLClassifierParent.h"
 #include "mozilla/dom/PURLClassifierLocalParent.h"
 #include "nsIURIClassifier.h"
 #include "nsIUrlClassifierFeature.h"
-#include "mozilla/dom/PContent.h"
 
 namespace mozilla {
 namespace dom {
 
 class IPCURLClassifierFeature;
 
 //////////////////////////////////////////////////////////////
 // URLClassifierParent
--- a/dom/ipc/WindowGlobalChild.cpp
+++ b/dom/ipc/WindowGlobalChild.cpp
@@ -15,30 +15,28 @@
 #include "mozilla/dom/MozFrameLoaderOwnerBinding.h"
 #include "mozilla/dom/BrowserChild.h"
 #include "mozilla/dom/BrowserBridgeChild.h"
 #include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/SecurityPolicyViolationEvent.h"
 #include "mozilla/dom/SessionStoreRestoreData.h"
 #include "mozilla/dom/SessionStoreDataCollector.h"
 #include "mozilla/dom/WindowGlobalActorsBinding.h"
-#include "mozilla/dom/WindowGlobalParent.h"
 #include "mozilla/dom/WindowContext.h"
 #include "mozilla/dom/InProcessChild.h"
 #include "mozilla/dom/InProcessParent.h"
 #include "mozilla/ipc/Endpoint.h"
 #include "mozilla/PresShell.h"
 #include "mozilla/ScopeExit.h"
 #include "GeckoProfiler.h"
 #include "nsContentUtils.h"
 #include "nsDocShell.h"
 #include "nsFocusManager.h"
 #include "nsFrameLoaderOwner.h"
 #include "nsGlobalWindowInner.h"
-#include "nsFrameLoaderOwner.h"
 #include "nsNetUtil.h"
 #include "nsQueryObject.h"
 #include "nsSerializationHelper.h"
 #include "nsFrameLoader.h"
 
 #include "mozilla/dom/JSWindowActorBinding.h"
 #include "mozilla/dom/JSWindowActorChild.h"
 #include "mozilla/dom/JSActorService.h"
--- a/dom/ipc/WindowGlobalParent.cpp
+++ b/dom/ipc/WindowGlobalParent.cpp
@@ -40,29 +40,27 @@
 #include "nsContentUtils.h"
 #include "nsDocShell.h"
 #include "nsDocShellLoadState.h"
 #include "nsError.h"
 #include "nsFrameLoader.h"
 #include "nsFrameLoaderOwner.h"
 #include "nsGlobalWindowInner.h"
 #include "nsQueryObject.h"
-#include "nsFrameLoaderOwner.h"
 #include "nsNetUtil.h"
 #include "nsSandboxFlags.h"
 #include "nsSerializationHelper.h"
 #include "nsIBrowser.h"
 #include "nsIEffectiveTLDService.h"
 #include "nsIHttpsOnlyModePermission.h"
 #include "nsIPromptCollection.h"
 #include "nsITimer.h"
 #include "nsITransportSecurityInfo.h"
 #include "nsISharePicker.h"
 #include "nsIURIMutator.h"
-#include "mozilla/Telemetry.h"
 
 #include "mozilla/dom/DOMException.h"
 #include "mozilla/dom/DOMExceptionBinding.h"
 
 #include "mozilla/dom/JSActorService.h"
 #include "mozilla/dom/JSWindowActorBinding.h"
 #include "mozilla/dom/JSWindowActorParent.h"
 
--- a/dom/media/AudioChannelFormat.h
+++ b/dom/media/AudioChannelFormat.h
@@ -6,17 +6,16 @@
 #ifndef MOZILLA_AUDIOCHANNELFORMAT_H_
 #define MOZILLA_AUDIOCHANNELFORMAT_H_
 
 #include <stdint.h>
 
 #include "mozilla/PodOperations.h"
 #include "nsTArrayForwardDeclare.h"
 #include "AudioSampleFormat.h"
-#include "mozilla/PodOperations.h"
 #include "nsTArray.h"
 
 namespace mozilla {
 
 /*
  * This file provides utilities for upmixing and downmixing channels.
  *
  * The channel layouts, upmixing and downmixing are consistent with the
--- a/dom/media/MediaTrackGraph.cpp
+++ b/dom/media/MediaTrackGraph.cpp
@@ -28,17 +28,16 @@
 #include "mozilla/dom/BaseAudioContextBinding.h"
 #include "mozilla/dom/WorkletThread.h"
 #include "mozilla/media/MediaUtils.h"
 #include <algorithm>
 #include "GeckoProfiler.h"
 #include "VideoFrameContainer.h"
 #include "mozilla/AbstractThread.h"
 #include "mozilla/StaticPrefs_dom.h"
-#include "mozilla/Unused.h"
 #include "transport/runnable_utils.h"
 #include "VideoUtils.h"
 #include "GraphRunner.h"
 #include "Tracing.h"
 #include "UnderrunHandler.h"
 #include "mozilla/CycleCollectedJSRuntime.h"
 #include "mozilla/Preferences.h"
 
--- a/dom/media/gmp/GMPVideoEncoderParent.cpp
+++ b/dom/media/gmp/GMPVideoEncoderParent.cpp
@@ -12,17 +12,16 @@
 #include "GMPVideoEncodedFrameImpl.h"
 #include "GMPVideoi420FrameImpl.h"
 #include "mozilla/gmp/GMPTypes.h"
 #include "mozilla/Unused.h"
 #include "nsAutoRef.h"
 #include "nsThread.h"
 #include "nsThreadUtils.h"
 #include "runnable_utils.h"
-#include "GMPLog.h"
 
 namespace mozilla::gmp {
 
 #ifdef __CLASS__
 #  undef __CLASS__
 #endif
 #define __CLASS__ "GMPVideoEncoderParent"
 
--- a/dom/media/gmp/GMPVideoHost.h
+++ b/dom/media/gmp/GMPVideoHost.h
@@ -4,17 +4,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef GMPVideoHost_h_
 #define GMPVideoHost_h_
 
 #include "gmp-video-host.h"
 #include "gmp-video-plane.h"
 #include "gmp-video-frame.h"
-#include "gmp-video-host.h"
 #include "nsTArray.h"
 
 namespace mozilla {
 namespace gmp {
 
 class GMPSharedMemManager;
 class GMPPlaneImpl;
 class GMPVideoEncodedFrameImpl;
--- a/dom/media/mediacapabilities/KeyValueStorage.cpp
+++ b/dom/media/mediacapabilities/KeyValueStorage.cpp
@@ -3,17 +3,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "KeyValueStorage.h"
 
 #include "nsAppDirectoryServiceDefs.h"
 #include "nsDirectoryServiceUtils.h"
-#include "KeyValueStorage.h"
 #include "nsServiceManagerUtils.h"
 #include "nsVariant.h"
 
 namespace mozilla {
 
 class DatabaseCallback final : public nsIKeyValueDatabaseCallback {
  public:
   NS_DECL_ISUPPORTS
--- a/dom/media/mp4/DecoderData.h
+++ b/dom/media/mp4/DecoderData.h
@@ -8,17 +8,16 @@
 #include "MediaInfo.h"
 #include "MediaResult.h"
 #include "mozilla/RefPtr.h"
 #include "mozilla/Result.h"
 #include "mozilla/Types.h"
 #include "mozilla/Vector.h"
 #include "nsString.h"
 #include "nsTArray.h"
-#include "nsString.h"
 #include "mp4parse.h"
 
 namespace mozilla {
 
 class MP4Demuxer;
 
 struct PsshInfo {
   PsshInfo() = default;
--- a/dom/media/platforms/ffmpeg/FFmpegLibWrapper.cpp
+++ b/dom/media/platforms/ffmpeg/FFmpegLibWrapper.cpp
@@ -8,17 +8,16 @@
 #ifdef MOZ_FFMPEG
 #  include "mozilla/StaticPrefs_media.h"
 #endif
 #include "mozilla/Types.h"
 #include "PlatformDecoderModule.h"
 #include "prlink.h"
 #ifdef MOZ_WAYLAND
 #  include "mozilla/widget/DMABufLibWrapper.h"
-#  include "mozilla/StaticPrefs_media.h"
 #endif
 
 #define AV_LOG_DEBUG 48
 #define AV_LOG_INFO 32
 
 namespace mozilla {
 
 FFmpegLibWrapper::LinkResult FFmpegLibWrapper::Link() {
--- a/dom/media/webaudio/AudioDestinationNode.cpp
+++ b/dom/media/webaudio/AudioDestinationNode.cpp
@@ -5,17 +5,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "AudioDestinationNode.h"
 
 #include "AlignmentUtils.h"
 #include "AudibilityMonitor.h"
 #include "AudioChannelService.h"
 #include "AudioContext.h"
-#include "AudioContext.h"
 #include "AudioNodeEngine.h"
 #include "AudioNodeTrack.h"
 #include "CubebUtils.h"
 #include "MediaTrackGraph.h"
 #include "mozilla/StaticPrefs_dom.h"
 #include "mozilla/dom/AudioDestinationNodeBinding.h"
 #include "mozilla/dom/BaseAudioContextBinding.h"
 #include "mozilla/dom/OfflineAudioCompletionEvent.h"
--- a/dom/media/webrtc/jsapi/MediaTransportHandler.cpp
+++ b/dom/media/webrtc/jsapi/MediaTransportHandler.cpp
@@ -38,17 +38,16 @@
 
 #include "mozilla/dom/RTCStatsReportBinding.h"
 
 #include "nss.h"                // For NSS_NoDB_Init
 #include "mozilla/PublicSSL.h"  // For psm::InitializeCipherSuite
 
 #include "nsISocketTransportService.h"
 #include "nsDNSService2.h"
-#include "nsNetUtil.h"  // NS_CheckPortSafety
 
 #include <string>
 #include <vector>
 #include <map>
 
 #ifdef MOZ_GECKO_PROFILER
 #  include "mozilla/ProfilerMarkers.h"
 
--- a/dom/media/webrtc/jsapi/RTCStatsReport.h
+++ b/dom/media/webrtc/jsapi/RTCStatsReport.h
@@ -12,17 +12,16 @@
 #include "js/Value.h"
 #include "mozilla/dom/AutoEntryScript.h"
 #include "mozilla/MozPromise.h"
 #include "mozilla/TimeStamp.h"
 #include "mozilla/dom/PerformanceService.h"
 #include "mozilla/dom/RTCStatsReportBinding.h"  // RTCStatsCollection
 #include "mozilla/dom/ToJSValue.h"
 #include "mozilla/ErrorResult.h"
-#include "mozilla/MozPromise.h"
 #include "mozilla/UniquePtr.h"
 #include "nsCOMPtr.h"
 #include "nsIGlobalObject.h"
 #include "nsPIDOMWindow.h"  // nsPIDOMWindowInner
 #include "nsWrapperCache.h"
 #include "prtime.h"  // PR_Now
 
 namespace mozilla {
--- a/dom/media/webrtc/libwebrtcglue/WebrtcMediaDataDecoderCodec.cpp
+++ b/dom/media/webrtc/libwebrtcglue/WebrtcMediaDataDecoderCodec.cpp
@@ -4,17 +4,16 @@
 
 #include "WebrtcMediaDataDecoderCodec.h"
 
 #include "ImageContainer.h"
 #include "Layers.h"
 #include "MediaDataDecoderProxy.h"
 #include "PDMFactory.h"
 #include "VideoUtils.h"
-#include "ImageContainer.h"
 #include "mozilla/layers/ImageBridgeChild.h"
 #include "mozilla/media/MediaUtils.h"
 #include "rtc_base/keep_ref_until_done.h"
 
 namespace mozilla {
 
 WebrtcMediaDataDecoder::WebrtcMediaDataDecoder(nsACString& aCodecMimeType)
     : mThreadPool(GetMediaThreadPool(MediaThreadType::SUPERVISOR)),
--- a/dom/media/webrtc/transport/nricectx.cpp
+++ b/dom/media/webrtc/transport/nricectx.cpp
@@ -53,17 +53,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 #include "nss.h"
 #include "pk11pub.h"
 #include "plbase64.h"
 
 #include "nsCOMPtr.h"
 #include "nsComponentManagerUtils.h"
 #include "nsError.h"
 #include "nsNetCID.h"
-#include "nsComponentManagerUtils.h"
 #include "nsServiceManagerUtils.h"
 #include "ScopedNSSTypes.h"
 #include "runnable_utils.h"
 #include "nsIPrefService.h"
 #include "nsIPrefBranch.h"
 #include "nsIUUIDGenerator.h"
 
 // nICEr includes
--- a/dom/media/webrtc/transport/test/ice_unittest.cpp
+++ b/dom/media/webrtc/transport/test/ice_unittest.cpp
@@ -42,17 +42,16 @@ extern "C" {
 #include "nriceresolver.h"
 #include "nrinterfaceprioritizer.h"
 #include "gtest_ringbuffer_dumper.h"
 #include "rlogconnector.h"
 #include "runnable_utils.h"
 #include "stunserver.h"
 #include "nr_socket_prsock.h"
 #include "test_nr_socket.h"
-#include "ice_ctx.h"
 #include "stun_socket_filter.h"
 #include "mozilla/net/DNS.h"
 
 #define GTEST_HAS_RTTI 0
 #include "gtest/gtest.h"
 #include "gtest_utils.h"
 
 using namespace mozilla;
--- a/dom/media/webrtc/transport/transportlayerdtls.cpp
+++ b/dom/media/webrtc/transport/transportlayerdtls.cpp
@@ -15,17 +15,16 @@
 #include "dtlsidentity.h"
 #include "keyhi.h"
 #include "logging.h"
 #include "mozilla/Telemetry.h"
 #include "mozilla/UniquePtr.h"
 #include "mozilla/Unused.h"
 #include "nsCOMPtr.h"
 #include "nsComponentManagerUtils.h"
-#include "nsComponentManagerUtils.h"
 #include "nsNetCID.h"
 #include "nsServiceManagerUtils.h"
 #include "sslexp.h"
 #include "sslproto.h"
 #include "transportflow.h"
 
 namespace mozilla {
 
--- a/dom/media/webrtc/transport/transportlayerice.cpp
+++ b/dom/media/webrtc/transport/transportlayerice.cpp
@@ -42,17 +42,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 
 #include <string>
 #include <vector>
 
 #include "nsCOMPtr.h"
 #include "nsComponentManagerUtils.h"
 #include "nsError.h"
 #include "nsNetCID.h"
-#include "nsComponentManagerUtils.h"
 #include "nsServiceManagerUtils.h"
 
 // nICEr includes
 extern "C" {
 #include "nr_api.h"
 #include "registry.h"
 #include "async_timer.h"
 #include "ice_util.h"
--- a/dom/media/webrtc/transport/transportlayersrtp.cpp
+++ b/dom/media/webrtc/transport/transportlayersrtp.cpp
@@ -7,17 +7,16 @@
 // Original author: ekr@rtfm.com
 
 #include "transportlayersrtp.h"
 #include "transportlayerdtls.h"
 
 #include "logging.h"
 #include "nsError.h"
 #include "mozilla/Assertions.h"
-#include "transportlayerdtls.h"
 #include "srtp.h"
 
 namespace mozilla {
 
 MOZ_MTLOG_MODULE("mtransport")
 
 static char kDTLSExporterLabel[] = "EXTRACTOR-dtls_srtp";
 
--- a/dom/notification/Notification.cpp
+++ b/dom/notification/Notification.cpp
@@ -11,17 +11,16 @@
 #include "mozilla/BasePrincipal.h"
 #include "mozilla/Components.h"
 #include "mozilla/Encoding.h"
 #include "mozilla/EventStateManager.h"
 #include "mozilla/HoldDropJSObjects.h"
 #include "mozilla/JSONWriter.h"
 #include "mozilla/OwningNonNull.h"
 #include "mozilla/Preferences.h"
-#include "mozilla/Components.h"
 #include "mozilla/StaticPrefs_dom.h"
 #include "mozilla/Telemetry.h"
 #include "mozilla/Unused.h"
 #include "mozilla/dom/AppNotificationServiceOptionsBinding.h"
 #include "mozilla/dom/BindingUtils.h"
 #include "mozilla/dom/ContentChild.h"
 #include "mozilla/dom/Document.h"
 #include "mozilla/dom/NotificationEvent.h"
--- a/dom/plugins/base/nsPluginTags.cpp
+++ b/dom/plugins/base/nsPluginTags.cpp
@@ -10,17 +10,16 @@
 #include "prenv.h"
 #include "nsPluginHost.h"
 #include "nsIBlocklistService.h"
 #include "nsPluginLogging.h"
 #include "nsCharSeparatedTokenizer.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/Unused.h"
 #include "nsNetUtil.h"
-#include "prenv.h"
 #include <cctype>
 #include "mozilla/Encoding.h"
 #include "mozilla/dom/FakePluginTagInitBinding.h"
 #include "mozilla/StaticPrefs_plugin.h"
 
 using mozilla::dom::FakePluginTagInit;
 using namespace mozilla;
 
--- a/dom/script/ScriptLoadRequest.cpp
+++ b/dom/script/ScriptLoadRequest.cpp
@@ -16,17 +16,16 @@
 #include "js/OffThreadScriptCompilation.h"
 #include "js/SourceText.h"
 
 #include "ModuleLoadRequest.h"
 #include "nsContentUtils.h"
 #include "nsICacheInfoChannel.h"
 #include "nsIClassOfService.h"
 #include "nsISupportsPriority.h"
-#include "ScriptLoadRequest.h"
 #include "ScriptSettings.h"
 
 using JS::SourceText;
 
 namespace mozilla {
 namespace dom {
 
 //////////////////////////////////////////////////////////////
--- a/dom/security/nsContentSecurityManager.cpp
+++ b/dom/security/nsContentSecurityManager.cpp
@@ -15,17 +15,16 @@
 #include "nsIHttpChannelInternal.h"
 #include "nsINode.h"
 #include "nsIStreamListener.h"
 #include "nsILoadInfo.h"
 #include "nsIOService.h"
 #include "nsContentUtils.h"
 #include "nsCORSListenerProxy.h"
 #include "nsIParentChannel.h"
-#include "nsIStreamListener.h"
 #include "nsIRedirectHistoryEntry.h"
 #include "nsNetUtil.h"
 #include "nsReadableUtils.h"
 #include "nsSandboxFlags.h"
 #include "nsIXPConnect.h"
 
 #include "mozilla/BasePrincipal.h"
 #include "mozilla/ClearOnShutdown.h"
--- a/dom/serviceworkers/ServiceWorker.cpp
+++ b/dom/serviceworkers/ServiceWorker.cpp
@@ -19,17 +19,16 @@
 #include "mozilla/dom/ClientIPCTypes.h"
 #include "mozilla/dom/ClientState.h"
 #include "mozilla/dom/MessagePortBinding.h"
 #include "mozilla/dom/Promise.h"
 #include "mozilla/dom/ServiceWorkerGlobalScopeBinding.h"
 #include "mozilla/dom/WorkerPrivate.h"
 #include "mozilla/StaticPrefs_dom.h"
 #include "mozilla/StorageAccess.h"
-#include "nsGlobalWindowInner.h"
 
 #ifdef XP_WIN
 #  undef PostMessage
 #endif
 
 using mozilla::ErrorResult;
 using namespace mozilla::dom;
 
--- a/dom/storage/StorageUtils.cpp
+++ b/dom/storage/StorageUtils.cpp
@@ -6,17 +6,16 @@
 
 #include "nsIURL.h"
 #include "StorageUtils.h"
 
 #include "mozilla/OriginAttributes.h"
 #include "nsDebug.h"
 #include "nsIPrincipal.h"
 #include "nsIURI.h"
-#include "nsIURL.h"
 #include "nsNetUtil.h"
 #include "nsPrintfCString.h"
 
 namespace mozilla {
 namespace dom {
 namespace StorageUtils {
 
 bool PrincipalsEqual(nsIPrincipal* aObjectPrincipal,
--- a/dom/svg/SVGContentUtils.cpp
+++ b/dom/svg/SVGContentUtils.cpp
@@ -25,17 +25,16 @@
 #include "nsIFrame.h"
 #include "nsIScriptError.h"
 #include "nsLayoutUtils.h"
 #include "nsMathUtils.h"
 #include "nsWhitespaceTokenizer.h"
 #include "SVGAnimatedPreserveAspectRatio.h"
 #include "SVGGeometryProperty.h"
 #include "nsContentUtils.h"
-#include "mozilla/gfx/2D.h"
 #include "mozilla/gfx/Types.h"
 #include "mozilla/FloatingPoint.h"
 #include "mozilla/ComputedStyle.h"
 #include "SVGPathDataParser.h"
 #include "SVGPathData.h"
 #include "SVGPathElement.h"
 
 using namespace mozilla;
--- a/dom/webauthn/WebAuthnUtil.cpp
+++ b/dom/webauthn/WebAuthnUtil.cpp
@@ -7,17 +7,16 @@
 #include "mozilla/dom/WebAuthnUtil.h"
 #include "mozilla/dom/WebAuthnCBORUtil.h"
 #include "nsComponentManagerUtils.h"
 #include "nsICryptoHash.h"
 #include "nsIEffectiveTLDService.h"
 #include "nsNetUtil.h"
 #include "mozpkix/pkixutil.h"
 #include "nsHTMLDocument.h"
-#include "nsICryptoHash.h"
 #include "hasht.h"
 
 namespace mozilla {
 namespace dom {
 
 // Bug #1436078 - Permit Google Accounts. Remove in Bug #1436085 in Jan 2023.
 constexpr auto kGoogleAccountsAppId1 =
     u"https://www.gstatic.com/securitykey/origins.json"_ns;
--- a/dom/webgpu/Texture.h
+++ b/dom/webgpu/Texture.h
@@ -5,17 +5,16 @@
 
 #ifndef GPU_Texture_H_
 #define GPU_Texture_H_
 
 #include "mozilla/WeakPtr.h"
 #include "nsWrapperCache.h"
 #include "ObjectModel.h"
 #include "mozilla/webgpu/WebGPUTypes.h"
-#include "mozilla/WeakPtr.h"
 
 namespace mozilla {
 namespace dom {
 struct GPUTextureDescriptor;
 struct GPUTextureViewDescriptor;
 class HTMLCanvasElement;
 }  // namespace dom
 
--- a/dom/websocket/WebSocket.cpp
+++ b/dom/websocket/WebSocket.cpp
@@ -8,17 +8,16 @@
 #include "mozilla/dom/WebSocketBinding.h"
 #include "mozilla/net/WebSocketChannel.h"
 
 #include "jsapi.h"
 #include "jsfriendapi.h"
 #include "mozilla/Atomics.h"
 #include "mozilla/BasePrincipal.h"
 #include "mozilla/DOMEventTargetHelper.h"
-#include "mozilla/net/WebSocketChannel.h"
 #include "mozilla/dom/File.h"
 #include "mozilla/dom/MessageEvent.h"
 #include "mozilla/dom/MessageEventBinding.h"
 #include "mozilla/dom/nsCSPContext.h"
 #include "mozilla/dom/nsCSPUtils.h"
 #include "mozilla/dom/nsHTTPSOnlyUtils.h"
 #include "mozilla/dom/nsMixedContentBlocker.h"
 #include "mozilla/dom/ScriptSettings.h"
--- a/dom/workers/RuntimeService.cpp
+++ b/dom/workers/RuntimeService.cpp
@@ -42,17 +42,16 @@
 #include "mozilla/dom/FetchUtil.h"
 #include "mozilla/dom/MessageChannel.h"
 #include "mozilla/dom/MessageEventBinding.h"
 #include "mozilla/dom/PerformanceService.h"
 #include "mozilla/dom/RemoteWorkerChild.h"
 #include "mozilla/dom/WorkerBinding.h"
 #include "mozilla/dom/ScriptSettings.h"
 #include "mozilla/dom/IndexedDatabaseManager.h"
-#include "mozilla/ipc/BackgroundChild.h"
 #include "mozilla/DebugOnly.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/ScopeExit.h"
 #include "mozilla/dom/Navigator.h"
 #include "mozilla/Monitor.h"
 #include "nsContentUtils.h"
 #include "nsCycleCollector.h"
 #include "nsDOMJSUtils.h"
--- a/dom/workers/ScriptLoader.cpp
+++ b/dom/workers/ScriptLoader.cpp
@@ -72,17 +72,16 @@
 #include "mozilla/dom/PerformanceStorage.h"
 #include "mozilla/dom/Promise.h"
 #include "mozilla/dom/PromiseNativeHandler.h"
 #include "mozilla/dom/Response.h"
 #include "mozilla/dom/ScriptLoader.h"
 #include "mozilla/dom/ScriptSettings.h"
 #include "mozilla/dom/SerializedStackHolder.h"
 #include "mozilla/dom/SRILogHelper.h"
-#include "mozilla/dom/SerializedStackHolder.h"
 #include "mozilla/dom/ServiceWorkerBinding.h"
 #include "mozilla/dom/ServiceWorkerManager.h"
 #include "mozilla/Result.h"
 #include "mozilla/ResultExtensions.h"
 #include "mozilla/StaticPrefs_browser.h"
 #include "mozilla/StaticPrefs_dom.h"
 #include "mozilla/StaticPrefs_security.h"
 #include "mozilla/UniquePtr.h"
--- a/dom/workers/WorkerEventTarget.cpp
+++ b/dom/workers/WorkerEventTarget.cpp
@@ -3,18 +3,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "WorkerEventTarget.h"
 #include "WorkerPrivate.h"
 #include "WorkerRunnable.h"
 
-#include "WorkerPrivate.h"
-#include "WorkerRunnable.h"
 #include "mozilla/dom/ReferrerInfo.h"
 
 namespace mozilla {
 namespace dom {
 
 namespace {
 
 class WrappedControlRunnable final : public WorkerControlRunnable {
--- a/dom/workers/WorkerScope.h
+++ b/dom/workers/WorkerScope.h
@@ -21,17 +21,16 @@
 #include "mozilla/dom/ImageBitmapSource.h"
 #include "mozilla/dom/SafeRefPtr.h"
 #include "mozilla/dom/WorkerPrivate.h"
 #include "nsCOMPtr.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsIGlobalObject.h"
 #include "nsISupports.h"
 #include "nsWeakReference.h"
-#include "mozilla/dom/ImageBitmapBinding.h"
 
 #ifdef XP_WIN
 #  undef PostMessage
 #endif
 
 class nsAtom;
 class nsISerialEventTarget;
 
--- a/dom/worklet/Worklet.cpp
+++ b/dom/worklet/Worklet.cpp
@@ -19,17 +19,16 @@
 #include "mozilla/dom/ScriptSettings.h"
 #include "mozilla/dom/ScriptLoader.h"
 #include "mozilla/dom/WorkletImpl.h"
 #include "js/Modules.h"
 #include "js/SourceText.h"
 #include "nsIInputStreamPump.h"
 #include "nsIStreamLoader.h"
 #include "nsIThreadRetargetableRequest.h"
-#include "nsIInputStreamPump.h"
 #include "nsNetUtil.h"
 #include "xpcprivate.h"
 #include "mozilla/ScopeExit.h"
 
 namespace mozilla {
 namespace dom {
 
 class ExecutionRunnable final : public Runnable {
--- a/dom/xhr/XMLHttpRequestMainThread.cpp
+++ b/dom/xhr/XMLHttpRequestMainThread.cpp
@@ -90,17 +90,16 @@
 #include "jsapi.h"          // JS_ClearPendingException
 #include "GeckoProfiler.h"
 #include "mozilla/dom/XMLHttpRequestBinding.h"
 #include "mozilla/Attributes.h"
 #include "MultipartBlobImpl.h"
 #include "nsIPermissionManager.h"
 #include "nsMimeTypes.h"
 #include "nsIHttpChannelInternal.h"
-#include "nsIClassOfService.h"
 #include "nsCharSeparatedTokenizer.h"
 #include "nsStreamListenerWrapper.h"
 #include "nsITimedChannel.h"
 #include "nsWrapperCacheInlines.h"
 #include "nsZipArchive.h"
 #include "mozilla/Preferences.h"
 #include "private/pprio.h"
 #include "XMLHttpRequestUpload.h"
--- a/dom/xslt/xslt/txXSLTPatterns.cpp
+++ b/dom/xslt/xslt/txXSLTPatterns.cpp
@@ -10,20 +10,16 @@
 #include "txXSLTPatterns.h"
 #include "txNodeSetContext.h"
 #include "txForwardContext.h"
 #include "txXMLUtils.h"
 #include "txXSLTFunctions.h"
 #include "nsWhitespaceTokenizer.h"
 #include "nsIContent.h"
 
-#ifdef TX_TO_STRING
-#  include "nsReadableUtils.h"
-#endif
-
 using mozilla::UniquePtr;
 using mozilla::Unused;
 using mozilla::WrapUnique;
 
 /*
  * Returns the default priority of this Pattern.
  * UnionPatterns don't like this.
  * This should be called on the simple patterns.