Bug 908778 - Don't #include nsRegion.h in nsIFrame.h; r=mats
authorEhsan Akhgari <ehsan.akhgari@gmail.com>
Fri, 23 Aug 2013 18:16:38 -0400
changeset 158002 d086ec92b7e0cca48b17c5fcf441c91b57f589c0
parent 158001 d4161ac800dd0f794aa31443e786749c0682b9b0
child 158003 7715dfab376ca847ce63f68f7efcd9600e9f9dae
push id407
push userlsblakk@mozilla.com
push dateTue, 03 Dec 2013 03:32:50 +0000
treeherdermozilla-release@babf8c9ebc52 [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 nsRegion.h in nsIFrame.h; r=mats
layout/base/DisplayItemClip.cpp
layout/base/PositionedEventTargeting.cpp
layout/generic/nsFrame.cpp
layout/generic/nsIFrame.h
layout/svg/nsSVGOuterSVGFrame.h
--- a/layout/base/DisplayItemClip.cpp
+++ b/layout/base/DisplayItemClip.cpp
@@ -4,16 +4,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "DisplayItemClip.h"
 
 #include "gfxContext.h"
 #include "nsPresContext.h"
 #include "nsCSSRendering.h"
 #include "nsLayoutUtils.h"
+#include "nsRegion.h"
 
 namespace mozilla {
 
 void
 DisplayItemClip::SetTo(const nsRect& aRect)
 {
   mHaveClipRect = true;
   mClipRect = aRect;
--- a/layout/base/PositionedEventTargeting.cpp
+++ b/layout/base/PositionedEventTargeting.cpp
@@ -6,16 +6,17 @@
 
 #include "mozilla/Preferences.h"
 #include "nsGUIEvent.h"
 #include "nsLayoutUtils.h"
 #include "nsGkAtoms.h"
 #include "nsEventListenerManager.h"
 #include "nsPrintfCString.h"
 #include "mozilla/dom/Element.h"
+#include "nsRegion.h"
 #include <algorithm>
 
 namespace mozilla {
 
 /*
  * The basic goal of FindFrameTargetedByInputEvent() is to find a good
  * target element that can respond to mouse events. Both mouse events and touch
  * events are targeted at this element. Note that even for touch events, we
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -70,16 +70,17 @@
 #include "nsSubDocumentFrame.h"
 #include "nsSVGTextFrame2.h"
 
 #include "gfxContext.h"
 #include "nsRenderingContext.h"
 #include "nsAbsoluteContainingBlock.h"
 #include "nsFontInflationData.h"
 #include "gfxASurface.h"
+#include "nsRegion.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;
@@ -8122,16 +8123,22 @@ nsIFrame::IsSelected() const
 }
 
 void
 nsIFrame::DestroySurface(void* aPropertyValue)
 {
   static_cast<gfxASurface*>(aPropertyValue)->Release();
 }
 
+void
+nsIFrame::DestroyRegion(void* aPropertyValue)
+{
+  delete static_cast<nsRegion*>(aPropertyValue);
+}
+
 // 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
@@ -17,17 +17,16 @@
 
 /* nsIFrame is in the process of being deCOMtaminated, i.e., this file is eventually
    going to be eliminated, and all callers will use nsFrame instead.  At the moment
    we're midway through this process, so you will see inlined functions and member
    variables in this file.  -dwh */
 
 #include <stdio.h>
 #include "nsQueryFrame.h"
-#include "nsRegion.h"
 #include "nsStyleContext.h"
 #include "nsStyleStruct.h"
 #include "nsStyleStructFwd.h"
 #include "nsHTMLReflowMetrics.h"
 #include "nsFrameList.h"
 #include "nsAlgorithm.h"
 #include "mozilla/layout/FrameChildList.h"
 #include "FramePropertyTable.h"
@@ -862,20 +861,17 @@ public:
   virtual nsPoint GetPositionOfChildIgnoringScrolling(nsIFrame* aChild)
   { return aChild->GetPosition(); }
   
   nsPoint GetPositionIgnoringScrolling() {
     return mParent ? mParent->GetPositionOfChildIgnoringScrolling(this)
       : GetPosition();
   }
 
-  static void DestroyRegion(void* aPropertyValue)
-  {
-    delete static_cast<nsRegion*>(aPropertyValue);
-  }
+  static void DestroyRegion(void* aPropertyValue);
 
   static void DestroyMargin(void* aPropertyValue)
   {
     delete static_cast<nsMargin*>(aPropertyValue);
   }
 
   static void DestroyRect(void* aPropertyValue)
   {
--- a/layout/svg/nsSVGOuterSVGFrame.h
+++ b/layout/svg/nsSVGOuterSVGFrame.h
@@ -5,16 +5,17 @@
 
 #ifndef __NS_SVGOUTERSVGFRAME_H__
 #define __NS_SVGOUTERSVGFRAME_H__
 
 #include "mozilla/Attributes.h"
 #include "gfxMatrix.h"
 #include "nsISVGSVGFrame.h"
 #include "nsSVGContainerFrame.h"
+#include "nsRegion.h"
 
 class nsSVGForeignObjectFrame;
 
 ////////////////////////////////////////////////////////////////////////
 // nsSVGOuterSVGFrame class
 
 typedef nsSVGDisplayContainerFrame nsSVGOuterSVGFrameBase;