Bug 904539 - Don't #include ImageLoader.h in nsIFrame.h. r=roc
authorMarkus Stange <mstange@themasta.com>
Wed, 14 Aug 2013 13:29:11 +0200
changeset 142633 886ac3dd391fded3394e283090066a4a03d34294
parent 142632 7532cb4b2e4b2605a68bbff860d473b63961eebb
child 142634 63faf921fa5ccd06ae6fb7e72952a7bacb0789b4
push id25104
push useremorley@mozilla.com
push dateThu, 15 Aug 2013 10:56:09 +0000
treeherdermozilla-central@31c08ca022b3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs904539
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 904539 - Don't #include ImageLoader.h in nsIFrame.h. r=roc
layout/generic/nsFrame.cpp
layout/generic/nsIFrame.h
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -3532,16 +3532,31 @@ nsIFrame::ContentOffsets nsIFrame::GetCo
   // to the same visual position?
 }
 
 nsIFrame::ContentOffsets nsFrame::CalcContentOffsetsFromFramePoint(nsPoint aPoint)
 {
   return OffsetsForSingleFrame(this, aPoint);
 }
 
+void
+nsIFrame::AssociateImage(const nsStyleImage& aImage, nsPresContext* aPresContext)
+{
+  if (aImage.GetType() != eStyleImageType_Image) {
+    return;
+  }
+
+  imgIRequest *req = aImage.GetImageData();
+  mozilla::css::ImageLoader* loader =
+    aPresContext->Document()->StyleImageLoader();
+
+  // If this fails there's not much we can do ...
+  loader->AssociateRequestToFrame(req, this);
+}
+
 NS_IMETHODIMP
 nsFrame::GetCursor(const nsPoint& aPoint,
                    nsIFrame::Cursor& aCursor)
 {
   FillCursorInformationFromStyle(StyleUserInterface(), aCursor);
   if (NS_STYLE_CURSOR_AUTO == aCursor.mCursor) {
     // If this is editable, I-beam cursor is better for most elements.
     aCursor.mCursor =
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -25,17 +25,16 @@
 #include "nsStyleContext.h"
 #include "nsStyleStruct.h"
 #include "nsStyleStructFwd.h"
 #include "nsHTMLReflowMetrics.h"
 #include "nsFrameList.h"
 #include "nsIContent.h"
 #include "nsAlgorithm.h"
 #include "mozilla/layout/FrameChildList.h"
-#include "mozilla/css/ImageLoader.h"
 #include "FramePropertyTable.h"
 #include "mozilla/TypedEnum.h"
 #include "nsDirection.h"
 #include <algorithm>
 #include "nsITheme.h"
 
 #ifdef ACCESSIBILITY
 #include "mozilla/a11y/AccTypes.h"
@@ -1361,29 +1360,17 @@ public:
   virtual ContentOffsets GetContentOffsetsFromPointExternal(nsPoint aPoint,
                                                             uint32_t aFlags = 0)
   { return GetContentOffsetsFromPoint(aPoint, aFlags); }
 
   /**
    * Ensure that aImage gets notifed when the underlying image request loads
    * or animates.
    */
-  void AssociateImage(const nsStyleImage& aImage, nsPresContext* aPresContext)
-  {
-    if (aImage.GetType() != eStyleImageType_Image) {
-      return;
-    }
-
-    imgIRequest *req = aImage.GetImageData();
-    mozilla::css::ImageLoader* loader =
-      aPresContext->Document()->StyleImageLoader();
-
-    // If this fails there's not much we can do ...
-    loader->AssociateRequestToFrame(req, this);
-  }
+  void AssociateImage(const nsStyleImage& aImage, nsPresContext* aPresContext);
 
   /**
    * This structure holds information about a cursor. mContainer represents a
    * loaded image that should be preferred. If it is not possible to use it, or
    * if it is null, mCursor should be used.
    */
   struct MOZ_STACK_CLASS Cursor {
     nsCOMPtr<imgIContainer> mContainer;