Bug 1287056 - Group private methods together in nsBlockReflowState.h. r=xidorn
authorTing-Yu Lin <tlin@mozilla.com>
Fri, 15 Jul 2016 15:57:40 +0800
changeset 305114 6e62bf258128e91645787ebecd2e8b896bfe431d
parent 305113 0df542fb3e35fcac86a524f751d3dd804c83b2e0
child 305115 9ee862a030f350e481e3fa3a09d6dc28d4dbf591
push id30630
push usertlin@mozilla.com
push dateSat, 16 Jul 2016 10:07:56 +0000
treeherderautoland@6e62bf258128 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersxidorn
bugs1287056
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 1287056 - Group private methods together in nsBlockReflowState.h. r=xidorn This is to avoid changing the access modifiers. MozReview-Commit-ID: 9kkWeAKelGL
layout/generic/nsBlockReflowState.h
--- a/layout/generic/nsBlockReflowState.h
+++ b/layout/generic/nsBlockReflowState.h
@@ -108,24 +108,19 @@ public:
    * place the float, false if the float did not fit in available
    * space.
    * aLineLayout is null when we are reflowing pushed floats (because
    * they are not associated with a line box).
    */
   bool AddFloat(nsLineLayout*       aLineLayout,
                 nsIFrame*           aFloat,
                 nscoord             aAvailableISize);
-private:
-  bool CanPlaceFloat(nscoord aFloatISize,
-                     const nsFlowAreaRect& aFloatAvailableSpace);
-public:
+
   bool FlowAndPlaceFloat(nsIFrame* aFloat);
-private:
-  void PushFloatPastBreak(nsIFrame* aFloat);
-public:
+
   void PlaceBelowCurrentLineFloats(nsFloatCacheFreeList& aFloats,
                                    nsLineBox* aLine);
 
   // Returns the first coordinate >= aBCoord that clears the
   // floats indicated by aBreakType and has enough inline size between floats
   // (or no floats remaining) to accomodate aReplacedBlock.
   nscoord ClearFloats(nscoord aBCoord, uint8_t aBreakType,
                       nsIFrame *aReplacedBlock = nullptr,
@@ -185,20 +180,16 @@ public:
 
   // Caller must have called GetAvailableSpace for the current mBCoord
   void ComputeBlockAvailSpace(nsIFrame* aFrame,
                               const nsStyleDisplay* aDisplay,
                               const nsFlowAreaRect& aFloatAvailableSpace,
                               bool aBlockAvoidsFloats,
                               mozilla::LogicalRect& aResult);
 
-protected:
-  void RecoverFloats(nsLineList::iterator aLine, nscoord aDeltaBCoord);
-
-public:
   void RecoverStateFrom(nsLineList::iterator aLine, nscoord aDeltaBCoord);
 
   void AdvanceToNextLine() {
     if (GetFlag(BRS_LINE_LAYOUT_EMPTY)) {
       SetFlag(BRS_LINE_LAYOUT_EMPTY, false);
     } else {
       mLineNumber++;
     }
@@ -348,17 +339,17 @@ public:
   // being N^2.
   nsFloatCacheFreeList mBelowCurrentLineFloats;
 
   nscoord mMinLineHeight;
 
   int32_t mLineNumber;
 
   int16_t mFlags;
- 
+
   uint8_t mFloatBreakType;
 
   // The amount of computed block-direction size "consumed" by previous-in-flows.
   nscoord mConsumedBSize;
 
   void SetFlag(uint32_t aFlag, bool aValue)
   {
     NS_ASSERTION(aFlag<=BRS_LASTFLAG, "bad flag");
@@ -370,11 +361,19 @@ public:
     }
   }
 
   bool GetFlag(uint32_t aFlag) const
   {
     NS_ASSERTION(aFlag<=BRS_LASTFLAG, "bad flag");
     return !!(mFlags & aFlag);
   }
+
+private:
+  bool CanPlaceFloat(nscoord aFloatISize,
+                     const nsFlowAreaRect& aFloatAvailableSpace);
+
+  void PushFloatPastBreak(nsIFrame* aFloat);
+
+  void RecoverFloats(nsLineList::iterator aLine, nscoord aDeltaBCoord);
 };
 
 #endif // nsBlockReflowState_h__