Bug 962443. Make layout frame tree dumping code work better for Fennec and b2g. r=mats

This commit is contained in:
Timothy Nikkel 2014-01-26 16:07:02 -06:00
Родитель ca307dca4e
Коммит 8d1d02dfa0
18 изменённых файлов: 159 добавлений и 119 удалений

Просмотреть файл

@ -328,34 +328,36 @@ nsBlockFrame::GetSplittableType() const
#ifdef DEBUG_FRAME_DUMP
void
nsBlockFrame::List(FILE* out, int32_t aIndent, uint32_t aFlags) const
nsBlockFrame::List(FILE* out, const char* aPrefix, uint32_t aFlags) const
{
ListGeneric(out, aIndent, aFlags);
nsCString str;
ListGeneric(str, aPrefix, aFlags);
fputs("<\n", out);
fprintf_stderr(out, "%s<\n", str.get());
aIndent++;
nsCString pfx(aPrefix);
pfx += " ";
// Output the lines
if (!mLines.empty()) {
const_line_iterator line = begin_lines(), line_end = end_lines();
for ( ; line != line_end; ++line) {
line->List(out, aIndent, aFlags);
line->List(out, pfx.get(), aFlags);
}
}
// Output the overflow lines.
const FrameLines* overflowLines = GetOverflowLines();
if (overflowLines && !overflowLines->mLines.empty()) {
IndentBy(out, aIndent);
fprintf(out, "Overflow-lines %p/%p <\n", overflowLines, &overflowLines->mFrames);
fprintf_stderr(out, "%sOverflow-lines %p/%p <\n", pfx.get(), overflowLines, &overflowLines->mFrames);
nsCString nestedPfx(pfx);
nestedPfx += " ";
const_line_iterator line = overflowLines->mLines.begin(),
line_end = overflowLines->mLines.end();
for ( ; line != line_end; ++line) {
line->List(out, aIndent + 1, aFlags);
line->List(out, nestedPfx.get(), aFlags);
}
IndentBy(out, aIndent);
fputs(">\n", out);
fprintf_stderr(out, "%s>\n", pfx.get());
}
// skip the principal list - we printed the lines above
@ -366,21 +368,20 @@ nsBlockFrame::List(FILE* out, int32_t aIndent, uint32_t aFlags) const
if (skip.Contains(lists.CurrentID())) {
continue;
}
IndentBy(out, aIndent);
fprintf(out, "%s %p <\n", mozilla::layout::ChildListName(lists.CurrentID()),
&GetChildList(lists.CurrentID()));
fprintf_stderr(out, "%s%s %p <\n", pfx.get(),
mozilla::layout::ChildListName(lists.CurrentID()),
&GetChildList(lists.CurrentID()));
nsCString nestedPfx(pfx);
nestedPfx += " ";
nsFrameList::Enumerator childFrames(lists.CurrentList());
for (; !childFrames.AtEnd(); childFrames.Next()) {
nsIFrame* kid = childFrames.get();
kid->List(out, aIndent + 1, aFlags);
kid->List(out, nestedPfx.get(), aFlags);
}
IndentBy(out, aIndent);
fputs(">\n", out);
fprintf_stderr(out, "%s>\n", pfx.get());
}
aIndent--;
IndentBy(out, aIndent);
fputs(">\n", out);
fprintf_stderr(out, "%s>\n", aPrefix);
}
NS_IMETHODIMP

Просмотреть файл

@ -172,7 +172,7 @@ public:
virtual void InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey = 0) MOZ_OVERRIDE;
#ifdef DEBUG_FRAME_DUMP
void List(FILE* out, int32_t aIndent, uint32_t aFlags = 0) const MOZ_OVERRIDE;
void List(FILE* out = stderr, const char* aPrefix = "", uint32_t aFlags = 0) const MOZ_OVERRIDE;
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
#endif

Просмотреть файл

