Bug 1523061 Part 2 - Remove static ListTag(FILE*, const nsIFrame*). r=dholbert
authorTing-Yu Lin <aethanyc@gmail.com>
Tue, 29 Jan 2019 21:22:14 +0000
changeset 455988 3fd657e4aea9479d9df9e49f68b1ebdce31bd7ff
parent 455987 a9804b2eca4a1c34f9578336affc3c8baf5fa0c6
child 455989 acdd17a4329e63220f8ce84658b585aeb7bc0d92
push id35465
push usershindli@mozilla.com
push dateWed, 30 Jan 2019 04:10:12 +0000
treeherdermozilla-central@9e919be867b3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1523061, 1277129
milestone67.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 1523061 Part 2 - Remove static ListTag(FILE*, const nsIFrame*). r=dholbert Many of the modifications are guarded by #ifdefs. I verify them locally by manually define them in nsBlockDebugFlags.h and nsLinelayout.cpp. Note that I replace "mFrame" with "frame" in lines guarded by NOISY_BLOCK_DIR_MARGINS in nsBlockFrame.cpp because they were incorrectly renamed in Bug 1277129 Part 6a. https://hg.mozilla.org/mozilla-central/rev/a70b04f074fc Differential Revision: https://phabricator.services.mozilla.com/D17733
layout/base/nsCSSFrameConstructor.cpp
layout/generic/BlockReflowInput.cpp
layout/generic/nsBlockFrame.cpp
layout/generic/nsBlockReflowContext.cpp
layout/generic/nsFrame.cpp
layout/generic/nsIFrame.h
layout/generic/nsLineLayout.cpp
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -6707,17 +6707,17 @@ void nsCSSFrameConstructor::ContentAppen
     RecreateFramesForContent(parentFrame->GetContent(), InsertionKind::Async);
     LAYOUT_PHASE_TEMP_REENTER();
     return;
   }
 
 #ifdef DEBUG
   if (gNoisyContentUpdates && IsFramePartOfIBSplit(parentFrame)) {
     printf("nsCSSFrameConstructor::ContentAppended: parentFrame=");
-    nsFrame::ListTag(stdout, parentFrame);
+    parentFrame->ListTag(stdout);
     printf(" is ib-split\n");
   }
 #endif
 
   // We should never get here with fieldsets or details, since they have
   // multiple insertion points.
   MOZ_ASSERT(!parentFrame->IsFieldSetFrame() && !parentFrame->IsDetailsFrame(),
              "Parent frame should not be fieldset or details!");
@@ -7567,21 +7567,21 @@ bool nsCSSFrameConstructor::ContentRemov
     nsContainerFrame* containingBlock =
         GetFloatContainingBlock(inflowChild->GetParent());
     bool haveFLS = containingBlock && HasFirstLetterStyle(containingBlock);
     if (haveFLS) {
       // Trap out to special routine that handles adjusting a blocks
       // frame tree when first-letter style is present.
 #ifdef NOISY_FIRST_LETTER
       printf("ContentRemoved: containingBlock=");
-      nsFrame::ListTag(stdout, containingBlock);
+      containingBlock->ListTag(stdout);
       printf(" parentFrame=");
-      nsFrame::ListTag(stdout, parentFrame);
+      parentFrame->ListTag(stdout);
       printf(" childFrame=");
-      nsFrame::ListTag(stdout, childFrame);
+      childFrame->ListTag(stdout);
       printf("\n");
 #endif
 
       // First update the containing blocks structure by removing the
       // existing letter frames. This makes the subsequent logic
       // simpler.
       RemoveLetterFrames(mPresShell, containingBlock);
 
@@ -7592,27 +7592,27 @@ bool nsCSSFrameConstructor::ContentRemov
         // Remove it once that's fixed.
         return false;
       }
       parentFrame = childFrame->GetParent();
       parentType = parentFrame->Type();
 
 #ifdef NOISY_FIRST_LETTER
       printf("  ==> revised parentFrame=");
-      nsFrame::ListTag(stdout, parentFrame);
+      parentFrame->ListTag(stdout);
       printf(" childFrame=");
