Bug 837000: Remove nsBlockReflowState.h's essentially-unnecessary #include of nsBlockFrame.h (and related cleanup). r=dbaron
authorDaniel Holbert <dholbert@cs.stanford.edu>
Mon, 11 Feb 2013 17:52:55 -0800
changeset 131453 e9f2886c0179a646f1927b2d0c732507fd57431c
parent 131452 1052782fd20d73ea0837b01554fa270bd6a85e17
child 131454 26cfbd9ed00ce53a0a2e09c72ee2a572c11a7628
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs837000
milestone21.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 837000: Remove nsBlockReflowState.h's essentially-unnecessary #include of nsBlockFrame.h (and related cleanup). r=dbaron
layout/generic/nsBlockReflowState.cpp
layout/generic/nsBlockReflowState.h
layout/generic/nsTextFrameThebes.cpp
--- a/layout/generic/nsBlockReflowState.cpp
+++ b/layout/generic/nsBlockReflowState.cpp
@@ -1,20 +1,21 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 // vim:cindent:ts=2:et:sw=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/. */
 
 /* state used in reflow of block frames */
 
+#include "nsBlockReflowState.h"
+
 #include "mozilla/DebugOnly.h"
 
 #include "nsBlockReflowContext.h"
-#include "nsBlockReflowState.h"
 #include "nsBlockFrame.h"
 #include "nsLineLayout.h"
 #include "nsPresContext.h"
 #include "nsGkAtoms.h"
 #include "nsIFrame.h"
 #include "nsFrameManager.h"
 #include "mozilla/AutoRestore.h"
 #include "FrameLayerBuilder.h"
@@ -349,16 +350,24 @@ nsBlockReflowState::SetupPushedFloatList
     // reordered into the correct order again.
     // (nsBlockFrame::ReflowDirtyLines ensures that any lines with
     // pushed floats are reflowed.)
     mPushedFloats = mBlock->EnsurePushedFloats();
     SetFlag(BRS_PROPTABLE_FLOATCLIST, true);
   }
 }
 
+void
+nsBlockReflowState::AppendPushedFloat(nsIFrame* aFloatCont)
+{
+  SetupPushedFloatList();
+  aFloatCont->AddStateBits(NS_FRAME_IS_PUSHED_FLOAT);
+  mPushedFloats->AppendFrame(mBlock, aFloatCont);
+}
+
 /**
  * Restore information about floats into the float manager for an
  * incremental reflow, and simultaneously push the floats by
  * |aDeltaY|, which is the amount |aLine| was pushed relative to its
  * parent.  The recovery of state is one of the things that makes
  * incremental reflow O(N^2) and this state should really be kept
  * around, attached to the frame tree.
  */
--- a/layout/generic/nsBlockReflowState.h
+++ b/layout/generic/nsBlockReflowState.h
@@ -6,17 +6,20 @@
 /* state used in reflow of block frames */
 
 #ifndef nsBlockReflowState_h__
 #define nsBlockReflowState_h__
 
 #include "nsFloatManager.h"
 #include "nsLineBox.h"
 #include "nsFrameList.h"
-#include "nsBlockFrame.h"
+#include "nsHTMLReflowState.h"
+
+class nsBlockFrame;
+class nsOverflowContinuationTracker;
 
   // block reflow state flags
 #define BRS_UNCONSTRAINEDHEIGHT   0x00000001
 #define BRS_ISTOPMARGINROOT       0x00000002  // Is this frame a root for top/bottom margin collapsing?
 #define BRS_ISBOTTOMMARGINROOT    0x00000004
 #define BRS_APPLYTOPMARGIN        0x00000008  // See ShouldApplyTopMargin
 #define BRS_ISFIRSTINFLOW         0x00000010
 // Set when mLineAdjacentToTop is valid
@@ -183,21 +186,17 @@ public:
   // Continuation out-of-flow float frames that need to move to our
   // next in flow are placed here during reflow.  It's a pointer to
   // a frame list stored in the block's property table.
   nsFrameList *mPushedFloats;
   // This method makes sure pushed floats are accessible to
   // StealFrame. Call it before adding any frames to mPushedFloats.
   void SetupPushedFloatList();
   // Use this method to append to mPushedFloats.
-  void AppendPushedFloat(nsIFrame* aFloatCont) {
-    SetupPushedFloatList();
-    aFloatCont->AddStateBits(NS_FRAME_IS_PUSHED_FLOAT);
-    mPushedFloats->AppendFrame(mBlock, aFloatCont);
-  }
+  void AppendPushedFloat(nsIFrame* aFloatCont);
 
   // Track child overflow continuations.
   nsOverflowContinuationTracker* mOverflowTracker;
 
   //----------------------------------------
 
   // This state is "running" state updated by the reflow of each line
   // in the block. This same state is "recovered" when a line is not
--- a/layout/generic/nsTextFrameThebes.cpp
+++ b/layout/generic/nsTextFrameThebes.cpp
@@ -1,23 +1,26 @@
 /* -*- 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/. */
 
 /* rendering object for textual content of elements */
 
+#include "nsTextFrame.h"
+
 #include <cmath> // for std::abs(float/double)
 #include <cstdlib> // for std::abs(int/long)
 
 #include "mozilla/Attributes.h"
 #include "mozilla/DebugOnly.h"
 #include "mozilla/Likely.h"
 
 #include "nsCOMPtr.h"
+#include "nsBlockFrame.h"
 #include "nsHTMLParts.h"
 #include "nsCRT.h"
 #include "nsSplittableFrame.h"
 #include "nsLineLayout.h"
 #include "nsString.h"
 #include "nsUnicharUtils.h"
 #include "nsPresContext.h"
 #include "nsIContent.h"
@@ -39,17 +42,16 @@
 #include "nsDisplayList.h"
 #include "nsFrame.h"
 #include "nsPlaceholderFrame.h"
 #include "nsTextFrameUtils.h"
 #include "nsTextRunTransformations.h"
 #include "nsFrameManager.h"
 #include "nsTextFrameTextRunCache.h"
 #include "nsExpirationTracker.h"
-#include "nsTextFrame.h"
 #include "nsUnicodeProperties.h"
 #include "nsUnicharUtilCIID.h"
 
 #include "nsTextFragment.h"
 #include "nsGkAtoms.h"
 #include "nsFrameSelection.h"
 #include "nsISelection.h"
 #include "nsIDOMRange.h"