@ -29,6 +29,7 @@
#include "nsBlockFrame.h"
#include "mozilla/AutoRestore.h"
#include "nsIFrameInlines.h"
#include "nsPrintfCString.h"
#include <algorithm>
#ifdef DEBUG
@ -1821,26 +1822,28 @@ nsOverflowContinuationTracker::EndFinish(nsIFrame* aChild)
#ifdef DEBUG_FRAME_DUMP
void
nsContainerFrame::List(FILE* out, int32_t aIndent, uint32_t aFlags) const
nsContainerFrame::List(FILE* out, const char* aPrefix, uint32_t aFlags) const
{
ListGeneric(out, aIndent, aFlags);
nsCString str;
ListGeneric(str, aPrefix, aFlags);
// Output the children
bool outputOneList = false;
ChildListIterator lists(this);
for (; !lists.IsDone(); lists.Next()) {
if (outputOneList) {
IndentBy(out, aIndent);
str += aPrefix;
}
if (lists.CurrentID() != kPrincipalList) {
if (!outputOneList) {
fputs("\n", out);
IndentBy(out, aIndent);
str += "\n";
str += aPrefix;
}
fputs(mozilla::layout::ChildListName(lists.CurrentID()), out);
fprintf(out, " %p ", &GetChildList(lists.CurrentID()));
str += nsPrintfCString("%s %p ", mozilla::layout::ChildListName(lists.CurrentID()),
&GetChildList(lists.CurrentID()));
}
fputs("<\n", out);
fprintf_stderr(out, "%s<\n", str.get());
str = "";
nsFrameList::Enumerator childFrames(lists.CurrentList());
for (; !childFrames.AtEnd(); childFrames.Next()) {
nsIFrame* kid = childFrames.get();
@ -1848,15 +1851,16 @@ nsContainerFrame::List(FILE* out, int32_t aIndent, uint32_t aFlags) const
NS_ASSERTION(kid->GetParent() == this, "bad parent frame pointer");
// Have the child frame list
kid->List(out, aIndent + 1, aFlags);
nsCString pfx(aPrefix);
pfx += " ";
kid->List(out, pfx.get(), aFlags);
}
IndentBy(out, aIndent);
fputs(">\n", out);
fprintf_stderr(out, "%s>\n", aPrefix);
outputOneList = true;
}
if (!outputOneList) {
fputs("<>\n", out);
fprintf_stderr(out, "%s<>\n", str.get());
}
}
#endif

Просмотреть файл

@ -76,7 +76,7 @@ public:
bool aRespectClusters = true) MOZ_OVERRIDE;
#ifdef DEBUG_FRAME_DUMP
void List(FILE* out, int32_t aIndent, uint32_t aFlags = 0) const MOZ_OVERRIDE;
void List(FILE* out = stderr, const char* aPrefix = "", uint32_t aFlags = 0) const MOZ_OVERRIDE;
#endif
// nsContainerFrame methods

Просмотреть файл

@ -431,10 +431,10 @@ nsFloatManager::List(FILE* out) const
for (uint32_t i = 0; i < mFloats.Length(); ++i) {
const FloatInfo &fi = mFloats[i];
printf("Float %u: frame=%p rect={%d,%d,%d,%d} ymost={l:%d, r:%d}\n",
i, static_cast<void*>(fi.mFrame),
fi.mRect.x, fi.mRect.y, fi.mRect.width, fi.mRect.height,
fi.mLeftYMost, fi.mRightYMost);
fprintf_stderr(out, "Float %u: frame=%p rect={%d,%d,%d,%d} ymost={l:%d, r:%d}\n",
i, static_cast<void*>(fi.mFrame),
fi.mRect.x, fi.mRect.y, fi.mRect.width, fi.mRect.height,
fi.mLeftYMost, fi.mRightYMost);
}
return NS_OK;
}

Просмотреть файл

