Bug 1576018 - Tweak frame tree debugging output. r=TYLin
authorCameron McCormack <cam@mcc.id.au>
Fri, 23 Aug 2019 05:31:37 +0000
changeset 553293 8ab6419caa6a8d474c5055c66e3530864db39816
parent 553292 cace4ffbecb254953949c51008d4ac1b9c5cab7d
child 553294 236e278e33a4871a38bcb4167ed868a952a31221
push id2165
push userffxbld-merge
push dateMon, 14 Oct 2019 16:30:58 +0000
treeherdermozilla-release@0eae18af659f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersTYLin
bugs1576018
milestone70.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 1576018 - Tweak frame tree debugging output. r=TYLin Differential Revision: https://phabricator.services.mozilla.com/D43178
layout/generic/nsFrame.cpp
layout/generic/nsLineBox.cpp
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -7790,44 +7790,43 @@ void nsIFrame::ListGeneric(nsACString& a
   if (IBprevsibling) {
     aTo += nsPrintfCString(" IBSplitPrevSibling=%p", IBprevsibling);
   }
   aTo += nsPrintfCString(" {%d,%d,%d,%d}", mRect.x, mRect.y, mRect.width,
                          mRect.height);
 
   mozilla::WritingMode wm = GetWritingMode();
   if (wm.IsVertical() || !wm.IsBidiLTR()) {
-    aTo += nsPrintfCString(" wm=%s: logical size={%d,%d}", wm.DebugString(),
+    aTo += nsPrintfCString(" wm=%s logical-size={%d,%d}", wm.DebugString(),
                            ISize(), BSize());
   }
 
   nsIFrame* parent = GetParent();
   if (parent) {
     WritingMode pWM = parent->GetWritingMode();
     if (pWM.IsVertical() || !pWM.IsBidiLTR()) {
       nsSize containerSize = parent->mRect.Size();
       LogicalRect lr(pWM, mRect, containerSize);
       aTo += nsPrintfCString(
-          " parent wm=%s, cs={%d,%d}, "
-          " logicalRect={%d,%d,%d,%d}",
+          " parent-wm=%s cs={%d,%d} logicalRect={%d,%d,%d,%d}",
           pWM.DebugString(), containerSize.width, containerSize.height,
           lr.IStart(pWM), lr.BStart(pWM), lr.ISize(pWM), lr.BSize(pWM));
     }
   }
   nsIFrame* f = const_cast<nsIFrame*>(this);
   if (f->HasOverflowAreas()) {
     nsRect vo = f->GetVisualOverflowRect();
     if (!vo.IsEqualEdges(mRect)) {
-      aTo += nsPrintfCString(" vis-overflow=%d,%d,%d,%d", vo.x, vo.y, vo.width,
-                             vo.height);
+      aTo += nsPrintfCString(" vis-overflow={%d,%d,%d,%d}", vo.x, vo.y,
+                             vo.width, vo.height);
     }
     nsRect so = f->GetScrollableOverflowRect();
     if (!so.IsEqualEdges(mRect)) {
-      aTo += nsPrintfCString(" scr-overflow=%d,%d,%d,%d", so.x, so.y, so.width,
-                             so.height);
+      aTo += nsPrintfCString(" scr-overflow={%d,%d,%d,%d}", so.x, so.y,
+                             so.width, so.height);
     }
   }
   bool hasNormalPosition;
   nsPoint normalPosition = GetNormalPosition(&hasNormalPosition);
   if (hasNormalPosition) {
     aTo += nsPrintfCString(" normal-position={%d,%d}", normalPosition.x,
                            normalPosition.y);
   }
--- a/layout/generic/nsLineBox.cpp
+++ b/layout/generic/nsLineBox.cpp
@@ -211,18 +211,18 @@ static void ListFloats(FILE* out, const 
   }
   return "unknown";
 }
 
 char* nsLineBox::StateToString(char* aBuf, int32_t aBufSize) const {
   snprintf(aBuf, aBufSize, "%s,%s,%s,%s,%s,before:%s,after:%s[0x%x]",
            IsBlock() ? "block" : "inline", IsDirty() ? "dirty" : "clean",
            IsPreviousMarginDirty() ? "prevmargindirty" : "prevmarginclean",
-           IsImpactedByFloat() ? "impacted" : "not impacted",
-           IsLineWrapped() ? "wrapped" : "not wrapped",
+           IsImpactedByFloat() ? "impacted" : "not-impacted",
+           IsLineWrapped() ? "wrapped" : "not-wrapped",
            BreakTypeToString(GetBreakTypeBefore()),
            BreakTypeToString(GetBreakTypeAfter()), mAllFlags);
   return aBuf;
 }
 
 void nsLineBox::List(FILE* out, int32_t aIndent, uint32_t aFlags) const {
   nsCString str;
   while (aIndent-- > 0) {