Skip to content

Commit

Permalink
Bug 1679522 - Fix include directives and forward declarations. r=andi…
Browse files Browse the repository at this point in the history
…,necko-reviewers,jgilbert

- Add missing include directives and forward declarations.
- Remove some extra include directives.
- Add missing namespace qualifications.
- Move include directives out of namespace in toolkit/xre/GlobalSemaphore.h

Differential Revision: https://phabricator.services.mozilla.com/D98894
  • Loading branch information
sigiesec committed Mar 25, 2021
1 parent 8753073 commit 82d9aa2
Show file tree
Hide file tree
Showing 93 changed files with 238 additions and 37 deletions.
7 changes: 7 additions & 0 deletions dom/base/MessageManagerCallback.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,19 @@
#ifndef dom_base_MessageManagerCallback_h__
#define dom_base_MessageManagerCallback_h__

#include "nsError.h"
#include "nsStringFwd.h"
#include "nsTArrayForwardDeclare.h"

namespace mozilla {

class ErrorResult;

namespace dom {

class ClonedMessageData;
class ContentChild;
class ContentParent;
class ProcessMessageManager;

namespace ipc {
Expand Down
2 changes: 2 additions & 0 deletions dom/base/Pose.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#ifndef mozilla_dom_Pose_h
#define mozilla_dom_Pose_h

#include "js/RootingAPI.h"
#include "nsCOMPtr.h"
#include "nsWrapperCache.h"

namespace mozilla {
Expand Down
1 change: 1 addition & 0 deletions dom/base/TextInputProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#define mozilla_dom_textinputprocessor_h_

#include "mozilla/Attributes.h"
#include "mozilla/BasicEvents.h"
#include "mozilla/EventForwards.h"
#include "mozilla/Maybe.h"
#include "mozilla/TextEventDispatcher.h"
Expand Down
1 change: 1 addition & 0 deletions dom/base/nsGlobalWindowOuter.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#include "mozilla/dom/ImageBitmapSource.h"
#include "mozilla/UniquePtr.h"
#include "mozilla/dom/BrowsingContext.h"
#include "X11UndefineNone.h"

class nsDocShell;
class nsIArray;
Expand Down
4 changes: 4 additions & 0 deletions dom/canvas/WebGLTexelConversions.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@

namespace mozilla {

namespace gl {
enum class OriginPos : uint8_t;
}

bool ConvertImage(size_t width, size_t height, const void* srcBegin,
size_t srcStride, gl::OriginPos srcOrigin,
WebGLTexelFormat srcFormat, bool srcPremultiplied,
Expand Down
1 change: 1 addition & 0 deletions dom/events/DataTransferItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class ErrorResult;

namespace dom {

class DataTransfer;
class FileSystemEntry;
class FunctionStringCallback;

Expand Down
3 changes: 3 additions & 0 deletions dom/events/DataTransferItemList.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@
#include "mozilla/dom/DataTransferItem.h"
#include "mozilla/dom/FileList.h"

class nsIVariant;

namespace mozilla {
namespace dom {

class DataTransfer;
class DataTransferItem;

class DataTransferItemList final : public nsISupports, public nsWrapperCache {
Expand Down
1 change: 1 addition & 0 deletions dom/events/PendingFullscreenEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#ifndef mozilla_PendingFullscreenEvent_h_
#define mozilla_PendingFullscreenEvent_h_

#include "mozilla/dom/Document.h"
#include "nsContentUtils.h"

namespace mozilla {
Expand Down
1 change: 1 addition & 0 deletions dom/file/MutableBlobStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "mozilla/RefPtr.h"
#include "mozilla/Mutex.h"
#include "nsCOMPtr.h"
#include "nsString.h"
#include "prio.h"

class nsIEventTarget;
Expand Down
2 changes: 2 additions & 0 deletions dom/gamepad/Gamepad.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
namespace mozilla {
namespace dom {

class GamepadHapticActuator;

// Per spec:
// https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.html#remapping
const int kStandardGamepadButtons = 17;
Expand Down
1 change: 1 addition & 0 deletions dom/gamepad/GamepadPose.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "mozilla/TypedEnumBits.h"
#include "mozilla/dom/Pose.h"
#include "mozilla/dom/GamepadPoseState.h"
#include "nsCOMPtr.h"

namespace mozilla {
namespace dom {
Expand Down
2 changes: 2 additions & 0 deletions dom/l10n/L10nMutations.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#ifndef mozilla_dom_l10n_L10nMutations_h
#define mozilla_dom_l10n_L10nMutations_h

#include "nsCycleCollectionParticipant.h"
#include "nsHashKeys.h"
#include "nsRefreshObservers.h"
#include "nsStubMutationObserver.h"
#include "nsTHashSet.h"
Expand Down
1 change: 1 addition & 0 deletions dom/media/AudioChannelFormat.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "mozilla/PodOperations.h"
#include "nsTArrayForwardDeclare.h"
#include "AudioSampleFormat.h"
#include "mozilla/PodOperations.h"
#include "nsTArray.h"

namespace mozilla {
Expand Down
1 change: 1 addition & 0 deletions dom/media/platforms/SimpleMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef mozilla_SimpleMap_h
#define mozilla_SimpleMap_h

#include "mozilla/Mutex.h"
#include "nsTArray.h"

#include <utility>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include "api/video/video_frame.h"
#include "common_video/libyuv/include/webrtc_libyuv.h"
#include "modules/video_capture/video_capture.h"
#include "modules/video_capture/video_capture_config.h"
#include "modules/desktop_capture/shared_memory.h"
#include "modules/desktop_capture/desktop_device_info.h"
Expand Down
1 change: 1 addition & 0 deletions dom/media/webm/NesteggPacketHolder.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#if !defined(NesteggPacketHolder_h_)
# define NesteggPacketHolder_h_

# include <deque>
# include <stdint.h>
# include "nsAutoRef.h"
# include "nestegg/nestegg.h"
Expand Down
1 change: 1 addition & 0 deletions dom/media/webrtc/SineWaveGenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define SINEWAVEGENERATOR_H_

#include "MediaSegment.h"
#include "prtime.h"

namespace mozilla {

Expand Down
6 changes: 4 additions & 2 deletions dom/media/webrtc/libwebrtcglue/GmpVideoCodec.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
#ifndef GMPVIDEOCODEC_H_
#define GMPVIDEOCODEC_H_

#include "MediaConduitInterface.h"

namespace mozilla {

class WebrtcVideoDecoder;
class WebrtcVideoEncoder;

class GmpVideoCodec {
public:
static WebrtcVideoEncoder* CreateEncoder();
Expand Down
1 change: 1 addition & 0 deletions dom/payments/PaymentRequestUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#ifndef mozilla_dom_PaymentRequestUtils_h
#define mozilla_dom_PaymentRequestUtils_h

#include "js/TypeDecls.h"
#include "nsTArray.h"

namespace mozilla {
Expand Down
2 changes: 2 additions & 0 deletions dom/security/nsHTTPSOnlyStreamListener.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#include "nsCOMPtr.h"
#include "nsIStreamListener.h"

class nsILoadInfo;

/**
* This event listener gets registered for requests that have been upgraded
* using the HTTPS-only mode to log failed upgrades to the console.
Expand Down
1 change: 1 addition & 0 deletions dom/webauthn/WebAuthnManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include "mozilla/Maybe.h"
#include "mozilla/MozPromise.h"
#include "mozilla/dom/AbortSignal.h"
#include "mozilla/dom/PWebAuthnTransaction.h"
#include "mozilla/dom/WebAuthnManagerBase.h"

Expand Down
8 changes: 8 additions & 0 deletions dom/webgpu/Buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,17 @@
#include "mozilla/dom/Nullable.h"
#include "mozilla/ipc/Shmem.h"
#include "mozilla/webgpu/WebGPUTypes.h"
#include "nsTArray.h"
#include "ObjectModel.h"

namespace mozilla {
class ErrorResult;

namespace dom {
template <typename T>
class Optional;
}

namespace ipc {
class Shmem;
} // namespace ipc
Expand Down
1 change: 1 addition & 0 deletions dom/webgpu/CommandBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#define GPU_CommandBuffer_H_

#include "mozilla/WeakPtr.h"
#include "mozilla/webgpu/WebGPUTypes.h"
#include "nsWrapperCache.h"
#include "ObjectModel.h"

Expand Down
2 changes: 2 additions & 0 deletions dom/webgpu/CommandEncoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#include "ObjectModel.h"

namespace mozilla {
class ErrorResult;

namespace dom {
struct GPUComputePassDescriptor;
struct GPUTextureDataLayout;
Expand Down
6 changes: 6 additions & 0 deletions dom/webgpu/ComputePassEncoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
#include "ObjectModel.h"

namespace mozilla {
class ErrorResult;

namespace dom {
struct GPUComputePassDescriptor;
}

namespace webgpu {
namespace ffi {
struct WGPUComputePass;
Expand Down
1 change: 1 addition & 0 deletions dom/webgpu/Device.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#ifndef GPU_DEVICE_H_
#define GPU_DEVICE_H_

#include "ObjectModel.h"
#include "mozilla/MozPromise.h"
#include "mozilla/RefPtr.h"
#include "mozilla/webgpu/WebGPUTypes.h"
Expand Down
3 changes: 3 additions & 0 deletions dom/webgpu/Queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "nsWrapperCache.h"
#include "ObjectModel.h"
#include "mozilla/dom/TypedArray.h"
#include "mozilla/webgpu/WebGPUTypes.h"

namespace mozilla {
class ErrorResult;
Expand All @@ -19,6 +20,8 @@ template <typename T>
class Optional;
template <typename T>
class Sequence;
struct GPUTextureCopyView;
struct GPUTextureDataLayout;
struct TextureCopyView;
struct TextureDataLayout;
typedef RangeEnforcedUnsignedLongSequenceOrGPUExtent3DDict GPUExtent3D;
Expand Down
6 changes: 6 additions & 0 deletions dom/webgpu/RenderPassEncoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@
#include "ObjectModel.h"

namespace mozilla {
class ErrorResult;

namespace dom {
class DoubleSequenceOrGPUColorDict;
struct GPURenderPassDescriptor;
template <typename T>
class Sequence;
namespace binding_detail {
Expand All @@ -25,9 +28,12 @@ namespace ffi {
struct WGPURenderPass;
} // namespace ffi

class BindGroup;
class Buffer;
class CommandEncoder;
class RenderBundle;
class RenderPipeline;
class TextureView;

struct ScopedFfiRenderTraits {
typedef ffi::WGPURenderPass* type;
Expand Down
1 change: 1 addition & 0 deletions dom/webgpu/Sampler.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#ifndef GPU_SAMPLER_H_
#define GPU_SAMPLER_H_

#include "mozilla/webgpu/WebGPUTypes.h"
#include "nsWrapperCache.h"
#include "ObjectModel.h"

Expand Down
1 change: 1 addition & 0 deletions dom/webgpu/ShaderModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#ifndef GPU_ShaderModule_H_
#define GPU_ShaderModule_H_

#include "mozilla/webgpu/WebGPUTypes.h"
#include "nsWrapperCache.h"
#include "ObjectModel.h"

Expand Down
3 changes: 2 additions & 1 deletion dom/xslt/xslt/txKey.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
#define txKey_h__

#include "nsTHashtable.h"
#include "txNodeSet.h"
#include "txExpandedNameMap.h"
#include "txList.h"
#include "txNodeSet.h"
#include "txXSLTPatterns.h"
#include "txXMLUtils.h"

Expand Down
2 changes: 2 additions & 0 deletions dom/xul/nsXULCommandDispatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
#include "nsWeakReference.h"
#include "nsString.h"
#include "nsCycleCollectionParticipant.h"
#include "nsTArray.h"
#include "mozilla/RefPtr.h"

class nsPIDOMWindowOuter;
class nsPIWindowRoot;

namespace mozilla {
Expand Down
1 change: 1 addition & 0 deletions gfx/2d/FilterNodeD2D1.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "2D.h"
#include "Filters.h"
#include <vector>
#include <windows.h>
#include <d2d1_1.h>
#include <cguid.h>

Expand Down
1 change: 1 addition & 0 deletions gfx/2d/ssse3-scaler.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#define MOZILLA_GFX_2D_SSSE3_SCALER_H_

#include <stdbool.h>
#include <stdint.h>

#ifdef __cplusplus
extern "C" {
Expand Down
Loading

0 comments on commit 82d9aa2

Please sign in to comment.