@ -84,6 +84,7 @@
#include "mozilla/MouseEvents.h"
#include "mozilla/css/ImageLoader.h"
#include "mozilla/gfx/Tools.h"
#include "nsPrintfCString.h"
using namespace mozilla;
using namespace mozilla::css;
@ -5265,90 +5266,105 @@ int32_t nsFrame::ContentIndexInContainer(const nsIFrame* aFrame)
void
DebugListFrameTree(nsIFrame* aFrame)
{
((nsFrame*)aFrame)->List(stdout, 0);
((nsFrame*)aFrame)->List(stdout);
}
void
nsIFrame::ListTag(nsACString& aTo) const
{
ListTag(aTo, this);
}
/* static */
void
nsIFrame::ListTag(nsACString& aTo, const nsIFrame* aFrame) {
nsAutoString tmp;
aFrame->GetFrameName(tmp);
aTo += NS_ConvertUTF16toUTF8(tmp).get();
aTo += nsPrintfCString("@%p", static_cast<const void*>(aFrame));
}
// Debugging
void
nsIFrame::ListGeneric(FILE* out, int32_t aIndent, uint32_t aFlags) const
nsIFrame::ListGeneric(nsACString& aTo, const char* aPrefix, uint32_t aFlags) const
{
IndentBy(out, aIndent);
ListTag(out);
aTo =+ aPrefix;
ListTag(aTo);
if (HasView()) {
fprintf(out, " [view=%p]", static_cast<void*>(GetView()));
aTo += nsPrintfCString(" [view=%p]", static_cast<void*>(GetView()));
}
if (GetNextSibling()) {
fprintf(out, " next=%p", static_cast<void*>(GetNextSibling()));
aTo += nsPrintfCString(" next=%p", static_cast<void*>(GetNextSibling()));
}
if (GetPrevContinuation()) {
bool fluid = GetPrevInFlow() == GetPrevContinuation();
fprintf(out, " prev-%s=%p", fluid?"in-flow":"continuation",
aTo += nsPrintfCString(" prev-%s=%p", fluid?"in-flow":"continuation",
static_cast<void*>(GetPrevContinuation()));
}
if (GetNextContinuation()) {
bool fluid = GetNextInFlow() == GetNextContinuation();
fprintf(out, " next-%s=%p", fluid?"in-flow":"continuation",
aTo += nsPrintfCString(" next-%s=%p", fluid?"in-flow":"continuation",
static_cast<void*>(GetNextContinuation()));
}
void* IBsibling = Properties().Get(IBSplitSpecialSibling());
if (IBsibling) {
fprintf(out, " IBSplitSpecialSibling=%p", IBsibling);
aTo += nsPrintfCString(" IBSplitSpecialSibling=%p", IBsibling);
}
void* IBprevsibling = Properties().Get(IBSplitSpecialPrevSibling());
if (IBprevsibling) {
fprintf(out, " IBSplitSpecialPrevSibling=%p", IBprevsibling);
aTo += nsPrintfCString(" IBSplitSpecialPrevSibling=%p", IBprevsibling);
}
fprintf(out, " {%d,%d,%d,%d}", mRect.x, mRect.y, mRect.width, mRect.height);
aTo += nsPrintfCString(" {%d,%d,%d,%d}", mRect.x, mRect.y, mRect.width, mRect.height);
nsIFrame* f = const_cast<nsIFrame*>(this);
if (f->HasOverflowAreas()) {
nsRect vo = f->GetVisualOverflowRect();
if (!vo.IsEqualEdges(mRect)) {
fprintf(out, " 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)) {
fprintf(out, " 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);
}
}
if (0 != mState) {
fprintf(out, " [state=%016llx]", (unsigned long long)mState);
aTo += nsPrintfCString(" [state=%016llx]", (unsigned long long)mState);
}
if (IsTransformed()) {
fprintf(out, " transformed");
aTo += nsPrintfCString(" transformed");
}
if (ChildrenHavePerspective()) {
fprintf(out, " perspective");
aTo += nsPrintfCString(" perspective");
}
if (Preserves3DChildren()) {
fprintf(out, " preserves-3d-children");
aTo += nsPrintfCString(" preserves-3d-children");
}
if (Preserves3D()) {
fprintf(out, " preserves-3d");
aTo += nsPrintfCString(" preserves-3d");
}
if (mContent) {
fprintf(out, " [content=%p]", static_cast<void*>(mContent));
aTo += nsPrintfCString(" [content=%p]", static_cast<void*>(mContent));
}
fprintf(out, " [sc=%p", static_cast<void*>(mStyleContext));
aTo += nsPrintfCString(" [sc=%p", static_cast<void*>(mStyleContext));
if (mStyleContext) {
nsIAtom* pseudoTag = mStyleContext->GetPseudo();
if (pseudoTag) {
nsAutoString atomString;
pseudoTag->ToString(atomString);
fprintf(out, "%s", NS_LossyConvertUTF16toASCII(atomString).get());
aTo += nsPrintfCString("%s", NS_LossyConvertUTF16toASCII(atomString).get());
}
if (mParent && mStyleContext->GetParent() != mParent->StyleContext()) {
fprintf(out, ",parent=%p", mStyleContext->GetParent());
aTo += nsPrintfCString(",parent=%p", mStyleContext->GetParent());
}
}
fputs("]", out);
aTo += "]";
}
void
nsIFrame::List(FILE* out, int32_t aIndent, uint32_t aFlags) const
nsIFrame::List(FILE* out, const char* aPrefix, uint32_t aFlags) const
{
ListGeneric(out, aIndent, aFlags);
fputs("\n", out);
nsCString str;
ListGeneric(str, aPrefix, aFlags);
fprintf_stderr(out, "%s\n", str.get());
}
NS_IMETHODIMP
@ -5380,17 +5396,17 @@ nsFrame::MakeFrameName(const nsAString& aType, nsAString& aResult) const
void
nsIFrame::DumpFrameTree()
{
RootFrameList(PresContext(), stdout, 0);
RootFrameList(PresContext(), stdout);
}
void
nsIFrame::DumpFrameTreeLimited()
{
List(stdout, 0);
List(stdout);
}
void
nsIFrame::RootFrameList(nsPresContext* aPresContext, FILE* out, int32_t aIndent)
nsIFrame::RootFrameList(nsPresContext* aPresContext, FILE* out, const char* aPrefix)
{
if (!aPresContext || !out)
return;
@ -5399,7 +5415,7 @@ nsIFrame::RootFrameList(nsPresContext* aPresContext, FILE* out, int32_t aIndent)
if (shell) {
nsIFrame* frame = shell->FrameManager()->GetRootFrame();
if(frame) {
frame->List(out, aIndent);
frame->List(out, aPrefix);
}
}
}

Просмотреть файл

@ -335,12 +335,12 @@ nsFrameList::UnhookFrameFromSiblings(nsIFrame* aFrame)
void
nsFrameList::List(FILE* out) const
{
fputs("<\n", out);
fprintf_stderr(out, "<\n");
for (nsIFrame* frame = mFirstChild; frame;
frame = frame->GetNextSibling()) {
frame->List(out, 1);
frame->List(out, " ");
}
fputs(">\n", out);
fprintf_stderr(out, ">\n");
}
#endif

Просмотреть файл

@ -3252,22 +3252,23 @@ public:
ListTag(out, this);
}
static void ListTag(FILE* out, const nsIFrame* aFrame) {
nsAutoString tmp;
aFrame->GetFrameName(tmp);
fputs(NS_LossyConvertUTF16toASCII(tmp).get(), out);
fprintf(out, "@%p", static_cast<const void*>(aFrame));
nsAutoCString t;
ListTag(t, aFrame);
fputs(t.get(), out);
}
void ListGeneric(FILE* out, int32_t aIndent, uint32_t aFlags) const;
void ListTag(nsACString& aTo) const;
static void ListTag(nsACString& aTo, const nsIFrame* aFrame);
void ListGeneric(nsACString& aTo, const char* aPrefix = "", uint32_t aFlags = 0) const;
enum {
TRAVERSE_SUBDOCUMENT_FRAMES = 0x01
};
virtual void List(FILE* out, int32_t aIndent, uint32_t aFlags = 0) const;
virtual void List(FILE* out = stderr, const char* aPrefix = "", uint32_t aFlags = 0) const;
/**
* lists the frames beginning from the root frame
* - calls root frame's List(...)
*/
static void RootFrameList(nsPresContext* aPresContext,
FILE* out, int32_t aIndent);
FILE* out = stderr, const char* aPrefix = "");
virtual void DumpFrameTree();
void DumpFrameTreeLimited();

Просмотреть файл

@ -1753,9 +1753,10 @@ nsImageFrame::GetFrameName(nsAString& aResult) const
}
void
nsImageFrame::List(FILE* out, int32_t aIndent, uint32_t aFlags) const
nsImageFrame::List(FILE* out, const char* aPrefix, uint32_t aFlags) const
{
ListGeneric(out, aIndent, aFlags);
nsCString str;
ListGeneric(str, aPrefix, aFlags);
// output the img src url
nsCOMPtr<nsIImageLoadingContent> imageLoader = do_QueryInterface(mContent);
@ -1768,10 +1769,10 @@ nsImageFrame::List(FILE* out, int32_t aIndent, uint32_t aFlags) const
currentRequest->GetURI(getter_AddRefs(uri));
nsAutoCString uristr;
uri->GetAsciiSpec(uristr);
fprintf(out, " [src=%s]", uristr.get());
str += nsPrintfCString(" [src=%s]", uristr.get());
}
}
fputs("\n", out);
fprintf_stderr(out, "%s\n", str.get());
}
#endif

