From bf5c77a9b833983321c547cc7cd97e985e957f44 Mon Sep 17 00:00:00 2001 From: David Zbarsky Date: Tue, 20 Aug 2013 15:45:30 -0400 Subject: [PATCH] Bug 903819 - Don't include Layers.h everywhere, part 4 r=nrc --- content/html/content/src/HTMLAnchorElement.h | 1 + content/media/MediaDecoderReader.h | 1 - content/media/dash/DASHRepDecoder.h | 5 ++++- dom/ipc/ContentParent.h | 1 + gfx/ipc/GfxMessageUtils.h | 10 ++++------ gfx/layers/Compositor.h | 2 +- gfx/layers/ImageLayers.h | 7 ------- gfx/layers/LayerTreeInvalidation.cpp | 2 +- gfx/layers/LayersTypes.h | 7 +++++++ gfx/layers/YCbCrImageDataSerializer.h | 1 + gfx/layers/ipc/LayerTransaction.ipdlh | 2 +- layout/generic/nsObjectFrame.cpp | 2 +- .../signaling/src/peerconnection/PeerConnectionImpl.h | 2 -- view/src/nsViewManager.cpp | 1 + 14 files changed, 23 insertions(+), 21 deletions(-) diff --git a/content/html/content/src/HTMLAnchorElement.h b/content/html/content/src/HTMLAnchorElement.h index 106066fa5c076..0e6938cef997f 100644 --- a/content/html/content/src/HTMLAnchorElement.h +++ b/content/html/content/src/HTMLAnchorElement.h @@ -9,6 +9,7 @@ #include "mozilla/Attributes.h" #include "mozilla/dom/Link.h" +#include "nsContentUtils.h" #include "nsGenericHTMLElement.h" #include "nsIDOMHTMLAnchorElement.h" diff --git a/content/media/MediaDecoderReader.h b/content/media/MediaDecoderReader.h index f6636c9612d81..c8dbf4c2ea486 100644 --- a/content/media/MediaDecoderReader.h +++ b/content/media/MediaDecoderReader.h @@ -11,7 +11,6 @@ #include "mozilla/ReentrantMonitor.h" #include "MediaStreamGraph.h" #include "SharedBuffer.h" -#include "ImageLayers.h" #include "AudioSampleFormat.h" #include "MediaResource.h" #include "mozilla/dom/HTMLMediaElement.h" diff --git a/content/media/dash/DASHRepDecoder.h b/content/media/dash/DASHRepDecoder.h index 4e0c6ce8c9d15..3634f121c428c 100644 --- a/content/media/dash/DASHRepDecoder.h +++ b/content/media/dash/DASHRepDecoder.h @@ -16,7 +16,6 @@ #define DASHRepDecoder_h_ #include "Representation.h" -#include "ImageLayers.h" #include "DASHDecoder.h" #include "WebMDecoder.h" #include "WebMReader.h" @@ -24,6 +23,10 @@ namespace mozilla { +namespace layers { +class ImageContainer; +} + class DASHDecoder; class DASHRepReader; diff --git a/dom/ipc/ContentParent.h b/dom/ipc/ContentParent.h index f1c356b727fad..e87089fb0d19d 100644 --- a/dom/ipc/ContentParent.h +++ b/dom/ipc/ContentParent.h @@ -55,6 +55,7 @@ class PCompositorParent; namespace dom { +class Element; class TabParent; class PStorageParent; class ClonedMessageData; diff --git a/gfx/ipc/GfxMessageUtils.h b/gfx/ipc/GfxMessageUtils.h index a95b31f89ffdb..cc9226d8e0cee 100644 --- a/gfx/ipc/GfxMessageUtils.h +++ b/gfx/ipc/GfxMessageUtils.h @@ -27,7 +27,6 @@ #include "mozilla/layers/LayersTypes.h" #include "mozilla/layers/CompositorTypes.h" #include "FrameMetrics.h" -#include "ImageLayers.h" #ifdef _MSC_VER #pragma warning( disable : 4800 ) @@ -39,7 +38,6 @@ typedef gfxASurface::gfxContentType gfxContentType; typedef gfxASurface::gfxImageFormat PixelFormat; typedef gfxASurface::gfxSurfaceType gfxSurfaceType; typedef gfxPattern::GraphicsFilter GraphicsFilterType; -typedef layers::ImageLayer::ScaleMode ScaleMode; } // namespace mozilla @@ -216,10 +214,10 @@ struct ParamTraits {}; template <> -struct ParamTraits - : public EnumSerializer +struct ParamTraits + : public EnumSerializer {}; template <> diff --git a/gfx/layers/Compositor.h b/gfx/layers/Compositor.h index eff6b2d478c75..4db9326d4c588 100644 --- a/gfx/layers/Compositor.h +++ b/gfx/layers/Compositor.h @@ -9,9 +9,9 @@ #include "mozilla/gfx/Rect.h" #include "mozilla/gfx/Matrix.h" #include "gfxMatrix.h" -#include "Layers.h" #include "mozilla/RefPtr.h" #include "mozilla/layers/CompositorTypes.h" +#include "Units.h" /** * Different elements of a web pages are rendered into separate "layers" before diff --git a/gfx/layers/ImageLayers.h b/gfx/layers/ImageLayers.h index 5433336d3b69f..782cd52fede92 100644 --- a/gfx/layers/ImageLayers.h +++ b/gfx/layers/ImageLayers.h @@ -22,13 +22,6 @@ class ImageContainer; */ class ImageLayer : public Layer { public: - enum ScaleMode { - SCALE_NONE, - SCALE_STRETCH, - SCALE_SENTINEL - // Unimplemented - SCALE_PRESERVE_ASPECT_RATIO_CONTAIN - }; - /** * CONSTRUCTION PHASE ONLY * Set the ImageContainer. aContainer must have the same layer manager diff --git a/gfx/layers/LayerTreeInvalidation.cpp b/gfx/layers/LayerTreeInvalidation.cpp index b5d46903f577a..e506b144a086f 100644 --- a/gfx/layers/LayerTreeInvalidation.cpp +++ b/gfx/layers/LayerTreeInvalidation.cpp @@ -335,7 +335,7 @@ struct ImageLayerProperties : public LayerPropertiesBase nsRefPtr mContainer; gfxPattern::GraphicsFilter mFilter; gfxIntSize mScaleToSize; - ImageLayer::ScaleMode mScaleMode; + ScaleMode mScaleMode; }; LayerPropertiesBase* diff --git a/gfx/layers/LayersTypes.h b/gfx/layers/LayersTypes.h index 3bb376ed1feff..93fd13234bee8 100644 --- a/gfx/layers/LayersTypes.h +++ b/gfx/layers/LayersTypes.h @@ -111,6 +111,13 @@ struct LayerRenderState { bool mHasOwnOffset; }; +enum ScaleMode { + SCALE_NONE, + SCALE_STRETCH, + SCALE_SENTINEL +// Unimplemented - SCALE_PRESERVE_ASPECT_RATIO_CONTAIN +}; + } // namespace } // namespace diff --git a/gfx/layers/YCbCrImageDataSerializer.h b/gfx/layers/YCbCrImageDataSerializer.h index ae32676c1e47d..af451d90167ca 100644 --- a/gfx/layers/YCbCrImageDataSerializer.h +++ b/gfx/layers/YCbCrImageDataSerializer.h @@ -12,6 +12,7 @@ #include "base/basictypes.h" #include "Shmem.h" #include "gfxPoint.h" +#include "ImageTypes.h" namespace mozilla { namespace ipc { diff --git a/gfx/layers/ipc/LayerTransaction.ipdlh b/gfx/layers/ipc/LayerTransaction.ipdlh index 38acc011018d6..ce9f4e6e6ac6b 100644 --- a/gfx/layers/ipc/LayerTransaction.ipdlh +++ b/gfx/layers/ipc/LayerTransaction.ipdlh @@ -33,7 +33,7 @@ using mozilla::dom::ScreenOrientation; using mozilla::layers::TextureInfo; using mozilla::LayerMargin; using mozilla::LayerPoint; -using mozilla::layers::ImageLayer::ScaleMode; +using mozilla::layers::ScaleMode; using mozilla::layers::DiagnosticTypes; namespace mozilla { diff --git a/layout/generic/nsObjectFrame.cpp b/layout/generic/nsObjectFrame.cpp index c0a4a300cf029..50d064ddfecdc 100644 --- a/layout/generic/nsObjectFrame.cpp +++ b/layout/generic/nsObjectFrame.cpp @@ -1617,7 +1617,7 @@ nsObjectFrame::BuildLayer(nsDisplayListBuilder* aBuilder, } #endif - imglayer->SetScaleToSize(size, ImageLayer::SCALE_STRETCH); + imglayer->SetScaleToSize(size, SCALE_STRETCH); imglayer->SetContainer(container); gfxPattern::GraphicsFilter filter = nsLayoutUtils::GetGraphicsFilterForFrame(this); diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h index 087753a71ee47..49a6f5aea442a 100644 --- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h +++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h @@ -30,9 +30,7 @@ #ifdef MOZILLA_INTERNAL_API #include "mozilla/net/DataChannel.h" -#include "Layers.h" #include "VideoUtils.h" -#include "ImageLayers.h" #include "VideoSegment.h" #include "nsNSSShutDown.h" #else diff --git a/view/src/nsViewManager.cpp b/view/src/nsViewManager.cpp index f35fe12aa1c58..099c5b31a0645 100644 --- a/view/src/nsViewManager.cpp +++ b/view/src/nsViewManager.cpp @@ -25,6 +25,7 @@ #include "mozilla/Preferences.h" #include "nsContentUtils.h" // for nsAutoScriptBlocker #include "nsLayoutUtils.h" +#include "Layers.h" #include "mozilla/layers/Compositor.h" /**