Skip to content

Commit

Permalink
Bug 1678062 - Remove unnecessary includes. r=andi
Browse files Browse the repository at this point in the history
Differential Revision: https://phabricator.services.mozilla.com/D97467

Depends on D96561
  • Loading branch information
sigiesec committed Nov 23, 2020
1 parent 57f7f7a commit f9e5a83
Show file tree
Hide file tree
Showing 302 changed files with 1,337 additions and 1,023 deletions.
3 changes: 2 additions & 1 deletion accessible/aom/AccessibleNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "nsDataHashtable.h"
#include "nsRefPtrHashtable.h"
#include "nsWrapperCache.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/DOMString.h"
#include "mozilla/dom/Nullable.h"
Expand All @@ -19,6 +18,8 @@ class nsINode;

namespace mozilla {

class ErrorResult;

namespace a11y {
class Accessible;
}
Expand Down
3 changes: 2 additions & 1 deletion devtools/shared/heapsnapshot/DominatorTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@

#include "mozilla/devtools/HeapSnapshot.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/RefCounted.h"
#include "js/UbiNodeDominatorTree.h"
#include "nsWrapperCache.h"

namespace mozilla {
class ErrorResult;

namespace devtools {

class DominatorTree final : public nsISupports, public nsWrapperCache {
Expand Down
3 changes: 2 additions & 1 deletion devtools/shared/heapsnapshot/HeapSnapshot.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#define mozilla_devtools_HeapSnapshot__

#include "js/HashTable.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/devtools/DeserializedNode.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/Nullable.h"
Expand All @@ -27,6 +26,8 @@
#include "nsXPCOM.h"

namespace mozilla {
class ErrorResult;

namespace devtools {

class DominatorTree;
Expand Down
1 change: 0 additions & 1 deletion docshell/base/BrowsingContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "mozilla/RefPtr.h"
#include "mozilla/Span.h"
#include "mozilla/Tuple.h"
#include "mozilla/WeakPtr.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/FeaturePolicy.h"
#include "mozilla/dom/LocationBase.h"
Expand Down
14 changes: 10 additions & 4 deletions docshell/base/SyncedContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@
#ifndef mozilla_dom_SyncedContext_h
#define mozilla_dom_SyncedContext_h

#include <array>
#include <type_traits>
#include <utility>
#include "mozilla/Attributes.h"
#include "mozilla/EnumSet.h"
#include "nsStringFwd.h"
#include "nscore.h"

// Referenced via macro definitions
#include "mozilla/ErrorResult.h"
#include "mozilla/Maybe.h"
#include "mozilla/RefPtr.h"
#include "mozilla/Tuple.h"
#include <utility>

class PickleIterator;

Expand All @@ -31,6 +35,8 @@ struct IPDLParamTraits;
namespace dom {
class ContentParent;
class ContentChild;
template <typename T>
class MaybeDiscarded;

namespace syncedcontext {

Expand Down
2 changes: 1 addition & 1 deletion docshell/base/WindowContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#include "mozilla/PermissionDelegateHandler.h"
#include "mozilla/Span.h"
#include "mozilla/dom/BrowsingContext.h"
#include "mozilla/dom/MaybeDiscarded.h"
#include "mozilla/dom/SyncedContext.h"
#include "mozilla/dom/UserActivation.h"
Expand All @@ -27,6 +26,7 @@ namespace dom {

class WindowGlobalParent;
class WindowGlobalInit;
class BrowsingContext;
class BrowsingContextGroup;

#define MOZ_EACH_WC_FIELD(FIELD) \
Expand Down
4 changes: 3 additions & 1 deletion docshell/base/nsILoadContext.idl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ webidl Element;

%{C++
#ifdef MOZILLA_INTERNAL_API
#include "mozilla/BasePrincipal.h" // for OriginAttributes
namespace mozilla {
class OriginAttributes;
}
#endif
%}

Expand Down
2 changes: 1 addition & 1 deletion docshell/shistory/ChildSHistory.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@

#include "nsCOMPtr.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/ErrorResult.h"
#include "nsWrapperCache.h"
#include "nsThreadUtils.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/LinkedList.h"
#include "nsID.h"

Expand Down
3 changes: 2 additions & 1 deletion dom/abort/AbortController.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
#define mozilla_dom_AbortController_h

#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/ErrorResult.h"
#include "nsCOMPtr.h"
#include "nsCycleCollectionParticipant.h"
#include "nsWrapperCache.h"

class nsIGlobalObject;

namespace mozilla {
class ErrorResult;

namespace dom {

class AbortSignal;
Expand Down
1 change: 0 additions & 1 deletion dom/animation/CSSPseudoElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#include "js/TypeDecls.h"
#include "mozilla/Attributes.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/RefPtr.h"
#include "nsCSSPseudoElements.h"
Expand Down
1 change: 0 additions & 1 deletion dom/base/BodyConsumer.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "mozilla/dom/AbortSignal.h"
#include "mozilla/dom/MutableBlobStorage.h"
#include "nsIInputStreamPump.h"
#include "nsNetUtil.h"
#include "nsIObserver.h"
#include "nsWeakReference.h"

Expand Down
3 changes: 2 additions & 1 deletion dom/base/BodyStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@
#include "nsISupportsImpl.h"
#include "nsNetCID.h"
#include "nsWeakReference.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/Mutex.h"

class nsIGlobalObject;

class nsIInputStream;

namespace mozilla {
class ErrorResult;

namespace dom {

class BodyStream;
Expand Down
3 changes: 2 additions & 1 deletion dom/base/BodyUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
#include "nsString.h"
#include "nsError.h"

#include "mozilla/ErrorResult.h"
#include "mozilla/dom/File.h"
#include "mozilla/dom/FormData.h"

namespace mozilla {
class ErrorResult;

namespace dom {

class BodyUtil final {
Expand Down
10 changes: 0 additions & 10 deletions dom/base/ChromeUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,21 @@
#include "WrapperFactory.h"

#include "mozilla/Base64.h"
#include "mozilla/BasePrincipal.h"
#include "mozilla/CycleCollectedJSRuntime.h"
#include "mozilla/IntentionalCrash.h"
#include "mozilla/PerformanceMetricsCollector.h"
#include "mozilla/PerfStats.h"
#include "mozilla/Preferences.h"
#include "mozilla/ProcInfo.h"
#include "mozilla/RDDProcessManager.h"
#include "mozilla/ResultExtensions.h"
#include "mozilla/SharedStyleSheetCache.h"
#include "mozilla/TimeStamp.h"
#include "mozilla/dom/BrowsingContext.h"
#include "mozilla/dom/ContentChild.h"
#include "mozilla/dom/ContentParent.h"
#include "mozilla/dom/IdleDeadline.h"
#include "mozilla/dom/InProcessParent.h"
#include "mozilla/dom/InProcessChild.h"
#include "mozilla/dom/JSActorService.h"
#include "mozilla/dom/MediaMetadata.h"
#include "mozilla/dom/MediaSessionBinding.h"
#include "mozilla/dom/PBrowserParent.h"
#include "mozilla/dom/PWindowGlobalParent.h"
#include "mozilla/dom/Performance.h"
#include "mozilla/dom/PopupBlocker.h"
#include "mozilla/dom/Promise.h"
Expand All @@ -43,12 +36,9 @@
#include "mozilla/dom/WindowBinding.h" // For IdleRequestCallback/Options
#include "mozilla/dom/WindowGlobalParent.h"
#include "mozilla/dom/WorkerPrivate.h"
#include "mozilla/gfx/GPUProcessManager.h"
#include "mozilla/ipc/GeckoChildProcessHost.h"
#include "mozilla/net/UrlClassifierFeatureFactory.h"
#include "mozilla/net/SocketProcessHost.h"
#include "IOActivityMonitor.h"
#include "nsIOService.h"
#include "nsThreadUtils.h"
#include "mozJSComponentLoader.h"
#include "GeckoProfiler.h"
Expand Down
3 changes: 2 additions & 1 deletion dom/base/ChromeUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/ChromeUtilsBinding.h"
#include "mozilla/dom/Exceptions.h"
#include "mozilla/ErrorResult.h"
#include "nsDOMNavigationTiming.h" // for DOMHighResTimeStamp
#include "nsIDOMProcessChild.h"
#include "nsIDOMProcessParent.h"

namespace mozilla {

class ErrorResult;

namespace devtools {
class HeapSnapshot;
} // namespace devtools
Expand Down
8 changes: 2 additions & 6 deletions dom/base/Crypto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,15 @@
* 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 "Crypto.h"
#include "jsfriendapi.h"
#include "js/ScalarType.h"
#include "js/experimental/TypedData.h" // JS_GetArrayBufferViewType
#include "nsCOMPtr.h"
#include "nsIRandomGenerator.h"
#include "MainThreadUtils.h"
#include "nsXULAppAPI.h"

#include "mozilla/dom/ContentChild.h"
#include "mozilla/dom/CryptoBinding.h"
#include "mozilla/dom/SubtleCrypto.h"
#include "nsServiceManagerUtils.h"

using mozilla::dom::ContentChild;

namespace mozilla::dom {

NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(Crypto)
Expand Down
3 changes: 2 additions & 1 deletion dom/base/CustomElementRegistry.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "js/TypeDecls.h"
#include "mozilla/Attributes.h"
#include "mozilla/CycleCollectedJSContext.h" // for MicroTaskRunnable
#include "mozilla/ErrorResult.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/CustomElementRegistryBinding.h"
#include "mozilla/dom/Document.h"
Expand All @@ -23,6 +22,8 @@
#include "nsContentUtils.h"

namespace mozilla {
class ErrorResult;

namespace dom {

struct CustomElementData;
Expand Down
3 changes: 2 additions & 1 deletion dom/base/DOMImplementation.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "nsWrapperCache.h"

#include "mozilla/Attributes.h"
#include "mozilla/ErrorResult.h"
#include "nsCOMPtr.h"
#include "nsCycleCollectionParticipant.h"
#include "nsIScriptGlobalObject.h"
Expand All @@ -19,6 +18,8 @@
#include "nsString.h"

namespace mozilla {
class ErrorResult;

namespace dom {
class Document;
class DocumentType;
Expand Down
3 changes: 2 additions & 1 deletion dom/base/DOMParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@
#include "nsCOMPtr.h"
#include "mozilla/dom/Document.h"
#include "nsWrapperCache.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/Span.h"
#include "mozilla/dom/DOMParserBinding.h"
#include "mozilla/dom/TypedArray.h"

class nsIGlobalObject;

namespace mozilla {
class ErrorResult;

namespace dom {

class DOMParser final : public nsISupports, public nsWrapperCache {
Expand Down
3 changes: 2 additions & 1 deletion dom/base/FormData.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#define mozilla_dom_FormData_h

#include "mozilla/Attributes.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/HTMLFormSubmission.h"
#include "mozilla/dom/File.h"
Expand All @@ -17,6 +16,8 @@
#include "nsWrapperCache.h"

namespace mozilla {
class ErrorResult;

namespace dom {

class HTMLFormElement;
Expand Down
1 change: 0 additions & 1 deletion dom/base/IdleDeadline.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#include "js/TypeDecls.h"
#include "mozilla/Attributes.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/Maybe.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "nsCOMPtr.h"
Expand Down
5 changes: 2 additions & 3 deletions dom/base/Location.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@
#include "mozilla/dom/BrowsingContext.h"
#include "mozilla/dom/LocationBase.h"
#include "nsCycleCollectionParticipant.h"
#include "nsIWeakReferenceUtils.h"
#include "nsPIDOMWindow.h"
#include "nsString.h"
#include "nsWrapperCache.h"

class nsIDocShell;
class nsIPrincipal;
class nsIURI;
class nsDocShellLoadState;
class nsPIDOMWindowInner;

namespace mozilla {
namespace dom {
Expand Down
3 changes: 2 additions & 1 deletion dom/base/LocationBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#define mozilla_dom_LocationBase_h

#include "mozilla/AlreadyAddRefed.h"
#include "mozilla/ErrorResult.h"
#include "nsStringFwd.h"

class nsIDocShell;
Expand All @@ -17,6 +16,8 @@ class nsIURI;
class nsDocShellLoadState;

namespace mozilla {
class ErrorResult;

namespace dom {
class BrowsingContext;

Expand Down
3 changes: 2 additions & 1 deletion dom/base/MozQueryInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@

#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/NonRefcountedDOMObject.h"
#include "mozilla/ErrorResult.h"
#include "nsID.h"

namespace mozilla {
class ErrorResult;

namespace dom {

class MozQueryInterface final : public NonRefcountedDOMObject {
Expand Down
Loading

0 comments on commit f9e5a83

Please sign in to comment.