Bug 1651202 Part 2 - Minor format tweaks for block frame's frame tree output. r=heycam

Make the following tweak so that they are consistent with others.

* Add a space before the open angle bracket. This is at the end of
`Block(div)(1)@7f10e25de5d0 ... <`

* Tweak nsLineBox format.
`line 7f10e25de808: count=1` becomes `line@7f10e25de808 count=1`.

* Tweak child list format.
`AbsoluteList 0x7f10e3c7e560` becomes `AbsoluteList@7f10e3c7e560`

Differential Revision: https://phabricator.services.mozilla.com/D82603
This commit is contained in:
Ting-Yu Lin 2020-07-08 05:37:39 +00:00
parent 358c2f9ef1
commit 4ecda7f556
3 changed files with 9 additions and 4 deletions

View File

@ -490,7 +490,7 @@ void nsBlockFrame::List(FILE* out, const char* aPrefix,
nsCString str;
ListGeneric(str, aPrefix, aFlags);
fprintf_stderr(out, "%s<\n", str.get());
fprintf_stderr(out, "%s <\n", str.get());
nsCString pfx(aPrefix);
pfx += " ";

View File

@ -3306,8 +3306,13 @@ void nsContainerFrame::ListChildLists(FILE* aOut, const char* aPrefix,
if (aSkippedListIDs.contains(listID)) {
continue;
}
fprintf_stderr(aOut, "%s%s %p <\n", aPrefix, ChildListName(listID),
&GetChildList(listID));
// Use nsPrintfCString so that %p don't output prefix "0x". This is
// consistent with nsIFrame::ListTag().
const nsPrintfCString str("%s%s@%p <\n", aPrefix, ChildListName(listID),
&GetChildList(listID));
fprintf_stderr(aOut, "%s", str.get());
for (nsIFrame* kid : list) {
kid->List(aOut, nestedPfx.get(), aFlags);
}

View File

@ -237,7 +237,7 @@ void nsLineBox::List(FILE* out, const char* aPrefix,
nsIFrame::ListFlags aFlags) const {
nsCString str(aPrefix);
char cbuf[100];
str += nsPrintfCString("line %p: count=%d state=%s ",
str += nsPrintfCString("line@%p count=%d state=%s ",
static_cast<const void*>(this), GetChildCount(),
StateToString(cbuf, sizeof(cbuf)));
if (IsBlock() && !GetCarriedOutBEndMargin().IsZero()) {