Bug 1596339 Part 6 - Use ToString() on nsPoint and nsSize in frame tree dump. r=dholbert
authorTing-Yu Lin <tlin@mozilla.com>
Fri, 15 Nov 2019 03:59:28 +0000
changeset 502120 a7a60ea3a7e06ff5b14a1cbb8c653637362b41bb
parent 502119 1622b327fb356012561b3ace3b382c89addeb4fc
child 502121 1e1617c67238dfb685fb3d07bf1793232c4469fa
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1596339
milestone72.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 1596339 Part 6 - Use ToString() on nsPoint and nsSize in frame tree dump. r=dholbert Differential Revision: https://phabricator.services.mozilla.com/D52967
layout/generic/nsFrame.cpp
layout/generic/nsLineBox.cpp
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -7851,37 +7851,37 @@ void nsIFrame::ListGeneric(nsACString& a
   }
 
   nsIFrame* parent = GetParent();
   if (parent) {
     WritingMode pWM = parent->GetWritingMode();
     if (pWM.IsVertical() || pWM.IsBidiRTL()) {
       nsSize containerSize = parent->mRect.Size();
       LogicalRect lr(pWM, mRect, containerSize);
-      aTo += nsPrintfCString(" parent-wm=%s cs={%d,%d} logical-rect=%s",
-                             ToString(pWM).c_str(), containerSize.width,
-                             containerSize.height, ToString(lr).c_str());
+      aTo += nsPrintfCString(
+          " parent-wm=%s cs=(%s) logical-rect=%s", ToString(pWM).c_str(),
+          ToString(containerSize).c_str(), ToString(lr).c_str());
     }
   }
   nsIFrame* f = const_cast<nsIFrame*>(this);
   if (f->HasOverflowAreas()) {
     nsRect vo = f->GetVisualOverflowRect();
     if (!vo.IsEqualEdges(mRect)) {
       aTo += nsPrintfCString(" vis-overflow=%s", ToString(vo).c_str());
     }
     nsRect so = f->GetScrollableOverflowRect();
     if (!so.IsEqualEdges(mRect)) {
       aTo += nsPrintfCString(" scr-overflow=%s", ToString(so).c_str());
     }
   }
   bool hasNormalPosition;
   nsPoint normalPosition = GetNormalPosition(&hasNormalPosition);
   if (hasNormalPosition) {
-    aTo += nsPrintfCString(" normal-position={%d,%d}", normalPosition.x,
-                           normalPosition.y);
+    aTo += nsPrintfCString(" normal-position=%s",
+                           ToString(normalPosition).c_str());
   }
   if (0 != mState) {
     aTo += nsPrintfCString(" [state=%016llx]", (unsigned long long)mState);
   }
   if (HasProperty(BidiDataProperty())) {
     FrameBidiData bidi = GetBidiData();
     aTo += nsPrintfCString(" bidi(%d,%d,%d)", bidi.baseLevel,
                            bidi.embeddingLevel, bidi.precedingControl);
--- a/layout/generic/nsLineBox.cpp
+++ b/layout/generic/nsLineBox.cpp
@@ -239,19 +239,19 @@ void nsLineBox::List(FILE* out, const ch
                          static_cast<const void*>(this), GetChildCount(),
                          StateToString(cbuf, sizeof(cbuf)));
   if (IsBlock() && !GetCarriedOutBEndMargin().IsZero()) {
     str += nsPrintfCString("bm=%d ", GetCarriedOutBEndMargin().get());
   }
   nsRect bounds = GetPhysicalBounds();
   str += nsPrintfCString("%s ", ToString(bounds).c_str());
   if (mWritingMode.IsVertical() || mWritingMode.IsBidiRTL()) {
-    str += nsPrintfCString("wm=%s cs={%d,%d} logical-rect=%s ",
-                           ToString(mWritingMode).c_str(), mContainerSize.width,
-                           mContainerSize.height, ToString(mBounds).c_str());
+    str += nsPrintfCString(
+        "wm=%s cs=(%s) logical-rect=%s ", ToString(mWritingMode).c_str(),
+        ToString(mContainerSize).c_str(), ToString(mBounds).c_str());
   }
   if (mData &&
       (!mData->mOverflowAreas.VisualOverflow().IsEqualEdges(bounds) ||
        !mData->mOverflowAreas.ScrollableOverflow().IsEqualEdges(bounds))) {
     str += nsPrintfCString(
         "vis-overflow=%s scr-overflow=%s ",
         ToString(mData->mOverflowAreas.VisualOverflow()).c_str(),
         ToString(mData->mOverflowAreas.ScrollableOverflow()).c_str());