Bug 1550629 - Fix comments mentioning GetAvailableSpace. r=dholbert
authorTing-Yu Lin <tlin@mozilla.com>
Fri, 10 May 2019 21:06:48 +0000
changeset 532283 41a34b64ca1798f76f0781978d0d1c9d764d9a1a
parent 532282 3665b343720dbbdf145769089959b4cecaf81c2d
child 532284 dc36541fb06201f266cf9b329bb78c6180bdc082
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1550629, 25888
milestone68.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 1550629 - Fix comments mentioning GetAvailableSpace. r=dholbert GetAvailableSpace was renamed to GetFloatAvailableSpace in bug 25888. DONTBUILD because this is a comment-only change. Differential Revision: https://phabricator.services.mozilla.com/D30581
layout/generic/BlockReflowInput.cpp
layout/generic/BlockReflowInput.h
layout/generic/nsBlockFrame.cpp
layout/generic/nsBlockFrame.h
--- a/layout/generic/BlockReflowInput.cpp
+++ b/layout/generic/BlockReflowInput.cpp
@@ -209,18 +209,18 @@ static nscoord GetBEndMarginClone(nsIFra
     return os.ComputedLogicalMargin()
         .ConvertTo(aWritingMode, aFrame->GetWritingMode())
         .BEnd(aWritingMode);
   }
   return 0;
 }
 
 // Compute the amount of available space for reflowing a block frame
-// at the current Y coordinate. This method assumes that
-// GetAvailableSpace has already been called.
+// at the current block-direction coordinate. This method assumes that
+// GetFloatAvailableSpace has already been called.
 void BlockReflowInput::ComputeBlockAvailSpace(
     nsIFrame* aFrame, const nsFlowAreaRect& aFloatAvailableSpace,
     bool aBlockAvoidsFloats, LogicalRect& aResult) {
 #ifdef REALLY_NOISY_REFLOW
   printf("CBAS frame=%p has floats %d\n", aFrame,
          aFloatAvailableSpace.HasFloats());
 #endif
   WritingMode wm = mReflowInput.GetWritingMode();
--- a/layout/generic/BlockReflowInput.h
+++ b/layout/generic/BlockReflowInput.h
@@ -207,23 +207,23 @@ class BlockReflowInput {
    * Retrieve the block-axis content size "consumed" by any prev-in-flows.
    * @note the value is cached so subsequent calls will return the same value
    */
   nscoord ConsumedBSize();
 
   // Reconstruct the previous block-end margin that goes before |aLine|.
   void ReconstructMarginBefore(nsLineList::iterator aLine);
 
-  // Caller must have called GetAvailableSpace for the correct position
+  // Caller must have called GetFloatAvailableSpace for the correct position
   // (which need not be the current mBCoord).
   void ComputeReplacedBlockOffsetsForFloats(
       nsIFrame* aFrame, const mozilla::LogicalRect& aFloatAvailableSpace,
       nscoord& aIStartResult, nscoord& aIEndResult) const;
 
-  // Caller must have called GetAvailableSpace for the current mBCoord
+  // Caller must have called GetFloatAvailableSpace for the current mBCoord
   void ComputeBlockAvailSpace(nsIFrame* aFrame,
                               const nsFlowAreaRect& aFloatAvailableSpace,
                               bool aBlockAvoidsFloats,
                               mozilla::LogicalRect& aResult);
 
   void RecoverStateFrom(nsLineList::iterator aLine, nscoord aDeltaBCoord);
 
   void AdvanceToNextLine() {
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -3506,20 +3506,19 @@ void nsBlockFrame::ReflowBlockFrame(Bloc
           // Compute the collapsed margin again, ignoring the incoming margin
           // this time
           mayNeedRetry = false;
           brc.ComputeCollapsedBStartMargin(reflowInput, &aState.mPrevBEndMargin,
                                            clearanceFrame, &mayNeedRetry);
         }
       }
 
-      // Temporarily advance the running Y value so that the
-      // GetAvailableSpace method will return the right available
-      // space. This undone as soon as the horizontal margins are
-      // computed.
+      // Temporarily advance the running block-direction value so that the
+      // GetFloatAvailableSpace method will return the right available space.
+      // This undone as soon as the horizontal margins are computed.
       bStartMargin = aState.mPrevBEndMargin.get();
 
       if (treatWithClearance) {
         nscoord currentBCoord = aState.mBCoord;
         // advance mBCoord to the clear position.
         aState.mBCoord =
             aState.ClearFloats(aState.mBCoord, breakType, replacedBlock);
 
@@ -4260,17 +4259,18 @@ void nsBlockFrame::DoReflowInlineFrames(
              LineReflowStatus::RedoNoPull != lineReflowStatus) {
     // If we are propagating out a break-before status then there is
     // no point in placing the line.
     if (!aState.mReflowStatus.IsInlineBreakBefore()) {
       if (!PlaceLine(aState, aLineLayout, aLine, aFloatStateBeforeLine,
                      aFloatAvailableSpace, aAvailableSpaceBSize,
                      aKeepReflowGoing)) {
         lineReflowStatus = LineReflowStatus::RedoMoreFloats;
-        // PlaceLine already called GetAvailableSpaceForBSize for us.
+        // PlaceLine already called GetFloatAvailableSpaceForBSize or its
+        // variant for us.
       }
     }
   }
 #ifdef DEBUG
   if (gNoisyReflow) {
     printf("Line reflow status = %s\n",
            LineReflowStatusToString(lineReflowStatus));
   }
--- a/layout/generic/nsBlockFrame.h
+++ b/layout/generic/nsBlockFrame.h
@@ -360,17 +360,17 @@ class nsBlockFrame : public nsContainerF
    * around floats intruding on it from the outside.  (aFrame need not
    * be a block frame, but if it's not, the result will be false.)
    */
   static bool BlockCanIntersectFloats(nsIFrame* aFrame);
 
   /**
    * Returns the inline size that needs to be cleared past floats for
    * blocks that cannot intersect floats.  aState must already have
-   * GetAvailableSpace called on it for the block-dir position that we
+   * GetFloatAvailableSpace called on it for the block-dir position that we
    * care about (which need not be its current mBCoord)
    */
   struct ReplacedElementISizeToClear {
     // Note that we care about the inline-start margin but can ignore
     // the inline-end margin.
     nscoord marginIStart, borderBoxISize;
   };
   static ReplacedElementISizeToClear ISizeToClearPastFloats(