Bug 1291110 Part 1 - Fix log and comment related to float. draft
authorTing-Yu Lin <tlin@mozilla.com>
Mon, 22 Aug 2016 19:41:53 +0800
changeset 435283 7376c3f56d3e94897839a10fa5ba5752e7d2a887
parent 434636 908557c762f798605a2f96e4c943791cbada1b50
child 435284 fa7a8ff8b85cb627c3a2ec9dfda832a076169ea9
push id34984
push userbmo:tlin@mozilla.com
push dateTue, 08 Nov 2016 09:37:37 +0000
bugs1291110
milestone52.0a1
Bug 1291110 Part 1 - Fix log and comment related to float. MozReview-Commit-ID: ICUflMUOsD2
layout/generic/BlockReflowInput.cpp
--- a/layout/generic/BlockReflowInput.cpp
+++ b/layout/generic/BlockReflowInput.cpp
@@ -351,17 +351,17 @@ BlockReflowInput::GetFloatAvailableSpace
   // Keep the inline size >= 0 for compatibility with nsSpaceManager.
   if (result.mRect.ISize(wm) < 0) {
     result.mRect.ISize(wm) = 0;
   }
 
 #ifdef DEBUG
   if (nsBlockFrame::gNoisyReflow) {
     nsFrame::IndentBy(stdout, nsBlockFrame::gNoiseIndent);
-    printf("GetAvailableSpace: band=%d,%d,%d,%d hasfloats=%d\n",
+    printf("%s: band=%d,%d,%d,%d hasfloats=%d\n", __func__,
            result.mRect.IStart(wm), result.mRect.BStart(wm),
            result.mRect.ISize(wm), result.mRect.BSize(wm), result.mHasFloats);
   }
 #endif
   return result;
 }
 
 nsFlowAreaRect
@@ -384,17 +384,17 @@ BlockReflowInput::GetFloatAvailableSpace
   // Keep the width >= 0 for compatibility with nsSpaceManager.
   if (result.mRect.ISize(wm) < 0) {
     result.mRect.ISize(wm) = 0;
   }
 
 #ifdef DEBUG
   if (nsBlockFrame::gNoisyReflow) {
     nsFrame::IndentBy(stdout, nsBlockFrame::gNoiseIndent);
-    printf("GetAvailableSpaceForHeight: space=%d,%d,%d,%d hasfloats=%d\n",
+    printf("%s: space=%d,%d,%d,%d hasfloats=%d\n", __func__,
            result.mRect.IStart(wm), result.mRect.BStart(wm),
            result.mRect.ISize(wm), result.mRect.BSize(wm), result.mHasFloats);
   }
 #endif
   return result;
 }
 
 /*
@@ -609,17 +609,17 @@ BlockReflowInput::AddFloat(nsLineLayout*
   mFloatManager->GetTranslation(oI, oB);
   nscoord dI = oI - mFloatManagerI;
   nscoord dB = oB - mFloatManagerB;
   mFloatManager->Translate(-dI, -dB);
 
   bool placed;
 
   // Now place the float immediately if possible. Otherwise stash it
-  // away in mPendingFloats and place it later.
+  // away in mBelowCurrentLineFloats and place it later.
   // If one or more floats has already been pushed to the next line,
   // don't let this one go on the current line, since that would violate
   // float ordering.
   LogicalRect floatAvailableSpace = GetFloatAvailableSpace().mRect;
   if (mBelowCurrentLineFloats.IsEmpty() &&
       (aLineLayout->LineIsEmpty() ||
        mBlock->ComputeFloatISize(*this, floatAvailableSpace, aFloat)
        <= aAvailableISize)) {