Bug 897540 - Reduce includes in nsDeviceContext.h; r=roc
authorMs2ger <ms2ger@gmail.com>
Fri, 02 Aug 2013 09:04:22 +0200
changeset 140991 6088be7ecfea76a298f88d5b8e475076d7fbfa24
parent 140990 15c0ae74266f5703a5be69f9deb86a685f84dae3
child 140992 0151cd1dba75b357983543dc552ac724ee9d8827
push id19
push useremorley@mozilla.com
push dateFri, 02 Aug 2013 12:51:45 +0000
treeherderb2g-inbound@09a8e6c3e1e2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs897540
milestone25.0a1
Bug 897540 - Reduce includes in nsDeviceContext.h; r=roc
content/svg/content/src/SVGPathElement.cpp
content/svg/content/src/nsSVGPathGeometryElement.h
gfx/layers/client/ClientLayerManager.h
gfx/src/nsDeviceContext.cpp
gfx/src/nsDeviceContext.h
layout/base/Units.h
layout/base/nsPresShell.cpp
widget/android/nsAppShell.cpp
--- a/content/svg/content/src/SVGPathElement.cpp
+++ b/content/svg/content/src/SVGPathElement.cpp
@@ -1,22 +1,25 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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 "nsGkAtoms.h"
+#include "mozilla/dom/SVGPathElement.h"
+
+#include <algorithm>
+
 #include "DOMSVGPathSeg.h"
 #include "DOMSVGPathSegList.h"
+#include "DOMSVGPoint.h"
+#include "gfxPath.h"
+#include "mozilla/dom/SVGPathElementBinding.h"
 #include "nsCOMPtr.h"
 #include "nsContentUtils.h"