Просмотреть файл

@ -113,7 +113,7 @@ public:
#ifdef DEBUG_FRAME_DUMP
NS_IMETHOD GetFrameName(nsAString& aResult) const;
void List(FILE* out, int32_t aIndent, uint32_t aFlags = 0) const;
void List(FILE* out = stderr, const char* aPrefix = "", uint32_t aFlags = 0) const;
#endif
virtual int GetSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;

Просмотреть файл

@ -16,6 +16,7 @@
#include "nsIFrameInlines.h"
#include "mozilla/Assertions.h"
#include "mozilla/Likely.h"
#include "nsPrintfCString.h"
#ifdef DEBUG
static int32_t ctorCount;
@ -169,22 +170,22 @@ nsLineBox::Cleanup()
#ifdef DEBUG_FRAME_DUMP
static void
ListFloats(FILE* out, int32_t aIndent, const nsFloatCacheList& aFloats)
ListFloats(FILE* out, const char* aPrefix, const nsFloatCacheList& aFloats)
{
nsFloatCache* fc = aFloats.Head();
while (fc) {
nsFrame::IndentBy(out, aIndent);
nsCString str(aPrefix);
nsIFrame* frame = fc->mFloat;
fprintf(out, "floatframe@%p ", static_cast<void*>(frame));
str += nsPrintfCString("floatframe@%p ", static_cast<void*>(frame));
if (frame) {
nsAutoString frameName;
frame->GetFrameName(frameName);
fputs(NS_LossyConvertUTF16toASCII(frameName).get(), out);
str += NS_ConvertUTF16toUTF8(frameName).get();
}
else {
fputs("\n###!!! NULL out-of-flow frame", out);
str += "\n###!!! NULL out-of-flow frame";
}
fprintf(out, "\n");
fprintf_stderr(out, "%s\n", str.get());
fc = fc->Next();
}
}
@ -222,20 +223,30 @@ nsLineBox::StateToString(char* aBuf, int32_t aBufSize) const
void
nsLineBox::List(FILE* out, int32_t aIndent, uint32_t aFlags) const
{
nsFrame::IndentBy(out, aIndent);
nsCString str;
while (aIndent-- > 0) {
str += " ";
}
List(out, str.get(), aFlags);
}
void
nsLineBox::List(FILE* out, const char* aPrefix, uint32_t aFlags) const
{
nsCString str(aPrefix);
char cbuf[100];
fprintf(out, "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() && !GetCarriedOutBottomMargin().IsZero()) {
fprintf(out, "bm=%d ", GetCarriedOutBottomMargin().get());
str += nsPrintfCString("bm=%d ", GetCarriedOutBottomMargin().get());
}
fprintf(out, "{%d,%d,%d,%d} ",
str += nsPrintfCString("{%d,%d,%d,%d} ",
mBounds.x, mBounds.y, mBounds.width, mBounds.height);
if (mData &&
(!mData->mOverflowAreas.VisualOverflow().IsEqualEdges(mBounds) ||
!mData->mOverflowAreas.ScrollableOverflow().IsEqualEdges(mBounds))) {
fprintf(out, "vis-overflow=%d,%d,%d,%d scr-overflow=%d,%d,%d,%d ",
str += nsPrintfCString("vis-overflow=%d,%d,%d,%d scr-overflow=%d,%d,%d,%d ",
mData->mOverflowAreas.VisualOverflow().x,
mData->mOverflowAreas.VisualOverflow().y,
mData->mOverflowAreas.VisualOverflow().width,
@ -245,22 +256,22 @@ nsLineBox::List(FILE* out, int32_t aIndent, uint32_t aFlags) const
mData->mOverflowAreas.ScrollableOverflow().width,
mData->mOverflowAreas.ScrollableOverflow().height);
}
fprintf(out, "<\n");
fprintf_stderr(out, "%s<\n", str.get());
nsIFrame* frame = mFirstChild;
int32_t n = GetChildCount();
nsCString pfx(aPrefix);
pfx += " ";
while (--n >= 0) {
frame->List(out, aIndent + 1, aFlags);
frame->List(out, pfx.get(), aFlags);
frame = frame->GetNextSibling();
}
if (HasFloats()) {
nsFrame::IndentBy(out, aIndent);
fputs("> floats <\n", out);
ListFloats(out, aIndent + 1, mInlineData->mFloats);
fprintf_stderr(out, "%s> floats <\n", aPrefix);
ListFloats(out, pfx.get(), mInlineData->mFloats);
}
nsFrame::IndentBy(out, aIndent);
fputs(">\n", out);
fprintf_stderr(out, "%s>\n", aPrefix);
}
#endif

Просмотреть файл

@ -500,6 +500,7 @@ public:
char* StateToString(char* aBuf, int32_t aBufSize) const;
void List(FILE* out, int32_t aIndent, uint32_t aFlags = 0) const;
void List(FILE* out = stderr, const char* aPrefix = "", uint32_t aFlags = 0) const;
nsIFrame* LastChild() const;
#endif

Просмотреть файл

@ -237,14 +237,15 @@ nsPlaceholderFrame::GetFrameName(nsAString& aResult) const
}
void
nsPlaceholderFrame::List(FILE* out, int32_t aIndent, uint32_t aFlags) const
nsPlaceholderFrame::List(FILE* out, const char* aPrefix, uint32_t aFlags) const
{
ListGeneric(out, aIndent, aFlags);
nsCString str;
ListGeneric(str, aPrefix, aFlags);
if (mOutOfFlowFrame) {
fprintf(out, " outOfFlowFrame=");
nsFrame::ListTag(out, mOutOfFlowFrame);
str += " outOfFlowFrame=";
nsFrame::ListTag(str, mOutOfFlowFrame);
}
fputs("\n", out);
fprintf_stderr(out, "%s\n", str.get());
}
#endif

Просмотреть файл

@ -112,7 +112,7 @@ public:
#endif // DEBUG || (MOZ_REFLOW_PERF_DSP && MOZ_REFLOW_PERF)
#ifdef DEBUG_FRAME_DUMP
void List(FILE* out, int32_t aIndent, uint32_t aFlags = 0) const MOZ_OVERRIDE;
void List(FILE* out = stderr, const char* aPrefix = "", uint32_t aFlags = 0) const MOZ_OVERRIDE;
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
#endif // DEBUG

Просмотреть файл

@ -528,16 +528,19 @@ nsSubDocumentFrame::GetIntrinsicHeight()
#ifdef DEBUG_FRAME_DUMP
void
nsSubDocumentFrame::List(FILE* out, int32_t aIndent, uint32_t aFlags) const
nsSubDocumentFrame::List(FILE* out, const char* aPrefix, uint32_t aFlags) const
{
ListGeneric(out, aIndent, aFlags);
fputs("\n", out);
nsCString str;
ListGeneric(str, aPrefix, aFlags);
fprintf_stderr(out, "%s\n", str.get());
nsSubDocumentFrame* f = const_cast<nsSubDocumentFrame*>(this);
if (aFlags & TRAVERSE_SUBDOCUMENT_FRAMES) {
nsSubDocumentFrame* f = const_cast<nsSubDocumentFrame*>(this);
nsIFrame* subdocRootFrame = f->GetSubdocumentRootFrame();
if (subdocRootFrame) {
subdocRootFrame->List(out, aIndent + 1);
nsCString pfx(aPrefix);
pfx += " ";
subdocRootFrame->List(out, pfx.get(), aFlags);
}
}
}

Просмотреть файл

@ -24,7 +24,7 @@ public:
nsSubDocumentFrame(nsStyleContext* aContext);
#ifdef DEBUG_FRAME_DUMP
void List(FILE* out, int32_t aIndent, uint32_t aFlags = 0) const MOZ_OVERRIDE;
void List(FILE* out = stderr, const char* aPrefix = "", uint32_t aFlags = 0) const MOZ_OVERRIDE;
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
#endif

Просмотреть файл

@ -8503,21 +8503,22 @@ nsTextFrame::GetFrameName(nsAString& aResult) const
}
void
nsTextFrame::List(FILE* out, int32_t aIndent, uint32_t aFlags) const
nsTextFrame::List(FILE* out, const char* aPrefix, uint32_t aFlags) const
{
ListGeneric(out, aIndent, aFlags);
nsCString str;
ListGeneric(str, aPrefix, aFlags);
fprintf(out, " [run=%p]", static_cast<void*>(mTextRun));
str += nsPrintfCString(" [run=%p]", static_cast<void*>(mTextRun));
// Output the first/last content offset and prev/next in flow info
bool isComplete = uint32_t(GetContentEnd()) == GetContent()->TextLength();
fprintf(out, "[%d,%d,%c] ", GetContentOffset(), GetContentLength(),
str += nsPrintfCString("[%d,%d,%c] ", GetContentOffset(), GetContentLength(),
isComplete ? 'T':'F');
if (IsSelected()) {
fprintf(out, " SELECTED");
str += " SELECTED";
}
fputs("\n", out);
fprintf_stderr(out, "%s\n", str.get());
}
#endif

Просмотреть файл

@ -125,7 +125,7 @@ public:
virtual void InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey = 0) MOZ_OVERRIDE;
#ifdef DEBUG_FRAME_DUMP
void List(FILE* out, int32_t aIndent, uint32_t aFlags = 0) const MOZ_OVERRIDE;
void List(FILE* out = stderr, const char* aPrefix = "", uint32_t aFlags = 0) const MOZ_OVERRIDE;
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
void ToCString(nsCString& aBuf, int32_t* aTotalContentLength) const;
#endif