Bug 908778 - Don't #include nsIContent.h in nsIFrame.h; r=mats
authorEhsan Akhgari <ehsan.akhgari@gmail.com>
Fri, 23 Aug 2013 18:15:45 -0400
changeset 144150 68d4e2efd5ab04080cd1e14c6b4bf369dda9a334
parent 144149 d0fda982e6a5beacdbdb6f59dab6b01ed214c13a
child 144151 d4161ac800dd0f794aa31443e786749c0682b9b0
push id32886
push usereakhgari@mozilla.com
push dateFri, 23 Aug 2013 22:25:51 +0000
treeherdermozilla-inbound@0b02658e1f7c [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 nsIContent.h in nsIFrame.h; r=mats
layout/generic/nsFrame.cpp
layout/generic/nsIFrame.h
layout/style/nsStyleStructInlines.h
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -8108,16 +8108,23 @@ nsIFrame::CreateOwnLayerIfNeeded(nsDispl
                                  nsDisplayList* aList)
 {
   if (GetContent()->HasAttr(kNameSpaceID_None, nsGkAtoms::layer)) {
     aList->AppendNewToTop(new (aBuilder) 
         nsDisplayOwnLayer(aBuilder, this, aList));
   }
 }
 
+bool
+nsIFrame::IsSelected() const
+{
+  return (GetContent() && GetContent()->IsSelectionDescendant()) ?
+    IsFrameSelected() : false;
+}
+
 // 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
@@ -23,17 +23,16 @@
 #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 "nsIContent.h"
 #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"
@@ -78,16 +77,17 @@ class nsILineIterator;
 class nsDisplayListBuilder;
 class nsDisplayListSet;
 class nsDisplayList;
 class gfxSkipChars;
 class gfxSkipCharsIterator;
 class gfxContext;
 class nsLineList_iterator;
 class nsAbsoluteContainingBlock;
+class nsIContent;
 
 struct nsPeekOffsetStruct;
 struct nsPoint;
 struct nsRect;
 struct nsSize;
 struct nsMargin;
 struct CharacterDataChangeInfo;
 
@@ -2415,20 +2415,17 @@ public:
    *       passed in, indicating that it should be used to determine if sides
    *       should be skipped during reflow.
    */
   virtual int GetSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const { return 0; }
 
   /**
    * @returns true if this frame is selected.
    */
-  bool IsSelected() const {
-    return (GetContent() && GetContent()->IsSelectionDescendant()) ?
-      IsFrameSelected() : false;
-  }
+  bool IsSelected() const;
 
   /**
    *  called to discover where this frame, or a parent frame has user-select style
    *  applied, which affects that way that it is selected.
    *    
    *  @param aIsSelectable out param. Set to true if the frame can be selected
    *                       (i.e. is not affected by user-select: none)
    *  @param aSelectStyle  out param. Returns the type of selection style found
--- a/layout/style/nsStyleStructInlines.h
+++ b/layout/style/nsStyleStructInlines.h
@@ -10,16 +10,17 @@
 
 #ifndef nsStyleStructInlines_h_
 #define nsStyleStructInlines_h_
 
 #include "nsIFrame.h"
 #include "nsStyleStruct.h"
 #include "imgIRequest.h"
 #include "imgIContainer.h"
+#include "nsIContent.h"
 
 inline void
 nsStyleBorder::SetBorderImage(imgRequestProxy* aImage)
 {
   mBorderImageSource = aImage;
   mSubImages.Clear();
 }