Bug 908778 - Don't #include gfxASurface.h in nsIFrame.h; r=mats
authorEhsan Akhgari <ehsan.akhgari@gmail.com>
Fri, 23 Aug 2013 18:16:16 -0400
changeset 144174 d4161ac800dd0f794aa31443e786749c0682b9b0
parent 144173 68d4e2efd5ab04080cd1e14c6b4bf369dda9a334
child 144175 d086ec92b7e0cca48b17c5fcf441c91b57f589c0
push id25153
push userphilringnalda@gmail.com
push dateSun, 25 Aug 2013 15:20:47 +0000
treeherdermozilla-central@133348d717a1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmats
bugs908778
milestone26.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 908778 - Don't #include gfxASurface.h in nsIFrame.h; r=mats
layout/generic/nsFrame.cpp
layout/generic/nsIFrame.h
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -69,16 +69,17 @@
 #include "nsDeckFrame.h"
 #include "nsSubDocumentFrame.h"
 #include "nsSVGTextFrame2.h"
 
 #include "gfxContext.h"
 #include "nsRenderingContext.h"
 #include "nsAbsoluteContainingBlock.h"
 #include "nsFontInflationData.h"
+#include "gfxASurface.h"
 
 #include "mozilla/Preferences.h"
 #include "mozilla/LookAndFeel.h"
 #include "mozilla/css/ImageLoader.h"
 #include "mozilla/gfx/Tools.h"
 
 using namespace mozilla;
 using namespace mozilla::layers;
@@ -8115,16 +8116,22 @@ nsIFrame::CreateOwnLayerIfNeeded(nsDispl
 
 bool
 nsIFrame::IsSelected() const
 {
   return (GetContent() && GetContent()->IsSelectionDescendant()) ?
     IsFrameSelected() : false;
 }
 
+void
+nsIFrame::DestroySurface(void* aPropertyValue)
+{
+  static_cast<gfxASurface*>(aPropertyValue)->Release();
+}
+
 // Box layout debugging
 #ifdef DEBUG_REFLOW
 int32_t gIndent2 = 0;
 
 void
 nsAdaptorAddIndents()
 {
     for(int32_t i=0; i < gIndent2; i++)
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -31,17 +31,16 @@
 #include "nsAlgorithm.h"
 #include "mozilla/layout/FrameChildList.h"
 #include "FramePropertyTable.h"
 #include "mozilla/TypedEnum.h"
 #include "nsDirection.h"
 #include <algorithm>
 #include "nsITheme.h"
 #include "gfx3DMatrix.h"
-#include "gfxASurface.h"
 
 #ifdef ACCESSIBILITY
 #include "mozilla/a11y/AccTypes.h"
 #endif
 
 /**
  * New rules of reflow:
  * 1. you get a WillReflow() followed by a Reflow() followed by a DidReflow() in order
@@ -888,20 +887,17 @@ public:
     delete static_cast<nsPoint*>(aPropertyValue);
   }
 
   static void DestroyOverflowAreas(void* aPropertyValue)
   {
     delete static_cast<nsOverflowAreas*>(aPropertyValue);
   }
 
-  static void DestroySurface(void* aPropertyValue)
-  {
-    static_cast<gfxASurface*>(aPropertyValue)->Release();
-  }
+  static void DestroySurface(void* aPropertyValue);
 
 #ifdef _MSC_VER
 // XXX Workaround MSVC issue by making the static FramePropertyDescriptor
 // non-const.  See bug 555727.
 #define NS_PROPERTY_DESCRIPTOR_CONST
 #else
 #define NS_PROPERTY_DESCRIPTOR_CONST const
 #endif