diff options
Diffstat (limited to 'dom')
314 files changed, 766 insertions, 348 deletions
diff --git a/dom/animation/AnimationComparator.h b/dom/animation/AnimationComparator.h index ff665e82a..730d62f48 100644 --- a/dom/animation/AnimationComparator.h +++ b/dom/animation/AnimationComparator.h @@ -7,6 +7,8 @@ #ifndef mozilla_AnimationComparator_h #define mozilla_AnimationComparator_h +#include "mozilla/dom/Animation.h" + namespace mozilla { // Although this file is called AnimationComparator, we don't actually diff --git a/dom/animation/AnimationEffectReadOnly.cpp b/dom/animation/AnimationEffectReadOnly.cpp index 63d633c2f..7eb0880c7 100644 --- a/dom/animation/AnimationEffectReadOnly.cpp +++ b/dom/animation/AnimationEffectReadOnly.cpp @@ -6,6 +6,7 @@ #include "mozilla/dom/AnimationEffectReadOnly.h" #include "mozilla/dom/AnimationEffectReadOnlyBinding.h" +#include "mozilla/dom/Animation.h" #include "mozilla/AnimationUtils.h" #include "mozilla/FloatingPoint.h" diff --git a/dom/animation/AnimationPerformanceWarning.h b/dom/animation/AnimationPerformanceWarning.h index 025857e0c..a1ac35cba 100644 --- a/dom/animation/AnimationPerformanceWarning.h +++ b/dom/animation/AnimationPerformanceWarning.h @@ -9,6 +9,9 @@ #include <initializer_list> +#include "mozilla/Maybe.h" +#include "nsTArray.h" + class nsXPIDLString; namespace mozilla { diff --git a/dom/animation/CSSPseudoElement.cpp b/dom/animation/CSSPseudoElement.cpp index a4dede0b3..09aad01ef 100644 --- a/dom/animation/CSSPseudoElement.cpp +++ b/dom/animation/CSSPseudoElement.cpp @@ -7,6 +7,7 @@ #include "mozilla/dom/CSSPseudoElement.h" #include "mozilla/dom/CSSPseudoElementBinding.h" #include "mozilla/dom/Element.h" +#include "mozilla/dom/KeyframeEffectBinding.h" // for ElementOrCSSPseudoElement class #include "mozilla/AnimationComparator.h" namespace mozilla { diff --git a/dom/animation/KeyframeEffect.cpp b/dom/animation/KeyframeEffect.cpp index decbf6305..32f6bd1a1 100644 --- a/dom/animation/KeyframeEffect.cpp +++ b/dom/animation/KeyframeEffect.cpp @@ -11,6 +11,7 @@ #include "mozilla/dom/AnimationEffectTiming.h" #include "mozilla/dom/KeyframeEffectBinding.h" #include "mozilla/KeyframeUtils.h" +#include "nsContentUtils.h" #include "nsDOMMutationObserver.h" // For nsAutoAnimationMutationBatch #include "nsIScriptError.h" diff --git a/dom/animation/KeyframeEffectReadOnly.cpp b/dom/animation/KeyframeEffectReadOnly.cpp index 639e0b2b0..95f657449 100644 --- a/dom/animation/KeyframeEffectReadOnly.cpp +++ b/dom/animation/KeyframeEffectReadOnly.cpp @@ -6,6 +6,7 @@ #include "mozilla/dom/KeyframeEffectReadOnly.h" +#include "mozilla/dom/Animation.h" #include "mozilla/dom/KeyframeAnimationOptionsBinding.h" // For UnrestrictedDoubleOrKeyframeAnimationOptions; #include "mozilla/dom/CSSPseudoElement.h" @@ -25,6 +26,7 @@ #include "nsCSSPseudoElements.h" // For CSSPseudoElementType #include "nsIPresShell.h" #include "nsIScriptError.h" +#include "nsRefreshDriver.h" namespace mozilla { diff --git a/dom/animation/moz.build b/dom/animation/moz.build index bd8c93707..356980f00 100644 --- a/dom/animation/moz.build +++ b/dom/animation/moz.build @@ -37,6 +37,11 @@ EXPORTS.mozilla += [ ] UNIFIED_SOURCES += [ + 'KeyframeEffect.cpp', + 'KeyframeEffectReadOnly.cpp', +] + +SOURCES += [ 'Animation.cpp', 'AnimationEffectReadOnly.cpp', 'AnimationEffectTiming.cpp', @@ -50,9 +55,7 @@ UNIFIED_SOURCES += [ 'DocumentTimeline.cpp', 'EffectCompositor.cpp', 'EffectSet.cpp', - 'KeyframeEffect.cpp', 'KeyframeEffectParams.cpp', - 'KeyframeEffectReadOnly.cpp', 'KeyframeUtils.cpp', 'PendingAnimationTracker.cpp', 'TimingParams.cpp', diff --git a/dom/archivereader/ArchiveRequest.cpp b/dom/archivereader/ArchiveRequest.cpp index ec1686804..8505f0e1f 100644 --- a/dom/archivereader/ArchiveRequest.cpp +++ b/dom/archivereader/ArchiveRequest.cpp @@ -8,10 +8,12 @@ #include "mozilla/EventDispatcher.h" #include "mozilla/dom/ArchiveRequestBinding.h" +#include "mozilla/dom/File.h" #include "mozilla/dom/ScriptSettings.h" #include "nsContentUtils.h" using namespace mozilla; +using namespace mozilla::dom; USING_ARCHIVEREADER_NAMESPACE diff --git a/dom/archivereader/ArchiveZipFile.cpp b/dom/archivereader/ArchiveZipFile.cpp index d374fe91f..e1716f348 100644 --- a/dom/archivereader/ArchiveZipFile.cpp +++ b/dom/archivereader/ArchiveZipFile.cpp @@ -12,6 +12,7 @@ #include "mozilla/Attributes.h" #include "mozilla/dom/File.h" +using namespace mozilla; using namespace mozilla::dom; USING_ARCHIVEREADER_NAMESPACE diff --git a/dom/archivereader/moz.build b/dom/archivereader/moz.build index 57dbfa121..a5d853c91 100644 --- a/dom/archivereader/moz.build +++ b/dom/archivereader/moz.build @@ -13,7 +13,7 @@ EXPORTS.mozilla.dom.archivereader += [ 'ArchiveZipFile.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'ArchiveEvent.cpp', 'ArchiveReader.cpp', 'ArchiveRequest.cpp', diff --git a/dom/audiochannel/moz.build b/dom/audiochannel/moz.build index 46923db3c..547cce24a 100644 --- a/dom/audiochannel/moz.build +++ b/dom/audiochannel/moz.build @@ -16,14 +16,12 @@ EXPORTS += [ 'AudioChannelService.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'AudioChannelAgent.cpp', 'AudioChannelService.cpp', ] -LOCAL_INCLUDES += [ - '/dom/base/', -] +LOCAL_INCLUDES += ['/dom/base/'] include('/ipc/chromium/chromium-config.mozbuild') diff --git a/dom/broadcastchannel/moz.build b/dom/broadcastchannel/moz.build index a076331e5..c9d687cbc 100644 --- a/dom/broadcastchannel/moz.build +++ b/dom/broadcastchannel/moz.build @@ -8,20 +8,16 @@ EXPORTS.mozilla.dom += [ 'BroadcastChannel.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'BroadcastChannel.cpp', 'BroadcastChannelChild.cpp', 'BroadcastChannelParent.cpp', 'BroadcastChannelService.cpp', ] -IPDL_SOURCES += [ - 'PBroadcastChannel.ipdl', -] +IPDL_SOURCES += ['PBroadcastChannel.ipdl'] -LOCAL_INCLUDES += [ - '../workers', -] +LOCAL_INCLUDES += ['../workers'] MOCHITEST_MANIFESTS += ['tests/mochitest.ini'] BROWSER_CHROME_MANIFESTS += ['tests/browser.ini'] diff --git a/dom/cache/CacheOpParent.cpp b/dom/cache/CacheOpParent.cpp index 992ee82a7..37fcbc0f3 100644 --- a/dom/cache/CacheOpParent.cpp +++ b/dom/cache/CacheOpParent.cpp @@ -12,6 +12,7 @@ #include "mozilla/dom/cache/SavedTypes.h" #include "mozilla/ipc/FileDescriptorSetParent.h" #include "mozilla/ipc/InputStreamUtils.h" +#include "mozilla/ipc/IPCStreamUtils.h" #include "mozilla/ipc/SendStream.h" namespace mozilla { diff --git a/dom/cache/CacheStorage.cpp b/dom/cache/CacheStorage.cpp index 937e3826f..a0f486445 100644 --- a/dom/cache/CacheStorage.cpp +++ b/dom/cache/CacheStorage.cpp @@ -7,6 +7,7 @@ #include "mozilla/dom/cache/CacheStorage.h" #include "mozilla/Unused.h" +#include "mozilla/dom/CacheBinding.h" #include "mozilla/dom/CacheStorageBinding.h" #include "mozilla/dom/Promise.h" #include "mozilla/dom/Response.h" @@ -29,6 +30,8 @@ #include "nsURLParsers.h" #include "WorkerPrivate.h" +using namespace mozilla::dom; + namespace mozilla { namespace dom { namespace cache { diff --git a/dom/cache/CacheStreamControlChild.cpp b/dom/cache/CacheStreamControlChild.cpp index b7ca3a0e7..978019ab6 100644 --- a/dom/cache/CacheStreamControlChild.cpp +++ b/dom/cache/CacheStreamControlChild.cpp @@ -11,6 +11,7 @@ #include "mozilla/dom/cache/CacheTypes.h" #include "mozilla/dom/cache/ReadStream.h" #include "mozilla/ipc/FileDescriptorSetChild.h" +#include "mozilla/ipc/IPCStreamUtils.h" #include "mozilla/ipc/PBackgroundChild.h" #include "mozilla/ipc/PFileDescriptorSetChild.h" #include "nsISupportsImpl.h" diff --git a/dom/cache/CacheStreamControlParent.cpp b/dom/cache/CacheStreamControlParent.cpp index 54eef01d8..02f2fd2d3 100644 --- a/dom/cache/CacheStreamControlParent.cpp +++ b/dom/cache/CacheStreamControlParent.cpp @@ -11,6 +11,7 @@ #include "mozilla/dom/cache/ReadStream.h" #include "mozilla/dom/cache/StreamList.h" #include "mozilla/ipc/FileDescriptorSetParent.h" +#include "mozilla/ipc/IPCStreamUtils.h" #include "mozilla/ipc/PBackgroundParent.h" #include "mozilla/ipc/PFileDescriptorSetParent.h" #include "nsISupportsImpl.h" @@ -20,6 +21,7 @@ namespace dom { namespace cache { using mozilla::dom::OptionalFileDescriptorSet; +using mozilla::ipc::AutoIPCStream; using mozilla::ipc::FileDescriptor; using mozilla::ipc::FileDescriptorSetParent; using mozilla::ipc::PFileDescriptorSetParent; diff --git a/dom/cache/ReadStream.h b/dom/cache/ReadStream.h index 824cedb02..6744f30c2 100644 --- a/dom/cache/ReadStream.h +++ b/dom/cache/ReadStream.h @@ -12,9 +12,12 @@ #include "nsID.h" #include "nsIInputStream.h" #include "nsISupportsImpl.h" +#include "mozilla/ErrorResult.h" #include "mozilla/RefPtr.h" #include "nsTArrayForwardDeclare.h" +using namespace mozilla; + namespace mozilla { namespace ipc { class AutoIPCStream; diff --git a/dom/cache/TypeUtils.cpp b/dom/cache/TypeUtils.cpp index 2d4cb30eb..f8c5cd7be 100644 --- a/dom/cache/TypeUtils.cpp +++ b/dom/cache/TypeUtils.cpp @@ -14,6 +14,7 @@ #include "mozilla/dom/cache/CacheTypes.h" #include "mozilla/dom/cache/ReadStream.h" #include "mozilla/ipc/BackgroundChild.h" +#include "mozilla/ipc/IPCStreamUtils.h" #include "mozilla/ipc/PBackgroundChild.h" #include "mozilla/ipc/PFileDescriptorSetChild.h" #include "mozilla/ipc/InputStreamUtils.h" diff --git a/dom/cache/moz.build b/dom/cache/moz.build index 66f9f30fd..a536e5d75 100644 --- a/dom/cache/moz.build +++ b/dom/cache/moz.build @@ -38,7 +38,7 @@ EXPORTS.mozilla.dom.cache += [ 'TypeUtils.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'Action.cpp', 'ActorChild.cpp', 'AutoUtils.cpp', diff --git a/dom/canvas/CanvasImageCache.cpp b/dom/canvas/CanvasImageCache.cpp index 82b3f277c..2e4e90d33 100644 --- a/dom/canvas/CanvasImageCache.cpp +++ b/dom/canvas/CanvasImageCache.cpp @@ -7,6 +7,7 @@ #include "nsAutoPtr.h" #include "nsIImageLoadingContent.h" #include "nsExpirationTracker.h" +#include "imgIContainer.h" #include "imgIRequest.h" #include "mozilla/dom/Element.h" #include "nsTHashtable.h" diff --git a/dom/canvas/CanvasRenderingContextHelper.cpp b/dom/canvas/CanvasRenderingContextHelper.cpp index 61317fb51..229801ffa 100644 --- a/dom/canvas/CanvasRenderingContextHelper.cpp +++ b/dom/canvas/CanvasRenderingContextHelper.cpp @@ -4,6 +4,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "CanvasRenderingContextHelper.h" + +#include "CanvasUtils.h" #include "ImageBitmapRenderingContext.h" #include "ImageEncoder.h" #include "mozilla/dom/CanvasRenderingContext2D.h" diff --git a/dom/canvas/ImageBitmap.cpp b/dom/canvas/ImageBitmap.cpp index 6efe1b318..e4b145d46 100644 --- a/dom/canvas/ImageBitmap.cpp +++ b/dom/canvas/ImageBitmap.cpp @@ -5,19 +5,29 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "mozilla/dom/ImageBitmap.h" + #include "mozilla/CheckedInt.h" +#include "mozilla/dom/File.h" // for Blob +#include "mozilla/dom/HTMLImageElement.h" #include "mozilla/dom/ImageBitmapBinding.h" #include "mozilla/dom/Promise.h" #include "mozilla/dom/StructuredCloneTags.h" +#include "mozilla/dom/UnionTypes.h" // for ArrayBufferViewOrArrayBuffer #include "mozilla/dom/WorkerPrivate.h" #include "mozilla/dom/WorkerRunnable.h" -#include "mozilla/gfx/2D.h" +#include "CanvasRenderingContext2D.h" +#include "gfxUtils.h" #include "ImageBitmapColorUtils.h" #include "ImageBitmapUtils.h" +#include "ImageData.h" +#include "ImageLayers.h" #include "ImageUtils.h" #include "imgTools.h" #include "libyuv.h" +#include "nsLayoutUtils.h" +#include "OffscreenCanvas.h" +using namespace mozilla::dom; using namespace mozilla::gfx; using namespace mozilla::layers; diff --git a/dom/canvas/ImageBitmap.h b/dom/canvas/ImageBitmap.h index 25084b6ac..22953e541 100644 --- a/dom/canvas/ImageBitmap.h +++ b/dom/canvas/ImageBitmap.h @@ -13,7 +13,9 @@ #include "mozilla/gfx/Rect.h" #include "mozilla/Maybe.h" #include "mozilla/UniquePtr.h" +#include "CanvasRenderingContextHelper.h" #include "nsCycleCollectionParticipant.h" +#include "nsIGlobalObject.h" struct JSContext; struct JSStructuredCloneReader; diff --git a/dom/canvas/ImageBitmapColorUtils.cpp b/dom/canvas/ImageBitmapColorUtils.cpp index 2b65c1f10..4ef4ade86 100644 --- a/dom/canvas/ImageBitmapColorUtils.cpp +++ b/dom/canvas/ImageBitmapColorUtils.cpp @@ -6,6 +6,9 @@ #include "ImageBitmapColorUtils.h" +#include "js/LegacyIntTypes.h" +#include <cmath> + namespace mozilla { namespace dom { diff --git a/dom/canvas/ImageBitmapRenderingContext.cpp b/dom/canvas/ImageBitmapRenderingContext.cpp index ad313906a..9c7af2522 100644 --- a/dom/canvas/ImageBitmapRenderingContext.cpp +++ b/dom/canvas/ImageBitmapRenderingContext.cpp @@ -4,9 +4,19 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "ImageBitmapRenderingContext.h" + #include "mozilla/dom/ImageBitmapRenderingContextBinding.h" +#include "mozilla/gfx/2D.h" +#include "mozilla/gfx/DataSurfaceHelpers.h" +#include "ImageBitmap.h" #include "ImageContainer.h" +#include "ImageEncoder.h" #include "ImageLayers.h" +#include "imgIEncoder.h" +#include "Layers.h" + +using namespace mozilla::gfx; +using namespace mozilla::layers; namespace mozilla { namespace dom { diff --git a/dom/canvas/ImageBitmapUtils.h b/dom/canvas/ImageBitmapUtils.h index 39be43d8a..bc8d6ad15 100644 --- a/dom/canvas/ImageBitmapUtils.h +++ b/dom/canvas/ImageBitmapUtils.h @@ -7,6 +7,7 @@ #ifndef mozilla_dom_ImageBitmapUtils_h #define mozilla_dom_ImageBitmapUtils_h +#include "ImageBitmap.h" #include "mozilla/UniquePtr.h" #include "nsTArrayForwardDeclare.h" diff --git a/dom/canvas/OffscreenCanvas.cpp b/dom/canvas/OffscreenCanvas.cpp index 0d188c24e..981faf1b1 100644 --- a/dom/canvas/OffscreenCanvas.cpp +++ b/dom/canvas/OffscreenCanvas.cpp @@ -6,6 +6,9 @@ #include "OffscreenCanvas.h" +#include "mozilla/dom/File.h" // for Blob +#include "mozilla/dom/ImageEncoder.h" +#include "mozilla/dom/Promise.h" #include "mozilla/dom/OffscreenCanvasBinding.h" #include "mozilla/dom/WorkerPrivate.h" #include "mozilla/dom/WorkerScope.h" @@ -15,10 +18,15 @@ #include "mozilla/Telemetry.h" #include "CanvasRenderingContext2D.h" #include "CanvasUtils.h" +#include "GLContext.h" #include "GLScreenBuffer.h" +#include "ImageBitmap.h" #include "WebGL1Context.h" #include "WebGL2Context.h" +using namespace mozilla::layers; +using namespace mozilla::dom::workers; + namespace mozilla { namespace dom { diff --git a/dom/canvas/WebGL2ContextUniforms.cpp b/dom/canvas/WebGL2ContextUniforms.cpp index 7f8c07332..900f845fd 100644 --- a/dom/canvas/WebGL2ContextUniforms.cpp +++ b/dom/canvas/WebGL2ContextUniforms.cpp @@ -11,6 +11,7 @@ #include "WebGLBuffer.h" #include "WebGLContext.h" #include "WebGLProgram.h" +#include "WebGLTransformFeedback.h" #include "WebGLUniformLocation.h" #include "WebGLVertexArray.h" #include "WebGLVertexAttribData.h" diff --git a/dom/canvas/WebGLContextBuffers.cpp b/dom/canvas/WebGLContextBuffers.cpp index f53f9d7d7..e787b9914 100644 --- a/dom/canvas/WebGLContextBuffers.cpp +++ b/dom/canvas/WebGLContextBuffers.cpp @@ -7,6 +7,7 @@ #include "GLContext.h" #include "WebGLBuffer.h" +#include "WebGLTransformFeedback.h" #include "WebGLVertexArray.h" #include "mozilla/CheckedInt.h" diff --git a/dom/canvas/WebGLContextVertices.cpp b/dom/canvas/WebGLContextVertices.cpp index ba3156693..5daf1102a 100644 --- a/dom/canvas/WebGLContextVertices.cpp +++ b/dom/canvas/WebGLContextVertices.cpp @@ -7,6 +7,7 @@ #include "GLContext.h" #include "mozilla/CheckedInt.h" +#include "WebGL2Context.h" #include "WebGLBuffer.h" #include "WebGLFramebuffer.h" #include "WebGLProgram.h" diff --git a/dom/canvas/WebGLExtensionDebugGet.cpp b/dom/canvas/WebGLExtensionDebugGet.cpp index 39bb3c57a..a849bd17e 100644 --- a/dom/canvas/WebGLExtensionDebugGet.cpp +++ b/dom/canvas/WebGLExtensionDebugGet.cpp @@ -6,6 +6,7 @@ #include "WebGLExtensions.h" #include "mozilla/dom/WebGLRenderingContextBinding.h" +#include "GLContext.h" #include "WebGLContext.h" #include "WebGLContextUtils.h" diff --git a/dom/canvas/WebGLExtensions.h b/dom/canvas/WebGLExtensions.h index 7b6b6b54b..595d1c948 100644 --- a/dom/canvas/WebGLExtensions.h +++ b/dom/canvas/WebGLExtensions.h @@ -8,7 +8,7 @@ #include "mozilla/AlreadyAddRefed.h" #include "nsWrapperCache.h" -#include "WebGLObjectModel.h" +#include "WebGLContext.h" #include "WebGLTypes.h" namespace mozilla { diff --git a/dom/canvas/WebGLFramebuffer.h b/dom/canvas/WebGLFramebuffer.h index ac457c098..53e01dfe7 100644 --- a/dom/canvas/WebGLFramebuffer.h +++ b/dom/canvas/WebGLFramebuffer.h @@ -12,7 +12,7 @@ #include "mozilla/WeakPtr.h" #include "nsWrapperCache.h" -#include "WebGLObjectModel.h" +#include "WebGLContext.h" #include "WebGLRenderbuffer.h" #include "WebGLStrongTypes.h" #include "WebGLTexture.h" diff --git a/dom/canvas/WebGLObjectModel.h b/dom/canvas/WebGLObjectModel.h index 6371c7b03..7c6caf2c4 100644 --- a/dom/canvas/WebGLObjectModel.h +++ b/dom/canvas/WebGLObjectModel.h @@ -15,7 +15,6 @@ namespace mozilla { template<typename> class LinkedList; class WebGLContext; - //// // This class is a mixin for objects that are tied to a specific diff --git a/dom/canvas/WebGLSampler.h b/dom/canvas/WebGLSampler.h index 1cf039984..73e550dfe 100644 --- a/dom/canvas/WebGLSampler.h +++ b/dom/canvas/WebGLSampler.h @@ -8,6 +8,7 @@ #include "mozilla/LinkedList.h" #include "nsWrapperCache.h" +#include "WebGLContext.h" #include "WebGLObjectModel.h" #include "WebGLStrongTypes.h" diff --git a/dom/canvas/WebGLTransformFeedback.h b/dom/canvas/WebGLTransformFeedback.h index aa57372a5..378794b9f 100644 --- a/dom/canvas/WebGLTransformFeedback.h +++ b/dom/canvas/WebGLTransformFeedback.h @@ -6,8 +6,11 @@ #ifndef WEBGL_TRANSFORM_FEEDBACK_H_ #define WEBGL_TRANSFORM_FEEDBACK_H_ +#include <vector> #include "mozilla/LinkedList.h" #include "nsWrapperCache.h" +#include "WebGLBuffer.h" +#include "WebGLContext.h" #include "WebGLObjectModel.h" namespace mozilla { diff --git a/dom/canvas/WebGLVertexAttribData.cpp b/dom/canvas/WebGLVertexAttribData.cpp index b5aee18e5..cea78eb14 100644 --- a/dom/canvas/WebGLVertexAttribData.cpp +++ b/dom/canvas/WebGLVertexAttribData.cpp @@ -7,6 +7,7 @@ #include "GLContext.h" #include "WebGLBuffer.h" +#include "WebGLContext.h" namespace mozilla { diff --git a/dom/canvas/WebGLVertexAttribData.h b/dom/canvas/WebGLVertexAttribData.h index 9d79b4f94..6318b06d2 100644 --- a/dom/canvas/WebGLVertexAttribData.h +++ b/dom/canvas/WebGLVertexAttribData.h @@ -7,6 +7,7 @@ #define WEBGL_VERTEX_ATTRIB_DATA_H_ #include "GLDefs.h" +#include "WebGLBuffer.h" #include "WebGLObjectModel.h" namespace mozilla { diff --git a/dom/canvas/moz.build b/dom/canvas/moz.build index 6d5e2756f..fe39425ec 100644 --- a/dom/canvas/moz.build +++ b/dom/canvas/moz.build @@ -42,7 +42,7 @@ EXPORTS.mozilla.dom += [ ] # Canvas 2D and common sources -UNIFIED_SOURCES += [ +SOURCES += [ 'CanvasImageCache.cpp', 'CanvasRenderingContext2D.cpp', 'CanvasRenderingContextHelper.cpp', @@ -60,7 +60,7 @@ SOURCES += [ ] # WebGL Sources -UNIFIED_SOURCES += [ +SOURCES += [ 'TexUnpackBlob.cpp', 'WebGL1Context.cpp', 'WebGL1ContextUniforms.cpp', diff --git a/dom/console/moz.build b/dom/console/moz.build index 79bd1cf09..82623e442 100644 --- a/dom/console/moz.build +++ b/dom/console/moz.build @@ -22,7 +22,7 @@ EXPORTS.mozilla.dom += [ 'Console.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'Console.cpp', 'ConsoleReportCollector.cpp', ] diff --git a/dom/crypto/WebCryptoThreadPool.cpp b/dom/crypto/WebCryptoThreadPool.cpp index 6a1e78608..a2b8e6239 100644 --- a/dom/crypto/WebCryptoThreadPool.cpp +++ b/dom/crypto/WebCryptoThreadPool.cpp @@ -9,6 +9,9 @@ #include "mozilla/Services.h" #include "mozilla/StaticPtr.h" #include "nsComponentManagerUtils.h" +#include "nsContentUtils.h" +#include "nsNSSComponent.h" +#include "nsString.h" #include "nsXPCOMCIDInternal.h" #include "nsXPCOMPrivate.h" #include "nsIObserverService.h" diff --git a/dom/crypto/WebCryptoThreadPool.h b/dom/crypto/WebCryptoThreadPool.h index 77c4afb24..76bf74708 100644 --- a/dom/crypto/WebCryptoThreadPool.h +++ b/dom/crypto/WebCryptoThreadPool.h @@ -7,6 +7,8 @@ #ifndef mozilla_dom_WebCryptoThreadPool_h #define mozilla_dom_WebCryptoThreadPool_h +#include "mozilla/Mutex.h" +#include "nsIObserver.h" #include "nsIObserverService.h" #include "nsIThreadPool.h" diff --git a/dom/crypto/moz.build b/dom/crypto/moz.build index ba0b5f2cd..eb15a5530 100644 --- a/dom/crypto/moz.build +++ b/dom/crypto/moz.build @@ -13,7 +13,7 @@ EXPORTS.mozilla.dom += [ 'WebCryptoThreadPool.h' ] -UNIFIED_SOURCES += [ +SOURCES += [ 'CryptoBuffer.cpp', 'CryptoKey.cpp', 'KeyAlgorithmProxy.cpp', diff --git a/dom/encoding/moz.build b/dom/encoding/moz.build index 37292d6e5..7dc360aaf 100644 --- a/dom/encoding/moz.build +++ b/dom/encoding/moz.build @@ -11,7 +11,7 @@ EXPORTS.mozilla.dom += [ 'TextEncoder.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'EncodingUtils.cpp', 'FallbackEncoding.cpp', 'TextDecoder.cpp', @@ -19,9 +19,8 @@ UNIFIED_SOURCES += [ ] FINAL_LIBRARY = 'xul' -LOCAL_INCLUDES += [ - '/intl/locale', -] + +LOCAL_INCLUDES += ['/intl/locale'] props2arrays = '/intl/locale/props2arrays.py' prefixes = ( diff --git a/dom/events/DOMEventTargetHelper.cpp b/dom/events/DOMEventTargetHelper.cpp index dd9a01d8d..7daf7f7a7 100644 --- a/dom/events/DOMEventTargetHelper.cpp +++ b/dom/events/DOMEventTargetHelper.cpp @@ -13,6 +13,7 @@ #include "mozilla/EventDispatcher.h" #include "mozilla/EventListenerManager.h" #include "mozilla/Likely.h" +#include "mozilla/Unused.h" namespace mozilla { diff --git a/dom/events/EventTarget.cpp b/dom/events/EventTarget.cpp index 6c4cbf2d0..b111b9f9d 100644 --- a/dom/events/EventTarget.cpp +++ b/dom/events/EventTarget.cpp @@ -5,6 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "mozilla/EventListenerManager.h" +#include "mozilla/dom/Event.h" #include "mozilla/dom/EventTarget.h" #include "mozilla/dom/EventTargetBinding.h" #include "nsThreadUtils.h" diff --git a/dom/events/IMEContentObserver.h b/dom/events/IMEContentObserver.h index d2f65e186..e459096d9 100644 --- a/dom/events/IMEContentObserver.h +++ b/dom/events/IMEContentObserver.h @@ -7,6 +7,7 @@ #ifndef mozilla_IMEContentObserver_h_ #define mozilla_IMEContentObserver_h_ +#include "ContentEventHandler.h" #include "mozilla/Attributes.h" #include "nsCOMPtr.h" #include "nsCycleCollectionParticipant.h" diff --git a/dom/events/IMEStateManager.cpp b/dom/events/IMEStateManager.cpp index 80abad3cc..fd628fb6f 100644 --- a/dom/events/IMEStateManager.cpp +++ b/dom/events/IMEStateManager.cpp @@ -18,6 +18,7 @@ #include "mozilla/TextComposition.h" #include "mozilla/TextEvents.h" #include "mozilla/Unused.h" +#include "mozilla/dom/Event.h" #include "mozilla/dom/HTMLFormElement.h" #include "mozilla/dom/TabParent.h" diff --git a/dom/events/TextClause.h b/dom/events/TextClause.h index 7f85333e8..b9f3c1519 100644 --- a/dom/events/TextClause.h +++ b/dom/events/TextClause.h @@ -12,6 +12,7 @@ #include "mozilla/ErrorResult.h" #include "mozilla/dom/BindingDeclarations.h" #include "nsCycleCollectionParticipant.h" +#include "nsPIDOMWindow.h" #include "nsWrapperCache.h" namespace mozilla { diff --git a/dom/events/TouchEvent.cpp b/dom/events/TouchEvent.cpp index 9b7a74ac2..0656021a0 100644 --- a/dom/events/TouchEvent.cpp +++ b/dom/events/TouchEvent.cpp @@ -16,6 +16,8 @@ namespace mozilla { +using namespace widget; + namespace dom { /****************************************************************************** diff --git a/dom/events/moz.build b/dom/events/moz.build index ec3813207..661f56c7e 100644 --- a/dom/events/moz.build +++ b/dom/events/moz.build @@ -76,7 +76,7 @@ EXPORTS.mozilla.dom += [ if CONFIG['MOZ_WEBSPEECH']: EXPORTS.mozilla.dom += ['SpeechRecognitionError.h'] -UNIFIED_SOURCES += [ +SOURCES += [ 'AnimationEvent.cpp', 'AsyncEventDispatcher.cpp', 'BeforeAfterKeyboardEvent.cpp', @@ -97,6 +97,7 @@ UNIFIED_SOURCES += [ 'EventDispatcher.cpp', 'EventListenerManager.cpp', 'EventListenerService.cpp', + 'EventStateManager.cpp', 'EventTarget.cpp', 'FocusEvent.cpp', 'ImageCaptureError.cpp', @@ -126,13 +127,8 @@ UNIFIED_SOURCES += [ 'XULCommandEvent.cpp', ] -# nsEventStateManager.cpp should be built separately because of Mac OS X headers. -SOURCES += [ - 'EventStateManager.cpp', -] - if CONFIG['MOZ_WEBSPEECH']: - UNIFIED_SOURCES += ['SpeechRecognitionError.cpp'] + SOURCES += ['SpeechRecognitionError.cpp'] include('/ipc/chromium/chromium-config.mozbuild') diff --git a/dom/fetch/FetchConsumer.h b/dom/fetch/FetchConsumer.h index a7509a0ae..2b5725342 100644 --- a/dom/fetch/FetchConsumer.h +++ b/dom/fetch/FetchConsumer.h @@ -8,11 +8,13 @@ #define mozilla_dom_FetchConsumer_h #include "Fetch.h" +#include "nsIInputStream.h" #include "nsIObserver.h" #include "nsWeakReference.h" #include "mozilla/dom/MutableBlobStorage.h" class nsIThread; +class nsIInputStreamPump; namespace mozilla { namespace dom { diff --git a/dom/fetch/FetchUtil.cpp b/dom/fetch/FetchUtil.cpp index 601d99216..b384c4f81 100644 --- a/dom/fetch/FetchUtil.cpp +++ b/dom/fetch/FetchUtil.cpp @@ -2,6 +2,7 @@ #include "nsError.h" #include "nsIUnicodeDecoder.h" +#include "nsNetUtil.h" #include "nsString.h" #include "mozilla/dom/EncodingUtils.h" diff --git a/dom/fetch/InternalRequest.cpp b/dom/fetch/InternalRequest.cpp index b2631da6a..65f8095e2 100644 --- a/dom/fetch/InternalRequest.cpp +++ b/dom/fetch/InternalRequest.cpp @@ -8,6 +8,7 @@ #include "nsIContentPolicy.h" #include "nsIDocument.h" +#include "nsIHttpChannelInternal.h" #include "nsStreamUtils.h" #include "mozilla/ErrorResult.h" diff --git a/dom/fetch/InternalResponse.cpp b/dom/fetch/InternalResponse.cpp index cb7d74597..1b1ae13e3 100644 --- a/dom/fetch/InternalResponse.cpp +++ b/dom/fetch/InternalResponse.cpp @@ -7,6 +7,7 @@ #include "InternalResponse.h" #include "mozilla/Assertions.h" +#include "mozilla/dom/FetchTypes.h" #include "mozilla/dom/InternalHeaders.h" #include "mozilla/dom/cache/CacheTypes.h" #include "mozilla/ipc/PBackgroundSharedTypes.h" diff --git a/dom/fetch/InternalResponse.h b/dom/fetch/InternalResponse.h index 35467836a..0801e3250 100644 --- a/dom/fetch/InternalResponse.h +++ b/dom/fetch/InternalResponse.h @@ -12,6 +12,7 @@ #include "mozilla/dom/ResponseBinding.h" #include "mozilla/dom/ChannelInfo.h" +#include "mozilla/dom/InternalHeaders.h" #include "mozilla/UniquePtr.h" namespace mozilla { diff --git a/dom/fetch/Request.cpp b/dom/fetch/Request.cpp index 7ca5b43c4..6a7885b1a 100644 --- a/dom/fetch/Request.cpp +++ b/dom/fetch/Request.cpp @@ -7,6 +7,7 @@ #include "Request.h" #include "nsIURI.h" +#include "nsNetUtil.h" #include "nsPIDOMWindow.h" #include "mozilla/ErrorResult.h" @@ -15,14 +16,18 @@ #include "mozilla/dom/FetchUtil.h" #include "mozilla/dom/Promise.h" #include "mozilla/dom/URL.h" -#include "mozilla/dom/WorkerPrivate.h" #include "mozilla/Unused.h" #include "WorkerPrivate.h" +#include "WorkerRunnable.h" +#include "WorkerScope.h" +#include "Workers.h" namespace mozilla { namespace dom { +using namespace workers; + NS_IMPL_CYCLE_COLLECTING_ADDREF(Request) NS_IMPL_CYCLE_COLLECTING_RELEASE(Request) NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(Request, mOwner, mHeaders) @@ -237,14 +242,14 @@ GetRequestURLFromWorker(const GlobalObject& aGlobal, const nsAString& aInput, } } -class ReferrerSameOriginChecker final : public workers::WorkerMainThreadRunnable +class ReferrerSameOriginChecker final : public WorkerMainThreadRunnable { public: ReferrerSameOriginChecker(workers::WorkerPrivate* aWorkerPrivate, const nsAString& aReferrerURL, nsresult& aResult) - : workers::WorkerMainThreadRunnable(aWorkerPrivate, - NS_LITERAL_CSTRING("Fetch :: Referrer same origin check")), + : WorkerMainThreadRunnable(aWorkerPrivate, + NS_LITERAL_CSTRING("Fetch :: Referrer same origin check")), mReferrerURL(aReferrerURL), mResult(aResult) { diff --git a/dom/fetch/Response.cpp b/dom/fetch/Response.cpp index 3b3ada6d3..e35de0e12 100644 --- a/dom/fetch/Response.cpp +++ b/dom/fetch/Response.cpp @@ -8,6 +8,7 @@ #include "nsISupportsImpl.h" #include "nsIURI.h" +#include "nsNetUtil.h" #include "nsPIDOMWindow.h" #include "mozilla/ErrorResult.h" diff --git a/dom/fetch/moz.build b/dom/fetch/moz.build index fb2279fe7..be820ab57 100644 --- a/dom/fetch/moz.build +++ b/dom/fetch/moz.build @@ -19,17 +19,20 @@ EXPORTS.mozilla.dom += [ ] UNIFIED_SOURCES += [ - 'ChannelInfo.cpp', 'Fetch.cpp', 'FetchConsumer.cpp', + 'Request.cpp', + 'Response.cpp', +] + +SOURCES += [ + 'ChannelInfo.cpp', 'FetchDriver.cpp', 'FetchUtil.cpp', 'Headers.cpp', 'InternalHeaders.cpp', 'InternalRequest.cpp', 'InternalResponse.cpp', - 'Request.cpp', - 'Response.cpp', ] IPDL_SOURCES += [ diff --git a/dom/filehandle/moz.build b/dom/filehandle/moz.build index b4e3b64c0..37e5c22a7 100644 --- a/dom/filehandle/moz.build +++ b/dom/filehandle/moz.build @@ -18,7 +18,7 @@ EXPORTS.mozilla.dom += [ 'MutableFileBase.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'ActorsChild.cpp', 'ActorsParent.cpp', 'FileHandleBase.cpp', diff --git a/dom/filesystem/FileSystemBase.cpp b/dom/filesystem/FileSystemBase.cpp index f44f4fbf1..b19e12738 100644 --- a/dom/filesystem/FileSystemBase.cpp +++ b/dom/filesystem/FileSystemBase.cpp @@ -7,6 +7,7 @@ #include "mozilla/dom/FileSystemBase.h" #include "nsCharSeparatedTokenizer.h" +#include "FileSystemUtils.h" #include "OSFileSystem.h" namespace mozilla { diff --git a/dom/filesystem/FileSystemRequestParent.cpp b/dom/filesystem/FileSystemRequestParent.cpp index 0b9d6c18a..95a316b96 100644 --- a/dom/filesystem/FileSystemRequestParent.cpp +++ b/dom/filesystem/FileSystemRequestParent.cpp @@ -9,12 +9,15 @@ #include "GetDirectoryListingTask.h" #include "GetFileOrDirectoryTask.h" +#include "GetFilesTask.h" +#include "OSFileSystem.h" #include "mozilla/AppProcessChecker.h" #include "mozilla/dom/ContentParent.h" #include "mozilla/dom/FileSystemBase.h" #include "mozilla/dom/FileSystemSecurity.h" #include "mozilla/ipc/BackgroundParent.h" +#include "mozilla/Preferences.h" #include "mozilla/Unused.h" #include "nsProxyRelease.h" diff --git a/dom/filesystem/FileSystemSecurity.cpp b/dom/filesystem/FileSystemSecurity.cpp index b3d425817..7c70374a0 100644 --- a/dom/filesystem/FileSystemSecurity.cpp +++ b/dom/filesystem/FileSystemSecurity.cpp @@ -8,6 +8,9 @@ #include "FileSystemUtils.h" #include "mozilla/ClearOnShutdown.h" #include "mozilla/StaticPtr.h" +#include "mozilla/ipc/BackgroundParent.h" + +using namespace mozilla::ipc; namespace mozilla { namespace dom { diff --git a/dom/filesystem/FileSystemTaskBase.cpp b/dom/filesystem/FileSystemTaskBase.cpp index 481002b7d..e9eed90ee 100644 --- a/dom/filesystem/FileSystemTaskBase.cpp +++ b/dom/filesystem/FileSystemTaskBase.cpp @@ -19,6 +19,8 @@ #include "mozilla/Unused.h" #include "nsProxyRelease.h" +using namespace mozilla::ipc; + namespace mozilla { namespace dom { diff --git a/dom/filesystem/FileSystemUtils.cpp b/dom/filesystem/FileSystemUtils.cpp index 872e049ee..56293cbda 100644 --- a/dom/filesystem/FileSystemUtils.cpp +++ b/dom/filesystem/FileSystemUtils.cpp @@ -5,6 +5,9 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "mozilla/dom/FileSystemUtils.h" +#include "nsCharSeparatedTokenizer.h" +#include "nsString.h" +#include "nsTArray.h" namespace mozilla { namespace dom { diff --git a/dom/filesystem/FileSystemUtils.h b/dom/filesystem/FileSystemUtils.h index ae302e07c..42fc5573c 100644 --- a/dom/filesystem/FileSystemUtils.h +++ b/dom/filesystem/FileSystemUtils.h @@ -7,6 +7,8 @@ #ifndef mozilla_dom_FileSystemUtils_h #define mozilla_dom_FileSystemUtils_h +#include "nsString.h" + class nsIFile; namespace mozilla { diff --git a/dom/filesystem/GetDirectoryListingTask.cpp b/dom/filesystem/GetDirectoryListingTask.cpp index e3ac2933f..999366fe8 100644 --- a/dom/filesystem/GetDirectoryListingTask.cpp +++ b/dom/filesystem/GetDirectoryListingTask.cpp @@ -16,10 +16,13 @@ #include "mozilla/dom/UnionTypes.h" #include "mozilla/dom/ipc/BlobChild.h" #include "mozilla/dom/ipc/BlobParent.h" +#include "mozilla/ipc/BackgroundParent.h" #include "nsIFile.h" #include "nsISimpleEnumerator.h" #include "nsStringGlue.h" +using namespace mozilla::ipc; + namespace mozilla { namespace dom { diff --git a/dom/filesystem/GetFileOrDirectoryTask.cpp b/dom/filesystem/GetFileOrDirectoryTask.cpp index f71976503..446c641f4 100644 --- a/dom/filesystem/GetFileOrDirectoryTask.cpp +++ b/dom/filesystem/GetFileOrDirectoryTask.cpp @@ -14,9 +14,12 @@ #include "mozilla/dom/Promise.h" #include "mozilla/dom/ipc/BlobChild.h" #include "mozilla/dom/ipc/BlobParent.h" +#include "mozilla/ipc/BackgroundParent.h" #include "nsIFile.h" #include "nsStringGlue.h" +using namespace mozilla::ipc; + namespace mozilla { namespace dom { diff --git a/dom/filesystem/GetFilesHelper.cpp b/dom/filesystem/GetFilesHelper.cpp index 21d228a60..c4cbe7f14 100644 --- a/dom/filesystem/GetFilesHelper.cpp +++ b/dom/filesystem/GetFilesHelper.cpp @@ -5,8 +5,16 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "GetFilesHelper.h" +#include "FileSystemUtils.h" #include "mozilla/dom/ContentChild.h" #include "mozilla/dom/ContentParent.h" +#include "mozilla/dom/Directory.h" +#include "mozilla/dom/Promise.h" +#include "mozilla/dom/UnionTypes.h" +#include "mozilla/dom/ipc/BlobParent.h" +#include "nsContentUtils.h" +#include "nsNetCID.h" +#include "nsISimpleEnumerator.h" #include "nsProxyRelease.h" namespace mozilla { diff --git a/dom/filesystem/GetFilesHelper.h b/dom/filesystem/GetFilesHelper.h index a1bb1b27a..371c73ef2 100644 --- a/dom/filesystem/GetFilesHelper.h +++ b/dom/filesystem/GetFilesHelper.h @@ -9,9 +9,12 @@ #include "mozilla/Mutex.h" #include "mozilla/RefPtr.h" +#include "mozilla/dom/File.h" +#include "nsClassHashtable.h" #include "nsCycleCollectionTraversalCallback.h" #include "nsTArray.h" #include "nsTHashtable.h" +#include "nsThreadUtils.h" class nsIGlobalObject; diff --git a/dom/filesystem/GetFilesTask.cpp b/dom/filesystem/GetFilesTask.cpp index 6682fb7d3..b283eec54 100644 --- a/dom/filesystem/GetFilesTask.cpp +++ b/dom/filesystem/GetFilesTask.cpp @@ -15,9 +15,12 @@ #include "mozilla/dom/Promise.h" #include "mozilla/dom/ipc/BlobChild.h" #include "mozilla/dom/ipc/BlobParent.h" +#include "mozilla/ipc/BackgroundParent.h" #include "nsIFile.h" #include "nsStringGlue.h" +using namespace mozilla::ipc; + namespace mozilla { namespace dom { diff --git a/dom/filesystem/moz.build b/dom/filesystem/moz.build index 6e516c3a7..1b6a8d3ca 100644 --- a/dom/filesystem/moz.build +++ b/dom/filesystem/moz.build @@ -19,7 +19,7 @@ EXPORTS.mozilla.dom += [ 'OSFileSystem.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'Directory.cpp', 'FileSystemBase.cpp', 'FileSystemRequestParent.cpp', diff --git a/dom/gamepad/GamepadManager.cpp b/dom/gamepad/GamepadManager.cpp index e17829652..0c05b3ddb 100644 --- a/dom/gamepad/GamepadManager.cpp +++ b/dom/gamepad/GamepadManager.cpp @@ -20,7 +20,6 @@ #include "mozilla/StaticPtr.h" #include "nsAutoPtr.h" -#include "nsGlobalWindow.h" #include "nsIDOMEvent.h" #include "nsIDOMDocument.h" #include "nsIDOMWindow.h" diff --git a/dom/gamepad/GamepadManager.h b/dom/gamepad/GamepadManager.h index a772221ca..38fdfc342 100644 --- a/dom/gamepad/GamepadManager.h +++ b/dom/gamepad/GamepadManager.h @@ -7,11 +7,14 @@ #ifndef mozilla_dom_GamepadManager_h_ #define mozilla_dom_GamepadManager_h_ +#include "nsGlobalWindow.h" #include "nsIIPCBackgroundChildCreateCallback.h" #include "nsIObserver.h" // Needed for GamepadMappingType #include "mozilla/dom/GamepadBinding.h" +#include "mozilla/dom/GamepadPoseState.h" #include "mozilla/dom/GamepadServiceType.h" +#include "nsRefPtrHashtable.h" class nsGlobalWindow; diff --git a/dom/gamepad/GamepadPlatformService.h b/dom/gamepad/GamepadPlatformService.h index 0a61281e4..77a08ae17 100644 --- a/dom/gamepad/GamepadPlatformService.h +++ b/dom/gamepad/GamepadPlatformService.h @@ -15,6 +15,7 @@ namespace mozilla { namespace dom { +class GamepadChangeEvent; class GamepadEventChannelParent; // Platform Service for building and transmitting IPDL messages diff --git a/dom/gamepad/GamepadPoseState.h b/dom/gamepad/GamepadPoseState.h index 958b26139..dc5903aba 100644 --- a/dom/gamepad/GamepadPoseState.h +++ b/dom/gamepad/GamepadPoseState.h @@ -2,6 +2,8 @@ #ifndef mozilla_dom_gamepad_GamepadPoseState_h_ #define mozilla_dom_gamepad_GamepadPoseState_h_ +#include "mozilla/TypedEnumBits.h" + namespace mozilla{ namespace dom{ diff --git a/dom/gamepad/GamepadServiceTest.cpp b/dom/gamepad/GamepadServiceTest.cpp index 89429b52a..e8ec46cfe 100644 --- a/dom/gamepad/GamepadServiceTest.cpp +++ b/dom/gamepad/GamepadServiceTest.cpp @@ -22,6 +22,8 @@ #include "nsIObserver.h" #include "nsIObserverService.h" +using namespace mozilla::ipc; + namespace mozilla { namespace dom { diff --git a/dom/gamepad/android/AndroidGamepad.cpp b/dom/gamepad/android/AndroidGamepad.cpp index 706d02617..6ed1ef2ee 100644 --- a/dom/gamepad/android/AndroidGamepad.cpp +++ b/dom/gamepad/android/AndroidGamepad.cpp @@ -7,6 +7,7 @@ #include "GeneratedJNIWrappers.h" #include "GeneratedJNINatives.h" #include "nsThreadUtils.h" +#include "mozilla/dom/Gamepad.h" namespace mozilla { namespace dom { diff --git a/dom/gamepad/cocoa/CocoaGamepad.cpp b/dom/gamepad/cocoa/CocoaGamepad.cpp index e7c986e22..7fcf48532 100644 --- a/dom/gamepad/cocoa/CocoaGamepad.cpp +++ b/dom/gamepad/cocoa/CocoaGamepad.cpp @@ -7,8 +7,10 @@ // mostly derived from the Allegro source code at: // http://alleg.svn.sourceforge.net/viewvc/alleg/allegro/branches/4.9/src/macosx/hidjoy.m?revision=13760&view=markup +#include "mozilla/dom/Gamepad.h" #include "mozilla/dom/GamepadPlatformService.h" #include "mozilla/ArrayUtils.h" +#include "mozilla/Unused.h" #include "nsThreadUtils.h" #include <CoreFoundation/CoreFoundation.h> #include <IOKit/hid/IOHIDBase.h> diff --git a/dom/gamepad/ipc/GamepadEventChannelParent.cpp b/dom/gamepad/ipc/GamepadEventChannelParent.cpp index c3c8fd2c8..806081789 100644 --- a/dom/gamepad/ipc/GamepadEventChannelParent.cpp +++ b/dom/gamepad/ipc/GamepadEventChannelParent.cpp @@ -1,9 +1,13 @@ /* 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 "GamepadEventChannelParent.h" + #include "GamepadPlatformService.h" +#include "mozilla/Unused.h" #include "mozilla/dom/GamepadMonitoring.h" +#include "mozilla/ipc/BackgroundParent.h" #include "nsThreadUtils.h" namespace mozilla { diff --git a/dom/gamepad/ipc/GamepadTestChannelParent.cpp b/dom/gamepad/ipc/GamepadTestChannelParent.cpp index 421447fe0..9730f7d16 100644 --- a/dom/gamepad/ipc/GamepadTestChannelParent.cpp +++ b/dom/gamepad/ipc/GamepadTestChannelParent.cpp @@ -5,6 +5,7 @@ #include "GamepadTestChannelParent.h" #include "mozilla/dom/GamepadPlatformService.h" +#include "mozilla/ipc/BackgroundParent.h" #include "mozilla/Unused.h" namespace mozilla { diff --git a/dom/gamepad/linux/LinuxGamepad.cpp b/dom/gamepad/linux/LinuxGamepad.cpp index c45f4174a..8c6e8ea75 100644 --- a/dom/gamepad/linux/LinuxGamepad.cpp +++ b/dom/gamepad/linux/LinuxGamepad.cpp @@ -19,6 +19,7 @@ #include <sys/ioctl.h> #include <unistd.h> #include "nscore.h" +#include "mozilla/dom/Gamepad.h" #include "mozilla/dom/GamepadPlatformService.h" #include "udev.h" diff --git a/dom/gamepad/moz.build b/dom/gamepad/moz.build index a809d1eba..81ff37631 100644 --- a/dom/gamepad/moz.build +++ b/dom/gamepad/moz.build @@ -31,7 +31,7 @@ if CONFIG['MOZ_GAMEPAD']: 'ipc/GamepadTestChannelParent.h' ] - UNIFIED_SOURCES = [ + SOURCES = [ 'Gamepad.cpp', 'GamepadButton.cpp', 'GamepadManager.cpp', @@ -46,23 +46,23 @@ if CONFIG['MOZ_GAMEPAD']: ] if CONFIG['MOZ_GAMEPAD_BACKEND'] == 'stub': - UNIFIED_SOURCES += [ + SOURCES += [ 'fallback/FallbackGamepad.cpp' ] elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'cocoa': - UNIFIED_SOURCES += [ + SOURCES += [ 'cocoa/CocoaGamepad.cpp' ] elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'windows': - UNIFIED_SOURCES += [ + SOURCES += [ 'windows/WindowsGamepad.cpp' ] elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'linux': - UNIFIED_SOURCES += [ + SOURCES += [ 'linux/LinuxGamepad.cpp' ] elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'android': - UNIFIED_SOURCES += [ + SOURCES += [ 'android/AndroidGamepad.cpp' ] diff --git a/dom/gamepad/windows/WindowsGamepad.cpp b/dom/gamepad/windows/WindowsGamepad.cpp index e1965c00c..ddab2f28c 100644 --- a/dom/gamepad/windows/WindowsGamepad.cpp +++ b/dom/gamepad/windows/WindowsGamepad.cpp @@ -24,6 +24,7 @@ #include "mozilla/Services.h" #include "mozilla/ipc/BackgroundParent.h" +#include "mozilla/dom/Gamepad.h" #include "mozilla/dom/GamepadPlatformService.h" namespace { diff --git a/dom/geolocation/moz.build b/dom/geolocation/moz.build index 4339d5a7f..8ac79e8b3 100644 --- a/dom/geolocation/moz.build +++ b/dom/geolocation/moz.build @@ -13,7 +13,7 @@ SOURCES += [ 'nsGeolocation.cpp', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'MLSFallback.cpp', 'nsGeoPosition.cpp', ] diff --git a/dom/geolocation/nsGeoPosition.h b/dom/geolocation/nsGeoPosition.h index 06b406c32..cefb4ae8d 100644 --- a/dom/geolocation/nsGeoPosition.h +++ b/dom/geolocation/nsGeoPosition.h @@ -7,6 +7,7 @@ #ifndef nsGeoPosition_h #define nsGeoPosition_h +#include "nsCOMPtr.h" #include "nsIDOMGeoPositionCoords.h" #include "nsIDOMGeoPosition.h" #include "nsString.h" diff --git a/dom/grid/GridDimension.h b/dom/grid/GridDimension.h index 7a3373521..ec9635444 100644 --- a/dom/grid/GridDimension.h +++ b/dom/grid/GridDimension.h @@ -7,11 +7,13 @@ #ifndef mozilla_dom_GridDimension_h #define mozilla_dom_GridDimension_h +#include "mozilla/dom/GridBinding.h" #include "nsWrapperCache.h" namespace mozilla { struct ComputedGridTrackInfo; +struct ComputedGridLineInfo; namespace dom { diff --git a/dom/grid/GridLines.cpp b/dom/grid/GridLines.cpp index 898885346..2604eff6c 100644 --- a/dom/grid/GridLines.cpp +++ b/dom/grid/GridLines.cpp @@ -6,6 +6,7 @@ #include "GridLines.h" +#include "GridArea.h" #include "GridDimension.h" #include "GridLine.h" #include "mozilla/dom/GridBinding.h" diff --git a/dom/grid/GridLines.h b/dom/grid/GridLines.h index 921168204..784fe2d28 100644 --- a/dom/grid/GridLines.h +++ b/dom/grid/GridLines.h @@ -7,10 +7,15 @@ #ifndef mozilla_dom_GridLines_h #define mozilla_dom_GridLines_h -#include "nsTArray.h" +#include "mozilla/dom/GridBinding.h" +#include "nsGridContainerFrame.h" #include "nsWrapperCache.h" namespace mozilla { + +struct ComputedGridTrackInfo; +struct ComputedGridLineInfo; + namespace dom { class GridDimension; diff --git a/dom/grid/moz.build b/dom/grid/moz.build index 96d5c3151..62025c98e 100644 --- a/dom/grid/moz.build +++ b/dom/grid/moz.build @@ -16,7 +16,7 @@ EXPORTS.mozilla.dom += [ 'GridTracks.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'Grid.cpp', 'GridArea.cpp', 'GridDimension.cpp', diff --git a/dom/html/HTMLBodyElement.cpp b/dom/html/HTMLBodyElement.cpp index 6230cb6ca..ee1bced02 100644 --- a/dom/html/HTMLBodyElement.cpp +++ b/dom/html/HTMLBodyElement.cpp @@ -7,6 +7,7 @@ #include "HTMLBodyElement.h" #include "mozilla/dom/HTMLBodyElementBinding.h" #include "nsAttrValueInlines.h" +#include "nsContentUtils.h" #include "nsGkAtoms.h" #include "nsStyleConsts.h" #include "nsPresContext.h" diff --git a/dom/html/HTMLFrameSetElement.cpp b/dom/html/HTMLFrameSetElement.cpp index 6d39caa19..5d49cd78e 100644 --- a/dom/html/HTMLFrameSetElement.cpp +++ b/dom/html/HTMLFrameSetElement.cpp @@ -7,6 +7,7 @@ #include "HTMLFrameSetElement.h" #include "mozilla/dom/HTMLFrameSetElementBinding.h" #include "mozilla/dom/EventHandlerBinding.h" +#include "nsContentUtils.h" #include "nsGlobalWindow.h" #include "mozilla/UniquePtrExtensions.h" diff --git a/dom/html/HTMLLabelElement.cpp b/dom/html/HTMLLabelElement.cpp index d1c037336..ec36c8b99 100644 --- a/dom/html/HTMLLabelElement.cpp +++ b/dom/html/HTMLLabelElement.cpp @@ -8,6 +8,7 @@ * Implementation of HTML <label> elements. */ #include "HTMLLabelElement.h" +#include "HTMLFormElement.h" #include "mozilla/EventDispatcher.h" #include "mozilla/MouseEvents.h" #include "mozilla/dom/HTMLLabelElementBinding.h" diff --git a/dom/html/HTMLMetaElement.cpp b/dom/html/HTMLMetaElement.cpp index 47effa2bc..de7dc184c 100644 --- a/dom/html/HTMLMetaElement.cpp +++ b/dom/html/HTMLMetaElement.cpp @@ -11,6 +11,7 @@ #include "nsContentUtils.h" #include "nsStyleConsts.h" #include "nsIContentSecurityPolicy.h" +#include "nsIDOMDocument.h" NS_IMPL_NS_NEW_HTML_ELEMENT(Meta) diff --git a/dom/html/ValidityState.h b/dom/html/ValidityState.h index 4dbb94aad..adbd86c1d 100644 --- a/dom/html/ValidityState.h +++ b/dom/html/ValidityState.h @@ -11,6 +11,7 @@ #include "nsIConstraintValidation.h" #include "nsWrapperCache.h" #include "js/TypeDecls.h" +#include "nsCOMPtr.h" namespace mozilla { namespace dom { diff --git a/dom/html/moz.build b/dom/html/moz.build index c86c169b5..82d6e07b3 100644 --- a/dom/html/moz.build +++ b/dom/html/moz.build @@ -122,7 +122,7 @@ EXPORTS.mozilla.dom += [ 'ValidityState.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'HTMLAllCollection.cpp', 'HTMLAnchorElement.cpp', 'HTMLAreaElement.cpp', @@ -206,6 +206,7 @@ UNIFIED_SOURCES += [ 'nsIConstraintValidation.cpp', 'nsRadioVisitor.cpp', 'nsTextEditorState.cpp', + 'PluginDocument.cpp', 'RadioNodeList.cpp', 'TextTrackManager.cpp', 'TimeRanges.cpp', @@ -213,11 +214,6 @@ UNIFIED_SOURCES += [ 'VideoDocument.cpp', ] -SOURCES += [ - # Includes npapi.h. - 'PluginDocument.cpp', -] - EXTRA_COMPONENTS += [ 'htmlMenuBuilder.js', 'htmlMenuBuilder.manifest' diff --git a/dom/html/nsBrowserElement.cpp b/dom/html/nsBrowserElement.cpp index 858d1c7cb..1c2f00c15 100644 --- a/dom/html/nsBrowserElement.cpp +++ b/dom/html/nsBrowserElement.cpp @@ -18,8 +18,10 @@ #include "mozIApplication.h" #include "nsComponentManagerUtils.h" +#include "nsContentUtils.h" #include "nsFrameLoader.h" #include "nsIAppsService.h" +#include "nsIDOMDocument.h" #include "nsIDOMDOMRequest.h" #include "nsIDOMElement.h" #include "nsIMozBrowserFrame.h" diff --git a/dom/html/nsHTMLDocument.cpp b/dom/html/nsHTMLDocument.cpp index 0f2d90673..fc5268acc 100644 --- a/dom/html/nsHTMLDocument.cpp +++ b/dom/html/nsHTMLDocument.cpp @@ -28,6 +28,7 @@ #include "nsIDOMElement.h" #include "nsPIDOMWindow.h" #include "nsDOMString.h" +#include "nsIProtocolHandler.h" #include "nsIStreamListener.h" #include "nsIURI.h" #include "nsIIOService.h" diff --git a/dom/html/nsIConstraintValidation.cpp b/dom/html/nsIConstraintValidation.cpp index 00f34df67..db69cba07 100644 --- a/dom/html/nsIConstraintValidation.cpp +++ b/dom/html/nsIConstraintValidation.cpp @@ -13,6 +13,8 @@ #include "mozilla/dom/HTMLInputElement.h" #include "mozilla/dom/ValidityState.h" #include "nsIFormControl.h" +#include "nsIMutableArray.h" +#include "nsISimpleEnumerator.h" #include "nsContentUtils.h" #include "nsIFormSubmitObserver.h" diff --git a/dom/indexedDB/IDBDatabase.cpp b/dom/indexedDB/IDBDatabase.cpp index 6ef352801..8a1fa4b21 100644 --- a/dom/indexedDB/IDBDatabase.cpp +++ b/dom/indexedDB/IDBDatabase.cpp @@ -16,6 +16,7 @@ #include "IDBTransaction.h" #include "IDBFactory.h" #include "IndexedDatabaseManager.h" +#include "KeyPath.h" #include "mozilla/ErrorResult.h" #include "mozilla/EventDispatcher.h" #include "MainThreadUtils.h" @@ -54,13 +55,15 @@ // Include this last to avoid path problems on Windows. #include "ActorsChild.h" -namespace mozilla { -namespace dom { +using namespace mozilla::dom::indexedDB; using namespace mozilla::dom::quota; using namespace mozilla::ipc; using namespace mozilla::services; +namespace mozilla { +namespace dom { + namespace { const char kCycleCollectionObserverTopic[] = "cycle-collector-end"; diff --git a/dom/indexedDB/IDBFactory.cpp b/dom/indexedDB/IDBFactory.cpp index 66471fe24..1fae686b4 100644 --- a/dom/indexedDB/IDBFactory.cpp +++ b/dom/indexedDB/IDBFactory.cpp @@ -41,6 +41,8 @@ #include "nsContentUtils.h" // For assertions. #endif +using namespace mozilla::dom::indexedDB; + namespace mozilla { namespace dom { diff --git a/dom/indexedDB/IDBFileHandle.cpp b/dom/indexedDB/IDBFileHandle.cpp index 8b88e1722..3287cf404 100644 --- a/dom/indexedDB/IDBFileHandle.cpp +++ b/dom/indexedDB/IDBFileHandle.cpp @@ -12,6 +12,8 @@ #include "mozilla/dom/IDBFileHandleBinding.h" #include "mozilla/dom/filehandle/ActorsChild.h" #include "mozilla/EventDispatcher.h" +#include "nsContentUtils.h" +#include "nsQueryObject.h" #include "nsServiceManagerUtils.h" #include "nsWidgetsCID.h" diff --git a/dom/indexedDB/IDBIndex.cpp b/dom/indexedDB/IDBIndex.cpp index af50926e6..f47098fce 100644 --- a/dom/indexedDB/IDBIndex.cpp +++ b/dom/indexedDB/IDBIndex.cpp @@ -23,6 +23,9 @@ // Include this last to avoid path problems on Windows. #include "ActorsChild.h" +using namespace mozilla::dom; +using namespace mozilla::dom::indexedDB; + namespace mozilla { namespace dom { diff --git a/dom/indexedDB/IDBObjectStore.cpp b/dom/indexedDB/IDBObjectStore.cpp index cbac30894..1216c8f84 100644 --- a/dom/indexedDB/IDBObjectStore.cpp +++ b/dom/indexedDB/IDBObjectStore.cpp @@ -52,6 +52,8 @@ // Include this last to avoid path problems on Windows. #include "ActorsChild.h" +using namespace mozilla::dom::indexedDB; + namespace mozilla { namespace dom { diff --git a/dom/indexedDB/IDBTransaction.cpp b/dom/indexedDB/IDBTransaction.cpp index a50489898..61b49b137 100644 --- a/dom/indexedDB/IDBTransaction.cpp +++ b/dom/indexedDB/IDBTransaction.cpp @@ -18,6 +18,7 @@ #include "mozilla/ipc/BackgroundChild.h" #include "nsAutoPtr.h" #include "nsPIDOMWindow.h" +#include "nsQueryObject.h" #include "nsServiceManagerUtils.h" #include "nsTHashtable.h" #include "ProfilerHelpers.h" diff --git a/dom/indexedDB/KeyPath.cpp b/dom/indexedDB/KeyPath.cpp index 0221c9450..74316f465 100644 --- a/dom/indexedDB/KeyPath.cpp +++ b/dom/indexedDB/KeyPath.cpp @@ -11,10 +11,12 @@ #include "nsCharSeparatedTokenizer.h" #include "nsJSUtils.h" +#include "nsPrintfCString.h" #include "xpcpublic.h" #include "mozilla/dom/BindingDeclarations.h" #include "mozilla/dom/BlobBinding.h" +#include "mozilla/dom/File.h" // for Blob #include "mozilla/dom/IDBObjectStoreBinding.h" namespace mozilla { diff --git a/dom/indexedDB/ScriptErrorHelper.h b/dom/indexedDB/ScriptErrorHelper.h index d1cd8c749..1716af87f 100644 --- a/dom/indexedDB/ScriptErrorHelper.h +++ b/dom/indexedDB/ScriptErrorHelper.h @@ -7,6 +7,8 @@ #ifndef mozilla_dom_indexeddb_scripterrorhelper_h__ #define mozilla_dom_indexeddb_scripterrorhelper_h__ +#include "nsString.h" + class nsAString; namespace mozilla { diff --git a/dom/indexedDB/moz.build b/dom/indexedDB/moz.build index d8c217f38..050599393 100644 --- a/dom/indexedDB/moz.build +++ b/dom/indexedDB/moz.build @@ -45,7 +45,7 @@ EXPORTS.mozilla.dom.indexedDB += [ 'SerializationHelpers.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'ActorsChild.cpp', 'FileInfo.cpp', 'FileSnapshot.cpp', diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 0d11fb889..deea691f3 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -109,6 +109,7 @@ #include "nsIDOMWindow.h" #include "nsIExternalProtocolService.h" #include "nsIFormProcessor.h" +#include "nsIFrameLoader.h" #include "nsIGfxInfo.h" #include "nsIIdleService.h" #include "nsIInterfaceRequestorUtils.h" @@ -229,6 +230,7 @@ static NS_DEFINE_CID(kCClipboardCID, NS_CLIPBOARD_CID); using base::ChildPrivileges; using base::KillProcess; +using namespace mozilla::dom; using namespace mozilla::dom::power; using namespace mozilla::media; using namespace mozilla::embedding; diff --git a/dom/ipc/StructuredCloneData.cpp b/dom/ipc/StructuredCloneData.cpp index 2c1fff2ac..6b3ee0cd1 100644 --- a/dom/ipc/StructuredCloneData.cpp +++ b/dom/ipc/StructuredCloneData.cpp @@ -13,6 +13,7 @@ #include "ipc/IPCMessageUtils.h" #include "mozilla/dom/BindingUtils.h" #include "mozilla/dom/BlobBinding.h" +#include "mozilla/dom/DOMTypes.h" #include "mozilla/dom/File.h" #include "mozilla/dom/ToJSValue.h" #include "nsContentUtils.h" diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index e1355adee..aac95ae02 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -71,6 +71,7 @@ #include "nsIURI.h" #include "nsIURIFixup.h" #include "nsCDefaultURIFixup.h" +#include "nsISupportsPrimitives.h" #include "nsIWebBrowser.h" #include "nsIWebBrowserFocus.h" #include "nsIWebBrowserSetup.h" diff --git a/dom/ipc/moz.build b/dom/ipc/moz.build index 5629ab2c6..455d0eff7 100644 --- a/dom/ipc/moz.build +++ b/dom/ipc/moz.build @@ -44,11 +44,13 @@ EXPORTS.mozilla += [ 'ProcessPriorityManager.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'AppProcessChecker.cpp', + 'Blob.cpp', 'ColorPickerParent.cpp', 'ContentBridgeChild.cpp', 'ContentBridgeParent.cpp', + 'ContentChild.cpp', 'ContentParent.cpp', 'ContentProcess.cpp', 'ContentProcessManager.cpp', @@ -57,6 +59,7 @@ UNIFIED_SOURCES += [ 'nsIContentParent.cpp', 'PermissionMessageUtils.cpp', 'PreallocatedProcessManager.cpp', + 'ProcessHangMonitor.cpp', 'ProcessPriorityManager.cpp', 'ScreenManagerParent.cpp', 'StructuredCloneData.cpp', @@ -66,14 +69,6 @@ UNIFIED_SOURCES += [ 'TabParent.cpp', ] -# Blob.cpp cannot be compiled in unified mode because it triggers a fatal gcc warning. -# ContentChild.cpp cannot be compiled in unified mode on linux due to Time conflict -SOURCES += [ - 'Blob.cpp', - 'ContentChild.cpp', - 'ProcessHangMonitor.cpp', -] - IPDL_SOURCES += [ 'BlobTypes.ipdlh', 'DOMTypes.ipdlh', diff --git a/dom/ipc/nsIContentParent.cpp b/dom/ipc/nsIContentParent.cpp index 0ef1abdf7..77bfae4c7 100644 --- a/dom/ipc/nsIContentParent.cpp +++ b/dom/ipc/nsIContentParent.cpp @@ -27,6 +27,7 @@ #include "nsPrintfCString.h" #include "xpcpublic.h" +using namespace mozilla::ipc; using namespace mozilla::jsipc; // XXX need another bug to move this to a common header. diff --git a/dom/json/moz.build b/dom/json/moz.build index 635dca255..28711b19a 100644 --- a/dom/json/moz.build +++ b/dom/json/moz.build @@ -4,17 +4,11 @@ # 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/. -EXPORTS += [ - 'nsJSON.h', -] +EXPORTS += ['nsJSON.h'] -UNIFIED_SOURCES += [ - 'nsJSON.cpp', -] +SOURCES += ['nsJSON.cpp'] -LOCAL_INCLUDES += [ - '/dom/base', -] +LOCAL_INCLUDES += ['/dom/base'] FINAL_LIBRARY = 'xul' diff --git a/dom/jsurl/moz.build b/dom/jsurl/moz.build index f5579b64d..c0c82a141 100644 --- a/dom/jsurl/moz.build +++ b/dom/jsurl/moz.build @@ -8,7 +8,7 @@ EXPORTS += [ 'nsJSProtocolHandler.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'nsJSProtocolHandler.cpp', ] diff --git a/dom/mathml/moz.build b/dom/mathml/moz.build index 307c1603e..d483008aa 100644 --- a/dom/mathml/moz.build +++ b/dom/mathml/moz.build @@ -4,7 +4,7 @@ # 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/. -UNIFIED_SOURCES += [ +SOURCES += [ 'nsMathMLElement.cpp', 'nsMathMLElementFactory.cpp', ] @@ -12,6 +12,5 @@ UNIFIED_SOURCES += [ include('/ipc/chromium/chromium-config.mozbuild') FINAL_LIBRARY = 'xul' -LOCAL_INCLUDES += [ - '/dom/base', -] + +LOCAL_INCLUDES += ['/dom/base'] diff --git a/dom/media/Benchmark.cpp b/dom/media/Benchmark.cpp index 7394f8036..e2b4abe7b 100644 --- a/dom/media/Benchmark.cpp +++ b/dom/media/Benchmark.cpp @@ -11,6 +11,7 @@ #include "PDMFactory.h" #include "WebMDemuxer.h" #include "mozilla/Preferences.h" +#include "mozilla/SharedThreadPool.h" #include "mozilla/dom/ContentChild.h" #ifndef MOZ_WIDGET_ANDROID diff --git a/dom/media/CanvasCaptureMediaStream.cpp b/dom/media/CanvasCaptureMediaStream.cpp index f40f01e21..acf2059c7 100644 --- a/dom/media/CanvasCaptureMediaStream.cpp +++ b/dom/media/CanvasCaptureMediaStream.cpp @@ -8,6 +8,7 @@ #include "gfxPlatform.h" #include "ImageContainer.h" #include "MediaStreamGraph.h" +#include "MediaStreamListener.h" #include "mozilla/dom/CanvasCaptureMediaStreamBinding.h" #include "mozilla/gfx/2D.h" #include "mozilla/Atomics.h" diff --git a/dom/media/CubebUtils.cpp b/dom/media/CubebUtils.cpp index 6bb846afe..7f203ce62 100644 --- a/dom/media/CubebUtils.cpp +++ b/dom/media/CubebUtils.cpp @@ -10,6 +10,8 @@ #include "nsDebug.h" #include "nsString.h" #include "mozilla/Preferences.h" +#include "mozilla/Services.h" +#include "mozilla/Sprintf.h" #include "mozilla/StaticMutex.h" #include "mozilla/StaticPtr.h" #include "mozilla/Telemetry.h" diff --git a/dom/media/DOMMediaStream.cpp b/dom/media/DOMMediaStream.cpp index 118d845a3..53d096d6e 100755 --- a/dom/media/DOMMediaStream.cpp +++ b/dom/media/DOMMediaStream.cpp @@ -14,6 +14,7 @@ #include "mozilla/dom/MediaStreamTrackEvent.h" #include "mozilla/dom/LocalMediaStreamBinding.h" #include "mozilla/dom/AudioNode.h" +#include "AudioCaptureStream.h" #include "AudioChannelAgent.h" #include "mozilla/dom/AudioTrack.h" #include "mozilla/dom/AudioTrackList.h" @@ -22,6 +23,7 @@ #include "mozilla/dom/HTMLCanvasElement.h" #include "mozilla/media/MediaUtils.h" #include "MediaStreamGraph.h" +#include "MediaStreamListener.h" #include "AudioStreamTrack.h" #include "VideoStreamTrack.h" #include "Layers.h" diff --git a/dom/media/MediaDecoder.cpp b/dom/media/MediaDecoder.cpp index 0cce91ccb..b1f2f95d7 100644 --- a/dom/media/MediaDecoder.cpp +++ b/dom/media/MediaDecoder.cpp @@ -788,6 +788,13 @@ MediaDecoder::CallSeek(const SeekTarget& aTarget, dom::Promise* aPromise) &MediaDecoder::OnSeekResolved, &MediaDecoder::OnSeekRejected)); } +// GetCurrentTime is defined in winbase.h as a zero argument macro forwarding to +// GetTickCount(), which conflicts with the MediaDecoder::GetCurrentTime +// implementation here. Clear the macro. +#ifdef GetCurrentTime +#undef GetCurrentTime +#endif + double MediaDecoder::GetCurrentTime() { diff --git a/dom/media/MediaDecoderReader.cpp b/dom/media/MediaDecoderReader.cpp index b6cdf9080..046f81b2e 100644 --- a/dom/media/MediaDecoderReader.cpp +++ b/dom/media/MediaDecoderReader.cpp @@ -14,6 +14,7 @@ #include "nsPrintfCString.h" #include "mozilla/mozalloc.h" #include "mozilla/Mutex.h" +#include "mozilla/SharedThreadPool.h" #include <stdint.h> #include <algorithm> diff --git a/dom/media/MediaStreamListener.h b/dom/media/MediaStreamListener.h index 2b6be85cf..eefd4adac 100644 --- a/dom/media/MediaStreamListener.h +++ b/dom/media/MediaStreamListener.h @@ -7,7 +7,9 @@ #ifndef MOZILLA_MEDIASTREAMLISTENER_h_ #define MOZILLA_MEDIASTREAMLISTENER_h_ +#include "MediaStreamGraph.h" #include "StreamTracks.h" +#include "MediaStreamGraph.h" namespace mozilla { diff --git a/dom/media/MediaStreamTrack.cpp b/dom/media/MediaStreamTrack.cpp index 75cdeb1d1..648ec82a0 100644 --- a/dom/media/MediaStreamTrack.cpp +++ b/dom/media/MediaStreamTrack.cpp @@ -7,8 +7,10 @@ #include "DOMMediaStream.h" #include "MediaStreamGraph.h" +#include "nsContentUtils.h" #include "nsIUUIDGenerator.h" #include "nsServiceManagerUtils.h" +#include "MediaStreamError.h" #include "MediaStreamListener.h" #include "systemservices/MediaUtils.h" @@ -21,6 +23,8 @@ static mozilla::LazyLogModule gMediaStreamTrackLog("MediaStreamTrack"); #define LOG(type, msg) MOZ_LOG(gMediaStreamTrackLog, type, msg) +using namespace mozilla::media; + namespace mozilla { namespace dom { diff --git a/dom/media/eme/MediaKeySystemAccess.cpp b/dom/media/eme/MediaKeySystemAccess.cpp index 4a5a7a30c..e4e86f4c5 100644 --- a/dom/media/eme/MediaKeySystemAccess.cpp +++ b/dom/media/eme/MediaKeySystemAccess.cpp @@ -36,9 +36,11 @@ #include "mozilla/ClearOnShutdown.h" #include "nsUnicharUtils.h" #include "mozilla/dom/MediaSource.h" +#include "DecoderTraits.h" #ifdef MOZ_WIDGET_ANDROID #include "FennecJNIWrappers.h" #endif + namespace mozilla { namespace dom { diff --git a/dom/media/eme/mediadrm/moz.build b/dom/media/eme/mediadrm/moz.build index c01f7a52e..83479d670 100644 --- a/dom/media/eme/mediadrm/moz.build +++ b/dom/media/eme/mediadrm/moz.build @@ -10,7 +10,7 @@ EXPORTS.mozilla += [ 'MediaDrmProxySupport.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'MediaDrmCDMCallbackProxy.cpp', 'MediaDrmCDMProxy.cpp', 'MediaDrmProxySupport.cpp', diff --git a/dom/media/eme/moz.build b/dom/media/eme/moz.build index 47e622ae3..b55ae3df5 100644 --- a/dom/media/eme/moz.build +++ b/dom/media/eme/moz.build @@ -23,7 +23,7 @@ EXPORTS.mozilla += [ 'EMEUtils.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'CDMCaps.cpp', 'DetailedPromise.cpp', 'EMEUtils.cpp', diff --git a/dom/media/encoder/OpusTrackEncoder.cpp b/dom/media/encoder/OpusTrackEncoder.cpp index 4b55b3954..aa732b392 100644 --- a/dom/media/encoder/OpusTrackEncoder.cpp +++ b/dom/media/encoder/OpusTrackEncoder.cpp @@ -2,7 +2,9 @@ /* 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 "OpusTrackEncoder.h" +#include "VideoUtils.h" #include "nsString.h" #include "GeckoProfiler.h" diff --git a/dom/media/encoder/moz.build b/dom/media/encoder/moz.build index f29430cb0..925c36f90 100644 --- a/dom/media/encoder/moz.build +++ b/dom/media/encoder/moz.build @@ -16,7 +16,7 @@ EXPORTS += [ 'TrackMetadataBase.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'MediaEncoder.cpp', 'OpusTrackEncoder.cpp', 'TrackEncoder.cpp', @@ -25,8 +25,10 @@ UNIFIED_SOURCES += [ if CONFIG['MOZ_WEBM_ENCODER']: EXPORTS += ['VP8TrackEncoder.h', ] - UNIFIED_SOURCES += ['VP8TrackEncoder.cpp', + + SOURCES += ['VP8TrackEncoder.cpp', ] + LOCAL_INCLUDES += ['/media/libyuv/include'] FINAL_LIBRARY = 'xul' diff --git a/dom/media/flac/FlacDemuxer.cpp b/dom/media/flac/FlacDemuxer.cpp index 7a98edbee..6df09cc25 100644 --- a/dom/media/flac/FlacDemuxer.cpp +++ b/dom/media/flac/FlacDemuxer.cpp @@ -33,14 +33,6 @@ namespace flac { // flac::FrameHeader - Holds the flac frame header and its parsing // state. -#define FLAC_MAX_CHANNELS 8 -#define FLAC_MIN_BLOCKSIZE 16 -#define FLAC_MAX_BLOCKSIZE 65535 -#define FLAC_MIN_FRAME_SIZE 11 -#define FLAC_MAX_FRAME_HEADER_SIZE 16 -#define FLAC_MAX_FRAME_SIZE (FLAC_MAX_FRAME_HEADER_SIZE \ - +FLAC_MAX_BLOCKSIZE*FLAC_MAX_CHANNELS*3) - class FrameHeader { public: const AudioInfo& Info() const { return mInfo; } diff --git a/dom/media/flac/FlacDemuxer.h b/dom/media/flac/FlacDemuxer.h index fd0e35c94..248ae861f 100644 --- a/dom/media/flac/FlacDemuxer.h +++ b/dom/media/flac/FlacDemuxer.h @@ -13,6 +13,15 @@ namespace mozilla { namespace flac { + +#define FLAC_MAX_CHANNELS 8 +#define FLAC_MIN_BLOCKSIZE 16 +#define FLAC_MAX_BLOCKSIZE 65535 +#define FLAC_MIN_FRAME_SIZE 11 +#define FLAC_MAX_FRAME_HEADER_SIZE 16 +#define FLAC_MAX_FRAME_SIZE (FLAC_MAX_FRAME_HEADER_SIZE \ + +FLAC_MAX_BLOCKSIZE*FLAC_MAX_CHANNELS*3) + class Frame; class FrameParser; } diff --git a/dom/media/flac/FlacFrameParser.cpp b/dom/media/flac/FlacFrameParser.cpp index f2d6c1367..c31161cbc 100644 --- a/dom/media/flac/FlacFrameParser.cpp +++ b/dom/media/flac/FlacFrameParser.cpp @@ -7,6 +7,7 @@ #include "FlacFrameParser.h" #include "mp4_demuxer/ByteReader.h" #include "nsTArray.h" +#include "FlacDemuxer.h" #include "OggCodecState.h" #include "OpusParser.h" #include "VideoUtils.h" diff --git a/dom/media/flac/moz.build b/dom/media/flac/moz.build index 6933ded1f..86427e0dd 100644 --- a/dom/media/flac/moz.build +++ b/dom/media/flac/moz.build @@ -10,7 +10,7 @@ EXPORTS += [ 'FlacFrameParser.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'FlacDecoder.cpp', 'FlacDemuxer.cpp', 'FlacFrameParser.cpp', diff --git a/dom/media/fmp4/moz.build b/dom/media/fmp4/moz.build index a79fb0229..535a99253 100644 --- a/dom/media/fmp4/moz.build +++ b/dom/media/fmp4/moz.build @@ -10,13 +10,10 @@ EXPORTS += [ 'MP4Stream.h', ] -UNIFIED_SOURCES += [ - 'MP4Decoder.cpp', - 'MP4Stream.cpp', -] - SOURCES += [ + 'MP4Decoder.cpp', 'MP4Demuxer.cpp', + 'MP4Stream.cpp', ] FINAL_LIBRARY = 'xul' diff --git a/dom/media/gmp/GMPDecryptorParent.cpp b/dom/media/gmp/GMPDecryptorParent.cpp index 4f5402160..56474e973 100644 --- a/dom/media/gmp/GMPDecryptorParent.cpp +++ b/dom/media/gmp/GMPDecryptorParent.cpp @@ -4,7 +4,9 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "GMPDecryptorParent.h" + #include "GMPContentParent.h" +#include "GMPUtils.h" #include "MediaData.h" #include "mozilla/Unused.h" diff --git a/dom/media/gmp/GMPUtils.cpp b/dom/media/gmp/GMPUtils.cpp index d27523760..6c2147ae2 100644 --- a/dom/media/gmp/GMPUtils.cpp +++ b/dom/media/gmp/GMPUtils.cpp @@ -10,8 +10,10 @@ #include "nsCOMPtr.h" #include "nsLiteralString.h" #include "nsCRTGlue.h" +#include "mozIGeckoMediaPluginService.h" #include "mozilla/Base64.h" #include "nsISimpleEnumerator.h" +#include "prio.h" namespace mozilla { diff --git a/dom/media/gmp/moz.build b/dom/media/gmp/moz.build index 79de6e1d9..8595ee0de 100644 --- a/dom/media/gmp/moz.build +++ b/dom/media/gmp/moz.build @@ -87,7 +87,7 @@ if CONFIG['OS_TARGET'] == 'Android': 'rlz', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'GMPAudioDecoderChild.cpp', 'GMPAudioDecoderParent.cpp', 'GMPAudioHost.cpp', @@ -123,7 +123,7 @@ UNIFIED_SOURCES += [ ] if CONFIG['MOZ_EME']: - UNIFIED_SOURCES += [ + SOURCES += [ 'GMPCDMCallbackProxy.cpp', 'GMPCDMProxy.cpp', ] diff --git a/dom/media/imagecapture/CaptureTask.cpp b/dom/media/imagecapture/CaptureTask.cpp index 589ba5a42..9f1eea9ef 100644 --- a/dom/media/imagecapture/CaptureTask.cpp +++ b/dom/media/imagecapture/CaptureTask.cpp @@ -15,24 +15,6 @@ namespace mozilla { -class CaptureTask::MediaStreamEventListener : public MediaStreamTrackListener -{ -public: - explicit MediaStreamEventListener(CaptureTask* aCaptureTask) - : mCaptureTask(aCaptureTask) {}; - - // MediaStreamListener methods. - void NotifyEnded() override - { - if(!mCaptureTask->mImageGrabbedOrTrackEnd) { - mCaptureTask->PostTrackEndEvent(); - } - } - -private: - CaptureTask* mCaptureTask; -}; - CaptureTask::CaptureTask(dom::ImageCapture* aImageCapture) : mImageCapture(aImageCapture) , mEventListener(new MediaStreamEventListener(this)) diff --git a/dom/media/imagecapture/CaptureTask.h b/dom/media/imagecapture/CaptureTask.h index 2b4f0a04c..f9c810158 100644 --- a/dom/media/imagecapture/CaptureTask.h +++ b/dom/media/imagecapture/CaptureTask.h @@ -86,6 +86,24 @@ protected: bool mPrincipalChanged; }; +class CaptureTask::MediaStreamEventListener : public MediaStreamTrackListener +{ +public: + explicit MediaStreamEventListener(CaptureTask* aCaptureTask) + : mCaptureTask(aCaptureTask) {}; + + // MediaStreamListener methods. + void NotifyEnded() override + { + if(!mCaptureTask->mImageGrabbedOrTrackEnd) { + mCaptureTask->PostTrackEndEvent(); + } + } + +private: + CaptureTask* mCaptureTask; +}; + } // namespace mozilla #endif // CAPTURETASK_H diff --git a/dom/media/imagecapture/moz.build b/dom/media/imagecapture/moz.build index f47649c5e..c1a58ff37 100644 --- a/dom/media/imagecapture/moz.build +++ b/dom/media/imagecapture/moz.build @@ -8,7 +8,7 @@ EXPORTS.mozilla.dom += [ 'ImageCapture.h' ] -UNIFIED_SOURCES += [ +SOURCES += [ 'CaptureTask.cpp', 'ImageCapture.cpp', ] diff --git a/dom/media/mediasink/DecodedStream.cpp b/dom/media/mediasink/DecodedStream.cpp index 00bc5ea49..54161be5c 100644 --- a/dom/media/mediasink/DecodedStream.cpp +++ b/dom/media/mediasink/DecodedStream.cpp @@ -19,6 +19,8 @@ #include "VideoSegment.h" #include "VideoUtils.h" +#include "nsPrintfCString.h" + namespace mozilla { #undef DUMP_LOG diff --git a/dom/media/mediasink/VideoSink.cpp b/dom/media/mediasink/VideoSink.cpp index 18c0b22ad..a438cf8a4 100644 --- a/dom/media/mediasink/VideoSink.cpp +++ b/dom/media/mediasink/VideoSink.cpp @@ -4,9 +4,11 @@ * 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 "MediaStreamGraph.h" #include "MediaQueue.h" #include "VideoSink.h" #include "MediaPrefs.h" +#include "nsPrintfCString.h" namespace mozilla { diff --git a/dom/media/mediasink/moz.build b/dom/media/mediasink/moz.build index c09341374..34c78a749 100644 --- a/dom/media/mediasink/moz.build +++ b/dom/media/mediasink/moz.build @@ -4,7 +4,7 @@ # 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/. -UNIFIED_SOURCES += [ +SOURCES += [ 'AudioSinkWrapper.cpp', 'DecodedAudioDataSink.cpp', 'DecodedStream.cpp', diff --git a/dom/media/mediasource/TrackBuffersManager.cpp b/dom/media/mediasource/TrackBuffersManager.cpp index 9a2d00ad8..b9cf19492 100644 --- a/dom/media/mediasource/TrackBuffersManager.cpp +++ b/dom/media/mediasource/TrackBuffersManager.cpp @@ -40,6 +40,7 @@ using media::TimeUnit; using media::TimeInterval; using media::TimeIntervals; typedef SourceBufferTask::AppendBufferResult AppendBufferResult; +typedef SourceBufferAttributes::AppendState AppendState; static const char* AppendStateToStr(SourceBufferAttributes::AppendState aState) diff --git a/dom/media/mediasource/moz.build b/dom/media/mediasource/moz.build index a1689c216..dfa227a86 100644 --- a/dom/media/mediasource/moz.build +++ b/dom/media/mediasource/moz.build @@ -21,7 +21,7 @@ EXPORTS.mozilla.dom += [ 'SourceBufferList.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'ContainerParser.cpp', 'MediaSource.cpp', 'MediaSourceDecoder.cpp', diff --git a/dom/media/moz.build b/dom/media/moz.build index 41267a6ef..4cb514a08 100644 --- a/dom/media/moz.build +++ b/dom/media/moz.build @@ -184,7 +184,7 @@ EXPORTS.mozilla.dom += [ 'VideoTrackList.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'AccurateSeekTask.cpp', 'ADTSDecoder.cpp', 'ADTSDemuxer.cpp', @@ -201,6 +201,7 @@ UNIFIED_SOURCES += [ 'CanvasCaptureMediaStream.cpp', 'CubebUtils.cpp', 'DecoderDoctorDiagnostics.cpp', + 'DecoderTraits.cpp', 'DOMMediaStream.cpp', 'EncodedBufferCache.cpp', 'FileBlockCache.cpp', @@ -256,11 +257,6 @@ UNIFIED_SOURCES += [ if CONFIG['OS_TARGET'] == 'WINNT': SOURCES += [ 'ThreadPoolCOMListener.cpp' ] -# DecoderTraits.cpp needs to be built separately because of Mac OS X headers. -SOURCES += [ - 'DecoderTraits.cpp', -] - # Some codec-related code uses multi-character constants, which GCC and clang # warn about. Suppress turning this warning into an error. if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']: diff --git a/dom/media/mp3/moz.build b/dom/media/mp3/moz.build index 596d061f8..838a5a854 100644 --- a/dom/media/mp3/moz.build +++ b/dom/media/mp3/moz.build @@ -9,7 +9,7 @@ EXPORTS += [ 'MP3Demuxer.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'MP3Decoder.cpp', 'MP3Demuxer.cpp', ] diff --git a/dom/media/ogg/OggDemuxer.cpp b/dom/media/ogg/OggDemuxer.cpp index 0cc484687..f9475700a 100644 --- a/dom/media/ogg/OggDemuxer.cpp +++ b/dom/media/ogg/OggDemuxer.cpp @@ -21,6 +21,7 @@ #include <algorithm> extern mozilla::LazyLogModule gMediaDemuxerLog; +#define LOG(type, msg) MOZ_LOG(gMediaDecoderLog, type, msg) #define OGG_DEBUG(arg, ...) MOZ_LOG(gMediaDemuxerLog, mozilla::LogLevel::Debug, ("OggDemuxer(%p)::%s: " arg, this, __func__, ##__VA_ARGS__)) // Un-comment to enable logging of seek bisections. diff --git a/dom/media/ogg/moz.build b/dom/media/ogg/moz.build index 07e195b6f..c47abf690 100644 --- a/dom/media/ogg/moz.build +++ b/dom/media/ogg/moz.build @@ -13,7 +13,7 @@ EXPORTS += [ 'OpusParser.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'OggCodecState.cpp', 'OggCodecStore.cpp', 'OggDecoder.cpp', diff --git a/dom/media/platforms/PlatformDecoderModule.h b/dom/media/platforms/PlatformDecoderModule.h index 7480d8ff9..5684dea2d 100644 --- a/dom/media/platforms/PlatformDecoderModule.h +++ b/dom/media/platforms/PlatformDecoderModule.h @@ -7,6 +7,8 @@ #if !defined(PlatformDecoderModule_h_) #define PlatformDecoderModule_h_ +#include "ImageContainer.h" +#include "DecoderDoctorDiagnostics.h" #include "MediaDecoderReader.h" #include "MediaInfo.h" #include "mozilla/MozPromise.h" diff --git a/dom/media/platforms/agnostic/TheoraDecoder.cpp b/dom/media/platforms/agnostic/TheoraDecoder.cpp index b216791e4..695e697d7 100644 --- a/dom/media/platforms/agnostic/TheoraDecoder.cpp +++ b/dom/media/platforms/agnostic/TheoraDecoder.cpp @@ -10,6 +10,7 @@ #include "nsError.h" #include "TimeUnits.h" #include "mozilla/PodOperations.h" +#include "mozilla/SyncRunnable.h" #include <algorithm> diff --git a/dom/media/platforms/agnostic/eme/moz.build b/dom/media/platforms/agnostic/eme/moz.build index 78b76d4d4..e48d49d80 100644 --- a/dom/media/platforms/agnostic/eme/moz.build +++ b/dom/media/platforms/agnostic/eme/moz.build @@ -11,7 +11,7 @@ EXPORTS += [ 'SamplesWaitingForKey.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'EMEAudioDecoder.cpp', 'EMEDecoderModule.cpp', 'EMEVideoDecoder.cpp', diff --git a/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp b/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp index 912b88ce1..26d029da0 100644 --- a/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp +++ b/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp @@ -10,6 +10,7 @@ #include "prsystem.h" #include "MediaData.h" #include "GMPDecoderModule.h" +#include "MP4Decoder.h" #include "VPXDecoder.h" namespace mozilla { diff --git a/dom/media/platforms/agnostic/gmp/moz.build b/dom/media/platforms/agnostic/gmp/moz.build index eb2738e26..644df47a3 100644 --- a/dom/media/platforms/agnostic/gmp/moz.build +++ b/dom/media/platforms/agnostic/gmp/moz.build @@ -11,7 +11,7 @@ EXPORTS += [ 'MediaDataDecoderProxy.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'GMPAudioDecoder.cpp', 'GMPDecoderModule.cpp', 'GMPVideoDecoder.cpp', diff --git a/dom/media/platforms/apple/AppleCMLinker.cpp b/dom/media/platforms/apple/AppleCMLinker.cpp index 5227bf9e5..b1417b46a 100644 --- a/dom/media/platforms/apple/AppleCMLinker.cpp +++ b/dom/media/platforms/apple/AppleCMLinker.cpp @@ -7,7 +7,9 @@ #include <dlfcn.h> #include "AppleCMLinker.h" +#include "PlatformDecoderModule.h" #include "mozilla/ArrayUtils.h" +#include "mozilla/Logging.h" #include "nsDebug.h" #define LOG(...) MOZ_LOG(sPDMLog, mozilla::LogLevel::Debug, (__VA_ARGS__)) diff --git a/dom/media/platforms/apple/AppleVTDecoder.cpp b/dom/media/platforms/apple/AppleVTDecoder.cpp index 81638870a..93a480266 100644 --- a/dom/media/platforms/apple/AppleVTDecoder.cpp +++ b/dom/media/platforms/apple/AppleVTDecoder.cpp @@ -11,12 +11,15 @@ #include "AppleUtils.h" #include "AppleVTDecoder.h" #include "AppleVTLinker.h" +#include "MacIOSurfaceImage.h" #include "MediaData.h" #include "mozilla/ArrayUtils.h" #include "mp4_demuxer/H264.h" #include "nsAutoPtr.h" #include "nsThreadUtils.h" #include "mozilla/Logging.h" +#include "mozilla/SyncRunnable.h" +#include "mozilla/gfx/MacIOSurface.h" #include "VideoUtils.h" #include "gfxPlatform.h" @@ -360,7 +363,7 @@ AppleVTDecoder::OutputFrame(CVPixelBufferRef aImage, RefPtr<MacIOSurface> macSurface = new MacIOSurface(surface); - RefPtr<layers::Image> image = new MacIOSurfaceImage(macSurface); + RefPtr<layers::Image> image = new layers::MacIOSurfaceImage(macSurface); data = VideoData::CreateFromImage(info, diff --git a/dom/media/platforms/apple/AppleVTLinker.cpp b/dom/media/platforms/apple/AppleVTLinker.cpp index 51a8a0122..287de3ed3 100644 --- a/dom/media/platforms/apple/AppleVTLinker.cpp +++ b/dom/media/platforms/apple/AppleVTLinker.cpp @@ -7,7 +7,9 @@ #include <dlfcn.h> #include "AppleVTLinker.h" +#include "PlatformDecoderModule.h" #include "mozilla/ArrayUtils.h" +#include "mozilla/Logging.h" #include "nsDebug.h" #define LOG(...) MOZ_LOG(sPDMLog, mozilla::LogLevel::Debug, (__VA_ARGS__)) diff --git a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp index f3101e44c..f9e8a2d26 100644 --- a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp +++ b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp @@ -16,6 +16,7 @@ #include "FFmpegVideoDecoder.h" #include "FFmpegLog.h" #include "mozilla/PodOperations.h" +#include "prsystem.h" // for PR_GetNumberOfProcessors #include "libavutil/pixfmt.h" #if LIBAVCODEC_VERSION_MAJOR < 54 diff --git a/dom/media/platforms/ffmpeg/ffmpeg57/moz.build b/dom/media/platforms/ffmpeg/ffmpeg57/moz.build index 6bd5db8d7..7a55d7685 100644 --- a/dom/media/platforms/ffmpeg/ffmpeg57/moz.build +++ b/dom/media/platforms/ffmpeg/ffmpeg57/moz.build @@ -4,7 +4,7 @@ # 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/. -UNIFIED_SOURCES += [ +SOURCES += [ '../FFmpegAudioDecoder.cpp', '../FFmpegDataDecoder.cpp', '../FFmpegDecoderModule.cpp', diff --git a/dom/media/platforms/ffmpeg/ffmpeg58/moz.build b/dom/media/platforms/ffmpeg/ffmpeg58/moz.build index 6bd5db8d7..7a55d7685 100644 --- a/dom/media/platforms/ffmpeg/ffmpeg58/moz.build +++ b/dom/media/platforms/ffmpeg/ffmpeg58/moz.build @@ -4,7 +4,7 @@ # 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/. -UNIFIED_SOURCES += [ +SOURCES += [ '../FFmpegAudioDecoder.cpp', '../FFmpegDataDecoder.cpp', '../FFmpegDecoderModule.cpp', diff --git a/dom/media/platforms/ffmpeg/ffvpx/moz.build b/dom/media/platforms/ffmpeg/ffvpx/moz.build index c0041a4d4..95f8eec65 100644 --- a/dom/media/platforms/ffmpeg/ffvpx/moz.build +++ b/dom/media/platforms/ffmpeg/ffvpx/moz.build @@ -9,7 +9,7 @@ EXPORTS += [ 'FFVPXRuntimeLinker.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ '../FFmpegAudioDecoder.cpp', '../FFmpegDataDecoder.cpp', '../FFmpegDecoderModule.cpp', diff --git a/dom/media/platforms/ffmpeg/libav53/moz.build b/dom/media/platforms/ffmpeg/libav53/moz.build index 2bdc1dc34..471edd701 100644 --- a/dom/media/platforms/ffmpeg/libav53/moz.build +++ b/dom/media/platforms/ffmpeg/libav53/moz.build @@ -4,7 +4,7 @@ # 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/. -UNIFIED_SOURCES += [ +SOURCES += [ '../FFmpegAudioDecoder.cpp', '../FFmpegDataDecoder.cpp', '../FFmpegDecoderModule.cpp', diff --git a/dom/media/platforms/ffmpeg/libav54/moz.build b/dom/media/platforms/ffmpeg/libav54/moz.build index 2bdc1dc34..471edd701 100644 --- a/dom/media/platforms/ffmpeg/libav54/moz.build +++ b/dom/media/platforms/ffmpeg/libav54/moz.build @@ -4,7 +4,7 @@ # 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/. -UNIFIED_SOURCES += [ +SOURCES += [ '../FFmpegAudioDecoder.cpp', '../FFmpegDataDecoder.cpp', '../FFmpegDecoderModule.cpp', diff --git a/dom/media/platforms/ffmpeg/libav55/moz.build b/dom/media/platforms/ffmpeg/libav55/moz.build index 6bd5db8d7..7a55d7685 100644 --- a/dom/media/platforms/ffmpeg/libav55/moz.build +++ b/dom/media/platforms/ffmpeg/libav55/moz.build @@ -4,7 +4,7 @@ # 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/. -UNIFIED_SOURCES += [ +SOURCES += [ '../FFmpegAudioDecoder.cpp', '../FFmpegDataDecoder.cpp', '../FFmpegDecoderModule.cpp', diff --git a/dom/media/platforms/ffmpeg/moz.build b/dom/media/platforms/ffmpeg/moz.build index af96fb521..e42a8aa4d 100644 --- a/dom/media/platforms/ffmpeg/moz.build +++ b/dom/media/platforms/ffmpeg/moz.build @@ -16,7 +16,7 @@ DIRS += [ 'ffmpeg58', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'FFmpegRuntimeLinker.cpp', ] diff --git a/dom/media/platforms/moz.build b/dom/media/platforms/moz.build index c46d52e3f..23bea20dd 100644 --- a/dom/media/platforms/moz.build +++ b/dom/media/platforms/moz.build @@ -16,7 +16,7 @@ EXPORTS += [ 'wrappers/H264Converter.h' ] -UNIFIED_SOURCES += [ +SOURCES += [ 'agnostic/AgnosticDecoderModule.cpp', 'agnostic/BlankDecoderModule.cpp', 'agnostic/OpusDecoder.cpp', @@ -42,7 +42,7 @@ if CONFIG['MOZ_WMF']: if CONFIG['MOZ_FFVPX'] or CONFIG['MOZ_FFMPEG']: # common code to either FFmpeg or FFVPX - UNIFIED_SOURCES += [ + SOURCES += [ 'ffmpeg/FFmpegLibWrapper.cpp', ] @@ -60,7 +60,7 @@ if CONFIG['MOZ_AV1']: EXPORTS += [ 'agnostic/AOMDecoder.h', ] - UNIFIED_SOURCES += [ + SOURCES += [ 'agnostic/AOMDecoder.cpp', ] @@ -68,7 +68,7 @@ if CONFIG['MOZ_APPLEMEDIA']: EXPORTS += [ 'apple/AppleDecoderModule.h', ] - UNIFIED_SOURCES += [ + SOURCES += [ 'apple/AppleATDecoder.cpp', 'apple/AppleCMLinker.cpp', 'apple/AppleDecoderModule.cpp', @@ -85,7 +85,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': EXPORTS += [ 'android/AndroidDecoderModule.h', ] - UNIFIED_SOURCES += [ + SOURCES += [ 'android/AndroidDecoderModule.cpp', 'android/MediaCodecDataDecoder.cpp', 'android/RemoteDataDecoder.cpp', diff --git a/dom/media/platforms/omx/OmxPlatformLayer.cpp b/dom/media/platforms/omx/OmxPlatformLayer.cpp index 15b3062a4..12a7d0595 100644 --- a/dom/media/platforms/omx/OmxPlatformLayer.cpp +++ b/dom/media/platforms/omx/OmxPlatformLayer.cpp @@ -6,6 +6,8 @@ #include "OmxPlatformLayer.h" +#include "OmxDataDecoder.h" + #include "OMX_VideoExt.h" // For VP8. #include "VPXDecoder.h" diff --git a/dom/media/platforms/omx/OmxPlatformLayer.h b/dom/media/platforms/omx/OmxPlatformLayer.h index 67d9e448f..8e751e1a7 100644 --- a/dom/media/platforms/omx/OmxPlatformLayer.h +++ b/dom/media/platforms/omx/OmxPlatformLayer.h @@ -7,6 +7,7 @@ #if !defined(OmxPlatformLayer_h_) #define OmxPlatformLayer_h_ +#include "OMX_Component.h" #include "OMX_Core.h" #include "OMX_Types.h" diff --git a/dom/media/platforms/omx/moz.build b/dom/media/platforms/omx/moz.build index 661e280e0..ee7202bd3 100644 --- a/dom/media/platforms/omx/moz.build +++ b/dom/media/platforms/omx/moz.build @@ -8,7 +8,7 @@ EXPORTS += [ 'OmxDecoderModule.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'OmxDataDecoder.cpp', 'OmxDecoderModule.cpp', 'OmxPlatformLayer.cpp', diff --git a/dom/media/platforms/wmf/moz.build b/dom/media/platforms/wmf/moz.build index fa966bea2..83c2249e1 100644 --- a/dom/media/platforms/wmf/moz.build +++ b/dom/media/platforms/wmf/moz.build @@ -14,6 +14,7 @@ EXPORTS += [ 'WMFUtils.h', 'WMFVideoMFTManager.h', ] + UNIFIED_SOURCES += [ 'DXVA2Manager.cpp', 'MFTDecoder.cpp', diff --git a/dom/media/platforms/wrappers/FuzzingWrapper.cpp b/dom/media/platforms/wrappers/FuzzingWrapper.cpp index 7df020f46..e8b451cc8 100644 --- a/dom/media/platforms/wrappers/FuzzingWrapper.cpp +++ b/dom/media/platforms/wrappers/FuzzingWrapper.cpp @@ -6,6 +6,8 @@ #include "FuzzingWrapper.h" +#include "mozilla/SharedThreadPool.h" + mozilla::LogModule* GetFuzzingWrapperLog() { static mozilla::LazyLogModule log("MediaFuzzingWrapper"); return log; diff --git a/dom/media/platforms/wrappers/H264Converter.cpp b/dom/media/platforms/wrappers/H264Converter.cpp index 0edbfc10c..cca03fceb 100644 --- a/dom/media/platforms/wrappers/H264Converter.cpp +++ b/dom/media/platforms/wrappers/H264Converter.cpp @@ -6,9 +6,11 @@ #include "mozilla/TaskQueue.h" +#include "DecoderDoctorDiagnostics.h" #include "H264Converter.h" #include "ImageContainer.h" #include "MediaInfo.h" +#include "PDMFactory.h" #include "mp4_demuxer/AnnexB.h" #include "mp4_demuxer/H264.h" diff --git a/dom/media/standalone/moz.build b/dom/media/standalone/moz.build index 959703765..a3cc3545f 100644 --- a/dom/media/standalone/moz.build +++ b/dom/media/standalone/moz.build @@ -7,7 +7,7 @@ if CONFIG['OS_TARGET'] != 'WINNT': Library('media_standalone') -UNIFIED_SOURCES += [ +SOURCES += [ '../AudioChannelFormat.cpp', '../AudioSegment.cpp', '../SimpleImageBuffer.cpp', diff --git a/dom/media/systemservices/MediaParent.cpp b/dom/media/systemservices/MediaParent.cpp index 89a495f6a..16c399f37 100644 --- a/dom/media/systemservices/MediaParent.cpp +++ b/dom/media/systemservices/MediaParent.cpp @@ -23,6 +23,7 @@ #include "nsAppDirectoryServiceDefs.h" #include "nsISupportsImpl.h" #include "mozilla/Logging.h" +#include "mozilla/MediaManager.h" #undef LOG mozilla::LazyLogModule gMediaParentLog("MediaParent"); diff --git a/dom/media/systemservices/MediaSystemResourceManager.cpp b/dom/media/systemservices/MediaSystemResourceManager.cpp index 29db0ef3e..a66e946eb 100644 --- a/dom/media/systemservices/MediaSystemResourceManager.cpp +++ b/dom/media/systemservices/MediaSystemResourceManager.cpp @@ -7,6 +7,7 @@ #include "mozilla/TaskQueue.h" #include "gfxPrefs.h" +#include "MediaSystemResourceClient.h" #include "MediaSystemResourceManagerChild.h" #include "mozilla/layers/ImageBridgeChild.h" diff --git a/dom/media/systemservices/moz.build b/dom/media/systemservices/moz.build index 82a5c5e72..c582b7ba1 100644 --- a/dom/media/systemservices/moz.build +++ b/dom/media/systemservices/moz.build @@ -12,7 +12,7 @@ if CONFIG['MOZ_WEBRTC']: 'LoadManagerFactory.h', 'LoadMonitor.h', ] - UNIFIED_SOURCES += [ + SOURCES += [ 'CamerasChild.cpp', 'CamerasParent.cpp', 'LoadManager.cpp', @@ -24,6 +24,7 @@ if CONFIG['MOZ_WEBRTC']: '/media/webrtc/signaling', '/media/webrtc/trunk', ] + if CONFIG['OS_TARGET'] == 'WINNT': DEFINES['WEBRTC_WIN'] = True else: @@ -34,12 +35,12 @@ if CONFIG['OS_TARGET'] == 'Android': EXPORTS += [ 'OpenSLESProvider.h' ] - UNIFIED_SOURCES += [ + SOURCES += [ 'OpenSLESProvider.cpp', ] if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': - UNIFIED_SOURCES += ['OSXRunLoopSingleton.cpp'] + SOURCES += ['OSXRunLoopSingleton.cpp'] EXPORTS += ['OSXRunLoopSingleton.h'] if CONFIG['_MSC_VER']: @@ -66,7 +67,8 @@ EXPORTS.mozilla.media += ['CamerasTypes.h', 'MediaTaskUtils.h', 'MediaUtils.h', ] -UNIFIED_SOURCES += [ + +SOURCES += [ 'MediaChild.cpp', 'MediaParent.cpp', 'MediaSystemResourceClient.cpp', @@ -76,11 +78,13 @@ UNIFIED_SOURCES += [ 'MediaSystemResourceService.cpp', 'MediaUtils.cpp', ] + IPDL_SOURCES += [ 'PCameras.ipdl', 'PMedia.ipdl', 'PMediaSystemResourceManager.ipdl', ] + # /dom/base needed for nsGlobalWindow.h in MediaChild.cpp LOCAL_INCLUDES += [ '/dom/base', diff --git a/dom/media/wave/moz.build b/dom/media/wave/moz.build index f91e8eaeb..d62d3bea4 100644 --- a/dom/media/wave/moz.build +++ b/dom/media/wave/moz.build @@ -9,7 +9,7 @@ EXPORTS += [ 'WaveDemuxer.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'WaveDecoder.cpp', 'WaveDemuxer.cpp', ] diff --git a/dom/media/webaudio/AudioContext.cpp b/dom/media/webaudio/AudioContext.cpp index d58441309..75f57a630 100755 --- a/dom/media/webaudio/AudioContext.cpp +++ b/dom/media/webaudio/AudioContext.cpp @@ -22,6 +22,7 @@ #include "AudioChannelService.h" #include "AudioDestinationNode.h" #include "AudioListener.h" +#include "AudioNodeStream.h" #include "AudioStream.h" #include "BiquadFilterNode.h" #include "ChannelMergerNode.h" diff --git a/dom/media/webaudio/AudioDestinationNode.cpp b/dom/media/webaudio/AudioDestinationNode.cpp index 29a9de736..f23eb0377 100644 --- a/dom/media/webaudio/AudioDestinationNode.cpp +++ b/dom/media/webaudio/AudioDestinationNode.cpp @@ -7,6 +7,7 @@ #include "AudioDestinationNode.h" #include "AlignmentUtils.h" #include "AudioContext.h" +#include "mozilla/dom/AudioContextBinding.h" #include "mozilla/dom/AudioDestinationNodeBinding.h" #include "mozilla/dom/ScriptSettings.h" #include "mozilla/Services.h" diff --git a/dom/media/webaudio/AudioEventTimeline.h b/dom/media/webaudio/AudioEventTimeline.h index ae06ad4db..ba6da56a3 100644 --- a/dom/media/webaudio/AudioEventTimeline.h +++ b/dom/media/webaudio/AudioEventTimeline.h @@ -13,6 +13,7 @@ #include "mozilla/PodOperations.h" #include "MainThreadUtils.h" +#include "MediaStreamGraph.h" #include "nsTArray.h" #include "math.h" #include "WebAudioUtils.h" diff --git a/dom/media/webaudio/AudioNodeEngine.cpp b/dom/media/webaudio/AudioNodeEngine.cpp index 91170adb3..89eefef31 100644 --- a/dom/media/webaudio/AudioNodeEngine.cpp +++ b/dom/media/webaudio/AudioNodeEngine.cpp @@ -14,6 +14,7 @@ #include "AlignmentUtils.h" #include "AudioNodeEngineSSE2.h" #endif +#include "AudioBlock.h" namespace mozilla { diff --git a/dom/media/webaudio/AudioNodeStream.cpp b/dom/media/webaudio/AudioNodeStream.cpp index 0e5aa3fc7..ba002b70e 100644 --- a/dom/media/webaudio/AudioNodeStream.cpp +++ b/dom/media/webaudio/AudioNodeStream.cpp @@ -5,6 +5,7 @@ #include "AudioNodeStream.h" +#include "AlignmentUtils.h" #include "MediaStreamGraphImpl.h" #include "MediaStreamListener.h" #include "AudioNodeEngine.h" diff --git a/dom/media/webaudio/ConstantSourceNode.cpp b/dom/media/webaudio/ConstantSourceNode.cpp index b6884105c..8b9df7c89 100644 --- a/dom/media/webaudio/ConstantSourceNode.cpp +++ b/dom/media/webaudio/ConstantSourceNode.cpp @@ -7,6 +7,8 @@ #include "ConstantSourceNode.h" #include "AudioDestinationNode.h" +#include "AudioNodeEngine.h" +#include "AudioNodeStream.h" #include "nsContentUtils.h" namespace mozilla { diff --git a/dom/media/webaudio/DelayBuffer.h b/dom/media/webaudio/DelayBuffer.h index e55d0ba83..e6c9434bf 100644 --- a/dom/media/webaudio/DelayBuffer.h +++ b/dom/media/webaudio/DelayBuffer.h @@ -8,6 +8,7 @@ #define DelayBuffer_h_ #include "nsTArray.h" +#include "AudioBlock.h" #include "AudioSegment.h" #include "mozilla/dom/AudioNodeBinding.h" // for ChannelInterpretation diff --git a/dom/media/webaudio/IIRFilterNode.cpp b/dom/media/webaudio/IIRFilterNode.cpp index 3a69a94c8..9175cc4c9 100644 --- a/dom/media/webaudio/IIRFilterNode.cpp +++ b/dom/media/webaudio/IIRFilterNode.cpp @@ -5,7 +5,13 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "IIRFilterNode.h" +#include "AlignmentUtils.h" +#include "AudioBlock.h" #include "AudioNodeEngine.h" +#include "AudioNodeStream.h" +#include "AudioDestinationNode.h" +#include "PlayingRefChangeHandler.h" +#include "mozilla/dom/AudioDestinationNodeBinding.h" #include "blink/IIRFilter.h" diff --git a/dom/media/webaudio/MediaBufferDecoder.cpp b/dom/media/webaudio/MediaBufferDecoder.cpp index f3b75ca1a..f590d2f68 100644 --- a/dom/media/webaudio/MediaBufferDecoder.cpp +++ b/dom/media/webaudio/MediaBufferDecoder.cpp @@ -16,6 +16,7 @@ #include "DecoderTraits.h" #include "AudioContext.h" #include "AudioBuffer.h" +#include "AudioNodeEngine.h" #include "nsContentUtils.h" #include "nsIScriptObjectPrincipal.h" #include "nsIScriptError.h" diff --git a/dom/media/webaudio/MediaStreamAudioSourceNode.cpp b/dom/media/webaudio/MediaStreamAudioSourceNode.cpp index beedd5300..31b276a54 100644 --- a/dom/media/webaudio/MediaStreamAudioSourceNode.cpp +++ b/dom/media/webaudio/MediaStreamAudioSourceNode.cpp @@ -9,7 +9,9 @@ #include "AudioNodeEngine.h" #include "AudioNodeExternalInputStream.h" #include "AudioStreamTrack.h" +#include "nsContentUtils.h" #include "nsIDocument.h" +#include "nsIScriptError.h" #include "mozilla/CORSMode.h" namespace mozilla { diff --git a/dom/media/webaudio/WebAudioUtils.cpp b/dom/media/webaudio/WebAudioUtils.cpp index 6289f803b..aa0c7f9ea 100644 --- a/dom/media/webaudio/WebAudioUtils.cpp +++ b/dom/media/webaudio/WebAudioUtils.cpp @@ -5,6 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "WebAudioUtils.h" +#include "AudioEventTimeline.h" #include "AudioNodeStream.h" #include "blink/HRTFDatabaseLoader.h" diff --git a/dom/media/webaudio/moz.build b/dom/media/webaudio/moz.build index d1a9f5680..c4bfcea60 100644 --- a/dom/media/webaudio/moz.build +++ b/dom/media/webaudio/moz.build @@ -75,7 +75,7 @@ EXPORTS.mozilla.dom += [ 'WaveShaperNode.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'AnalyserNode.cpp', 'AudioBlock.cpp', 'AudioBuffer.cpp', diff --git a/dom/media/webm/moz.build b/dom/media/webm/moz.build index f2898fafd..4dacfe095 100644 --- a/dom/media/webm/moz.build +++ b/dom/media/webm/moz.build @@ -11,7 +11,7 @@ EXPORTS += [ 'WebMDemuxer.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'WebMBufferedParser.cpp', 'WebMDecoder.cpp', 'WebMDemuxer.cpp', @@ -19,8 +19,10 @@ UNIFIED_SOURCES += [ if CONFIG['MOZ_WEBM_ENCODER']: EXPORTS += ['WebMWriter.h'] - UNIFIED_SOURCES += ['EbmlComposer.cpp', - 'WebMWriter.cpp', + + SOURCES += [ + 'EbmlComposer.cpp', + 'WebMWriter.cpp', ] CXXFLAGS += CONFIG['MOZ_LIBVPX_CFLAGS'] diff --git a/dom/media/webrtc/MediaEngineRemoteVideoSource.cpp b/dom/media/webrtc/MediaEngineRemoteVideoSource.cpp index 881d85b4a..e79d8249c 100644 --- a/dom/media/webrtc/MediaEngineRemoteVideoSource.cpp +++ b/dom/media/webrtc/MediaEngineRemoteVideoSource.cpp @@ -6,6 +6,7 @@ #include "MediaEngineRemoteVideoSource.h" #include "mozilla/RefPtr.h" +#include "Layers.h" #include "VideoUtils.h" #include "nsIPrefService.h" #include "MediaTrackConstraints.h" @@ -15,6 +16,8 @@ extern mozilla::LogModule* GetMediaManagerLog(); #define LOG(msg) MOZ_LOG(GetMediaManagerLog(), mozilla::LogLevel::Debug, msg) #define LOGFRAME(msg) MOZ_LOG(GetMediaManagerLog(), mozilla::LogLevel::Verbose, msg) +typedef mozilla::gfx::IntSize IntSize; + namespace mozilla { // These need a definition somewhere because template diff --git a/dom/media/webrtc/MediaEngineTabVideoSource.cpp b/dom/media/webrtc/MediaEngineTabVideoSource.cpp index d101bab1e..1ac24aae5 100644 --- a/dom/media/webrtc/MediaEngineTabVideoSource.cpp +++ b/dom/media/webrtc/MediaEngineTabVideoSource.cpp @@ -29,6 +29,7 @@ namespace mozilla { using namespace mozilla::gfx; +using namespace mozilla::dom; NS_IMPL_ISUPPORTS(MediaEngineTabVideoSource, nsIDOMEventListener, nsITimerCallback) diff --git a/dom/media/webrtc/MediaEngineWebRTCAudio.cpp b/dom/media/webrtc/MediaEngineWebRTCAudio.cpp index 1e2e13d01..0eda3aac1 100644 --- a/dom/media/webrtc/MediaEngineWebRTCAudio.cpp +++ b/dom/media/webrtc/MediaEngineWebRTCAudio.cpp @@ -9,6 +9,7 @@ #include "MediaTrackConstraints.h" #include "mtransport/runnable_utils.h" #include "nsAutoPtr.h" +#include "nsContentUtils.h" // scoped_ptr.h uses FF #ifdef FF diff --git a/dom/media/webrtc/MediaTrackConstraints.cpp b/dom/media/webrtc/MediaTrackConstraints.cpp index 6225b6d49..42582e3c2 100644 --- a/dom/media/webrtc/MediaTrackConstraints.cpp +++ b/dom/media/webrtc/MediaTrackConstraints.cpp @@ -5,6 +5,7 @@ #include "MediaTrackConstraints.h" #include "mozilla/dom/MediaStreamTrackBinding.h" +#include "mozilla/Unused.h" #include <limits> #include <algorithm> diff --git a/dom/media/webrtc/PeerIdentity.h b/dom/media/webrtc/PeerIdentity.h index bdfa1d2b3..1f3413bf6 100644 --- a/dom/media/webrtc/PeerIdentity.h +++ b/dom/media/webrtc/PeerIdentity.h @@ -13,6 +13,8 @@ #include "nsStringAPI.h" #endif +#include "mozilla/RefCounted.h" + template <class T> class nsCOMPtr; class nsIIDNService; diff --git a/dom/media/webrtc/moz.build b/dom/media/webrtc/moz.build index 66def8719..5b76e17cb 100644 --- a/dom/media/webrtc/moz.build +++ b/dom/media/webrtc/moz.build @@ -31,15 +31,14 @@ if CONFIG['MOZ_WEBRTC']: UNIFIED_SOURCES += [ 'MediaEngineCameraVideoSource.cpp', 'MediaEngineRemoteVideoSource.cpp', + ] + SOURCES += [ 'MediaEngineTabVideoSource.cpp', + 'MediaEngineWebRTC.cpp', 'MediaEngineWebRTCAudio.cpp', 'RTCCertificate.cpp', 'RTCIdentityProviderRegistrar.cpp', ] - # MediaEngineWebRTC.cpp needs to be built separately. - SOURCES += [ - 'MediaEngineWebRTC.cpp', - ] LOCAL_INCLUDES += [ '/dom/base', '/media/libyuv/include', @@ -53,8 +52,10 @@ XPIDL_SOURCES += [ ] UNIFIED_SOURCES += [ - 'MediaEngineDefault.cpp', 'MediaTrackConstraints.cpp', +] +SOURCES += [ + 'MediaEngineDefault.cpp', 'PeerIdentity.cpp', ] diff --git a/dom/media/webspeech/recognition/SpeechGrammarList.cpp b/dom/media/webspeech/recognition/SpeechGrammarList.cpp index d4883378f..925e591aa 100644 --- a/dom/media/webspeech/recognition/SpeechGrammarList.cpp +++ b/dom/media/webspeech/recognition/SpeechGrammarList.cpp @@ -10,6 +10,7 @@ #include "mozilla/ErrorResult.h" #include "nsCOMPtr.h" #include "nsXPCOMStrings.h" +#include "SpeechGrammar.h" #include "SpeechRecognition.h" namespace mozilla { diff --git a/dom/media/webspeech/recognition/SpeechGrammarList.h b/dom/media/webspeech/recognition/SpeechGrammarList.h index dbe7117fe..32c0ddbdd 100644 --- a/dom/media/webspeech/recognition/SpeechGrammarList.h +++ b/dom/media/webspeech/recognition/SpeechGrammarList.h @@ -9,6 +9,7 @@ #include "mozilla/Attributes.h" #include "nsCOMPtr.h" +#include "nsTArray.h" #include "nsCycleCollectionParticipant.h" #include "nsWrapperCache.h" diff --git a/dom/media/webspeech/recognition/SpeechRecognition.cpp b/dom/media/webspeech/recognition/SpeechRecognition.cpp index 48b1177b2..cd57f03ca 100644 --- a/dom/media/webspeech/recognition/SpeechRecognition.cpp +++ b/dom/media/webspeech/recognition/SpeechRecognition.cpp @@ -22,6 +22,7 @@ #include "AudioSegment.h" #include "endpointer.h" +#include "SpeechGrammar.h" #include "mozilla/dom/SpeechRecognitionEvent.h" #include "nsContentUtils.h" #include "nsIDocument.h" diff --git a/dom/media/webspeech/recognition/moz.build b/dom/media/webspeech/recognition/moz.build index 0a26021b0..c296cd40d 100644 --- a/dom/media/webspeech/recognition/moz.build +++ b/dom/media/webspeech/recognition/moz.build @@ -31,7 +31,7 @@ if CONFIG['MOZ_WEBSPEECH_POCKETSPHINX']: 'PocketSphinxSpeechRecognitionService.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'endpointer.cc', 'energy_endpointer.cc', 'energy_endpointer_params.cc', @@ -45,12 +45,12 @@ UNIFIED_SOURCES += [ ] if CONFIG['MOZ_WEBSPEECH_TEST_BACKEND']: - UNIFIED_SOURCES += [ + SOURCES += [ 'test/FakeSpeechRecognitionService.cpp', ] if CONFIG['MOZ_WEBSPEECH_POCKETSPHINX']: - UNIFIED_SOURCES += [ + SOURCES += [ 'PocketSphinxSpeechRecognitionService.cpp', ] diff --git a/dom/media/webspeech/synth/moz.build b/dom/media/webspeech/synth/moz.build index bb26515af..7b8c4cd31 100644 --- a/dom/media/webspeech/synth/moz.build +++ b/dom/media/webspeech/synth/moz.build @@ -26,7 +26,7 @@ if CONFIG['MOZ_WEBSPEECH']: 'SpeechSynthesisVoice.h', ] - UNIFIED_SOURCES += [ + SOURCES += [ 'ipc/SpeechSynthesisChild.cpp', 'ipc/SpeechSynthesisParent.cpp', 'nsSpeechTask.cpp', @@ -37,7 +37,7 @@ if CONFIG['MOZ_WEBSPEECH']: ] if CONFIG['MOZ_WEBSPEECH_TEST_BACKEND']: - UNIFIED_SOURCES += [ + SOURCES += [ 'test/FakeSynthModule.cpp', 'test/nsFakeSynthServices.cpp' ] diff --git a/dom/media/webspeech/synth/pico/moz.build b/dom/media/webspeech/synth/pico/moz.build index 01ef30450..8c360bc85 100644 --- a/dom/media/webspeech/synth/pico/moz.build +++ b/dom/media/webspeech/synth/pico/moz.build @@ -4,7 +4,7 @@ # 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/. -UNIFIED_SOURCES += [ +SOURCES += [ 'nsPicoService.cpp', 'PicoModule.cpp' ] diff --git a/dom/media/webspeech/synth/speechd/moz.build b/dom/media/webspeech/synth/speechd/moz.build index 51d675c10..552ccf856 100644 --- a/dom/media/webspeech/synth/speechd/moz.build +++ b/dom/media/webspeech/synth/speechd/moz.build @@ -4,7 +4,7 @@ # 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/. -UNIFIED_SOURCES += [ +SOURCES += [ 'SpeechDispatcherModule.cpp', 'SpeechDispatcherService.cpp' ] diff --git a/dom/media/webspeech/synth/windows/moz.build b/dom/media/webspeech/synth/windows/moz.build index f0ff9f2c9..2ab20c05a 100644 --- a/dom/media/webspeech/synth/windows/moz.build +++ b/dom/media/webspeech/synth/windows/moz.build @@ -4,7 +4,7 @@ # 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/. -UNIFIED_SOURCES += [ +SOURCES += [ 'SapiModule.cpp', 'SapiService.cpp' ] diff --git a/dom/messagechannel/moz.build b/dom/messagechannel/moz.build index 679d7eeb8..6ace4d77f 100644 --- a/dom/messagechannel/moz.build +++ b/dom/messagechannel/moz.build @@ -13,7 +13,7 @@ EXPORTS.mozilla.dom += [ 'MessagePortParent.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'MessageChannel.cpp', 'MessagePort.cpp', 'MessagePortChild.cpp', @@ -22,9 +22,7 @@ UNIFIED_SOURCES += [ 'SharedMessagePortMessage.cpp', ] -IPDL_SOURCES += [ - 'PMessagePort.ipdl', -] +IPDL_SOURCES += ['PMessagePort.ipdl'] LOCAL_INCLUDES += [ '../base', diff --git a/dom/network/TCPServerSocketParent.cpp b/dom/network/TCPServerSocketParent.cpp index 8f98d8b78..aec0ad198 100644 --- a/dom/network/TCPServerSocketParent.cpp +++ b/dom/network/TCPServerSocketParent.cpp @@ -4,15 +4,18 @@ * 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 "TCPServerSocketParent.h" + #include "nsIScriptSecurityManager.h" +#include "TCPSocket.h" #include "TCPServerSocket.h" -#include "TCPServerSocketParent.h" #include "nsJSUtils.h" #include "TCPSocketParent.h" #include "mozilla/Unused.h" #include "mozilla/AppProcessChecker.h" #include "mozilla/dom/ContentParent.h" #include "mozilla/dom/TabParent.h" +#include "mozilla/dom/TCPServerSocketEvent.h" namespace mozilla { namespace dom { diff --git a/dom/network/TCPSocket.cpp b/dom/network/TCPSocket.cpp index 38827a9ac..3f4fb696e 100644 --- a/dom/network/TCPSocket.cpp +++ b/dom/network/TCPSocket.cpp @@ -6,7 +6,9 @@ #include "mozilla/ErrorResult.h" #include "TCPSocket.h" #include "TCPServerSocket.h" +#include "TCPSocketParent.h" #include "TCPSocketChild.h" +#include "mozilla/Unused.h" #include "mozilla/dom/DOMError.h" #include "mozilla/dom/TCPSocketBinding.h" #include "mozilla/dom/TCPSocketErrorEvent.h" diff --git a/dom/network/TCPSocketParent.cpp b/dom/network/TCPSocketParent.cpp index 54167234e..5fd53067d 100644 --- a/dom/network/TCPSocketParent.cpp +++ b/dom/network/TCPSocketParent.cpp @@ -5,6 +5,7 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "TCPSocketParent.h" +#include "TCPSocket.h" #include "jsapi.h" #include "jsfriendapi.h" #include "nsJSUtils.h" diff --git a/dom/network/UDPSocket.cpp b/dom/network/UDPSocket.cpp index e275e3902..3e18463ae 100644 --- a/dom/network/UDPSocket.cpp +++ b/dom/network/UDPSocket.cpp @@ -17,6 +17,8 @@ #include "nsINetAddr.h" #include "nsStringStream.h" +using namespace mozilla::net; + namespace mozilla { namespace dom { diff --git a/dom/network/UDPSocketChild.cpp b/dom/network/UDPSocketChild.cpp index d205e7e8a..9d6ec0978 100644 --- a/dom/network/UDPSocketChild.cpp +++ b/dom/network/UDPSocketChild.cpp @@ -5,6 +5,8 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "UDPSocketChild.h" + +#include "UDPSocket.h" #include "mozilla/Unused.h" #include "mozilla/ipc/InputStreamUtils.h" #include "mozilla/net/NeckoChild.h" diff --git a/dom/network/UDPSocketParent.cpp b/dom/network/UDPSocketParent.cpp index 904a995ed..2f258badb 100644 --- a/dom/network/UDPSocketParent.cpp +++ b/dom/network/UDPSocketParent.cpp @@ -6,9 +6,11 @@ #include "nsIServiceManager.h" #include "UDPSocketParent.h" +#include "UDPSocket.h" #include "nsComponentManagerUtils.h" #include "nsIUDPSocket.h" #include "nsINetAddr.h" +#include "nsNetCID.h" #include "mozilla/AppProcessChecker.h" #include "mozilla/Unused.h" #include "mozilla/ipc/InputStreamUtils.h" @@ -17,9 +19,12 @@ #include "mozilla/net/PNeckoParent.h" #include "nsIPermissionManager.h" #include "nsIScriptSecurityManager.h" +#include "mozilla/dom/ContentParent.h" #include "mozilla/ipc/PBackgroundParent.h" #include "mtransport/runnable_utils.h" +using namespace mozilla::net; + namespace mozilla { namespace dom { diff --git a/dom/network/moz.build b/dom/network/moz.build index ffb90d116..79f8fe009 100644 --- a/dom/network/moz.build +++ b/dom/network/moz.build @@ -27,7 +27,7 @@ EXPORTS.mozilla.dom.network += [ 'UDPSocketParent.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'Connection.cpp', 'TCPServerSocket.cpp', 'TCPServerSocketChild.cpp', diff --git a/dom/notification/moz.build b/dom/notification/moz.build index d966b160d..8297daa6b 100644 --- a/dom/notification/moz.build +++ b/dom/notification/moz.build @@ -9,9 +9,7 @@ EXTRA_COMPONENTS += [ 'NotificationStorage.manifest', ] -EXTRA_JS_MODULES += [ - 'NotificationDB.jsm' -] +EXTRA_JS_MODULES += ['NotificationDB.jsm'] EXPORTS.mozilla.dom += [ 'DesktopNotification.h', @@ -19,7 +17,7 @@ EXPORTS.mozilla.dom += [ 'NotificationEvent.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'DesktopNotification.cpp', 'Notification.cpp', 'NotificationEvent.cpp', @@ -28,6 +26,7 @@ UNIFIED_SOURCES += [ include('/ipc/chromium/chromium-config.mozbuild') FINAL_LIBRARY = 'xul' + LOCAL_INCLUDES += [ '/dom/base', '/dom/ipc', diff --git a/dom/offline/moz.build b/dom/offline/moz.build index 1e3c192c5..2baa12496 100644 --- a/dom/offline/moz.build +++ b/dom/offline/moz.build @@ -4,15 +4,10 @@ # 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/. -EXPORTS += [ - 'nsDOMOfflineResourceList.h', -] -UNIFIED_SOURCES += [ - 'nsDOMOfflineResourceList.cpp', -] +EXPORTS += ['nsDOMOfflineResourceList.h'] -LOCAL_INCLUDES += [ - '/dom/base', -] +SOURCES += ['nsDOMOfflineResourceList.cpp'] + +LOCAL_INCLUDES += ['/dom/base'] FINAL_LIBRARY = 'xul' diff --git a/dom/performance/PerformanceMainThread.cpp b/dom/performance/PerformanceMainThread.cpp index b95a91ea6..60eccf595 100644 --- a/dom/performance/PerformanceMainThread.cpp +++ b/dom/performance/PerformanceMainThread.cpp @@ -6,7 +6,12 @@ #include "PerformanceMainThread.h" #include "PerformanceNavigation.h" +#include "PerformanceNavigationTiming.h" +#include "PerformanceResourceTiming.h" +#include "PerformanceTiming.h" #include "nsICacheInfoChannel.h" +#include "nsITimedChannel.h" +#include "mozilla/dom/Event.h" namespace mozilla { namespace dom { diff --git a/dom/performance/PerformanceService.cpp b/dom/performance/PerformanceService.cpp index cf119af89..21d1aaa26 100644 --- a/dom/performance/PerformanceService.cpp +++ b/dom/performance/PerformanceService.cpp @@ -9,6 +9,7 @@ #include "mozilla/ClearOnShutdown.h" #include "mozilla/StaticMutex.h" #include "mozilla/StaticPtr.h" +#include "prtime.h" namespace mozilla { namespace dom { diff --git a/dom/performance/PerformanceTiming.cpp b/dom/performance/PerformanceTiming.cpp index 887a23938..f1d75ca03 100755 --- a/dom/performance/PerformanceTiming.cpp +++ b/dom/performance/PerformanceTiming.cpp @@ -6,6 +6,7 @@ #include "PerformanceTiming.h" #include "mozilla/dom/PerformanceTimingBinding.h" +#include "nsITimedChannel.h" namespace mozilla { namespace dom { diff --git a/dom/performance/moz.build b/dom/performance/moz.build index e1f96fec8..454f8f544 100644 --- a/dom/performance/moz.build +++ b/dom/performance/moz.build @@ -18,7 +18,7 @@ EXPORTS.mozilla.dom += [ 'PerformanceTiming.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'Performance.cpp', 'PerformanceEntry.cpp', 'PerformanceMainThread.cpp', diff --git a/dom/permission/PermissionUtils.cpp b/dom/permission/PermissionUtils.cpp index 1bb1c1c0d..a1d4fea43 100644 --- a/dom/permission/PermissionUtils.cpp +++ b/dom/permission/PermissionUtils.cpp @@ -4,6 +4,7 @@ * 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 "nsIPermissionManager.h" #include "PermissionUtils.h" namespace mozilla { diff --git a/dom/permission/Permissions.cpp b/dom/permission/Permissions.cpp index ddbfc5ffe..99654055a 100644 --- a/dom/permission/Permissions.cpp +++ b/dom/permission/Permissions.cpp @@ -11,6 +11,7 @@ #include "mozilla/dom/Promise.h" #include "mozilla/Services.h" #include "nsIPermissionManager.h" +#include "PermissionStatus.h" #include "PermissionUtils.h" namespace mozilla { diff --git a/dom/permission/moz.build b/dom/permission/moz.build index 0be8a7535..ea17c738f 100644 --- a/dom/permission/moz.build +++ b/dom/permission/moz.build @@ -9,7 +9,7 @@ EXPORTS.mozilla.dom += [ 'PermissionStatus.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'PermissionObserver.cpp', 'Permissions.cpp', 'PermissionStatus.cpp', diff --git a/dom/plugins/base/moz.build b/dom/plugins/base/moz.build index a159d6fc1..d63ca51ce 100644 --- a/dom/plugins/base/moz.build +++ b/dom/plugins/base/moz.build @@ -38,10 +38,12 @@ EXPORTS.mozilla += [ 'PluginPRLibrary.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'nsJSNPRuntime.cpp', + 'nsNPAPIPlugin.cpp', 'nsNPAPIPluginInstance.cpp', 'nsNPAPIPluginStreamListener.cpp', + 'nsPluginHost.cpp', 'nsPluginInstanceOwner.cpp', 'nsPluginModule.cpp', 'nsPluginStreamListenerPeer.cpp', @@ -49,24 +51,19 @@ UNIFIED_SOURCES += [ 'PluginPRLibrary.cpp', ] -SOURCES += [ - 'nsNPAPIPlugin.cpp', # Conflict with X11 headers - 'nsPluginHost.cpp', # Conflict with NS_NPAPIPLUGIN_CALLBACK -] - if CONFIG['OS_ARCH'] == 'WINNT': - UNIFIED_SOURCES += [ + SOURCES += [ 'nsPluginDirServiceProvider.cpp', 'nsPluginNativeWindowWin.cpp', 'nsPluginsDirWin.cpp', ] elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': - UNIFIED_SOURCES += [ + SOURCES += [ 'nsPluginNativeWindow.cpp', 'nsPluginsDirDarwin.cpp', ] else: - UNIFIED_SOURCES += [ + SOURCES += [ 'nsPluginsDirUnix.cpp', ] if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: @@ -75,7 +72,7 @@ else: 'nsPluginNativeWindowGtk.cpp', ] else: - UNIFIED_SOURCES += [ + SOURCES += [ 'nsPluginNativeWindow.cpp', ] diff --git a/dom/plugins/base/nsNPAPIPluginInstance.cpp b/dom/plugins/base/nsNPAPIPluginInstance.cpp index ce24b6296..7ee71c8f7 100644 --- a/dom/plugins/base/nsNPAPIPluginInstance.cpp +++ b/dom/plugins/base/nsNPAPIPluginInstance.cpp @@ -36,6 +36,7 @@ #include "nsILoadContext.h" #include "mozilla/dom/HTMLObjectElementBinding.h" #include "AudioChannelService.h" +#include "GeckoProfiler.h" using namespace mozilla; using namespace mozilla::dom; diff --git a/dom/plugins/base/nsNPAPIPluginStreamListener.cpp b/dom/plugins/base/nsNPAPIPluginStreamListener.cpp index 0f500a1ae..2b5f65ef4 100644 --- a/dom/plugins/base/nsNPAPIPluginStreamListener.cpp +++ b/dom/plugins/base/nsNPAPIPluginStreamListener.cpp @@ -9,11 +9,13 @@ #include "nsDirectoryServiceDefs.h" #include "nsDirectoryServiceUtils.h" #include "nsIFile.h" +#include "nsIHttpChannel.h" #include "nsNetUtil.h" #include "nsPluginHost.h" #include "nsNPAPIPlugin.h" #include "nsPluginLogging.h" #include "nsPluginStreamListenerPeer.h" +#include "GeckoProfiler.h" #include <stdint.h> #include <algorithm> diff --git a/dom/plugins/base/nsNPAPIPluginStreamListener.h b/dom/plugins/base/nsNPAPIPluginStreamListener.h index dd567f99b..cb9c616d0 100644 --- a/dom/plugins/base/nsNPAPIPluginStreamListener.h +++ b/dom/plugins/base/nsNPAPIPluginStreamListener.h @@ -10,6 +10,7 @@ #include "nsIHTTPHeaderListener.h" #include "nsIRequest.h" #include "nsITimer.h" +#include "nsCOMPtr.h" #include "nsCOMArray.h" #include "nsIOutputStream.h" #include "nsIPluginInstanceOwner.h" diff --git a/dom/plugins/base/nsPluginInstanceOwner.cpp b/dom/plugins/base/nsPluginInstanceOwner.cpp index 22c4783ca..0d4dc68cc 100644 --- a/dom/plugins/base/nsPluginInstanceOwner.cpp +++ b/dom/plugins/base/nsPluginInstanceOwner.cpp @@ -64,6 +64,7 @@ using mozilla::DefaultXDisplay; #include "mozilla/IMEStateManager.h" #include "mozilla/TextComposition.h" #include "mozilla/AutoRestore.h" +#include "mozilla/plugins/PluginAsyncSurrogate.h" #include "nsContentCID.h" #include "nsWidgetsCID.h" @@ -90,6 +91,7 @@ static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID); using namespace mozilla; using namespace mozilla::dom; using namespace mozilla::layers; +using namespace mozilla::plugins; static inline nsPoint AsNsPoint(const nsIntPoint &p) { return nsPoint(p.x, p.y); diff --git a/dom/plugins/base/nsPluginNativeWindowWin.cpp b/dom/plugins/base/nsPluginNativeWindowWin.cpp index 106dcaf77..82f851174 100644 --- a/dom/plugins/base/nsPluginNativeWindowWin.cpp +++ b/dom/plugins/base/nsPluginNativeWindowWin.cpp @@ -5,6 +5,7 @@ #include "mozilla/BasicEvents.h" #include "mozilla/DebugOnly.h" +#include "nsPluginHost.h" #include "windows.h" #include "windowsx.h" diff --git a/dom/plugins/base/nsPluginStreamListenerPeer.cpp b/dom/plugins/base/nsPluginStreamListenerPeer.cpp index 0476315d5..603f2408c 100644 --- a/dom/plugins/base/nsPluginStreamListenerPeer.cpp +++ b/dom/plugins/base/nsPluginStreamListenerPeer.cpp @@ -34,6 +34,7 @@ #include "nsPluginInstanceOwner.h" #include "nsDataHashtable.h" #include "nsNullPrincipal.h" +#include "prtime.h" #define BYTERANGE_REQUEST_CONTEXT 0x01020304 diff --git a/dom/plugins/base/nsPluginTags.cpp b/dom/plugins/base/nsPluginTags.cpp index 58b413388..5fd63f377 100644 --- a/dom/plugins/base/nsPluginTags.cpp +++ b/dom/plugins/base/nsPluginTags.cpp @@ -13,6 +13,7 @@ #include "nsIBlocklistService.h" #include "nsIUnicodeDecoder.h" #include "nsIPlatformCharset.h" +#include "nsIURI.h" #include "nsPluginLogging.h" #include "nsNPAPIPlugin.h" #include "nsCharSeparatedTokenizer.h" @@ -26,6 +27,7 @@ using mozilla::dom::EncodingUtils; using mozilla::dom::FakePluginTagInit; +using mozilla::dom::FakePluginMimeEntry; using namespace mozilla; // These legacy flags are used in the plugin registry. The states are now diff --git a/dom/plugins/ipc/D3D11SurfaceHolder.h b/dom/plugins/ipc/D3D11SurfaceHolder.h index 16cd2d182..2d2342347 100644 --- a/dom/plugins/ipc/D3D11SurfaceHolder.h +++ b/dom/plugins/ipc/D3D11SurfaceHolder.h @@ -6,6 +6,7 @@ #define _include_dom_plugins_ipc_D3D11SurfaceHolder_h__ #include "ipc/IPCMessageUtils.h" +#include "mozilla/gfx/2D.h" #include "mozilla/gfx/Point.h" #include "mozilla/gfx/Types.h" diff --git a/dom/plugins/ipc/PluginAsyncSurrogate.h b/dom/plugins/ipc/PluginAsyncSurrogate.h index 5b6315715..8e69a57a4 100644 --- a/dom/plugins/ipc/PluginAsyncSurrogate.h +++ b/dom/plugins/ipc/PluginAsyncSurrogate.h @@ -8,6 +8,7 @@ #define dom_plugins_ipc_PluginAsyncSurrogate_h #include "mozilla/UniquePtr.h" +#include "mozilla/WeakPtr.h" #include "npapi.h" #include "npfunctions.h" #include "npruntime.h" diff --git a/dom/plugins/ipc/PluginInstanceParent.cpp b/dom/plugins/ipc/PluginInstanceParent.cpp index 24b1410bc..523dc5c80 100644 --- a/dom/plugins/ipc/PluginInstanceParent.cpp +++ b/dom/plugins/ipc/PluginInstanceParent.cpp @@ -9,6 +9,8 @@ #include "mozilla/BasicEvents.h" #include "mozilla/Preferences.h" +#include "mozilla/D3DMessageUtils.h" +#include "D3D11SurfaceHolder.h" #include "PluginInstanceParent.h" #include "BrowserStreamParent.h" #include "PluginAsyncSurrogate.h" @@ -69,8 +71,10 @@ extern const wchar_t* kFlashFullscreenClass; #include <ApplicationServices/ApplicationServices.h> #endif // defined(XP_MACOSX) +using namespace mozilla; using namespace mozilla::plugins; using namespace mozilla::layers; +using namespace mozilla::gfx; using namespace mozilla::gl; void diff --git a/dom/plugins/ipc/PluginModuleParent.cpp b/dom/plugins/ipc/PluginModuleParent.cpp index 4a509676d..6ea205ef0 100755 --- a/dom/plugins/ipc/PluginModuleParent.cpp +++ b/dom/plugins/ipc/PluginModuleParent.cpp @@ -29,10 +29,14 @@ #include "nsNPAPIPlugin.h" #include "nsPrintfCString.h" #include "prsystem.h" +#include "PluginBackgroundDestroyer.h" #include "PluginQuirks.h" +#include "PluginStreamParent.h" +#include "StreamNotifyParent.h" #include "GeckoProfiler.h" #include "nsPluginTags.h" #include "nsUnicharUtils.h" +#include "mozilla/layers/ImageBridgeChild.h" #include "mozilla/layers/TextureClientRecycleAllocator.h" #ifdef XP_WIN @@ -56,6 +60,7 @@ using mozilla::ipc::MessageChannel; using mozilla::ipc::GeckoChildProcessHost; using namespace mozilla; +using namespace mozilla::layers; using namespace mozilla::plugins; using namespace mozilla::plugins::parent; diff --git a/dom/plugins/ipc/PluginQuirks.h b/dom/plugins/ipc/PluginQuirks.h index f0a6b6a30..66dc8fba6 100644 --- a/dom/plugins/ipc/PluginQuirks.h +++ b/dom/plugins/ipc/PluginQuirks.h @@ -7,6 +7,8 @@ #ifndef dom_plugins_PluginQuirks_h #define dom_plugins_PluginQuirks_h +#include "nsString.h" + namespace mozilla { namespace plugins { diff --git a/dom/plugins/ipc/PluginUtilsWin.h b/dom/plugins/ipc/PluginUtilsWin.h index 097ae5262..a1a7c2aa6 100644 --- a/dom/plugins/ipc/PluginUtilsWin.h +++ b/dom/plugins/ipc/PluginUtilsWin.h @@ -8,6 +8,7 @@ #define dom_plugins_PluginUtilsWin_h 1
#include "npapi.h"
+#include "PluginModuleParent.h"
namespace mozilla {
namespace plugins {
diff --git a/dom/plugins/ipc/hangui/moz.build b/dom/plugins/ipc/hangui/moz.build index 0b84cfb8f..52c2f1495 100644 --- a/dom/plugins/ipc/hangui/moz.build +++ b/dom/plugins/ipc/hangui/moz.build @@ -6,7 +6,7 @@ Program('plugin-hang-ui') -UNIFIED_SOURCES += [ +SOURCES += [ 'MiniShmChild.cpp', 'PluginHangUIChild.cpp', ] diff --git a/dom/plugins/ipc/interpose/moz.build b/dom/plugins/ipc/interpose/moz.build index 8bd8ee651..10171afd0 100644 --- a/dom/plugins/ipc/interpose/moz.build +++ b/dom/plugins/ipc/interpose/moz.build @@ -6,7 +6,7 @@ SharedLibrary('plugin_child_interpose') -UNIFIED_SOURCES += [ "%s.mm" % (LIBRARY_NAME) ] +SOURCES += [ "%s.mm" % (LIBRARY_NAME) ] OS_LIBS += ['-framework Carbon'] diff --git a/dom/plugins/ipc/moz.build b/dom/plugins/ipc/moz.build index 051d5a3b4..182a11562 100644 --- a/dom/plugins/ipc/moz.build +++ b/dom/plugins/ipc/moz.build @@ -48,13 +48,11 @@ if CONFIG['OS_ARCH'] == 'WINNT': EXPORTS.mozilla.plugins += [ 'PluginSurfaceParent.h', ] - UNIFIED_SOURCES += [ + SOURCES += [ + 'MiniShmParent.cpp', 'PluginHangUIParent.cpp', 'PluginSurfaceParent.cpp', ] - SOURCES += [ - 'MiniShmParent.cpp', # Issues with CreateEvent - ] DEFINES['MOZ_HANGUI_PROCESS_NAME'] = '"plugin-hang-ui%s"' % CONFIG['BIN_SUFFIX'] LOCAL_INCLUDES += [ '/widget', @@ -66,15 +64,17 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': 'PluginInterposeOSX.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'BrowserStreamChild.cpp', 'BrowserStreamParent.cpp', 'ChildAsyncCall.cpp', 'ChildTimer.cpp', 'PluginAsyncSurrogate.cpp', 'PluginBackgroundDestroyer.cpp', + 'PluginInstanceChild.cpp', 'PluginInstanceParent.cpp', 'PluginMessageUtils.cpp', + 'PluginModuleChild.cpp', 'PluginModuleParent.cpp', 'PluginProcessChild.cpp', 'PluginProcessParent.cpp', @@ -83,23 +83,18 @@ UNIFIED_SOURCES += [ 'PluginScriptableObjectParent.cpp', 'PluginStreamChild.cpp', 'PluginStreamParent.cpp', -] - -SOURCES += [ - 'PluginInstanceChild.cpp', # 'PluginThreadCallback' : ambiguous symbol - 'PluginModuleChild.cpp', # Redefinition of mozilla::WindowsDllInterceptor sUser32Intercept 'PluginWidgetChild.cpp', 'PluginWidgetParent.cpp', ] if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': - UNIFIED_SOURCES += [ + SOURCES += [ 'PluginInterposeOSX.mm', 'PluginUtilsOSX.mm', ] if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': - UNIFIED_SOURCES += [ + SOURCES += [ 'D3D11SurfaceHolder.cpp', 'PluginUtilsWin.cpp' ] diff --git a/dom/power/moz.build b/dom/power/moz.build index cdd99264d..5474ebada 100644 --- a/dom/power/moz.build +++ b/dom/power/moz.build @@ -21,7 +21,7 @@ EXPORTS.mozilla.dom.power += [ 'Types.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'PowerManager.cpp', 'PowerManagerService.cpp', 'WakeLock.cpp', diff --git a/dom/push/PushSubscriptionOptions.cpp b/dom/push/PushSubscriptionOptions.cpp index 39252e9e8..8f6ce5499 100644 --- a/dom/push/PushSubscriptionOptions.cpp +++ b/dom/push/PushSubscriptionOptions.cpp @@ -6,6 +6,7 @@ #include "mozilla/dom/PushSubscriptionOptionsBinding.h" #include "mozilla/HoldDropJSObjects.h" +#include "PushUtil.h" namespace mozilla { namespace dom { diff --git a/dom/push/PushUtil.cpp b/dom/push/PushUtil.cpp index 408b62048..1aba0e066 100644 --- a/dom/push/PushUtil.cpp +++ b/dom/push/PushUtil.cpp @@ -3,6 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "mozilla/dom/PushUtil.h" +#include "mozilla/dom/UnionTypes.h" // for OwningArrayBufferViewOrArrayBuffer namespace mozilla { namespace dom { diff --git a/dom/push/PushUtil.h b/dom/push/PushUtil.h index 548ae2349..71a7af478 100644 --- a/dom/push/PushUtil.h +++ b/dom/push/PushUtil.h @@ -7,6 +7,7 @@ #include "nsTArray.h" +#include "mozilla/ErrorResult.h" #include "mozilla/dom/TypedArray.h" namespace mozilla { diff --git a/dom/push/moz.build b/dom/push/moz.build index d138b270c..ca72c5f5d 100644 --- a/dom/push/moz.build +++ b/dom/push/moz.build @@ -37,7 +37,7 @@ EXPORTS.mozilla.dom += [ 'PushUtil.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'PushManager.cpp', 'PushNotifier.cpp', 'PushSubscription.cpp', diff --git a/dom/quota/QuotaManagerService.cpp b/dom/quota/QuotaManagerService.cpp index fb5f0f3a1..bd811dc9b 100644 --- a/dom/quota/QuotaManagerService.cpp +++ b/dom/quota/QuotaManagerService.cpp @@ -16,6 +16,7 @@ #include "mozilla/ipc/BackgroundParent.h" #include "mozilla/ipc/BackgroundUtils.h" #include "mozilla/ipc/PBackgroundChild.h" +#include "nsContentUtils.h" #include "nsIIdleService.h" #include "nsIIPCBackgroundChildCreateCallback.h" #include "nsIObserverService.h" diff --git a/dom/quota/QuotaRequests.cpp b/dom/quota/QuotaRequests.cpp index 369bc790c..7d1c37731 100644 --- a/dom/quota/QuotaRequests.cpp +++ b/dom/quota/QuotaRequests.cpp @@ -8,6 +8,7 @@ #include "ActorsChild.h" #include "nsIQuotaCallbacks.h" +#include "nsIVariant.h" namespace mozilla { namespace dom { diff --git a/dom/quota/QuotaResults.h b/dom/quota/QuotaResults.h index 73fe6b790..246bfe9c9 100644 --- a/dom/quota/QuotaResults.h +++ b/dom/quota/QuotaResults.h @@ -8,6 +8,7 @@ #define mozilla_dom_quota_QuotaResults_h #include "nsIQuotaResults.h" +#include "nsString.h" namespace mozilla { namespace dom { diff --git a/dom/quota/StorageManager.cpp b/dom/quota/StorageManager.cpp index 4e9f0cf8c..3aad3c3e7 100644 --- a/dom/quota/StorageManager.cpp +++ b/dom/quota/StorageManager.cpp @@ -13,9 +13,12 @@ #include "mozilla/ErrorResult.h" #include "nsIQuotaCallbacks.h" #include "nsIQuotaRequests.h" +#include "nsIQuotaResults.h" #include "nsPIDOMWindow.h" +#include "QuotaManagerService.h" using namespace mozilla::dom::workers; +using namespace mozilla::dom::quota; namespace mozilla { namespace dom { diff --git a/dom/quota/StorageManager.h b/dom/quota/StorageManager.h index 162390f48..11dc01b6f 100644 --- a/dom/quota/StorageManager.h +++ b/dom/quota/StorageManager.h @@ -7,8 +7,10 @@ #ifndef mozilla_dom_StorageManager_h #define mozilla_dom_StorageManager_h +#include "mozilla/ErrorResult.h" #include "nsCOMPtr.h" #include "nsCycleCollectionParticipant.h" +#include "nsIGlobalObject.h" #include "nsISupports.h" #include "nsWrapperCache.h" diff --git a/dom/quota/moz.build b/dom/quota/moz.build index 66c4f4f45..182696569 100644 --- a/dom/quota/moz.build +++ b/dom/quota/moz.build @@ -31,7 +31,7 @@ EXPORTS.mozilla.dom.quota += [ 'UsageInfo.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'ActorsChild.cpp', 'ActorsParent.cpp', 'FileStreams.cpp', diff --git a/dom/security/SRICheck.h b/dom/security/SRICheck.h index 82929fe36..46de0532f 100644 --- a/dom/security/SRICheck.h +++ b/dom/security/SRICheck.h @@ -9,6 +9,7 @@ #include "nsCOMPtr.h" #include "nsICryptoHash.h" +#include "nsString.h" class nsIChannel; class nsIUnicharStreamLoader; diff --git a/dom/security/moz.build b/dom/security/moz.build index 00f7376a8..587e1e898 100644 --- a/dom/security/moz.build +++ b/dom/security/moz.build @@ -24,12 +24,15 @@ EXPORTS += [ ] UNIFIED_SOURCES += [ + 'nsCSPContext.cpp', + 'nsCSPUtils.cpp', +] + +SOURCES += [ 'ContentVerifier.cpp', 'nsContentSecurityManager.cpp', - 'nsCSPContext.cpp', 'nsCSPParser.cpp', 'nsCSPService.cpp', - 'nsCSPUtils.cpp', 'nsMixedContentBlocker.cpp', 'SRICheck.cpp', 'SRIMetadata.cpp', diff --git a/dom/security/nsCSPParser.h b/dom/security/nsCSPParser.h index d500a1c18..59f5d2d6d 100644 --- a/dom/security/nsCSPParser.h +++ b/dom/security/nsCSPParser.h @@ -7,6 +7,7 @@ #ifndef nsCSPParser_h___ #define nsCSPParser_h___ +#include "nsCSPContext.h" #include "nsCSPUtils.h" #include "nsIURI.h" #include "nsString.h" diff --git a/dom/security/nsCSPUtils.cpp b/dom/security/nsCSPUtils.cpp index 6d4f297d6..e9f218c14 100644 --- a/dom/security/nsCSPUtils.cpp +++ b/dom/security/nsCSPUtils.cpp @@ -17,6 +17,10 @@ #include "nsIURL.h" #include "nsReadableUtils.h" #include "nsSandboxFlags.h" +#include "nsString.h" +#include "mozilla/Logging.h" + +using namespace mozilla; #define DEFAULT_PORT -1 @@ -30,6 +34,29 @@ GetCspUtilsLog() #define CSPUTILSLOG(args) MOZ_LOG(GetCspUtilsLog(), mozilla::LogLevel::Debug, args) #define CSPUTILSLOGENABLED() MOZ_LOG_TEST(GetCspUtilsLog(), mozilla::LogLevel::Debug) +static const char16_t PERCENT_SIGN = '%'; + +static bool +isCharacterToken(char16_t aSymbol) +{ + return (aSymbol >= 'a' && aSymbol <= 'z') || + (aSymbol >= 'A' && aSymbol <= 'Z'); +} + +static bool +isNumberToken(char16_t aSymbol) +{ + return (aSymbol >= '0' && aSymbol <= '9'); +} + +static bool +isValidHexDig(char16_t aHexDig) +{ + return (isNumberToken(aHexDig) || + (aHexDig >= 'A' && aHexDig <= 'F') || + (aHexDig >= 'a' && aHexDig <= 'f')); +} + void CSP_PercentDecodeStr(const nsAString& aEncStr, nsAString& outDecStr) { diff --git a/dom/security/nsContentSecurityManager.cpp b/dom/security/nsContentSecurityManager.cpp index 5c6701992..298dc810e 100644 --- a/dom/security/nsContentSecurityManager.cpp +++ b/dom/security/nsContentSecurityManager.cpp @@ -5,16 +5,26 @@ #include "nsIStreamListener.h" #include "nsILoadInfo.h" #include "nsIOService.h" +#include "nsIProtocolHandler.h" #include "nsContentUtils.h" #include "nsCORSListenerProxy.h" #include "nsIStreamListener.h" +#include "nsIScriptError.h" #include "nsCDefaultURIFixup.h" #include "nsIURIFixup.h" #include "nsIImageLoadingContent.h" +#include "nsNetUtil.h" +#include "mozilla/ArrayUtils.h" +#include "nsString.h" +#include "nsMimeTypes.h" +#include "nsContentPolicyUtils.h" +#include "nsCharSeparatedTokenizer.h" #include "mozilla/dom/Element.h" #include "mozilla/dom/TabChild.h" +using namespace mozilla; + NS_IMPL_ISUPPORTS(nsContentSecurityManager, nsIContentSecurityManager, nsIChannelEventSink) diff --git a/dom/security/nsMixedContentBlocker.cpp b/dom/security/nsMixedContentBlocker.cpp index 543429aff..85fb06d8d 100644 --- a/dom/security/nsMixedContentBlocker.cpp +++ b/dom/security/nsMixedContentBlocker.cpp @@ -20,6 +20,8 @@ #include "nsIContentViewer.h" #include "nsIChannel.h" #include "nsIHttpChannel.h" +#include "nsIProtocolHandler.h" +#include "nsIInterfaceRequestorUtils.h" #include "nsIParentChannel.h" #include "mozilla/Preferences.h" #include "nsIScriptObjectPrincipal.h" @@ -33,12 +35,12 @@ #include "nsAsyncRedirectVerifyHelper.h" #include "mozilla/LoadInfo.h" #include "nsISiteSecurityService.h" +#include "nsNetUtil.h" #include "mozilla/Logging.h" #include "mozilla/dom/ContentChild.h" #include "mozilla/ipc/URIUtils.h" - using namespace mozilla; enum nsMixedContentBlockerMessageType { diff --git a/dom/smil/moz.build b/dom/smil/moz.build index 5b37ce642..3c432898f 100644 --- a/dom/smil/moz.build +++ b/dom/smil/moz.build @@ -35,7 +35,7 @@ EXPORTS.mozilla.dom += [ 'TimeEvent.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'nsSMILAnimationController.cpp', 'nsSMILAnimationFunction.cpp', 'nsSMILCompositor.cpp', diff --git a/dom/smil/nsSMILAnimationFunction.cpp b/dom/smil/nsSMILAnimationFunction.cpp index 767181897..cd57054fb 100644 --- a/dom/smil/nsSMILAnimationFunction.cpp +++ b/dom/smil/nsSMILAnimationFunction.cpp @@ -24,6 +24,7 @@ #include <math.h> #include <algorithm> +using namespace mozilla; using namespace mozilla::dom; //---------------------------------------------------------------------- diff --git a/dom/smil/nsSMILCSSProperty.cpp b/dom/smil/nsSMILCSSProperty.cpp index e74512443..14e428c05 100644 --- a/dom/smil/nsSMILCSSProperty.cpp +++ b/dom/smil/nsSMILCSSProperty.cpp @@ -17,6 +17,7 @@ #include "nsIDOMElement.h" #include "nsIDocument.h" +using namespace mozilla; using namespace mozilla::dom; // Helper function diff --git a/dom/smil/nsSMILCSSValueType.cpp b/dom/smil/nsSMILCSSValueType.cpp index ed89e7710..2940c1367 100644 --- a/dom/smil/nsSMILCSSValueType.cpp +++ b/dom/smil/nsSMILCSSValueType.cpp @@ -18,6 +18,7 @@ #include "nsDebug.h" #include "nsStyleUtil.h" #include "nsIDocument.h" +#include "nsComputedDOMStyle.h" using namespace mozilla::dom; using mozilla::StyleAnimationValue; diff --git a/dom/smil/nsSMILCompositor.cpp b/dom/smil/nsSMILCompositor.cpp index fe7b2c828..e7bf60932 100644 --- a/dom/smil/nsSMILCompositor.cpp +++ b/dom/smil/nsSMILCompositor.cpp @@ -9,6 +9,9 @@ #include "nsCSSProps.h" #include "nsHashKeys.h" #include "nsSMILCSSProperty.h" +#include "mozilla/CSSEnabledState.h" + +using namespace mozilla; // PLDHashEntryHdr methods bool diff --git a/dom/smil/nsSMILInstanceTime.h b/dom/smil/nsSMILInstanceTime.h index d5a5807e3..4602c9127 100644 --- a/dom/smil/nsSMILInstanceTime.h +++ b/dom/smil/nsSMILInstanceTime.h @@ -8,6 +8,7 @@ #define NS_SMILINSTANCETIME_H_ #include "nsSMILTimeValue.h" +#include "nsISupports.h" class nsSMILInterval; class nsSMILTimeContainer; diff --git a/dom/smil/nsSMILTimeContainer.cpp b/dom/smil/nsSMILTimeContainer.cpp index 3df8a64ca..e3ebf5b09 100644 --- a/dom/smil/nsSMILTimeContainer.cpp +++ b/dom/smil/nsSMILTimeContainer.cpp @@ -11,6 +11,8 @@ #include "mozilla/AutoRestore.h" +using namespace mozilla; + nsSMILTimeContainer::nsSMILTimeContainer() : mParent(nullptr), diff --git a/dom/storage/DOMStorageDBUpdater.cpp b/dom/storage/DOMStorageDBUpdater.cpp index 8e3f07d7c..61d86ca6c 100644 --- a/dom/storage/DOMStorageDBUpdater.cpp +++ b/dom/storage/DOMStorageDBUpdater.cpp @@ -4,12 +4,16 @@ * 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 "DOMStorageDBThread.h" #include "DOMStorageManager.h" #include "mozIStorageBindingParamsArray.h" #include "mozIStorageBindingParams.h" #include "mozIStorageValueArray.h" #include "mozIStorageFunction.h" + +#include "mozStorageHelper.h" + #include "mozilla/BasePrincipal.h" #include "nsVariant.h" #include "mozilla/Services.h" diff --git a/dom/storage/DOMStorageManager.cpp b/dom/storage/DOMStorageManager.cpp index 8f50fcfb4..55a360e16 100644 --- a/dom/storage/DOMStorageManager.cpp +++ b/dom/storage/DOMStorageManager.cpp @@ -14,6 +14,7 @@ #include "nsNetUtil.h" #include "nsNetCID.h" #include "nsIURL.h" +#include "nsPIDOMWindow.h" #include "nsPrintfCString.h" #include "nsXULAppAPI.h" #include "nsThreadUtils.h" diff --git a/dom/storage/moz.build b/dom/storage/moz.build index 47c2fb85f..7d52d6d7b 100644 --- a/dom/storage/moz.build +++ b/dom/storage/moz.build @@ -9,7 +9,7 @@ EXPORTS.mozilla.dom += [ 'DOMStorageIPC.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'DOMStorage.cpp', 'DOMStorageCache.cpp', 'DOMStorageDBThread.cpp', @@ -19,16 +19,13 @@ UNIFIED_SOURCES += [ 'DOMStorageObserver.cpp', ] -IPDL_SOURCES += [ - 'PStorage.ipdl', -] +IPDL_SOURCES += ['PStorage.ipdl'] include('/ipc/chromium/chromium-config.mozbuild') FINAL_LIBRARY = 'xul' -LOCAL_INCLUDES += [ - '/dom/base', -] + +LOCAL_INCLUDES += ['/dom/base'] if CONFIG['ENABLE_TESTS']: DEFINES['DOM_STORAGE_TESTS'] = True diff --git a/dom/svg/SVGDocument.cpp b/dom/svg/SVGDocument.cpp index f992e52f5..8b677d2e3 100644 --- a/dom/svg/SVGDocument.cpp +++ b/dom/svg/SVGDocument.cpp @@ -21,6 +21,8 @@ #include "nsSVGElement.h" #include "mozilla/StyleSheet.h" #include "mozilla/StyleSheetInlines.h" +#include "nsContentUtils.h" +#include "nsLayoutUtils.h" using namespace mozilla::css; using namespace mozilla::dom; diff --git a/dom/svg/SVGElementFactory.cpp b/dom/svg/SVGElementFactory.cpp index abbb0a865..3738275f3 100644 --- a/dom/svg/SVGElementFactory.cpp +++ b/dom/svg/SVGElementFactory.cpp @@ -7,9 +7,7 @@ #include "SVGElementFactory.h" #include "nsGkAtoms.h" #include "nsIContent.h" -#include "mozilla/dom/NodeInfo.h" #include "mozilla/dom/Element.h" -#include "mozilla/dom/FromParser.h" using namespace mozilla; using namespace mozilla::dom; diff --git a/dom/svg/SVGElementFactory.h b/dom/svg/SVGElementFactory.h index 3a75ef750..4c57b296d 100644 --- a/dom/svg/SVGElementFactory.h +++ b/dom/svg/SVGElementFactory.h @@ -7,6 +7,11 @@ #ifndef mozilla_dom_SVGElementFactory_h #define mozilla_dom_SVGElementFactory_h +#include "nsError.h" +#include "nsIContent.h" +#include "mozilla/dom/FromParser.h" +#include "mozilla/dom/NodeInfo.h" + class nsIAtom; namespace mozilla { diff --git a/dom/svg/SVGGraphicsElement.cpp b/dom/svg/SVGGraphicsElement.cpp index ba6306680..4b85c9abb 100644 --- a/dom/svg/SVGGraphicsElement.cpp +++ b/dom/svg/SVGGraphicsElement.cpp @@ -6,6 +6,8 @@ #include "mozilla/dom/SVGGraphicsElement.h" +#include "nsContentUtils.h" + namespace mozilla { namespace dom { diff --git a/dom/svg/SVGSymbolElement.cpp b/dom/svg/SVGSymbolElement.cpp index 42de96efd..a1b52bfab 100644 --- a/dom/svg/SVGSymbolElement.cpp +++ b/dom/svg/SVGSymbolElement.cpp @@ -7,6 +7,8 @@ #include "mozilla/dom/SVGSymbolElement.h" #include "mozilla/dom/SVGSymbolElementBinding.h" +#include "nsContentUtils.h" + NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Symbol) namespace mozilla { diff --git a/dom/svg/SVGTests.cpp b/dom/svg/SVGTests.cpp index 963ac27e4..03b205f67 100644 --- a/dom/svg/SVGTests.cpp +++ b/dom/svg/SVGTests.cpp @@ -11,6 +11,7 @@ #include "nsCharSeparatedTokenizer.h" #include "nsStyleUtil.h" #include "mozilla/Preferences.h" +#include "nsIContentInlines.h" namespace mozilla { namespace dom { diff --git a/dom/svg/moz.build b/dom/svg/moz.build index 298a7293d..3bbb26dd8 100644 --- a/dom/svg/moz.build +++ b/dom/svg/moz.build @@ -101,7 +101,7 @@ EXPORTS.mozilla.dom += [ 'SVGZoomEvent.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'DOMSVGAnimatedLengthList.cpp', 'DOMSVGAnimatedNumberList.cpp', 'DOMSVGLength.cpp', diff --git a/dom/system/moz.build b/dom/system/moz.build index fc8cf533b..cb0818b34 100644 --- a/dom/system/moz.build +++ b/dom/system/moz.build @@ -30,7 +30,7 @@ EXPORTS.mozilla += [ 'OSFileConstants.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'nsDeviceSensors.cpp', 'OSFileConstants.cpp', ] diff --git a/dom/time/moz.build b/dom/time/moz.build index f6ef682c6..b68f5c089 100644 --- a/dom/time/moz.build +++ b/dom/time/moz.build @@ -4,9 +4,7 @@ # 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/. -XPIDL_SOURCES += [ - 'nsITimeService.idl', -] +XPIDL_SOURCES += ['nsITimeService.idl'] XPIDL_MODULE = 'dom_time' @@ -17,7 +15,7 @@ EXPORTS.mozilla.dom.time += [ 'TimeService.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'DateCacheCleaner.cpp', 'TimeChangeObserver.cpp', 'TimeManager.cpp', diff --git a/dom/u2f/moz.build b/dom/u2f/moz.build index 1c851e1d8..19325205a 100644 --- a/dom/u2f/moz.build +++ b/dom/u2f/moz.build @@ -10,7 +10,7 @@ EXPORTS.mozilla.dom += [ 'USBToken.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'NSSU2FTokenRemote.cpp', 'U2F.cpp', 'USBToken.cpp', diff --git a/dom/url/moz.build b/dom/url/moz.build index 628b69101..4e88f2723 100644 --- a/dom/url/moz.build +++ b/dom/url/moz.build @@ -9,14 +9,12 @@ EXPORTS.mozilla.dom += [ 'URLSearchParams.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'URL.cpp', 'URLSearchParams.cpp', ] -LOCAL_INCLUDES += [ - '../workers', -] +LOCAL_INCLUDES += ['../workers'] MOCHITEST_MANIFESTS += ['tests/mochitest.ini'] MOCHITEST_CHROME_MANIFESTS += [ 'tests/chrome.ini' ] diff --git a/dom/workers/ServiceWorkerCommon.h b/dom/workers/ServiceWorkerCommon.h index 1c272c125..d7e2ec21b 100644 --- a/dom/workers/ServiceWorkerCommon.h +++ b/dom/workers/ServiceWorkerCommon.h @@ -7,6 +7,8 @@ #ifndef mozilla_dom_ServiceWorkerCommon_h #define mozilla_dom_ServiceWorkerCommon_h +#include "mozilla/TypedEnumBits.h" + namespace mozilla { namespace dom { diff --git a/dom/workers/ServiceWorkerEvents.cpp b/dom/workers/ServiceWorkerEvents.cpp index 8b375c635..a8b69bc48 100644 --- a/dom/workers/ServiceWorkerEvents.cpp +++ b/dom/workers/ServiceWorkerEvents.cpp @@ -28,6 +28,7 @@ #include "ServiceWorkerManager.h" #include "mozilla/ErrorResult.h" +#include "mozilla/Move.h" #include "mozilla/Preferences.h" #include "mozilla/dom/BodyUtil.h" #include "mozilla/dom/DOMException.h" @@ -50,6 +51,7 @@ #include "WorkerPrivate.h" #include "xpcpublic.h" +using namespace mozilla; using namespace mozilla::dom; using namespace mozilla::dom::workers; diff --git a/dom/workers/ServiceWorkerInfo.cpp b/dom/workers/ServiceWorkerInfo.cpp index fa08b97a6..04fba7f8e 100644 --- a/dom/workers/ServiceWorkerInfo.cpp +++ b/dom/workers/ServiceWorkerInfo.cpp @@ -6,6 +6,8 @@ #include "ServiceWorkerInfo.h" +#include "ServiceWorker.h" +#include "ServiceWorkerPrivate.h" #include "ServiceWorkerScriptCache.h" BEGIN_WORKERS_NAMESPACE diff --git a/dom/workers/ServiceWorkerInfo.h b/dom/workers/ServiceWorkerInfo.h index 80910bdad..8c3220c1a 100644 --- a/dom/workers/ServiceWorkerInfo.h +++ b/dom/workers/ServiceWorkerInfo.h @@ -9,6 +9,7 @@ #include "mozilla/dom/ServiceWorkerBinding.h" // For ServiceWorkerState #include "nsIServiceWorkerManager.h" +#include "Workers.h" namespace mozilla { namespace dom { diff --git a/dom/workers/ServiceWorkerJob.cpp b/dom/workers/ServiceWorkerJob.cpp index 3d0a8e2cd..d80dddfb6 100644 --- a/dom/workers/ServiceWorkerJob.cpp +++ b/dom/workers/ServiceWorkerJob.cpp @@ -9,6 +9,7 @@ #include "nsProxyRelease.h" #include "nsThreadUtils.h" #include "Workers.h" +#include "ServiceWorkerManager.h" namespace mozilla { namespace dom { diff --git a/dom/workers/ServiceWorkerRegisterJob.cpp b/dom/workers/ServiceWorkerRegisterJob.cpp index 8f771e762..595c029e1 100644 --- a/dom/workers/ServiceWorkerRegisterJob.cpp +++ b/dom/workers/ServiceWorkerRegisterJob.cpp @@ -6,6 +6,7 @@ #include "ServiceWorkerRegisterJob.h" +#include "ServiceWorkerManager.h" #include "Workers.h" namespace mozilla { diff --git a/dom/workers/ServiceWorkerRegistrationInfo.cpp b/dom/workers/ServiceWorkerRegistrationInfo.cpp index 26ad74bda..28d9fa9de 100644 --- a/dom/workers/ServiceWorkerRegistrationInfo.cpp +++ b/dom/workers/ServiceWorkerRegistrationInfo.cpp @@ -6,6 +6,10 @@ #include "ServiceWorkerRegistrationInfo.h" +#include "ServiceWorkerManager.h" +#include "ServiceWorkerPrivate.h" +#include "nsProxyRelease.h" + BEGIN_WORKERS_NAMESPACE namespace { diff --git a/dom/workers/ServiceWorkerRegistrationInfo.h b/dom/workers/ServiceWorkerRegistrationInfo.h index d2d217be0..a7175ef58 100644 --- a/dom/workers/ServiceWorkerRegistrationInfo.h +++ b/dom/workers/ServiceWorkerRegistrationInfo.h @@ -8,6 +8,7 @@ #define mozilla_dom_workers_serviceworkerregistrationinfo_h #include "mozilla/dom/workers/ServiceWorkerInfo.h" +#include "mozilla/dom/workers/ServiceWorkerCommon.h" namespace mozilla { namespace dom { diff --git a/dom/workers/ServiceWorkerUnregisterJob.cpp b/dom/workers/ServiceWorkerUnregisterJob.cpp index 8fd76b63d..9fd377700 100644 --- a/dom/workers/ServiceWorkerUnregisterJob.cpp +++ b/dom/workers/ServiceWorkerUnregisterJob.cpp @@ -7,6 +7,10 @@ #include "ServiceWorkerUnregisterJob.h" #include "nsIPushService.h" +#include "nsServiceManagerUtils.h" +#include "mozilla/Unused.h" +#include "Workers.h" +#include "ServiceWorkerManager.h" namespace mozilla { namespace dom { diff --git a/dom/workers/ServiceWorkerUpdateJob.cpp b/dom/workers/ServiceWorkerUpdateJob.cpp index 69877dfe4..38f58a3f9 100644 --- a/dom/workers/ServiceWorkerUpdateJob.cpp +++ b/dom/workers/ServiceWorkerUpdateJob.cpp @@ -6,9 +6,13 @@ #include "ServiceWorkerUpdateJob.h" +#include "nsProxyRelease.h" #include "nsIScriptError.h" #include "nsIURL.h" +#include "nsNetUtil.h" #include "ServiceWorkerScriptCache.h" +#include "ServiceWorkerPrivate.h" +#include "ServiceWorkerManager.h" #include "Workers.h" namespace mozilla { diff --git a/dom/workers/ServiceWorkerUpdateJob.h b/dom/workers/ServiceWorkerUpdateJob.h index 77adb2212..e5bfdc81d 100644 --- a/dom/workers/ServiceWorkerUpdateJob.h +++ b/dom/workers/ServiceWorkerUpdateJob.h @@ -8,6 +8,8 @@ #define mozilla_dom_workers_serviceworkerupdatejob_h #include "ServiceWorkerJob.h" +#include "ServiceWorkerRegistrationInfo.h" +#include "nsILoadGroup.h" namespace mozilla { namespace dom { diff --git a/dom/workers/ServiceWorkerWindowClient.cpp b/dom/workers/ServiceWorkerWindowClient.cpp index bae747214..bf22a7b28 100644 --- a/dom/workers/ServiceWorkerWindowClient.cpp +++ b/dom/workers/ServiceWorkerWindowClient.cpp @@ -19,16 +19,19 @@ #include "nsIDocShellLoadInfo.h" #include "nsIDocument.h" #include "nsIGlobalObject.h" +#include "nsIInterfaceRequestor.h" #include "nsIPrincipal.h" #include "nsIScriptSecurityManager.h" #include "nsIWebNavigation.h" #include "nsIWebProgress.h" #include "nsIWebProgressListener.h" +#include "nsNetUtil.h" #include "nsString.h" #include "nsWeakReference.h" #include "ServiceWorker.h" #include "ServiceWorkerInfo.h" #include "ServiceWorkerManager.h" +#include "ServiceWorkerPrivate.h" #include "WorkerPrivate.h" #include "WorkerScope.h" diff --git a/dom/workers/SharedWorker.cpp b/dom/workers/SharedWorker.cpp index 99bb50339..a9192e626 100644 --- a/dom/workers/SharedWorker.cpp +++ b/dom/workers/SharedWorker.cpp @@ -8,6 +8,7 @@ #include "nsPIDOMWindow.h" +#include "mozilla/dom/Event.h" #include "mozilla/EventDispatcher.h" #include "mozilla/Preferences.h" #include "mozilla/dom/MessagePort.h" diff --git a/dom/workers/WorkerRunnable.cpp b/dom/workers/WorkerRunnable.cpp index 60d69d4e4..8944c751c 100644 --- a/dom/workers/WorkerRunnable.cpp +++ b/dom/workers/WorkerRunnable.cpp @@ -14,6 +14,7 @@ #include "mozilla/DebugOnly.h" #include "mozilla/ErrorResult.h" +#include "mozilla/Unused.h" #include "mozilla/dom/ScriptSettings.h" #include "js/RootingAPI.h" @@ -22,6 +23,7 @@ #include "WorkerPrivate.h" #include "WorkerScope.h" +using namespace mozilla; USING_WORKERS_NAMESPACE namespace { diff --git a/dom/workers/WorkerRunnable.h b/dom/workers/WorkerRunnable.h index 8249a8053..2c9fb3b1d 100644 --- a/dom/workers/WorkerRunnable.h +++ b/dom/workers/WorkerRunnable.h @@ -14,6 +14,7 @@ #include "mozilla/Atomics.h" #include "nsISupportsImpl.h" #include "nsThreadUtils.h" /* nsRunnable */ +#include "WorkerHolder.h" struct JSContext; class nsIEventTarget; diff --git a/dom/workers/moz.build b/dom/workers/moz.build index 9fea84193..0ba7d9ad6 100644 --- a/dom/workers/moz.build +++ b/dom/workers/moz.build @@ -22,6 +22,7 @@ EXPORTS.mozilla.dom += [ EXPORTS.mozilla.dom.workers += [ 'RuntimeService.h', + 'ServiceWorkerCommon.h', 'ServiceWorkerInfo.h', 'ServiceWorkerManager.h', 'ServiceWorkerRegistrationInfo.h', @@ -46,7 +47,7 @@ XPIDL_SOURCES += [ 'nsIWorkerDebuggerManager.idl', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'ChromeWorkerScope.cpp', 'FileReaderSync.cpp', 'Principal.cpp', diff --git a/dom/worklet/moz.build b/dom/worklet/moz.build index 80c0bf0c9..7903dcf88 100644 --- a/dom/worklet/moz.build +++ b/dom/worklet/moz.build @@ -9,7 +9,7 @@ EXPORTS.mozilla.dom += [ 'WorkletGlobalScope.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'Worklet.cpp', 'WorkletGlobalScope.cpp', ] diff --git a/dom/xbl/moz.build b/dom/xbl/moz.build index 0950db036..7a8814878 100644 --- a/dom/xbl/moz.build +++ b/dom/xbl/moz.build @@ -16,7 +16,7 @@ EXPORTS.mozilla.dom += [ 'XBLChildrenElement.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'nsBindingManager.cpp', 'nsXBLBinding.cpp', 'nsXBLContentSink.cpp', diff --git a/dom/xhr/XMLHttpRequestString.cpp b/dom/xhr/XMLHttpRequestString.cpp index c668b94f6..c2bde5e0e 100644 --- a/dom/xhr/XMLHttpRequestString.cpp +++ b/dom/xhr/XMLHttpRequestString.cpp @@ -12,97 +12,6 @@ namespace mozilla { namespace dom { -class XMLHttpRequestStringBuffer final -{ - friend class XMLHttpRequestStringWriterHelper; - friend class XMLHttpRequestStringSnapshotReaderHelper; - -public: - NS_INLINE_DECL_THREADSAFE_REFCOUNTING(XMLHttpRequestStringBuffer) - NS_DECL_OWNINGTHREAD - - XMLHttpRequestStringBuffer() - : mMutex("XMLHttpRequestStringBuffer::mMutex") - { - } - - uint32_t - Length() - { - MutexAutoLock lock(mMutex); - return mData.Length(); - } - - uint32_t - UnsafeLength() const - { - return mData.Length(); - } - - void - Append(const nsAString& aString) - { - NS_ASSERT_OWNINGTHREAD(XMLHttpRequestStringBuffer); - - MutexAutoLock lock(mMutex); - mData.Append(aString); - } - - MOZ_MUST_USE bool - GetAsString(nsAString& aString) - { - MutexAutoLock lock(mMutex); - return aString.Assign(mData, mozilla::fallible); - } - - size_t - SizeOfThis(MallocSizeOf aMallocSizeOf) const - { - return mData.SizeOfExcludingThisIfUnshared(aMallocSizeOf); - } - - MOZ_MUST_USE bool - GetAsString(DOMString& aString, uint32_t aLength) - { - MutexAutoLock lock(mMutex); - MOZ_ASSERT(aLength <= mData.Length()); - nsStringBuffer* buf = nsStringBuffer::FromString(mData); - if (buf) { - // We have to use SetEphemeralStringBuffer, because once we release our - // mutex mData can get mutated from some other thread while the DOMString - // is still alive. - aString.SetEphemeralStringBuffer(buf, aLength); - return true; - } - - // We can get here if mData is empty. In that case it won't have an - // nsStringBuffer.... - MOZ_ASSERT(mData.IsEmpty()); - return aString.AsAString().Assign(mData.BeginReading(), aLength, - mozilla::fallible); - } - - void - CreateSnapshot(XMLHttpRequestStringSnapshot& aSnapshot) - { - MutexAutoLock lock(mMutex); - aSnapshot.Set(this, mData.Length()); - } - -private: - ~XMLHttpRequestStringBuffer() - {} - - nsString& UnsafeData() - { - return mData; - } - - Mutex mMutex; - - // The following member variable is protected by mutex. - nsString mData; -}; // --------------------------------------------------------------------------- // XMLHttpRequestString diff --git a/dom/xhr/XMLHttpRequestString.h b/dom/xhr/XMLHttpRequestString.h index b6b12483f..5709c1aa2 100644 --- a/dom/xhr/XMLHttpRequestString.h +++ b/dom/xhr/XMLHttpRequestString.h @@ -7,6 +7,9 @@ #ifndef mozilla_dom_XMLHttpRequestString_h #define mozilla_dom_XMLHttpRequestString_h +#include "mozilla/Mutex.h" +#include "mozilla/RefPtr.h" +#include "mozilla/dom/DOMString.h" #include "nsString.h" namespace mozilla { @@ -155,6 +158,98 @@ private: MutexAutoLock mLock; }; +class XMLHttpRequestStringBuffer final +{ + friend class XMLHttpRequestStringWriterHelper; + friend class XMLHttpRequestStringSnapshotReaderHelper; + +public: + NS_INLINE_DECL_THREADSAFE_REFCOUNTING(XMLHttpRequestStringBuffer) + NS_DECL_OWNINGTHREAD + + XMLHttpRequestStringBuffer() + : mMutex("XMLHttpRequestStringBuffer::mMutex") + { + } + + uint32_t + Length() + { + MutexAutoLock lock(mMutex); + return mData.Length(); + } + + uint32_t + UnsafeLength() const + { + return mData.Length(); + } + + void + Append(const nsAString& aString) + { + NS_ASSERT_OWNINGTHREAD(XMLHttpRequestStringBuffer); + + MutexAutoLock lock(mMutex); + mData.Append(aString); + } + + MOZ_MUST_USE bool + GetAsString(nsAString& aString) + { + MutexAutoLock lock(mMutex); + return aString.Assign(mData, mozilla::fallible); + } + + size_t + SizeOfThis(MallocSizeOf aMallocSizeOf) const + { + return mData.SizeOfExcludingThisIfUnshared(aMallocSizeOf); + } + + MOZ_MUST_USE bool + GetAsString(DOMString& aString, uint32_t aLength) + { + MutexAutoLock lock(mMutex); + MOZ_ASSERT(aLength <= mData.Length()); + nsStringBuffer* buf = nsStringBuffer::FromString(mData); + if (buf) { + // We have to use SetEphemeralStringBuffer, because once we release our + // mutex mData can get mutated from some other thread while the DOMString + // is still alive. + aString.SetEphemeralStringBuffer(buf, aLength); + return true; + } + + // We can get here if mData is empty. In that case it won't have an + // nsStringBuffer.... + MOZ_ASSERT(mData.IsEmpty()); + return aString.AsAString().Assign(mData.BeginReading(), aLength, + mozilla::fallible); + } + + void + CreateSnapshot(XMLHttpRequestStringSnapshot& aSnapshot) + { + MutexAutoLock lock(mMutex); + aSnapshot.Set(this, mData.Length()); + } + +private: + ~XMLHttpRequestStringBuffer() + {} + + nsString& UnsafeData() + { + return mData; + } + + Mutex mMutex; + + // The following member variable is protected by mutex. + nsString mData; +}; + } // dom namespace } // mozilla namespace diff --git a/dom/xhr/XMLHttpRequestWorker.cpp b/dom/xhr/XMLHttpRequestWorker.cpp index 2af61bd7d..7bec379aa 100644 --- a/dom/xhr/XMLHttpRequestWorker.cpp +++ b/dom/xhr/XMLHttpRequestWorker.cpp @@ -33,6 +33,8 @@ #include "WorkerScope.h" #include "WorkerPrivate.h" #include "WorkerRunnable.h" +#include "XMLHttpRequestMainThread.h" +#include "XMLHttpRequestString.h" #include "XMLHttpRequestUpload.h" #include "mozilla/UniquePtr.h" diff --git a/dom/xhr/moz.build b/dom/xhr/moz.build index 4ad91deea..d4803015f 100644 --- a/dom/xhr/moz.build +++ b/dom/xhr/moz.build @@ -18,7 +18,7 @@ EXPORTS.mozilla.dom += [ 'XMLHttpRequestUpload.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'XMLHttpRequest.cpp', 'XMLHttpRequestEventTarget.cpp', 'XMLHttpRequestMainThread.cpp', diff --git a/dom/xml/moz.build b/dom/xml/moz.build index f3af9968d..0eb3ee686 100644 --- a/dom/xml/moz.build +++ b/dom/xml/moz.build @@ -20,7 +20,7 @@ EXPORTS.mozilla.dom += [ 'XMLStylesheetProcessingInstruction.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'CDATASection.cpp', 'nsXMLContentSink.cpp', 'nsXMLElement.cpp', diff --git a/dom/xml/nsXMLPrettyPrinter.cpp b/dom/xml/nsXMLPrettyPrinter.cpp index 2e086dde0..7f1f2b07a 100644 --- a/dom/xml/nsXMLPrettyPrinter.cpp +++ b/dom/xml/nsXMLPrettyPrinter.cpp @@ -11,6 +11,7 @@ #include "nsIXSLTProcessor.h" #include "nsSyncLoadService.h" #include "nsPIDOMWindow.h" +#include "nsIDOMDocument.h" #include "nsIDOMElement.h" #include "nsIServiceManager.h" #include "nsNetUtil.h" diff --git a/dom/xslt/base/moz.build b/dom/xslt/base/moz.build index 7d9cd70fa..d08db4935 100644 --- a/dom/xslt/base/moz.build +++ b/dom/xslt/base/moz.build @@ -4,7 +4,7 @@ # 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/. -UNIFIED_SOURCES += [ +SOURCES += [ 'txDouble.cpp', 'txExpandedName.cpp', 'txExpandedNameMap.cpp', diff --git a/dom/xslt/xml/moz.build b/dom/xslt/xml/moz.build index f20a27bba..967035466 100644 --- a/dom/xslt/xml/moz.build +++ b/dom/xslt/xml/moz.build @@ -4,7 +4,7 @@ # 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/. -UNIFIED_SOURCES += [ +SOURCES += [ 'txXMLParser.cpp', 'txXMLUtils.cpp', ] diff --git a/dom/xslt/xpath/moz.build b/dom/xslt/xpath/moz.build index 1a7dbf89f..aa989ee91 100644 --- a/dom/xslt/xpath/moz.build +++ b/dom/xslt/xpath/moz.build @@ -10,7 +10,7 @@ EXPORTS.mozilla.dom += [ 'XPathResult.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'txBooleanExpr.cpp', 'txBooleanResult.cpp', 'txCoreFunctionCall.cpp', diff --git a/dom/xslt/xslt/moz.build b/dom/xslt/xslt/moz.build index d629e1d3e..8c9e98a0a 100644 --- a/dom/xslt/xslt/moz.build +++ b/dom/xslt/xslt/moz.build @@ -8,7 +8,7 @@ EXPORTS.mozilla.dom += [ 'txMozillaXSLTProcessor.h' ] -UNIFIED_SOURCES += [ +SOURCES += [ 'txBufferingHandler.cpp', 'txCurrentFunctionCall.cpp', 'txDocumentFunctionCall.cpp', diff --git a/dom/xslt/xslt/txExecutionState.cpp b/dom/xslt/xslt/txExecutionState.cpp index 869c3968b..5caaf77f0 100644 --- a/dom/xslt/xslt/txExecutionState.cpp +++ b/dom/xslt/xslt/txExecutionState.cpp @@ -13,6 +13,9 @@ #include "txLog.h" #include "txURIUtils.h" #include "txXMLParser.h" +#include "mozilla/Logging.h" + +using mozilla::LogLevel; const int32_t txExecutionState::kMaxRecursionDepth = 20000; diff --git a/dom/xslt/xslt/txMozillaXSLTProcessor.cpp b/dom/xslt/xslt/txMozillaXSLTProcessor.cpp index facb435b4..24c0595dd 100644 --- a/dom/xslt/xslt/txMozillaXSLTProcessor.cpp +++ b/dom/xslt/xslt/txMozillaXSLTProcessor.cpp @@ -37,7 +37,9 @@ #include "nsVariant.h" #include "mozilla/dom/DocumentFragment.h" #include "mozilla/dom/XSLTProcessorBinding.h" +#include "mozilla/ErrorResult.h" +using namespace mozilla; using namespace mozilla::dom; static NS_DEFINE_CID(kXMLDocumentCID, NS_XMLDOCUMENT_CID); diff --git a/dom/xul/moz.build b/dom/xul/moz.build index 8dff722be..dad38a2c4 100644 --- a/dom/xul/moz.build +++ b/dom/xul/moz.build @@ -19,7 +19,7 @@ if CONFIG['MOZ_XUL']: 'nsIXULDocument.h', ] - UNIFIED_SOURCES += [ + SOURCES += [ 'nsXULCommandDispatcher.cpp', 'nsXULContentSink.cpp', 'nsXULElement.cpp', @@ -36,7 +36,7 @@ XPIDL_SOURCES += [ XPIDL_MODULE = 'xul' -UNIFIED_SOURCES += [ +SOURCES += [ 'nsXULControllers.cpp', ] diff --git a/dom/xul/nsXULContentSink.cpp b/dom/xul/nsXULContentSink.cpp index 7103be758..edeee8728 100644 --- a/dom/xul/nsXULContentSink.cpp +++ b/dom/xul/nsXULContentSink.cpp @@ -42,6 +42,7 @@ #include "nsReadableUtils.h" #include "nsXULElement.h" #include "mozilla/Logging.h" +#include "mozilla/CheckedInt.h" #include "prmem.h" #include "nsCRT.h" @@ -57,6 +58,7 @@ #include "nsIScriptError.h" #include "nsContentTypeParser.h" +using namespace mozilla; static mozilla::LazyLogModule gContentSinkLog("nsXULContentSink");; //---------------------------------------------------------------------- diff --git a/dom/xul/templates/moz.build b/dom/xul/templates/moz.build index 3beb0b7e5..780f01941 100644 --- a/dom/xul/templates/moz.build +++ b/dom/xul/templates/moz.build @@ -17,7 +17,7 @@ XPIDL_SOURCES += [ XPIDL_MODULE = 'xultmpl' -UNIFIED_SOURCES += [ +SOURCES += [ 'nsContentSupportMap.cpp', 'nsContentTestNode.cpp', 'nsInstantiationNode.cpp', diff --git a/dom/xul/templates/nsInstantiationNode.cpp b/dom/xul/templates/nsInstantiationNode.cpp index 9079d4189..ebf12acad 100644 --- a/dom/xul/templates/nsInstantiationNode.cpp +++ b/dom/xul/templates/nsInstantiationNode.cpp @@ -8,6 +8,9 @@ #include "nsXULTemplateQueryProcessorRDF.h" #include "mozilla/Logging.h" + +using namespace mozilla; + extern mozilla::LazyLogModule gXULTemplateLog; nsInstantiationNode::nsInstantiationNode(nsXULTemplateQueryProcessorRDF* aProcessor, diff --git a/dom/xul/templates/nsTemplateMap.h b/dom/xul/templates/nsTemplateMap.h index cb828b093..dfa7d611a 100644 --- a/dom/xul/templates/nsTemplateMap.h +++ b/dom/xul/templates/nsTemplateMap.h @@ -9,6 +9,8 @@ #include "PLDHashTable.h" #include "nsXULElement.h" +using mozilla::fallible; + class nsTemplateMap { protected: struct Entry : public PLDHashEntryHdr { diff --git a/dom/xul/templates/nsXULTemplateQueryProcessorRDF.cpp b/dom/xul/templates/nsXULTemplateQueryProcessorRDF.cpp index 732e545d0..ecf6b64c5 100644 --- a/dom/xul/templates/nsXULTemplateQueryProcessorRDF.cpp +++ b/dom/xul/templates/nsXULTemplateQueryProcessorRDF.cpp @@ -35,6 +35,10 @@ #include "nsXULSortService.h" #include "nsIDocument.h" +#include "mozilla/Logging.h" + +using namespace mozilla; + //---------------------------------------------------------------------- #define PARSE_TYPE_INTEGER "Integer" diff --git a/dom/xul/templates/nsXULTemplateQueryProcessorStorage.cpp b/dom/xul/templates/nsXULTemplateQueryProcessorStorage.cpp index a70307bf5..cd7c32eae 100644 --- a/dom/xul/templates/nsXULTemplateQueryProcessorStorage.cpp +++ b/dom/xul/templates/nsXULTemplateQueryProcessorStorage.cpp @@ -28,6 +28,8 @@ #include "nsIDocument.h" #include "nsNetUtil.h" +using mozilla::fallible; + //---------------------------------------------------------------------- // // nsXULTemplateResultSetStorage diff --git a/dom/xul/templates/nsXULTreeBuilder.cpp b/dom/xul/templates/nsXULTreeBuilder.cpp index b42133484..3356700be 100644 --- a/dom/xul/templates/nsXULTreeBuilder.cpp +++ b/dom/xul/templates/nsXULTreeBuilder.cpp @@ -32,6 +32,9 @@ #include "nsTreeContentView.h" #include "nsIXULStore.h" #include "mozilla/BinarySearch.h" +#include "mozilla/Logging.h" + +using mozilla::LogLevel; // For security check #include "nsIDocument.h" |