Bug 1277129 Part 2a - Move nsBlockReflowState into mozilla namespace. r=dbaron
authorTing-Yu Lin <tlin@mozilla.com>
Thu, 21 Jul 2016 18:36:36 +0800
changeset 306065 f70b71911f7f1d95e84366d19b929890c7568fda
parent 306064 7fa3859b444c9a45f642e344d2ad961873bdaf8e
child 306066 3ae833bfcad42f7cb0671f7c645b2c1d9c8b2319
push id30474
push usercbook@mozilla.com
push dateThu, 21 Jul 2016 14:25:10 +0000
treeherdermozilla-central@6b180266ac16 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs1277129
milestone50.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 1277129 Part 2a - Move nsBlockReflowState into mozilla namespace. r=dbaron MozReview-Commit-ID: GNEgxqqBDAH
layout/generic/nsBlockFrame.h
layout/generic/nsBlockReflowContext.h
layout/generic/nsBlockReflowState.h
layout/generic/nsLineLayout.h
--- a/layout/generic/nsBlockFrame.h
+++ b/layout/generic/nsBlockFrame.h
@@ -35,19 +35,21 @@ enum LineReflowStatus {
   // We need to reflow the line again at a lower vertical postion where there
   // may be more horizontal space due to different float configuration.
   LINE_REFLOW_REDO_NEXT_BAND,
   // The line did not fit in the available vertical space. Try pushing it to
   // the next page or column if it's not the first line on the current page/column.
   LINE_REFLOW_TRUNCATED
 };
 
-class nsBlockReflowState;
 class nsBlockInFlowLineIterator;
 class nsBulletFrame;
+namespace mozilla {
+class nsBlockReflowState;
+} // namespace mozilla
 
 /**
  * Some invariants:
  * -- The overflow out-of-flows list contains the out-of-
  * flow frames whose placeholders are in the overflow list.
  * -- A given piece of content has at most one placeholder
  * frame in a block's normal child list.
  * -- While a block is being reflowed, and from then until
@@ -70,16 +72,18 @@ class nsBulletFrame;
 
 /*
  * Base class for block and inline frames.
  * The block frame has an additional child list, kAbsoluteList, which
  * contains the absolutely positioned frames.
  */
 class nsBlockFrame : public nsContainerFrame
 {
+  using nsBlockReflowState = mozilla::nsBlockReflowState;
+
 public:
   NS_DECL_QUERYFRAME_TARGET(nsBlockFrame)
   NS_DECL_FRAMEARENA_HELPERS
 
   typedef nsLineList::iterator                  line_iterator;
   typedef nsLineList::const_iterator            const_line_iterator;
   typedef nsLineList::reverse_iterator          reverse_line_iterator;
   typedef nsLineList::const_reverse_iterator    const_reverse_line_iterator;
@@ -883,17 +887,17 @@ protected:
   nscoord mMinWidth, mPrefWidth;
 
   nsLineList mLines;
 
   // List of all floats in this block
   // XXXmats blocks rarely have floats, make it a frame property
   nsFrameList mFloats;
 
-  friend class nsBlockReflowState;
+  friend class mozilla::nsBlockReflowState;
   friend class nsBlockInFlowLineIterator;
 
 #ifdef DEBUG
 public:
   static bool gLamePaintMetrics;
   static bool gLameReflowMetrics;
   static bool gNoisy;
   static bool gNoisyDamageRepair;
--- a/layout/generic/nsBlockReflowContext.h
+++ b/layout/generic/nsBlockReflowContext.h
@@ -7,24 +7,27 @@
 /* class that a parent frame uses to reflow a block frame */
 
 #ifndef nsBlockReflowContext_h___
 #define nsBlockReflowContext_h___
 
 #include "nsIFrame.h"
 #include "nsHTMLReflowMetrics.h"
 
-class nsBlockReflowState;
 class nsLineBox;
 class nsPresContext;
+namespace mozilla {
+class nsBlockReflowState;
+} // namespace mozilla
 
 /**
  * An encapsulation of the state and algorithm for reflowing block frames.
  */
 class nsBlockReflowContext {
+  using nsBlockReflowState = mozilla::nsBlockReflowState;
   using ReflowInput = mozilla::ReflowInput;
 
 public:
   nsBlockReflowContext(nsPresContext* aPresContext,
                        const ReflowInput& aParentRS);
   ~nsBlockReflowContext() { }
 
   void ReflowBlock(const mozilla::LogicalRect& aSpace,
--- a/layout/generic/nsBlockReflowState.h
+++ b/layout/generic/nsBlockReflowState.h
@@ -1,17 +1,17 @@
 /* -*- 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/. */
 
 /* state used in reflow of block frames */
 
-#ifndef nsBlockReflowState_h__
-#define nsBlockReflowState_h__
+#ifndef nsBlockReflowState_h
+#define nsBlockReflowState_h
 
 #include "nsFloatManager.h"
 #include "nsLineBox.h"
 #include "mozilla/ReflowInput.h"
 
 class nsBlockFrame;
 class nsFrameList;
 class nsOverflowContinuationTracker;
@@ -66,16 +66,18 @@ class nsOverflowContinuationTracker;
 #define BRS_LINE_LAYOUT_EMPTY     0x00000080
 #define BRS_ISOVERFLOWCONTAINER   0x00000100
 // Our mPushedFloats list is stored on the blocks' proptable
 #define BRS_PROPTABLE_FLOATCLIST  0x00000200
 // Set when the pref layout.float-fragments-inside-column.enabled is true.
 #define BRS_FLOAT_FRAGMENTS_INSIDE_COLUMN_ENABLED 0x00000400
 #define BRS_LASTFLAG              BRS_FLOAT_FRAGMENTS_INSIDE_COLUMN_ENABLED
 
+namespace mozilla {
+
 // nsBlockReflowState contains additional reflow state information that the
 // block frame uses along with ReflowInput. Like ReflowInput, this
 // is read-only data that is passed down from a parent frame to its children.
 class nsBlockReflowState {
   using ReflowInput = mozilla::ReflowInput;
 
 public:
   nsBlockReflowState(const ReflowInput& aReflowState,
@@ -373,9 +375,11 @@ private:
   bool CanPlaceFloat(nscoord aFloatISize,
                      const nsFlowAreaRect& aFloatAvailableSpace);
 
   void PushFloatPastBreak(nsIFrame* aFloat);
 
   void RecoverFloats(nsLineList::iterator aLine, nscoord aDeltaBCoord);
 };
 
-#endif // nsBlockReflowState_h__
+}; // namespace mozilla
+
+#endif // nsBlockReflowState_h
--- a/layout/generic/nsLineLayout.h
+++ b/layout/generic/nsLineLayout.h
@@ -23,16 +23,17 @@
 #include "nsBlockReflowState.h"
 #include "nsLineBox.h"
 #include "plarena.h"
 
 class nsFloatManager;
 struct nsStyleText;
 
 class nsLineLayout {
+  using nsBlockReflowState = mozilla::nsBlockReflowState;
   using ReflowInput = mozilla::ReflowInput;
 
 public:
   /**
    * @param aBaseLineLayout the nsLineLayout for ruby base,
    * nullptr if no separate base nsLineLayout is needed.
    */
   nsLineLayout(nsPresContext* aPresContext,