-#include "mozilla/dom/SVGPathElement.h"
-#include "DOMSVGPoint.h"
-#include <algorithm>
-#include "mozilla/dom/SVGPathElementBinding.h"
+#include "nsGkAtoms.h"
 
 class gfxContext;
 
 NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Path)
 
 namespace mozilla {
 namespace dom {
 
--- a/content/svg/content/src/nsSVGPathGeometryElement.h
+++ b/content/svg/content/src/nsSVGPathGeometryElement.h
@@ -3,16 +3,17 @@
  * 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/. */
 
 #ifndef __NS_SVGPATHGEOMETRYELEMENT_H__
 #define __NS_SVGPATHGEOMETRYELEMENT_H__
 
 #include "SVGGraphicsElement.h"
 
+class gfxFlattenedPath;
 struct gfxMatrix;
 template <class E> class nsTArray;
 
 struct nsSVGMark {
   enum Type {
     eStart,
     eMid,
     eEnd,
--- a/gfx/layers/client/ClientLayerManager.h
+++ b/gfx/layers/client/ClientLayerManager.h
@@ -7,16 +7,18 @@
 #define GFX_CLIENTLAYERMANAGER_H
 
 #include "Layers.h"
 #include "mozilla/layers/ShadowLayers.h"
 
 namespace mozilla {
 namespace layers {
 
+class CompositorChild;
+
 class ClientLayerManager : public LayerManager,
                            public ShadowLayerForwarder
 {
   typedef nsTArray<nsRefPtr<Layer> > LayerRefArray;
 
 public:
   ClientLayerManager(nsIWidget* aWidget);
   virtual ~ClientLayerManager();
--- a/gfx/src/nsDeviceContext.cpp
+++ b/gfx/src/nsDeviceContext.cpp
@@ -1,29 +1,32 @@
 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* 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 "nsDeviceContext.h"
+
+#include <algorithm>
+
+#include "gfxImageSurface.h"
+#include "mozilla/Attributes.h"
+#include "mozilla/Preferences.h"
+#include "mozilla/Services.h"
 #include "nsCRT.h"
 #include "nsFontMetrics.h"
-#include "nsRenderingContext.h"
-#include "nsIWidget.h"
-
-#include "mozilla/Attributes.h"
-#include "mozilla/Services.h"
-#include "mozilla/Preferences.h"
-#include "nsIServiceManager.h"
+#include "nsIDeviceContextSpec.h"
 #include "nsILanguageAtomService.h"
 #include "nsIObserver.h"
 #include "nsIObserverService.h"
-
-#include "gfxImageSurface.h"
-#include <algorithm>
+#include "nsIScreen.h"
+#include "nsIScreenManager.h"
+#include "nsIServiceManager.h"
+#include "nsIWidget.h"
+#include "nsRenderingContext.h"
 
 #if !XP_MACOSX
 #include "gfxPDFSurface.h"
 #endif
 
 #ifdef MOZ_WIDGET_GTK
 #include "gfxPSSurface.h"
 #elif XP_WIN
--- a/gfx/src/nsDeviceContext.h
+++ b/gfx/src/nsDeviceContext.h
@@ -1,26 +1,34 @@
 /* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* 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/. */
 
 #ifndef _NS_DEVICECONTEXT_H_
 #define _NS_DEVICECONTEXT_H_
 
+#include "gfxTypes.h"
+#include "nsAutoPtr.h"
 #include "nsCOMPtr.h"
-#include "nsIDeviceContextSpec.h"
-#include "nsIScreenManager.h"
-#include "nsIWidget.h"
 #include "nsCoord.h"
-#include "gfxContext.h"
+#include "nsMathUtils.h"
 
+class gfxASurface;
+class gfxUserFontSet;
+class nsFont;
+class nsFontCache;
+class nsFontMetrics;
 class nsIAtom;
-class nsFontCache;
-class gfxUserFontSet;
+class nsIDeviceContextSpec;
+class nsIScreen;
+class nsIScreenManager;
+class nsIWidget;
+class nsRect;
+class nsRenderingContext;
 
 class nsDeviceContext
 {
 public:
     nsDeviceContext();
     ~nsDeviceContext();
 
     NS_INLINE_DECL_REFCOUNTING(nsDeviceContext)
--- a/layout/base/Units.h
+++ b/layout/base/Units.h
@@ -6,16 +6,17 @@
 
 #ifndef MOZ_UNITS_H_
 #define MOZ_UNITS_H_
 
 #include "mozilla/gfx/Point.h"
 #include "mozilla/gfx/Rect.h"
 #include "mozilla/gfx/ScaleFactor.h"
 #include "nsDeviceContext.h"
+#include "nsRect.h"
 
 namespace mozilla {
 
 struct CSSPixel;
 struct LayoutDevicePixel;
 struct LayerPixel;
 struct ScreenPixel;
 
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -160,35 +160,34 @@
 #include "nsITreeBoxObject.h"
 #include "nsMenuPopupFrame.h"
 #include "nsITreeColumns.h"
 #include "nsIDOMXULMultSelectCntrlEl.h"
 #include "nsIDOMXULSelectCntrlItemEl.h"
 #include "nsIDOMXULMenuListElement.h"
 
 #endif
-#include "nsPlaceholderFrame.h"
-#include "nsCanvasFrame.h"
-
-// Content viewer interfaces
-#include "nsIContentViewer.h"
+
+#include "GeckoProfiler.h"
+#include "gfxPlatform.h"
 #include "imgIEncoder.h"
-#include "gfxPlatform.h"
-
+#include "Layers.h"
+#include "LayerTreeInvalidation.h"
+#include "mozilla/css/ImageLoader.h"
+#include "mozilla/layers/Compositor.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/Telemetry.h"
-#include "GeckoProfiler.h"
-#include "mozilla/css/ImageLoader.h"
-
-#include "Layers.h"
-#include "mozilla/layers/Compositor.h"
+#include "nsAsyncDOMEvent.h"
+#include "nsCanvasFrame.h"
+#include "nsIContentViewer.h"
+#include "nsIImageLoadingContent.h"
+#include "nsIScreen.h"
+#include "nsIScreenManager.h"
+#include "nsPlaceholderFrame.h"
 #include "nsTransitionManager.h"
-#include "LayerTreeInvalidation.h"
-#include "nsAsyncDOMEvent.h"
-#include "nsIImageLoadingContent.h"
 
 #define ANCHOR_SCROLL_FLAGS \
   (nsIPresShell::SCROLL_OVERFLOW_HIDDEN | nsIPresShell::SCROLL_NO_PARENT_FRAMES)
 
 using namespace mozilla;
 using namespace mozilla::css;
 using namespace mozilla::dom;
 using namespace mozilla::layers;
--- a/widget/android/nsAppShell.cpp
+++ b/widget/android/nsAppShell.cpp
@@ -1,21 +1,22 @@
 /* -*- Mode: c++; tab-width: 40; indent-tabs-mode: nil; c-basic-offset: 4; -*- */
 /* 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/. */
 
-// Make sure the order of included headers
+#include "nsAppShell.h"
+
 #include "base/basictypes.h"
 #include "nspr/prtypes.h"
 #include "base/message_loop.h"
 #include "base/task.h"
-
 #include "mozilla/Hal.h"
-#include "nsAppShell.h"
+#include "nsIScreen.h"
+#include "nsIScreenManager.h"
 #include "nsWindow.h"
 #include "nsThreadUtils.h"
 #include "nsICommandLineRunner.h"
 #include "nsIObserverService.h"
 #include "nsIAppStartup.h"
 #include "nsIGeolocationProvider.h"
 #include "nsCacheService.h"
 #include "nsIDOMEventListener.h"