-      nsFrame::ListTag(stdout, childFrame);
+      childFrame->ListTag(stdout);
       printf("\n");
 #endif
     }
 
 #ifdef DEBUG
     if (gReallyNoisyContentUpdates) {
       printf("nsCSSFrameConstructor::ContentRemoved: childFrame=");
-      nsFrame::ListTag(stdout, childFrame);
+      childFrame->ListTag(stdout);
       putchar('\n');
       parentFrame->List(stdout);
     }
 #endif
 
     // Notify the parent frame that it should delete the frame
     if (childFrame->GetStateBits() & NS_FRAME_OUT_OF_FLOW) {
       childFrame = childFrame->GetPlaceholderFrame();
--- a/layout/generic/BlockReflowInput.cpp
+++ b/layout/generic/BlockReflowInput.cpp
@@ -466,17 +466,17 @@ void BlockReflowInput::RecoverFloats(nsL
       }
 #ifdef DEBUG
       if (nsBlockFrame::gNoisyReflow || nsBlockFrame::gNoisyFloatManager) {
         nscoord tI, tB;
         FloatManager()->GetTranslation(tI, tB);
         nsFrame::IndentBy(stdout, nsBlockFrame::gNoiseIndent);
         printf("RecoverFloats: tIB=%d,%d (%d,%d) ", tI, tB, mFloatManagerI,
                mFloatManagerB);
-        nsFrame::ListTag(stdout, floatFrame);
+        floatFrame->ListTag(stdout);
         LogicalRect region =
             nsFloatManager::GetRegionFor(wm, floatFrame, ContainerSize());
         printf(" aDeltaBCoord=%d region={%d,%d,%d,%d}\n", aDeltaBCoord,
                region.IStart(wm), region.BStart(wm), region.ISize(wm),
                region.BSize(wm));
       }
 #endif
       FloatManager()->AddFloat(
@@ -1018,27 +1018,27 @@ bool BlockReflowInput::FlowAndPlaceFloat
   } else {
     MOZ_ASSERT(!aFloat->GetNextInFlow());
   }
 
 #ifdef DEBUG
   if (nsBlockFrame::gNoisyFloatManager) {
     nscoord tI, tB;
     FloatManager()->GetTranslation(tI, tB);
-    nsIFrame::ListTag(stdout, mBlock);
+    mBlock->ListTag(stdout);
     printf(": FlowAndPlaceFloat: AddFloat: tIB=%d,%d (%d,%d) {%d,%d,%d,%d}\n",
            tI, tB, mFloatManagerI, mFloatManagerB, region.IStart(wm),
            region.BStart(wm), region.ISize(wm), region.BSize(wm));
   }
 
   if (nsBlockFrame::gNoisyReflow) {
     nsRect r = aFloat->GetRect();
     nsFrame::IndentBy(stdout, nsBlockFrame::gNoiseIndent);
     printf("placed float: ");
-    nsFrame::ListTag(stdout, aFloat);
+    aFloat->ListTag(stdout);
     printf(" %d,%d,%d,%d\n", r.x, r.y, r.width, r.height);
   }
 #endif
 
   return true;
 }
 
 void BlockReflowInput::PushFloatPastBreak(nsIFrame* aFloat) {
@@ -1069,17 +1069,17 @@ void BlockReflowInput::PushFloatPastBrea
 void BlockReflowInput::PlaceBelowCurrentLineFloats(nsLineBox* aLine) {
   MOZ_ASSERT(mBelowCurrentLineFloats.NotEmpty());
   nsFloatCache* fc = mBelowCurrentLineFloats.Head();
   while (fc) {
 #ifdef DEBUG
     if (nsBlockFrame::gNoisyReflow) {
       nsFrame::IndentBy(stdout, nsBlockFrame::gNoiseIndent);
       printf("placing bcl float: ");
-      nsFrame::ListTag(stdout, fc->mFloat);
+      fc->mFloat->ListTag(stdout);
       printf("\n");
     }
 #endif
     // Place the float
     bool placed = FlowAndPlaceFloat(fc->mFloat);
     nsFloatCache* next = fc->Next();
     if (!placed) {
       mBelowCurrentLineFloats.Remove(fc);
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -3640,17 +3640,17 @@ void nsBlockFrame::ReflowBlockFrame(Bloc
 
             // The block-end margin for a block is only applied on the last
             // flow block. Since we just continued the child block frame,
             // we know that line->mFirstChild is not the last flow block
             // therefore zero out the running margin value.
 #ifdef NOISY_BLOCK_DIR_MARGINS
             ListTag(stdout);
             printf(": reflow incomplete, frame=");
-            nsFrame::ListTag(stdout, mFrame);
+            frame->ListTag(stdout);
             printf(" prevBEndMargin=%d, setting to zero\n",
                    aState.mPrevBEndMargin.get());
 #endif
             aState.mPrevBEndMargin.Zero();
           } else {  // frame is complete but its overflow is not complete
             // Disconnect the next-in-flow and put it in our overflow tracker
             if (!madeContinuation &&
                 !(NS_FRAME_IS_OVERFLOW_CONTAINER & nextFrame->GetStateBits())) {
@@ -3666,36 +3666,36 @@ void nsBlockFrame::ReflowBlockFrame(Bloc
 
             // Put it in our overflow list
             aState.mOverflowTracker->Insert(nextFrame, frameReflowStatus);
             aState.mReflowStatus.MergeCompletionStatusFrom(frameReflowStatus);
 
 #ifdef NOISY_BLOCK_DIR_MARGINS
             ListTag(stdout);
             printf(": reflow complete but overflow incomplete for ");
-            nsFrame::ListTag(stdout, mFrame);
+            frame->ListTag(stdout);
             printf(" prevBEndMargin=%d collapsedBEndMargin=%d\n",
                    aState.mPrevBEndMargin.get(), collapsedBEndMargin.get());
 #endif
             aState.mPrevBEndMargin = collapsedBEndMargin;
           }
         } else {  // frame is fully complete
 #ifdef NOISY_BLOCK_DIR_MARGINS
           ListTag(stdout);
           printf(": reflow complete for ");
-          nsFrame::ListTag(stdout, mFrame);
+          frame->ListTag(stdout);
           printf(" prevBEndMargin=%d collapsedBEndMargin=%d\n",
                  aState.mPrevBEndMargin.get(), collapsedBEndMargin.get());
 #endif
           aState.mPrevBEndMargin = collapsedBEndMargin;
         }
 #ifdef NOISY_BLOCK_DIR_MARGINS
         ListTag(stdout);
         printf(": frame=");
-        nsFrame::ListTag(stdout, mFrame);
+        frame->ListTag(stdout);
         printf(" carriedOutBEndMargin=%d collapsedBEndMargin=%d => %d\n",
                brc.GetCarriedOutBEndMargin().get(), collapsedBEndMargin.get(),
                aState.mPrevBEndMargin.get());
 #endif
       } else {
         if ((aLine == mLines.front() && !GetPrevInFlow()) ||
             ShouldAvoidBreakInside(aState.mReflowInput)) {
           // If it's our very first line *or* we're not at the top of the page
@@ -4063,17 +4063,17 @@ void nsBlockFrame::ReflowInlineFrame(Blo
                                      LineIterator aLine, nsIFrame* aFrame,
                                      LineReflowStatus* aLineReflowStatus) {
   MOZ_ASSERT(aFrame);
   *aLineReflowStatus = LineReflowStatus::OK;
 
 #ifdef NOISY_FIRST_LETTER
   ListTag(stdout);
   printf(": reflowing ");
-  nsFrame::ListTag(stdout, aFrame);
+  aFrame->ListTag(stdout);
   printf(" reflowingFirstLetter=%s\n",
          aLineLayout.GetFirstLetterStyleOK() ? "on" : "off");
 #endif
 
   if (aFrame->IsPlaceholderFrame()) {
     auto ph = static_cast<nsPlaceholderFrame*>(aFrame);
     ph->ForgetLineIsEmptySoFar();
   }
@@ -4083,17 +4083,17 @@ void nsBlockFrame::ReflowInlineFrame(Blo
   bool pushedFrame;
   aLineLayout.ReflowFrame(aFrame, frameReflowStatus, nullptr, pushedFrame);
 
   if (frameReflowStatus.NextInFlowNeedsReflow()) {
     aLineLayout.SetDirtyNextLine();
   }
 
 #ifdef REALLY_NOISY_REFLOW
-  nsFrame::ListTag(stdout, aFrame);
+  aFrame->ListTag(stdout);
   printf(": status=%s\n", ToString(frameReflowStatus).c_str());
 #endif
 
 #if defined(REFLOW_STATUS_COVERAGE)
   RecordReflowStatus(false, frameReflowStatus);
 #endif
 
   // Send post-reflow notification
@@ -4291,17 +4291,17 @@ void nsBlockFrame::SplitLine(BlockReflow
   MOZ_ASSERT(pushCount >= 0, "bad push count");
 
 #ifdef DEBUG
   if (gNoisyReflow) {
     nsFrame::IndentBy(stdout, gNoiseIndent);
     printf("split line: from line=%p pushCount=%d aFrame=",
            static_cast<void*>(aLine.get()), pushCount);
     if (aFrame) {
-      nsFrame::ListTag(stdout, aFrame);
+      aFrame->ListTag(stdout);
     } else {
       printf("(null)");
     }
     printf("\n");
     if (gReallyNoisyReflow) {
       aLine->List(stdout, gNoiseIndent + 1);
     }
   }
@@ -5068,17 +5068,17 @@ void nsBlockFrame::AppendFrames(ChildLis
       "out-of-sync mLines / mFrames");
 
 #ifdef NOISY_REFLOW_REASON
   ListTag(stdout);
   printf(": append ");
   nsFrame::ListTag(stdout, aFrameList);
   if (lastKid) {
     printf(" after ");
-    nsFrame::ListTag(stdout, lastKid);
+    lastKid->ListTag(stdout);
   }
   printf("\n");
 #endif
 
   if (nsSVGUtils::IsInSVGTextSubtree(this)) {
     MOZ_ASSERT(GetParent()->IsSVGTextFrame(),
                "unexpected block frame in SVG text");
     // Workaround for bug 1399425 in case this bit has been removed from the
@@ -5109,34 +5109,34 @@ void nsBlockFrame::InsertFrames(ChildLis
   }
 
 #ifdef NOISY_REFLOW_REASON
   ListTag(stdout);
   printf(": insert ");
   nsFrame::ListTag(stdout, aFrameList);
   if (aPrevFrame) {
     printf(" after ");
-    nsFrame::ListTag(stdout, aPrevFrame);
+    aPrevFrame->ListTag(stdout);
   }
   printf("\n");
 #endif
 
   AddFrames(aFrameList, aPrevFrame);
   if (aListID != kNoReflowPrincipalList) {
     PresShell()->FrameNeedsReflow(
         this, nsIPresShell::eTreeChange,
         NS_FRAME_HAS_DIRTY_CHILDREN);  // XXX sufficient?
   }
 }
 
 void nsBlockFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) {
 #ifdef NOISY_REFLOW_REASON
   ListTag(stdout);
   printf(": remove ");
-  nsFrame::ListTag(stdout, aOldFrame);
+  aOldFrame->ListTag(stdout);
   printf("\n");
 #endif
 
   if (aListID == kPrincipalList) {
     bool hasFloats = BlockHasAnyFloats(aOldFrame);
     DoRemoveFrame(aOldFrame, REMOVE_FIXED_CONTINUATIONS);
     if (hasFloats) {
       MarkSameFloatManagerLinesDirty(this);
@@ -5747,17 +5747,17 @@ void nsBlockFrame::DoRemoveFrameInternal
     // to destroy that too.
     nsIFrame* deletedNextContinuation =
         (aFlags & REMOVE_FIXED_CONTINUATIONS)
             ? aDeletedFrame->GetNextContinuation()
             : aDeletedFrame->GetNextInFlow();
 #ifdef NOISY_REMOVE_FRAME
     printf("DoRemoveFrame: %s line=%p frame=",
            searchingOverflowList ? "overflow" : "normal", line.get());
-    nsFrame::ListTag(stdout, aDeletedFrame);
+    aDeletedFrame->ListTag(stdout);
     printf(" prevSibling=%p deletedNextContinuation=%p\n",
            aDeletedFrame->GetPrevSibling(), deletedNextContinuation);
 #endif
 
     // If next-in-flow is an overflow container, must remove it first.
     if (deletedNextContinuation && deletedNextContinuation->GetStateBits() &
                                        NS_FRAME_IS_OVERFLOW_CONTAINER) {
       deletedNextContinuation->GetParent()->DeleteNextInFlowChild(
--- a/layout/generic/nsBlockReflowContext.cpp
+++ b/layout/generic/nsBlockReflowContext.cpp
@@ -59,17 +59,17 @@ bool nsBlockReflowContext::ComputeCollap
   aMargin->Include(
       aRI.ComputedLogicalMargin().ConvertTo(parentWM, wm).BStart(parentWM));
 
   // The inclusion of the block-end margin when empty is done by the caller
   // since it doesn't need to be done by the top-level (non-recursive)
   // caller.
 
 #ifdef NOISY_BLOCKDIR_MARGINS
-  nsFrame::ListTag(stdout, aRI.mFrame);
+  aRI.mFrame->ListTag(stdout);
   printf(": %d => %d\n", aRI.ComputedLogicalMargin().BStart(wm),
          aMargin->get());
 #endif
 
   bool dirtiedLine = false;
   bool setBlockIsEmpty = false;
 
   // Calculate the frame's generational block-start-margin from its child
@@ -206,17 +206,17 @@ bool nsBlockReflowContext::ComputeCollap
   }
 done:
 
   if (!setBlockIsEmpty && aBlockIsEmpty) {
     *aBlockIsEmpty = aRI.mFrame->IsEmpty();
   }
 
 #ifdef NOISY_BLOCKDIR_MARGINS
-  nsFrame::ListTag(stdout, aRI.mFrame);
+  aRI.mFrame->ListTag(stdout);
   printf(": => %d\n", aMargin->get());
 #endif
 
   return dirtiedLine;
 }
 
 void nsBlockReflowContext::ReflowBlock(
     const LogicalRect& aSpace, bool aApplyBStartMargin,
@@ -231,19 +231,19 @@ void nsBlockReflowContext::ReflowBlock(
   if (!aIsAdjacentWithBStart) {
     aFrameRI.mFlags.mIsTopOfPage = false;  // make sure this is cleared
   }
 
   if (aApplyBStartMargin) {
     mBStartMargin = aPrevMargin;
 
 #ifdef NOISY_BLOCKDIR_MARGINS
-    nsFrame::ListTag(stdout, mOuterReflowInput.mFrame);
+    mOuterReflowInput.mFrame->ListTag(stdout);
     printf(": reflowing ");
-    nsFrame::ListTag(stdout, mFrame);
+    mFrame->ListTag(stdout);
     printf(" margin => %d, clearance => %d\n", mBStartMargin.get(), aClearance);
 #endif
 
     // Adjust the available size if it's constrained so that the
     // child frame doesn't think it can reflow into its margin area.
     if (mWritingMode.IsOrthogonalTo(mFrame->GetWritingMode())) {
       if (NS_UNCONSTRAINEDSIZE != aFrameRI.AvailableISize()) {
         aFrameRI.AvailableISize() -= mBStartMargin.get() + aClearance;
@@ -298,24 +298,24 @@ void nsBlockReflowContext::ReflowBlock(
   mOuterReflowInput.mFloatManager->Translate(-tI, -tB);
 
 #ifdef DEBUG
   if (!aFrameReflowStatus.IsInlineBreakBefore()) {
     if ((CRAZY_SIZE(mMetrics.ISize(mWritingMode)) ||
          CRAZY_SIZE(mMetrics.BSize(mWritingMode))) &&
         !mFrame->GetParent()->IsCrazySizeAssertSuppressed()) {
       printf("nsBlockReflowContext: ");
-      nsFrame::ListTag(stdout, mFrame);
+      mFrame->ListTag(stdout);
       printf(" metrics=%d,%d!\n", mMetrics.ISize(mWritingMode),
              mMetrics.BSize(mWritingMode));
     }
     if ((mMetrics.ISize(mWritingMode) == nscoord(0xdeadbeef)) ||
         (mMetrics.BSize(mWritingMode) == nscoord(0xdeadbeef))) {
       printf("nsBlockReflowContext: ");
-      nsFrame::ListTag(stdout, mFrame);
+      mFrame->ListTag(stdout);
       printf(" didn't set i/b %d,%d!\n", mMetrics.ISize(mWritingMode),
              mMetrics.BSize(mWritingMode));
     }
   }
 #endif
 
   if (!mFrame->HasOverflowAreas()) {
     mMetrics.SetOverflowAreasToDesiredBounds();
@@ -377,19 +377,19 @@ bool nsBlockReflowContext::PlaceBlock(co
   bool empty = 0 == mMetrics.BSize(parentWM) && aLine->CachedIsEmpty();
   if (empty) {
     // Collapse the block-end margin with the block-start margin that was
     // already applied.
     aBEndMarginResult.Include(mBStartMargin);
 
 #ifdef NOISY_BLOCKDIR_MARGINS
     printf("  ");
-    nsFrame::ListTag(stdout, mOuterReflowInput.mFrame);
+    mOuterReflowInput.mFrame->ListTag(stdout);
     printf(": ");
-    nsFrame::ListTag(stdout, mFrame);
+    mFrame->ListTag(stdout);
     printf(
         " -- collapsing block start & end margin together; BStart=%d "
         "spaceBStart=%d\n",
         mBCoord, mSpace.BStart(mWritingMode));
 #endif
     // Section 8.3.1 of CSS 2.1 says that blocks with adjoining
     // "top/bottom" (i.e. block-start/end) margins whose top margin collapses
     // with their parent's top margin should have their top border-edge at the
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -9952,17 +9952,17 @@ void nsFrame::BoxReflow(nsBoxLayoutState
                         ReflowOutput& aDesiredSize,
                         gfxContext* aRenderingContext, nscoord aX, nscoord aY,
                         nscoord aWidth, nscoord aHeight, bool aMoveFrame) {
   DO_GLOBAL_REFLOW_COUNT("nsBoxToBlockAdaptor");
 
 #ifdef DEBUG_REFLOW
   nsAdaptorAddIndents();
   printf("Reflowing: ");
-  nsFrame::ListTag(stdout, mFrame);
+  mFrame->ListTag(stdout);
   printf("\n");
   gIndent2++;
 #endif
 
   nsBoxLayoutMetrics* metrics = BoxMetrics();
   if (MOZ_UNLIKELY(!metrics)) {
     // Can't proceed without BoxMetrics. This should only happen if something
     // is seriously broken, e.g. if we try to do XUL layout on a non-XUL frame.
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -4523,23 +4523,20 @@ class nsIFrame : public nsQueryFrame {
 #undef ABSTRACT_FRAME_ID
       0];
 
 #ifdef DEBUG_FRAME_DUMP
  public:
   static void IndentBy(FILE* out, int32_t aIndent) {
     while (--aIndent >= 0) fputs("  ", out);
   }
-  void ListTag(FILE* out) const { ListTag(out, this); }
-  static void ListTag(FILE* out, const nsIFrame* aFrame) {
-    fputs(aFrame->ListTag().get(), out);
-  }
+  void ListTag(FILE* out) const { fputs(ListTag().get(), out); }
   static void ListTag(FILE* out, const nsFrameList& aFrameList) {
     for (nsIFrame* frame : aFrameList) {
-      ListTag(out, frame);
+      frame->ListTag(out);
     }
   }
   nsAutoCString ListTag() const;
   void ListGeneric(nsACString& aTo, const char* aPrefix = "",
                    uint32_t aFlags = 0) const;
   enum {TRAVERSE_SUBDOCUMENT_FRAMES = 0x01};
   virtual void List(FILE* out = stderr, const char* aPrefix = "",
                     uint32_t aFlags = 0) const;
--- a/layout/generic/nsLineLayout.cpp
+++ b/layout/generic/nsLineLayout.cpp
@@ -151,27 +151,27 @@ void nsLineLayout::BeginLineReflow(nscoo
   NS_ASSERTION(nullptr == mRootSpan, "bad linelayout user");
   LAYOUT_WARN_IF_FALSE(aISize != NS_UNCONSTRAINEDSIZE,
                        "have unconstrained width; this should only result from "
                        "very large sizes, not attempts at intrinsic width "
                        "calculation");
 #ifdef DEBUG
   if ((aISize != NS_UNCONSTRAINEDSIZE) && CRAZY_SIZE(aISize) &&
       !LineContainerFrame()->GetParent()->IsCrazySizeAssertSuppressed()) {
-    nsFrame::ListTag(stdout, mBlockReflowInput->mFrame);
+    mBlockReflowInput->mFrame->ListTag(stdout);
     printf(": Init: bad caller: width WAS %d(0x%x)\n", aISize, aISize);
   }
   if ((aBSize != NS_UNCONSTRAINEDSIZE) && CRAZY_SIZE(aBSize) &&
       !LineContainerFrame()->GetParent()->IsCrazySizeAssertSuppressed()) {
-    nsFrame::ListTag(stdout, mBlockReflowInput->mFrame);
+    mBlockReflowInput->mFrame->ListTag(stdout);
     printf(": Init: bad caller: height WAS %d(0x%x)\n", aBSize, aBSize);
   }
 #endif
 #ifdef NOISY_REFLOW
-  nsFrame::ListTag(stdout, mBlockReflowInput->mFrame);
+  mBlockReflowInput->mFrame->ListTag(stdout);
   printf(": BeginLineReflow: %d,%d,%d,%d impacted=%s %s\n", aICoord, aBCoord,
          aISize, aBSize, aImpactedByFloats ? "true" : "false",
          aIsTopOfPage ? "top-of-page" : "");
 #endif
 #ifdef DEBUG
   mSpansAllocated = mSpansFreed = mFramesAllocated = mFramesFreed = 0;
 #endif
 
@@ -234,17 +234,17 @@ void nsLineLayout::BeginLineReflow(nscoo
                  "hence they should have identical writing mode");
       pfd->mOffsets = mBlockReflowInput->ComputedLogicalOffsets();
     }
   }
 }
 
 void nsLineLayout::EndLineReflow() {
 #ifdef NOISY_REFLOW
-  nsFrame::ListTag(stdout, mBlockReflowInput->mFrame);
+  mBlockReflowInput->mFrame->ListTag(stdout);
   printf(": EndLineReflow: width=%d\n",
          mRootSpan->mICoord - mRootSpan->mIStart);
 #endif
 
   NS_ASSERTION(!mBaseLineLayout ||
                    (!mSpansAllocated && !mSpansFreed && !mSpanFreeList &&
                     !mFramesAllocated && !mFramesFreed && !mFrameFreeList),
                "Allocated frames or spans on non-base line layout?");
@@ -291,24 +291,24 @@ void nsLineLayout::UpdateBand(WritingMod
       aNewAvailSpace.ISize(aWM), aNewAvailSpace.BSize(aWM),
       availSpace.IStart(lineWM), availSpace.BStart(lineWM),
       availSpace.ISize(lineWM), availSpace.BSize(lineWM), aFloatFrame);
 #endif
 #ifdef DEBUG
   if ((availSpace.ISize(lineWM) != NS_UNCONSTRAINEDSIZE) &&
       CRAZY_SIZE(availSpace.ISize(lineWM)) &&
       !LineContainerFrame()->GetParent()->IsCrazySizeAssertSuppressed()) {
-    nsFrame::ListTag(stdout, mBlockReflowInput->mFrame);
+    mBlockReflowInput->mFrame->ListTag(stdout);
     printf(": UpdateBand: bad caller: ISize WAS %d(0x%x)\n",
            availSpace.ISize(lineWM), availSpace.ISize(lineWM));
   }
   if ((availSpace.BSize(lineWM) != NS_UNCONSTRAINEDSIZE) &&
       CRAZY_SIZE(availSpace.BSize(lineWM)) &&
       !LineContainerFrame()->GetParent()->IsCrazySizeAssertSuppressed()) {
-    nsFrame::ListTag(stdout, mBlockReflowInput->mFrame);
+    mBlockReflowInput->mFrame->ListTag(stdout);
     printf(": UpdateBand: bad caller: BSize WAS %d(0x%x)\n",
            availSpace.BSize(lineWM), availSpace.BSize(lineWM));
   }
 #endif
 
   // Compute the difference between last times width and the new width
   NS_WARNING_ASSERTION(
       mRootSpan->mIEnd != NS_UNCONSTRAINEDSIZE &&
@@ -317,17 +317,17 @@ void nsLineLayout::UpdateBand(WritingMod
       "sizes, not attempts at intrinsic width calculation");
   // The root span's mIStart moves to aICoord
   nscoord deltaICoord = availSpace.IStart(lineWM) - mRootSpan->mIStart;
   // The inline size of all spans changes by this much (the root span's
   // mIEnd moves to aICoord + aISize, its new inline size is aISize)
   nscoord deltaISize =
       availSpace.ISize(lineWM) - (mRootSpan->mIEnd - mRootSpan->mIStart);
 #ifdef NOISY_REFLOW
-  nsFrame::ListTag(stdout, mBlockReflowInput->mFrame);
+  mBlockReflowInput->mFrame->ListTag(stdout);
   printf(": UpdateBand: %d,%d,%d,%d deltaISize=%d deltaICoord=%d\n",
          availSpace.IStart(lineWM), availSpace.BStart(lineWM),
          availSpace.ISize(lineWM), availSpace.BSize(lineWM), deltaISize,
          deltaICoord);
 #endif
 
   // Update the root span position
   mRootSpan->mIStart += deltaICoord;
@@ -391,17 +391,17 @@ nsLineLayout::PerSpanData* nsLineLayout:
 void nsLineLayout::BeginSpan(nsIFrame* aFrame,
                              const ReflowInput* aSpanReflowInput,
                              nscoord aIStart, nscoord aIEnd,
                              nscoord* aBaseline) {
   NS_ASSERTION(aIEnd != NS_UNCONSTRAINEDSIZE,
                "should no longer be using unconstrained sizes");
 #ifdef NOISY_REFLOW
   nsFrame::IndentBy(stdout, mSpanDepth + 1);
-  nsFrame::ListTag(stdout, aFrame);
+  aFrame->ListTag(stdout);
   printf(": BeginSpan leftEdge=%d rightEdge=%d\n", aIStart, aIEnd);
 #endif
 
   PerSpanData* psd = NewPerSpanData();
   // Link up span frame's pfd to point to its child span data
   PerFrameData* pfd = mCurrentSpan->mLastFrame;
   NS_ASSERTION(pfd->mFrame == aFrame, "huh?");
   pfd->mSpan = psd;
@@ -424,17 +424,17 @@ void nsLineLayout::BeginSpan(nsIFrame* a
   mCurrentSpan = psd;
   mSpanDepth++;
 }
 
 nscoord nsLineLayout::EndSpan(nsIFrame* aFrame) {
   NS_ASSERTION(mSpanDepth > 0, "end-span without begin-span");
 #ifdef NOISY_REFLOW
   nsFrame::IndentBy(stdout, mSpanDepth);
-  nsFrame::ListTag(stdout, aFrame);
+  aFrame->ListTag(stdout);
   printf(": EndSpan width=%d\n", mCurrentSpan->mICoord - mCurrentSpan->mIStart);
 #endif
   PerSpanData* psd = mCurrentSpan;
   MOZ_ASSERT(psd->mParent, "We never call this on the root");
 
   if (psd->mNoWrap && !psd->mParent->mNoWrap) {
     FlushNoWrapFloats();
   }
@@ -753,17 +753,17 @@ void nsLineLayout::ReflowFrame(nsIFrame*
 
   PerFrameData* pfd = NewPerFrameData(aFrame);
   PerSpanData* psd = mCurrentSpan;
   psd->AppendFrame(pfd);
 
 #ifdef REALLY_NOISY_REFLOW
   nsFrame::IndentBy(stdout, mSpanDepth);
   printf("%p: Begin ReflowFrame pfd=%p ", psd, pfd);
-  nsFrame::ListTag(stdout, aFrame);
+  aFrame->ListTag(stdout);
   printf("\n");
 #endif
 
   if (mCurrentSpan == mRootSpan) {
     pfd->mFrame->RemoveProperty(nsIFrame::LineBaselineOffset());
   } else {
 #ifdef DEBUG
     bool hasLineOffset;
@@ -971,23 +971,23 @@ void nsLineLayout::ReflowFrame(nsIFrame*
 #ifdef DEBUG
   // Note: break-before means ignore the reflow metrics since the
   // frame will be reflowed another time.
   if (!aReflowStatus.IsInlineBreakBefore()) {
     if ((CRAZY_SIZE(reflowOutput.ISize(lineWM)) ||
          CRAZY_SIZE(reflowOutput.BSize(lineWM))) &&
         !LineContainerFrame()->GetParent()->IsCrazySizeAssertSuppressed()) {
       printf("nsLineLayout: ");
-      nsFrame::ListTag(stdout, aFrame);
+      aFrame->ListTag(stdout);
       printf(" metrics=%d,%d!\n", reflowOutput.Width(), reflowOutput.Height());
     }
     if ((reflowOutput.Width() == nscoord(0xdeadbeef)) ||
         (reflowOutput.Height() == nscoord(0xdeadbeef))) {
       printf("nsLineLayout: ");
-      nsFrame::ListTag(stdout, aFrame);
+      aFrame->ListTag(stdout);
       printf(" didn't set w/h %d,%d!\n", reflowOutput.Width(),
              reflowOutput.Height());
     }
   }
 #endif
 
   // Unlike with non-inline reflow, the overflow area here does *not*
   // include the accumulation of the frame's bounds and its inline
@@ -1094,17 +1094,17 @@ void nsLineLayout::ReflowFrame(nsIFrame*
   } else {
     PushFrame(aFrame);
     aPushedFrame = true;
   }
 
 #ifdef REALLY_NOISY_REFLOW
   nsFrame::IndentBy(stdout, mSpanDepth);
   printf("End ReflowFrame ");
-  nsFrame::ListTag(stdout, aFrame);
+  aFrame->ListTag(stdout);
   printf(" status=%x\n", aReflowStatus);
 #endif
 }
 
 void nsLineLayout::AllowForStartMargin(PerFrameData* pfd,
                                        ReflowInput& aReflowInput) {
   NS_ASSERTION(!aReflowInput.IsFloating(),
                "How'd we get a floated inline frame? "
@@ -1245,20 +1245,20 @@ bool nsLineLayout::CanPlaceFrame(PerFram
   PerSpanData* psd = mCurrentSpan;
   if (psd->mNoWrap) {
     // When wrapping is off, everything fits.
     return true;
   }
 
 #ifdef NOISY_CAN_PLACE_FRAME
   if (nullptr != psd->mFrame) {
-    nsFrame::ListTag(stdout, psd->mFrame->mFrame);
+    psd->mFrame->mFrame->ListTag(stdout);
   }
   printf(": aNotSafeToBreak=%s frame=", aNotSafeToBreak ? "true" : "false");
-  nsFrame::ListTag(stdout, pfd->mFrame);
+  pfd->mFrame->ListTag(stdout);
   printf(" frameWidth=%d, margins=%d,%d\n",
          pfd->mBounds.IEnd(lineWM) + endMargin - psd->mICoord, startMargin,
          endMargin);
 #endif
 
   // Set outside to true if the result of the reflow leads to the
   // frame sticking outside of our available area.
   bool outside =
@@ -1438,17 +1438,17 @@ void nsLineLayout::RemoveBulletFrame(nsB
 #ifdef DEBUG
 void nsLineLayout::DumpPerSpanData(PerSpanData* psd, int32_t aIndent) {
   nsFrame::IndentBy(stdout, aIndent);
   printf("%p: left=%d x=%d right=%d\n", static_cast<void*>(psd), psd->mIStart,
          psd->mICoord, psd->mIEnd);
   PerFrameData* pfd = psd->mFirstFrame;
   while (nullptr != pfd) {
     nsFrame::IndentBy(stdout, aIndent + 1);
-    nsFrame::ListTag(stdout, pfd->mFrame);
+    pfd->mFrame->ListTag(stdout);
     nsRect rect =
         pfd->mBounds.GetPhysicalRect(psd->mWritingMode, ContainerSize());
     printf(" %d,%d,%d,%d\n", rect.x, rect.y, rect.width, rect.height);
     if (pfd->mSpan) {
       DumpPerSpanData(pfd->mSpan, aIndent + 1);
     }
     pfd = pfd->mNext;
   }
@@ -1618,17 +1618,17 @@ void nsLineLayout::PlaceTopBottomFrames(
           pfd->mBounds.BStart(lineWM) = -aDistanceFromStart - span->mMinBCoord;
         } else {
           pfd->mBounds.BStart(lineWM) =
               -aDistanceFromStart + pfd->mMargin.BStart(lineWM);
         }
         pfd->mFrame->SetRect(lineWM, pfd->mBounds, containerSize);
 #ifdef NOISY_BLOCKDIR_ALIGN
         printf("    ");
-        nsFrame::ListTag(stdout, pfd->mFrame);
+        pfd->mFrame->ListTag(stdout);
         printf(": y=%d dTop=%d [bp.top=%d topLeading=%d]\n",
                pfd->mBounds.BStart(lineWM), aDistanceFromStart,
                span ? pfd->mBorderPadding.BStart(lineWM) : 0,
                span ? span->mBStartLeading : 0);
 #endif
         break;
       case VALIGN_BOTTOM:
         if (span) {
@@ -1638,17 +1638,17 @@ void nsLineLayout::PlaceTopBottomFrames(
         } else {
           pfd->mBounds.BStart(lineWM) = -aDistanceFromStart + aLineBSize -
                                         pfd->mMargin.BEnd(lineWM) -
                                         pfd->mBounds.BSize(lineWM);
         }
         pfd->mFrame->SetRect(lineWM, pfd->mBounds, containerSize);
 #ifdef NOISY_BLOCKDIR_ALIGN
         printf("    ");
-        nsFrame::ListTag(stdout, pfd->mFrame);
+        pfd->mFrame->ListTag(stdout);
         printf(": y=%d\n", pfd->mBounds.BStart(lineWM));
 #endif
         break;
     }
     if (span) {
       nscoord fromStart = aDistanceFromStart + pfd->mBounds.BStart(lineWM);
       PlaceTopBottomFrames(span, fromStart, aLineBSize);
     }
@@ -1756,17 +1756,17 @@ void nsLineLayout::VerticalAlignFrames(P
   // - it's zero sized
   WritingMode lineWM = mRootSpan->mWritingMode;
   bool emptyContinuation = psd != mRootSpan && spanFrame->GetPrevInFlow() &&
                            !spanFrame->GetNextInFlow() &&
                            spanFramePFD->mBounds.IsZeroSize();
 
 #ifdef NOISY_BLOCKDIR_ALIGN
   printf("[%sSpan]", (psd == mRootSpan) ? "Root" : "");
-  nsFrame::ListTag(stdout, spanFrame);
+  spanFrame->ListTag(stdout);
   printf(": preMode=%s strictMode=%s w/h=%d,%d emptyContinuation=%s",
          preMode ? "yes" : "no",
          mPresContext->CompatibilityMode() != eCompatibility_NavQuirks ? "yes"
                                                                        : "no",
          spanFramePFD->mBounds.ISize(lineWM),
          spanFramePFD->mBounds.BSize(lineWM), emptyContinuation ? "yes" : "no");
   if (psd != mRootSpan) {
     printf(" bp=%d,%d,%d,%d margin=%d,%d,%d,%d",
@@ -1855,17 +1855,17 @@ void nsLineLayout::VerticalAlignFrames(P
     // values so that only the child frames will impact their values
     // (since these are children of the block, there is no span box to
     // provide initial values).
     baselineBCoord = 0;
     minBCoord = BLOCKDIR_ALIGN_FRAMES_NO_MINIMUM;
     maxBCoord = BLOCKDIR_ALIGN_FRAMES_NO_MAXIMUM;
 #ifdef NOISY_BLOCKDIR_ALIGN
     printf("[RootSpan]");
-    nsFrame::ListTag(stdout, spanFrame);
+    spanFrame->ListTag(stdout);
     printf(
         ": pass1 valign frames: topEdge=%d minLineBSize=%d "
         "zeroEffectiveSpanBox=%s\n",
         mBStartEdge, mMinLineBSize, zeroEffectiveSpanBox ? "yes" : "no");
 #endif
   } else {
     // Compute the logical block size for this span. The logical block size
     // is based on the "line-height" value, not the font-size. Also
@@ -1915,17 +1915,17 @@ void nsLineLayout::VerticalAlignFrames(P
 
     // This is the distance from the top edge of the parents visual
     // box to the baseline. The span already computed this for us,
     // so just use it.
     *psd->mBaseline = baselineBCoord = spanFramePFD->mAscent;
 
 #ifdef NOISY_BLOCKDIR_ALIGN
     printf("[%sSpan]", (psd == mRootSpan) ? "Root" : "");
-    nsFrame::ListTag(stdout, spanFrame);
+    spanFrame->ListTag(stdout);
     printf(
         ": baseLine=%d logicalBSize=%d topLeading=%d h=%d bp=%d,%d "
         "zeroEffectiveSpanBox=%s\n",
         baselineBCoord, psd->mLogicalBSize, psd->mBStartLeading,
         spanFramePFD->mBounds.BSize(lineWM),
         spanFramePFD->mBorderPadding.Top(lineWM),
         spanFramePFD->mBorderPadding.Bottom(lineWM),
         zeroEffectiveSpanBox ? "yes" : "no");
@@ -1965,17 +1965,17 @@ void nsLineLayout::VerticalAlignFrames(P
     }
 
     // Get vertical-align property ("vertical-align" is the CSS name for
     // block-direction align)
     const nsStyleCoord& verticalAlign = frame->StyleDisplay()->mVerticalAlign;
     uint8_t verticalAlignEnum = frame->VerticalAlignEnum();
 #ifdef NOISY_BLOCKDIR_ALIGN
     printf("  [frame]");
-    nsFrame::ListTag(stdout, frame);
+    frame->ListTag(stdout);
     printf(": verticalAlignUnit=%d (enum == %d", verticalAlign.GetUnit(),
            ((eStyleUnit_Enumerated == verticalAlign.GetUnit())
                 ? verticalAlign.GetIntValue()
                 : -1));
     if (verticalAlignEnum != nsIFrame::eInvalidVerticalAlign) {
       printf(", after SVG dominant-baseline conversion == %d",
              verticalAlignEnum);
     }
@@ -2486,19 +2486,19 @@ bool nsLineLayout::TrimTrailingWhiteSpac
   PerFrameData* pfd = psd->mFirstFrame;
   if (!pfd) {
     *aDeltaISize = 0;
     return false;
   }
   pfd = pfd->Last();
   while (nullptr != pfd) {
 #ifdef REALLY_NOISY_TRIM
-    nsFrame::ListTag(stdout, psd->mFrame->mFrame);
+    psd->mFrame->mFrame->ListTag(stdout);
     printf(": attempting trim of ");
-    nsFrame::ListTag(stdout, pfd->mFrame);
+    pfd->mFrame->ListTag(stdout);
     printf("\n");
 #endif
     PerSpanData* childSpan = pfd->mSpan;
     WritingMode lineWM = mRootSpan->mWritingMode;
     if (childSpan) {
       // Maybe the child span has the trailing white-space in it?
       if (TrimTrailingWhiteSpaceIn(childSpan, aDeltaISize)) {
         nscoord deltaISize = *aDeltaISize;
@@ -2551,19 +2551,19 @@ bool nsLineLayout::TrimTrailingWhiteSpac
       // Call TrimTrailingWhiteSpace even on empty textframes because they
       // might have a soft hyphen which should now appear, changing the frame's
       // width
       nsTextFrame::TrimOutput trimOutput =
           static_cast<nsTextFrame*>(pfd->mFrame)
               ->TrimTrailingWhiteSpace(
                   mBlockReflowInput->mRenderingContext->GetDrawTarget());
 #ifdef NOISY_TRIM
-      nsFrame::ListTag(stdout, psd->mFrame->mFrame);
+      psd->mFrame->mFrame->ListTag(stdout);
       printf(": trim of ");
-      nsFrame::ListTag(stdout, pfd->mFrame);
+      pfd->mFrame->ListTag(stdout);
       printf(" returned %d\n", trimOutput.mDeltaWidth);
 #endif
 
       if (trimOutput.mChanged) {
         pfd->mRecomputeOverflow = true;
       }
 
       // Delta width not being zero means that
@@ -3062,17 +3062,17 @@ void nsLineLayout::TextAlignLine(nsLineB
   WritingMode lineWM = psd->mWritingMode;
   LAYOUT_WARN_IF_FALSE(psd->mIEnd != NS_UNCONSTRAINEDSIZE,
                        "have unconstrained width; this should only result from "
                        "very large sizes, not attempts at intrinsic width "
                        "calculation");
   nscoord availISize = psd->mIEnd - psd->mIStart;
   nscoord remainingISize = availISize - aLine->ISize();
 #ifdef NOISY_INLINEDIR_ALIGN
-  nsFrame::ListTag(stdout, mBlockReflowInput->mFrame);
+  mBlockReflowInput->mFrame->ListTag(stdout);
   printf(": availISize=%d lineBounds.IStart=%d lineISize=%d delta=%d\n",
          availISize, aLine->IStart(), aLine->ISize(), remainingISize);
 #endif
 
   // 'text-align-last: auto' is equivalent to the value of the 'text-align'
   // property except when 'text-align' is set to 'justify', in which case it
   // is 'justify' when 'text-justify' is 'distribute' and 'start' otherwise.
   //