diff --git a/accessible/src/base/nsAccessible.cpp b/accessible/src/base/nsAccessible.cpp index 07bf0582b5a..648deda4d1c 100644 --- a/accessible/src/base/nsAccessible.cpp +++ b/accessible/src/base/nsAccessible.cpp @@ -94,7 +94,6 @@ #include "nsNetUtil.h" #ifdef NS_DEBUG -#include "nsIFrameDebug.h" #include "nsIDOMCharacterData.h" #endif diff --git a/extensions/layout-debug/src/nsLayoutDebuggingTools.cpp b/extensions/layout-debug/src/nsLayoutDebuggingTools.cpp index 74dd0d1d7a1..bc3996ef25f 100644 --- a/extensions/layout-debug/src/nsLayoutDebuggingTools.cpp +++ b/extensions/layout-debug/src/nsLayoutDebuggingTools.cpp @@ -58,7 +58,6 @@ #include "nsIPresShell.h" #include "nsIViewManager.h" #include "nsIFrame.h" -#include "nsIFrameDebug.h" #include "nsILayoutDebugger.h" #include "nsLayoutCID.h" @@ -434,10 +433,7 @@ DumpFramesRecur(nsIDocShell* aDocShell, FILE* out) if (shell) { nsIFrame* root = shell->GetRootFrame(); if (root) { - nsIFrameDebug* fdbg = do_QueryFrame(root); - if (fdbg) { - fdbg->List(out, 0); - } + root->List(out, 0); } } else { diff --git a/extensions/layout-debug/src/nsRegressionTester.cpp b/extensions/layout-debug/src/nsRegressionTester.cpp index 832292eb59f..1195fb7b86f 100644 --- a/extensions/layout-debug/src/nsRegressionTester.cpp +++ b/extensions/layout-debug/src/nsRegressionTester.cpp @@ -55,7 +55,6 @@ #include "nsIDocShell.h" #include "nsIContentViewer.h" #include "nsIContentViewerFile.h" -#include "nsIFrameDebug.h" #include "nsIFrame.h" #include "nsStyleStruct.h" #include "nsIFrameUtil.h" @@ -105,15 +104,12 @@ nsRegressionTester::DumpFrameModel(nsIDOMWindow *aWindowToDump, nsILocalFile *aD *aResult = DUMP_RESULT_LOADING; return NS_OK; } - + nsCOMPtr presShell; docShell->GetPresShell(getter_AddRefs(presShell)); nsIFrame* root = presShell->GetRootFrame(); - nsIFrameDebug* fdbg = do_QueryFrame(root); - if (NS_FAILED(rv)) return rv; - FILE* fp = stdout; if (aDestFile) { @@ -131,7 +127,7 @@ nsRegressionTester::DumpFrameModel(nsIDOMWindow *aWindowToDump, nsILocalFile *aD } } else { - fdbg->DumpRegressionData(presShell->GetPresContext(), fp, 0); + root->DumpRegressionData(presShell->GetPresContext(), fp, 0); } if (fp != stdout) fclose(fp); diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 00a0418f4c8..a526310c7e8 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -6458,11 +6458,8 @@ nsCSSFrameConstructor::ContentAppended(nsIContent* aContainer, #ifdef DEBUG if (gReallyNoisyContentUpdates) { - nsIFrameDebug* fdbg = do_QueryFrame(parentFrame); - if (fdbg) { - printf("nsCSSFrameConstructor::ContentAppended: resulting frame model:\n"); - fdbg->List(stdout, 0); - } + printf("nsCSSFrameConstructor::ContentAppended: resulting frame model:\n"); + parentFrame->List(stdout, 0); } #endif @@ -6569,12 +6566,9 @@ nsCSSFrameConstructor::ContentInserted(nsIContent* aContainer, InvalidateCanvasIfNeeded(mPresShell, aChild); #ifdef DEBUG if (gReallyNoisyContentUpdates) { - nsIFrameDebug* fdbg = do_QueryFrame(mFixedContainingBlock); - if (fdbg) { - printf("nsCSSFrameConstructor::ContentInserted: resulting frame " - "model:\n"); - fdbg->List(stdout, 0); - } + printf("nsCSSFrameConstructor::ContentInserted: resulting frame " + "model:\n"); + mFixedContainingBlock->List(stdout, 0); } #endif } @@ -6883,11 +6877,8 @@ nsCSSFrameConstructor::ContentInserted(nsIContent* aContainer, #ifdef DEBUG if (gReallyNoisyContentUpdates && parentFrame) { - nsIFrameDebug* fdbg = do_QueryFrame(parentFrame); - if (fdbg) { - printf("nsCSSFrameConstructor::ContentInserted: resulting frame model:\n"); - fdbg->List(stdout, 0); - } + printf("nsCSSFrameConstructor::ContentInserted: resulting frame model:\n"); + parentFrame->List(stdout, 0); } #endif @@ -7279,11 +7270,8 @@ nsCSSFrameConstructor::ContentRemoved(nsIContent* aContainer, if (gReallyNoisyContentUpdates) { printf("nsCSSFrameConstructor::ContentRemoved: childFrame="); nsFrame::ListTag(stdout, childFrame); - printf("\n"); - - nsIFrameDebug* fdbg = do_QueryFrame(parentFrame); - if (fdbg) - fdbg->List(stdout, 0); + putchar('\n'); + parentFrame->List(stdout, 0); } #endif @@ -7381,11 +7369,8 @@ nsCSSFrameConstructor::ContentRemoved(nsIContent* aContainer, #ifdef DEBUG if (gReallyNoisyContentUpdates && parentFrame) { - nsIFrameDebug* fdbg = do_QueryFrame(parentFrame); - if (fdbg) { - printf("nsCSSFrameConstructor::ContentRemoved: resulting frame model:\n"); - fdbg->List(stdout, 0); - } + printf("nsCSSFrameConstructor::ContentRemoved: resulting frame model:\n"); + parentFrame->List(stdout, 0); } #endif } @@ -10830,22 +10815,20 @@ nsCSSFrameConstructor::ConstructInline(nsFrameConstructorState& aState, MarkIBSpecialPrevSibling(blockFrame, newFrame); MarkIBSpecialPrevSibling(inlineFrame, blockFrame); - #ifdef DEBUG +#ifdef DEBUG if (gNoisyInlineConstruction) { - nsIFrameDebug* frameDebug; - printf("nsCSSFrameConstructor::ConstructInline:\n"); - if ( (frameDebug = do_QueryFrame(*aNewFrame)) ) { + if (*aNewFrame) { printf(" ==> leading inline frame:\n"); - frameDebug->List(stdout, 2); + (*aNewFrame)->List(stdout, 2); } - if ( (frameDebug = do_QueryFrame(blockFrame)) ) { + if (blockFrame) { printf(" ==> block frame:\n"); - frameDebug->List(stdout, 2); + blockFrame->List(stdout, 2); } - if ( (frameDebug = do_QueryFrame(inlineFrame)) ) { + if (inlineFrame) { printf(" ==> trailing inline frame:\n"); - frameDebug->List(stdout, 2); + inlineFrame->List(stdout, 2); } } #endif diff --git a/layout/base/nsDisplayList.h b/layout/base/nsDisplayList.h index 39cd4c4ee7a..1c0d0afe291 100644 --- a/layout/base/nsDisplayList.h +++ b/layout/base/nsDisplayList.h @@ -944,7 +944,7 @@ protected: #if defined(MOZ_REFLOW_PERF_DSP) && defined(MOZ_REFLOW_PERF) /** * This class implements painting of reflow counts. Ideally, we would simply - * make all the frame names be those returned by nsIFrameDebug::GetFrameName + * make all the frame names be those returned by nsFrame::GetFrameName * (except that tosses in the content tag name!) and support only one color * and eliminate this class altogether in favor of nsDisplayGeneric, but for * the time being we can't pass args to a PaintCallback, so just have a diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp index 2374f2a5266..0df42b461b1 100644 --- a/layout/base/nsDocumentViewer.cpp +++ b/layout/base/nsDocumentViewer.cpp @@ -98,7 +98,6 @@ #include "nsIDocShellTreeOwner.h" #include "nsIDocShell.h" #include "nsIBaseWindow.h" -#include "nsIFrameDebug.h" #include "nsILayoutHistoryState.h" #include "nsIParser.h" #include "nsGUIEvent.h" diff --git a/layout/base/nsFrameManager.cpp b/layout/base/nsFrameManager.cpp index 0bbc4f727f5..2d24138a8f5 100644 --- a/layout/base/nsFrameManager.cpp +++ b/layout/base/nsFrameManager.cpp @@ -766,11 +766,8 @@ DumpContext(nsIFrame* aFrame, nsStyleContext* aContext) if (aFrame) { fputs("frame: ", stdout); nsAutoString name; - nsIFrameDebug *frameDebug = do_QueryFrame(aFrame); - if (frameDebug) { - frameDebug->GetFrameName(name); - fputs(NS_LossyConvertUTF16toASCII(name).get(), stdout); - } + aFrame->GetFrameName(name); + fputs(NS_LossyConvertUTF16toASCII(name).get(), stdout); fprintf(stdout, " (%p)", static_cast(aFrame)); } if (aContext) { diff --git a/layout/base/nsLayoutDebugger.cpp b/layout/base/nsLayoutDebugger.cpp index 804803cc09c..5f0dc6aeb1f 100644 --- a/layout/base/nsLayoutDebugger.cpp +++ b/layout/base/nsLayoutDebugger.cpp @@ -41,8 +41,7 @@ */ #include "nsILayoutDebugger.h" -#include "nsIFrame.h" -#include "nsIFrameDebug.h" +#include "nsFrame.h" #include "nsDisplayList.h" #include @@ -101,28 +100,28 @@ NS_IMPL_ISUPPORTS1(nsLayoutDebugger, nsILayoutDebugger) NS_IMETHODIMP nsLayoutDebugger::SetShowFrameBorders(PRBool aEnable) { - nsIFrameDebug::ShowFrameBorders(aEnable); + nsFrame::ShowFrameBorders(aEnable); return NS_OK; } NS_IMETHODIMP nsLayoutDebugger::GetShowFrameBorders(PRBool* aResult) { - *aResult = nsIFrameDebug::GetShowFrameBorders(); + *aResult = nsFrame::GetShowFrameBorders(); return NS_OK; } NS_IMETHODIMP nsLayoutDebugger::SetShowEventTargetFrameBorder(PRBool aEnable) { - nsIFrameDebug::ShowEventTargetFrameBorder(aEnable); + nsFrame::ShowEventTargetFrameBorder(aEnable); return NS_OK; } NS_IMETHODIMP nsLayoutDebugger::GetShowEventTargetFrameBorder(PRBool* aResult) { - *aResult = nsIFrameDebug::GetShowEventTargetFrameBorder(); + *aResult = nsFrame::GetShowEventTargetFrameBorder(); return NS_OK; } @@ -159,10 +158,9 @@ PrintDisplayListTo(nsDisplayListBuilder* aBuilder, const nsDisplayList& aList, fputc(' ', aOutput); } nsIFrame* f = i->GetUnderlyingFrame(); - nsIFrameDebug* fDebug = do_QueryFrame(f); nsAutoString fName; - if (fDebug) { - fDebug->GetFrameName(fName); + if (f) { + f->GetFrameName(fName); } nsRect rect = i->GetBounds(aBuilder); switch (i->GetType()) { @@ -194,7 +192,8 @@ PrintDisplayListTo(nsDisplayListBuilder* aBuilder, const nsDisplayList& aList, } void -nsIFrameDebug::PrintDisplayList(nsDisplayListBuilder* aBuilder, const nsDisplayList& aList) +nsFrame::PrintDisplayList(nsDisplayListBuilder* aBuilder, + const nsDisplayList& aList) { PrintDisplayListTo(aBuilder, aList, 0, stderr); } diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index d4943ee4190..b0d3f52e1dd 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -942,10 +942,10 @@ nsLayoutUtils::GetFrameForPoint(nsIFrame* aFrame, nsPoint aPt, #ifdef DEBUG if (gDumpEventList) { fprintf(stderr, "Event handling --- (%d,%d):\n", aPt.x, aPt.y); - nsIFrameDebug::PrintDisplayList(&builder, list); + nsFrame::PrintDisplayList(&builder, list); } #endif - + nsDisplayItem::HitTestState hitTestState; nsIFrame* result = list.HitTest(&builder, aPt, &hitTestState); list.DeleteAll(); @@ -1114,20 +1114,20 @@ nsLayoutUtils::PaintFrame(nsIRenderingContext* aRenderingContext, nsIFrame* aFra if (gDumpPaintList) { fprintf(stderr, "Painting --- before optimization (dirty %d,%d,%d,%d):\n", dirtyRect.x, dirtyRect.y, dirtyRect.width, dirtyRect.height); - nsIFrameDebug::PrintDisplayList(&builder, list); + nsFrame::PrintDisplayList(&builder, list); } #endif - + nsRegion visibleRegion = aDirtyRegion; list.OptimizeVisibility(&builder, &visibleRegion); #ifdef DEBUG if (gDumpPaintList) { fprintf(stderr, "Painting --- after optimization:\n"); - nsIFrameDebug::PrintDisplayList(&builder, list); + nsFrame::PrintDisplayList(&builder, list); } #endif - + list.Paint(&builder, aRenderingContext, aDirtyRegion.GetBounds()); // Flush the list so we don't trigger the IsEmpty-on-destruction assertion list.DeleteAll(); @@ -1279,7 +1279,7 @@ nsLayoutUtils::ComputeRepaintRegionForCopy(nsIFrame* aRootFrame, fprintf(stderr, "Repaint region for copy --- before optimization (area %d,%d,%d,%d, frame %p):\n", rect.x, rect.y, rect.width, rect.height, (void*)aMovingFrame); - nsIFrameDebug::PrintDisplayList(&builder, list); + nsFrame::PrintDisplayList(&builder, list); } #endif @@ -1292,7 +1292,7 @@ nsLayoutUtils::ComputeRepaintRegionForCopy(nsIFrame* aRootFrame, #ifdef DEBUG if (gDumpRepaintRegionForCopy) { fprintf(stderr, "Repaint region for copy --- after optimization:\n"); - nsIFrameDebug::PrintDisplayList(&builder, list); + nsFrame::PrintDisplayList(&builder, list); } #endif diff --git a/layout/base/nsPresContext.cpp b/layout/base/nsPresContext.cpp index 04762d35f0e..192443db5b8 100644 --- a/layout/base/nsPresContext.cpp +++ b/layout/base/nsPresContext.cpp @@ -2299,17 +2299,17 @@ nsRootPresContext::GetPluginGeometryUpdates(nsIFrame* aChangedSubtree, if (gDumpPluginList) { fprintf(stderr, "Plugins --- before optimization (bounds %d,%d,%d,%d):\n", bounds.x, bounds.y, bounds.width, bounds.height); - nsIFrameDebug::PrintDisplayList(&builder, list); + nsFrame::PrintDisplayList(&builder, list); } #endif - + nsRegion visibleRegion(bounds); list.OptimizeVisibility(&builder, &visibleRegion); #ifdef DEBUG if (gDumpPluginList) { fprintf(stderr, "Plugins --- after optimization:\n"); - nsIFrameDebug::PrintDisplayList(&builder, list); + nsFrame::PrintDisplayList(&builder, list); } #endif diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index d56c64aa230..b6ac1b153f1 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -131,9 +131,6 @@ #include "nsLayoutErrors.h" #include "nsLayoutUtils.h" #include "nsCSSRendering.h" -#ifdef NS_DEBUG -#include "nsIFrameDebug.h" -#endif // for |#ifdef DEBUG| code #include "prenv.h" #include "nsIAttribute.h" @@ -1455,7 +1452,7 @@ PRLogModuleInfo* PresShell::gLog; static void VerifyStyleTree(nsPresContext* aPresContext, nsFrameManager* aFrameManager) { - if (nsIFrameDebug::GetVerifyStyleTreeEnable()) { + if (nsFrame::GetVerifyStyleTreeEnable()) { nsIFrame* rootFrame = aFrameManager->GetRootFrame(); aFrameManager->DebugVerifyStyleTree(rootFrame); } @@ -6142,7 +6139,7 @@ PresShell::HandleEvent(nsIView *aView, void PresShell::ShowEventTargetDebug() { - if (nsIFrameDebug::GetShowEventTargetFrameBorder() && + if (nsFrame::GetShowEventTargetFrameBorder() && GetCurrentEventFrame()) { if (mDrawEventTargetFrame) { mDrawEventTargetFrame->Invalidate( @@ -7494,37 +7491,22 @@ static NS_DEFINE_CID(kWidgetCID, NS_CHILD_CID); static void LogVerifyMessage(nsIFrame* k1, nsIFrame* k2, const char* aMsg) { - printf("verifyreflow: "); - nsAutoString name; - if (nsnull != k1) { - nsIFrameDebug *frameDebug = do_QueryFrame(k1); - if (frameDebug) { - frameDebug->GetFrameName(name); - } + nsAutoString n1, n2; + if (k1) { + k1->GetFrameName(n1); + } else { + n1.Assign(NS_LITERAL_STRING("(null)")); } - else { - name.Assign(NS_LITERAL_STRING("(null)")); + + if (k2) { + k2->GetFrameName(n2); + } else { + n2.Assign(NS_LITERAL_STRING("(null)")); } - fputs(NS_LossyConvertUTF16toASCII(name).get(), stdout); - fprintf(stdout, " %p ", (void*)k1); - - printf(" != "); - - if (nsnull != k2) { - nsIFrameDebug *frameDebug = do_QueryFrame(k2); - if (frameDebug) { - frameDebug->GetFrameName(name); - } - } - else { - name.Assign(NS_LITERAL_STRING("(null)")); - } - fputs(NS_LossyConvertUTF16toASCII(name).get(), stdout); - - fprintf(stdout, " %p ", (void*)k2); - - printf(" %s", aMsg); + printf("verifyreflow: %s %p != %s %p %s\n", + NS_LossyConvertUTF16toASCII(n1).get(), (void*)k1, + NS_LossyConvertUTF16toASCII(n2).get(), (void*)k2, aMsg); } static void @@ -7533,27 +7515,19 @@ LogVerifyMessage(nsIFrame* k1, nsIFrame* k2, const char* aMsg, { printf("VerifyReflow Error:\n"); nsAutoString name; - nsIFrameDebug *frameDebug = do_QueryFrame(k1); - if (frameDebug) { - fprintf(stdout, " "); - frameDebug->GetFrameName(name); - fputs(NS_LossyConvertUTF16toASCII(name).get(), stdout); - fprintf(stdout, " %p ", (void*)k1); + + if (k1) { + k1->GetFrameName(name); + printf(" %s %p ", NS_LossyConvertUTF16toASCII(name).get(), (void*)k1); } - printf("{%d, %d, %d, %d}", r1.x, r1.y, r1.width, r1.height); + printf("{%d, %d, %d, %d} != \n", r1.x, r1.y, r1.width, r1.height); - printf(" != \n"); - - frameDebug = do_QueryFrame(k2); - if (frameDebug) { - fprintf(stdout, " "); - frameDebug->GetFrameName(name); - fputs(NS_LossyConvertUTF16toASCII(name).get(), stdout); - fprintf(stdout, " %p ", (void*)k2); + if (k2) { + k2->GetFrameName(name); + printf(" %s %p ", NS_LossyConvertUTF16toASCII(name).get(), (void*)k2); } - printf("{%d, %d, %d, %d}\n", r2.x, r2.y, r2.width, r2.height); - - printf(" %s\n", aMsg); + printf("{%d, %d, %d, %d}\n %s\n", + r2.x, r2.y, r2.width, r2.height, aMsg); } static void @@ -7562,27 +7536,19 @@ LogVerifyMessage(nsIFrame* k1, nsIFrame* k2, const char* aMsg, { printf("VerifyReflow Error:\n"); nsAutoString name; - nsIFrameDebug *frameDebug = do_QueryFrame(k1); - if (frameDebug) { - fprintf(stdout, " "); - frameDebug->GetFrameName(name); - fputs(NS_LossyConvertUTF16toASCII(name).get(), stdout); - fprintf(stdout, " %p ", (void*)k1); + + if (k1) { + k1->GetFrameName(name); + printf(" %s %p ", NS_LossyConvertUTF16toASCII(name).get(), (void*)k1); } - printf("{%d, %d, %d, %d}", r1.x, r1.y, r1.width, r1.height); + printf("{%d, %d, %d, %d} != \n", r1.x, r1.y, r1.width, r1.height); - printf(" != \n"); - - frameDebug = do_QueryFrame(k2); - if (frameDebug) { - fprintf(stdout, " "); - frameDebug->GetFrameName(name); - fputs(NS_LossyConvertUTF16toASCII(name).get(), stdout); - fprintf(stdout, " %p ", (void*)k2); + if (k2) { + k2->GetFrameName(name); + printf(" %s %p ", NS_LossyConvertUTF16toASCII(name).get(), (void*)k2); } - printf("{%d, %d, %d, %d}\n", r2.x, r2.y, r2.width, r2.height); - - printf(" %s\n", aMsg); + printf("{%d, %d, %d, %d}\n %s\n", + r2.x, r2.y, r2.width, r2.height, aMsg); } static PRBool @@ -7935,15 +7901,9 @@ PresShell::VerifyIncrementalReflow() PRBool ok = CompareTrees(mPresContext, root1, cx, root2); if (!ok && (VERIFY_REFLOW_NOISY & gVerifyReflowFlags)) { printf("Verify reflow failed, primary tree:\n"); - nsIFrameDebug* frameDebug = do_QueryFrame(root1); - if (frameDebug) { - frameDebug->List(stdout, 0); - } + root1->List(stdout, 0); printf("Verification tree:\n"); - frameDebug = do_QueryFrame(root2); - if (frameDebug) { - frameDebug->List(stdout, 0); - } + root2->List(stdout, 0); } #ifdef DEBUG_Eli diff --git a/layout/forms/nsListControlFrame.h b/layout/forms/nsListControlFrame.h index f4320a6d97f..d6eea38bbbd 100644 --- a/layout/forms/nsListControlFrame.h +++ b/layout/forms/nsListControlFrame.h @@ -130,7 +130,6 @@ public: PRUint32 aFlags); #ifdef DEBUG - // nsIFrameDebug NS_IMETHOD GetFrameName(nsAString& aResult) const; #endif diff --git a/layout/generic/Makefile.in b/layout/generic/Makefile.in index 7aec50a792a..3e180233ced 100644 --- a/layout/generic/Makefile.in +++ b/layout/generic/Makefile.in @@ -90,7 +90,6 @@ EXPORTS = \ nsIAnonymousContentCreator.h \ nsICanvasFrame.h \ nsIFrame.h \ - nsIFrameDebug.h \ nsIFrameFrame.h \ nsIFrameUtil.h \ nsIImageFrame.h \ diff --git a/layout/generic/nsAbsoluteContainingBlock.cpp b/layout/generic/nsAbsoluteContainingBlock.cpp index aa2c41caedf..7f2433fa20e 100644 --- a/layout/generic/nsAbsoluteContainingBlock.cpp +++ b/layout/generic/nsAbsoluteContainingBlock.cpp @@ -403,13 +403,10 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame* aDelegat if (nsBlockFrame::gNoisyReflow) { nsFrame::IndentBy(stdout,nsBlockFrame::gNoiseIndent); printf("abs pos "); - if (nsnull != aKidFrame) { - nsIFrameDebug *frameDebug = do_QueryFrame(aKidFrame); - if (frameDebug) { - nsAutoString name; - frameDebug->GetFrameName(name); - printf("%s ", NS_LossyConvertUTF16toASCII(name).get()); - } + if (aKidFrame) { + nsAutoString name; + aKidFrame->GetFrameName(name); + printf("%s ", NS_LossyConvertUTF16toASCII(name).get()); } char width[16]; @@ -547,16 +544,13 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame* aDelegat if (nsBlockFrame::gNoisyReflow) { nsFrame::IndentBy(stdout,nsBlockFrame::gNoiseIndent - 1); printf("abs pos "); - if (nsnull != aKidFrame) { - nsIFrameDebug *frameDebug = do_QueryFrame(aKidFrame); - if (frameDebug) { - nsAutoString name; - frameDebug->GetFrameName(name); - printf("%s ", NS_LossyConvertUTF16toASCII(name).get()); - } + if (aKidFrame) { + nsAutoString name; + aKidFrame->GetFrameName(name); + printf("%s ", NS_LossyConvertUTF16toASCII(name).get()); } - printf("%p rect=%d,%d,%d,%d", aKidFrame, rect.x, rect.y, rect.width, rect.height); - printf("\n"); + printf("%p rect=%d,%d,%d,%d\n", (void*)aKidFrame, + rect.x, rect.y, rect.width, rect.height); } #endif diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index 94b4de19f06..ceab0c3d188 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -439,10 +439,7 @@ nsBlockFrame::List(FILE* out, PRInt32 aIndent) const } fputs("<\n", out); while (kid) { - nsIFrameDebug *frameDebug = do_QueryFrame(kid); - if (frameDebug) { - frameDebug->List(out, aIndent + 1); - } + kid->List(out, aIndent + 1); kid = kid->GetNextSibling(); } IndentBy(out, aIndent); @@ -6845,7 +6842,7 @@ nsBlockFrame::CheckFloats(nsBlockReflowState& aState) if ((!equal || lineFloats.Length() != storedFloats.Length()) && !anyLineDirty) { NS_WARNING("nsBlockFrame::CheckFloats: Explicit float list is out of sync with float cache"); #if defined(DEBUG_roc) - nsIFrameDebug::RootFrameList(PresContext(), stdout, 0); + nsFrame::RootFrameList(PresContext(), stdout, 0); for (i = 0; i < lineFloats.Length(); ++i) { printf("Line float: %p\n", lineFloats.ElementAt(i)); } diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp index c428deecb8a..fec6b52e264 100644 --- a/layout/generic/nsContainerFrame.cpp +++ b/layout/generic/nsContainerFrame.cpp @@ -1629,10 +1629,7 @@ nsContainerFrame::List(FILE* out, PRInt32 aIndent) const NS_ASSERTION(kid->GetParent() == (nsIFrame*)this, "bad parent frame pointer"); // Have the child frame list - nsIFrameDebug *frameDebug = do_QueryFrame(kid); - if (frameDebug) { - frameDebug->List(out, aIndent + 1); - } + kid->List(out, aIndent + 1); kid = kid->GetNextSibling(); } IndentBy(out, aIndent); diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index 184a4023050..21b56e5e860 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -168,29 +168,29 @@ static void RefreshContentFrames(nsPresContext* aPresContext, nsIContent * aStar #include "prenv.h" -// start nsIFrameDebug +// Formerly the nsIFrameDebug interface #ifdef NS_DEBUG static PRBool gShowFrameBorders = PR_FALSE; -void nsIFrameDebug::ShowFrameBorders(PRBool aEnable) +void nsFrame::ShowFrameBorders(PRBool aEnable) { gShowFrameBorders = aEnable; } -PRBool nsIFrameDebug::GetShowFrameBorders() +PRBool nsFrame::GetShowFrameBorders() { return gShowFrameBorders; } static PRBool gShowEventTargetFrameBorder = PR_FALSE; -void nsIFrameDebug::ShowEventTargetFrameBorder(PRBool aEnable) +void nsFrame::ShowEventTargetFrameBorder(PRBool aEnable) { gShowEventTargetFrameBorder = aEnable; } -PRBool nsIFrameDebug::GetShowEventTargetFrameBorder() +PRBool nsFrame::GetShowEventTargetFrameBorder() { return gShowEventTargetFrameBorder; } @@ -206,7 +206,7 @@ static PRLogModuleInfo* gStyleVerifyTreeLogModuleInfo; static PRBool gStyleVerifyTreeEnable = PRBool(0x55); PRBool -nsIFrameDebug::GetVerifyStyleTreeEnable() +nsFrame::GetVerifyStyleTreeEnable() { if (gStyleVerifyTreeEnable == PRBool(0x55)) { if (nsnull == gStyleVerifyTreeLogModuleInfo) { @@ -218,13 +218,13 @@ nsIFrameDebug::GetVerifyStyleTreeEnable() } void -nsIFrameDebug::SetVerifyStyleTreeEnable(PRBool aEnabled) +nsFrame::SetVerifyStyleTreeEnable(PRBool aEnabled) { gStyleVerifyTreeEnable = aEnabled; } PRLogModuleInfo* -nsIFrameDebug::GetLogModuleInfo() +nsFrame::GetLogModuleInfo() { if (nsnull == gLogModule) { gLogModule = PR_NewLogModule("frame"); @@ -233,29 +233,26 @@ nsIFrameDebug::GetLogModuleInfo() } void -nsIFrameDebug::DumpFrameTree(nsIFrame* aFrame) +nsFrame::DumpFrameTree(nsIFrame* aFrame) { RootFrameList(aFrame->PresContext(), stdout, 0); } void -nsIFrameDebug::RootFrameList(nsPresContext* aPresContext, FILE* out, PRInt32 aIndent) +nsFrame::RootFrameList(nsPresContext* aPresContext, FILE* out, PRInt32 aIndent) { - if((nsnull == aPresContext) || (nsnull == out)) + if (!aPresContext || !out) return; nsIPresShell *shell = aPresContext->GetPresShell(); - if (nsnull != shell) { + if (shell) { nsIFrame* frame = shell->FrameManager()->GetRootFrame(); - if(nsnull != frame) { - nsIFrameDebug* debugFrame = do_QueryFrame(frame); - if (debugFrame) - debugFrame->List(out, aIndent); + if(frame) { + frame->List(out, aIndent); } } } #endif -// end nsIFrameDebug void NS_MergeReflowStatusInto(nsReflowStatus* aPrimary, nsReflowStatus aSecondary) @@ -334,9 +331,6 @@ nsFrame::~nsFrame() NS_QUERYFRAME_HEAD(nsFrame) NS_QUERYFRAME_ENTRY(nsIFrame) -#ifdef DEBUG - NS_QUERYFRAME_ENTRY(nsIFrameDebug) -#endif NS_QUERYFRAME_TAIL ///////////////////////////////////////////////////////////////////////////// @@ -1212,12 +1206,12 @@ DisplayDebugBorders(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame, const nsDisplayListSet& aLists) { // Draw a border around the child // REVIEW: From nsContainerFrame::PaintChild - if (nsIFrameDebug::GetShowFrameBorders() && !aFrame->GetRect().IsEmpty()) { + if (nsFrame::GetShowFrameBorders() && !aFrame->GetRect().IsEmpty()) { aLists.Outlines()->AppendNewToTop(new (aBuilder) nsDisplayGeneric(aFrame, PaintDebugBorder, "DebugBorder")); } // Draw a border around the current event target - if (nsIFrameDebug::GetShowEventTargetFrameBorder() && + if (nsFrame::GetShowEventTargetFrameBorder() && aFrame->PresContext()->PresShell()->GetDrawEventTargetFrame() == aFrame) { aLists.Outlines()->AppendNewToTop(new (aBuilder) nsDisplayGeneric(aFrame, PaintEventTargetBorder, "EventTargetBorder")); @@ -4391,10 +4385,7 @@ nsFrame::DumpBaseRegressionData(nsPresContext* aPresContext, FILE* out, PRInt32 } aIndent++; while (kid) { - nsIFrameDebug* frameDebug = do_QueryFrame(kid); - if (kid) { - frameDebug->DumpRegressionData(aPresContext, out, aIndent); - } + kid->DumpRegressionData(aPresContext, out, aIndent); kid = kid->GetNextSibling(); } aIndent--; @@ -6742,13 +6733,7 @@ nsAdaptorPrintReason(nsHTMLReflowState& aReflowState) void nsFrame::GetBoxName(nsAutoString& aName) { - nsIFrameDebug* frameDebug; - nsAutoString name; - if (NS_SUCCEEDED(QueryInterface(NS_GET_IID(nsIFrameDebug), (void**)&frameDebug))) { - frameDebug->GetFrameName(name); - } - - aName = name; + GetFrameName(aName); } #endif @@ -7288,10 +7273,9 @@ void DR_State::DisplayFrameTypeInfo(nsIFrame* aFrame, printf(" "); } if(!strcmp(frameTypeInfo->mNameAbbrev, "unknown")) { - nsAutoString name; - nsIFrameDebug* frameDebug = do_QueryFrame(aFrame); - if (frameDebug) { - frameDebug->GetFrameName(name); + if (aFrame) { + nsAutoString name; + aFrame->GetFrameName(name); printf("%s %p ", NS_LossyConvertUTF16toASCII(name).get(), (void*)aFrame); } else { diff --git a/layout/generic/nsFrame.h b/layout/generic/nsFrame.h index f33c5b0b008..9572054cf06 100644 --- a/layout/generic/nsFrame.h +++ b/layout/generic/nsFrame.h @@ -45,9 +45,6 @@ #include "nsRect.h" #include "nsString.h" #include "prlog.h" -#ifdef NS_DEBUG -#include "nsIFrameDebug.h" -#endif #include "nsIPresShell.h" #include "nsFrameSelection.h" @@ -70,7 +67,7 @@ #ifdef NS_DEBUG #define NS_FRAME_LOG(_bit,_args) \ PR_BEGIN_MACRO \ - if (NS_FRAME_LOG_TEST(nsIFrameDebug::GetLogModuleInfo(),_bit)) { \ + if (NS_FRAME_LOG_TEST(nsFrame::GetLogModuleInfo(),_bit)) { \ PR_LogPrint _args; \ } \ PR_END_MACRO @@ -87,14 +84,14 @@ // XXX remove me #define NS_FRAME_TRACE_MSG(_bit,_args) \ PR_BEGIN_MACRO \ - if (NS_FRAME_LOG_TEST(nsIFrameDebug::GetLogModuleInfo(),_bit)) { \ + if (NS_FRAME_LOG_TEST(nsFrame::GetLogModuleInfo(),_bit)) { \ TraceMsg _args; \ } \ PR_END_MACRO #define NS_FRAME_TRACE(_bit,_args) \ PR_BEGIN_MACRO \ - if (NS_FRAME_LOG_TEST(nsIFrameDebug::GetLogModuleInfo(),_bit)) { \ + if (NS_FRAME_LOG_TEST(nsFrame::GetLogModuleInfo(),_bit)) { \ TraceMsg _args; \ } \ PR_END_MACRO @@ -125,9 +122,6 @@ struct nsBoxLayoutMetrics; * behavior is to keep the frame and view position and size in sync. */ class nsFrame : public nsBox -#ifdef NS_DEBUG - , public nsIFrameDebug -#endif { public: /** @@ -232,12 +226,6 @@ public: NS_IMETHOD GetOffsetFromView(nsPoint& aOffset, nsIView** aView) const; virtual nsIAtom* GetType() const; virtual PRBool IsContainingBlock() const; -#ifdef NS_DEBUG - NS_IMETHOD List(FILE* out, PRInt32 aIndent) const; - NS_IMETHOD GetFrameName(nsAString& aResult) const; - NS_IMETHOD_(nsFrameState) GetDebugStateBits() const; - NS_IMETHOD DumpRegressionData(nsPresContext* aPresContext, FILE* out, PRInt32 aIndent); -#endif NS_IMETHOD GetSelected(PRBool *aSelected) const; NS_IMETHOD IsSelectable(PRBool* aIsSelectable, PRUint8* aSelectStyle) const; @@ -445,17 +433,14 @@ public: } void ListTag(FILE* out) const { - ListTag(out, (nsIFrame*)this); + ListTag(out, this); } - static void ListTag(FILE* out, nsIFrame* aFrame) { + static void ListTag(FILE* out, const nsIFrame* aFrame) { nsAutoString tmp; - nsIFrameDebug* frameDebug = do_QueryFrame(aFrame); - if (frameDebug) { - frameDebug->GetFrameName(tmp); - } + aFrame->GetFrameName(tmp); fputs(NS_LossyConvertUTF16toASCII(tmp).get(), out); - fprintf(out, "@%p", static_cast(aFrame)); + fprintf(out, "@%p", static_cast(aFrame)); } static void XMLQuote(nsString& aString); @@ -631,6 +616,76 @@ private: NS_IMETHODIMP RefreshSizeCache(nsBoxLayoutState& aState); virtual nsILineIterator* GetLineIterator(); + +#ifdef NS_DEBUG +public: + // Formerly the nsIFrameDebug interface + + NS_IMETHOD List(FILE* out, PRInt32 aIndent) const; + /** + * lists the frames beginning from the root frame + * - calls root frame's List(...) + */ + static void RootFrameList(nsPresContext* aPresContext, + FILE* out, PRInt32 aIndent); + + static void DumpFrameTree(nsIFrame* aFrame); + + /** + * Get a printable from of the name of the frame type. + * XXX This should be eliminated and we use GetType() instead... + */ + NS_IMETHOD GetFrameName(nsAString& aResult) const; + /** + * Return the state bits that are relevant to regression tests (that + * is, those bits which indicate a real difference when they differ + */ + NS_IMETHOD_(nsFrameState) GetDebugStateBits() const; + /** + * Called to dump out regression data that describes the layout + * of the frame and its children, and so on. The format of the + * data is dictated to be XML (using a specific DTD); the + * specific kind of data dumped is up to the frame itself, with + * the caveat that some base types are defined. + * For more information, see XXX. + */ + NS_IMETHOD DumpRegressionData(nsPresContext* aPresContext, + FILE* out, PRInt32 aIndent); + + /** + * See if style tree verification is enabled. To enable style tree + * verification add "styleverifytree:1" to your NSPR_LOG_MODULES + * environment variable (any non-zero debug level will work). Or, + * call SetVerifyStyleTreeEnable with PR_TRUE. + */ + static PRBool GetVerifyStyleTreeEnable(); + + /** + * Set the verify-style-tree enable flag. + */ + static void SetVerifyStyleTreeEnable(PRBool aEnabled); + + /** + * The frame class and related classes share an nspr log module + * for logging frame activity. + * + * Note: the log module is created during library initialization which + * means that you cannot perform logging before then. + */ + static PRLogModuleInfo* GetLogModuleInfo(); + + // Show frame borders when rendering + static void ShowFrameBorders(PRBool aEnable); + static PRBool GetShowFrameBorders(); + + // Show frame border of event target + static void ShowEventTargetFrameBorder(PRBool aEnable); + static PRBool GetShowEventTargetFrameBorder(); + + static void PrintDisplayList(nsDisplayListBuilder* aBuilder, + const nsDisplayList& aList); + +#endif }; // Start Display Reflow Debugging diff --git a/layout/generic/nsFrameList.cpp b/layout/generic/nsFrameList.cpp index 0b78aa2e45b..9a93eda4045 100644 --- a/layout/generic/nsFrameList.cpp +++ b/layout/generic/nsFrameList.cpp @@ -40,9 +40,6 @@ #include "nsFrameList.h" #include "nsIFrame.h" -#ifdef DEBUG -#include "nsIFrameDebug.h" -#endif #include "nsLayoutUtils.h" #ifdef IBMBIDI @@ -424,10 +421,7 @@ nsFrameList::List(FILE* out) const fputs("<\n", out); for (nsIFrame* frame = mFirstChild; frame; frame = frame->GetNextSibling()) { - nsIFrameDebug *frameDebug = do_QueryFrame(frame); - if (frameDebug) { - frameDebug->List(out, 1); - } + frame->List(out, 1); } fputs(">\n", out); } diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index 61fbdbe5108..3d38845406b 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -935,9 +935,6 @@ NS_QUERYFRAME_HEAD(nsHTMLScrollFrame) NS_QUERYFRAME_ENTRY(nsIScrollableFrame) NS_QUERYFRAME_ENTRY(nsIScrollableViewProvider) NS_QUERYFRAME_ENTRY(nsIStatefulFrame) -#ifdef DEBUG - NS_QUERYFRAME_ENTRY(nsIFrameDebug) -#endif NS_QUERYFRAME_TAIL_INHERITING(nsHTMLContainerFrame) //----------nsXULScrollFrame------------------------------------------- @@ -1278,9 +1275,6 @@ NS_QUERYFRAME_HEAD(nsXULScrollFrame) NS_QUERYFRAME_ENTRY(nsIScrollableFrame) NS_QUERYFRAME_ENTRY(nsIScrollableViewProvider) NS_QUERYFRAME_ENTRY(nsIStatefulFrame) -#ifdef DEBUG - NS_QUERYFRAME_ENTRY(nsIFrameDebug) -#endif NS_QUERYFRAME_TAIL_INHERITING(nsBoxFrame) //-------------------- Inner ---------------------- diff --git a/layout/generic/nsIFrame.h b/layout/generic/nsIFrame.h index daefcaa5a01..bb554d069f2 100644 --- a/layout/generic/nsIFrame.h +++ b/layout/generic/nsIFrame.h @@ -2467,6 +2467,16 @@ protected: private: nsRect* GetOverflowAreaProperty(PRBool aCreateIfNecessary = PR_FALSE); void SetOverflowRect(const nsRect& aRect); + +#ifdef NS_DEBUG +public: + // Formerly nsIFrameDebug + NS_IMETHOD List(FILE* out, PRInt32 aIndent) const = 0; + NS_IMETHOD GetFrameName(nsAString& aResult) const = 0; + NS_IMETHOD_(nsFrameState) GetDebugStateBits() const = 0; + NS_IMETHOD DumpRegressionData(nsPresContext* aPresContext, + FILE* out, PRInt32 aIndent) = 0; +#endif }; //---------------------------------------------------------------------- diff --git a/layout/generic/nsIFrameDebug.h b/layout/generic/nsIFrameDebug.h deleted file mode 100644 index 23188c2cdef..00000000000 --- a/layout/generic/nsIFrameDebug.h +++ /dev/null @@ -1,116 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either of the GNU General Public License Version 2 or later (the "GPL"), - * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -/* debugging interface for all rendering objects */ - -#ifndef nsIFrameDebug_h___ -#define nsIFrameDebug_h___ - -#include "nsIFrame.h" - -class nsPresContext; -struct PRLogModuleInfo; - -/** - * Debug related functions - */ -class nsIFrameDebug { -public: - NS_DECLARE_FRAME_ACCESSOR(nsIFrameDebug) - - NS_IMETHOD List(FILE* out, PRInt32 aIndent) const = 0; - /** - * lists the frames beginning from the root frame - * - calls root frame's List(...) - */ - static void RootFrameList(nsPresContext* aPresContext, FILE* out, PRInt32 aIndent); - - static void DumpFrameTree(nsIFrame* aFrame); - - /** - * Get a printable from of the name of the frame type. - * XXX This should be eliminated and we use GetType() instead... - */ - NS_IMETHOD GetFrameName(nsAString& aResult) const = 0; - /** - * Return the state bits that are relevant to regression tests (that is, those bits which indicate a real difference when they differ - */ - NS_IMETHOD_(nsFrameState) GetDebugStateBits() const = 0; - /** - * Called to dump out regression data that describes the layout - * of the frame and its children, and so on. The format of the - * data is dictated to be XML (using a specific DTD); the - * specific kind of data dumped is up to the frame itself, with - * the caveat that some base types are defined. - * For more information, see XXX. - */ - NS_IMETHOD DumpRegressionData(nsPresContext* aPresContext, FILE* out, PRInt32 aIndent) = 0; - - /** - * See if style tree verification is enabled. To enable style tree - * verification add "styleverifytree:1" to your NSPR_LOG_MODULES - * environment variable (any non-zero debug level will work). Or, - * call SetVerifyStyleTreeEnable with PR_TRUE. - */ - static PRBool GetVerifyStyleTreeEnable(); - - /** - * Set the verify-style-tree enable flag. - */ - static void SetVerifyStyleTreeEnable(PRBool aEnabled); - - /** - * The frame class and related classes share an nspr log module - * for logging frame activity. - * - * Note: the log module is created during library initialization which - * means that you cannot perform logging before then. - */ - static PRLogModuleInfo* GetLogModuleInfo(); - - // Show frame borders when rendering - static void ShowFrameBorders(PRBool aEnable); - static PRBool GetShowFrameBorders(); - - // Show frame border of event target - static void ShowEventTargetFrameBorder(PRBool aEnable); - static PRBool GetShowEventTargetFrameBorder(); - - static void PrintDisplayList(nsDisplayListBuilder* aBuilder, const nsDisplayList& aList); -}; - -#endif /* nsIFrameDebug_h___ */ diff --git a/layout/generic/nsLineBox.cpp b/layout/generic/nsLineBox.cpp index be162a85879..0b688f7d267 100644 --- a/layout/generic/nsLineBox.cpp +++ b/layout/generic/nsLineBox.cpp @@ -137,7 +137,6 @@ nsLineBox::Cleanup() static void ListFloats(FILE* out, PRInt32 aIndent, const nsFloatCacheList& aFloats) { - nsAutoString frameName; nsFloatCache* fc = aFloats.Head(); while (fc) { nsFrame::IndentBy(out, aIndent); @@ -146,11 +145,9 @@ ListFloats(FILE* out, PRInt32 aIndent, const nsFloatCacheList& aFloats) fprintf(out, "placeholder@%p ", static_cast(ph)); nsIFrame* frame = ph->GetOutOfFlowFrame(); if (frame) { - nsIFrameDebug* frameDebug = do_QueryFrame(frame); - if (frameDebug) { - frameDebug->GetFrameName(frameName); - fputs(NS_LossyConvertUTF16toASCII(frameName).get(), out); - } + nsAutoString frameName; + frame->GetFrameName(frameName); + fputs(NS_LossyConvertUTF16toASCII(frameName).get(), out); } if (!frame) { @@ -222,10 +219,7 @@ nsLineBox::List(FILE* out, PRInt32 aIndent) const nsIFrame* frame = mFirstChild; PRInt32 n = GetChildCount(); while (--n >= 0) { - nsIFrameDebug* frameDebug = do_QueryFrame(frame); - if (frameDebug) { - frameDebug->List(out, aIndent + 1); - } + frame->List(out, aIndent + 1); frame = frame->GetNextSibling(); } diff --git a/layout/generic/nsQueryFrame.h b/layout/generic/nsQueryFrame.h index 682c1bb848e..e49c66e21fe 100644 --- a/layout/generic/nsQueryFrame.h +++ b/layout/generic/nsQueryFrame.h @@ -106,7 +106,6 @@ public: nsIComboboxControlFrame_id, nsIFormControlFrame_id, nsIFrame_id, - nsIFrameDebug_id, nsIFrameFrame_id, nsIImageFrame_id, nsIListControlFrame_id, diff --git a/layout/generic/nsVideoFrame.cpp b/layout/generic/nsVideoFrame.cpp index 9e6f2cc05cb..71de6def1c1 100644 --- a/layout/generic/nsVideoFrame.cpp +++ b/layout/generic/nsVideoFrame.cpp @@ -81,9 +81,6 @@ nsVideoFrame::~nsVideoFrame() NS_QUERYFRAME_HEAD(nsVideoFrame) NS_QUERYFRAME_ENTRY(nsIAnonymousContentCreator) -#ifdef DEBUG - NS_QUERYFRAME_ENTRY(nsIFrameDebug) -#endif NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame) nsresult diff --git a/layout/mathml/nsMathMLmtableFrame.cpp b/layout/mathml/nsMathMLmtableFrame.cpp index 8265d5997de..ed101fa5df6 100644 --- a/layout/mathml/nsMathMLmtableFrame.cpp +++ b/layout/mathml/nsMathMLmtableFrame.cpp @@ -340,9 +340,7 @@ ListMathMLTree(nsIFrame* atLeast) break; } if (!f) f = atLeast; - nsIFrameDebug* fdbg; - CallQueryInterface(f, &fdbg); - fdbg->List(stdout, 0); + f->List(stdout, 0); } #endif diff --git a/layout/printing/nsPrintEngine.cpp b/layout/printing/nsPrintEngine.cpp index 940c2ec84fc..571f01148ab 100644 --- a/layout/printing/nsPrintEngine.cpp +++ b/layout/printing/nsPrintEngine.cpp @@ -143,7 +143,6 @@ static const char kPrintingPromptService[] = "@mozilla.org/embedcomp/printingpro #include "nsIWebBrowserChrome.h" #include "nsIDocShell.h" #include "nsIBaseWindow.h" -#include "nsIFrameDebug.h" #include "nsILayoutHistoryState.h" #include "nsFrameManager.h" #include "nsIParser.h" @@ -2176,10 +2175,7 @@ nsPrintEngine::DoPrint(nsPrintObject * aPO) #ifdef NS_DEBUG // output the regression test nsIFrame* root = poPresShell->FrameManager()->GetRootFrame(); - nsIFrameDebug* fdbg = do_QueryFrame(root); - if (fdbg) { - fdbg->DumpRegressionData(poPresContext, mPrt->mDebugFilePtr, 0); - } + root->DumpRegressionData(poPresContext, mPrt->mDebugFilePtr, 0); fclose(mPrt->mDebugFilePtr); SetIsPrinting(PR_FALSE); #endif @@ -3338,9 +3334,7 @@ static void RootFrameList(nsPresContext* aPresContext, FILE* out, PRInt32 aInden if (shell) { nsIFrame* frame = shell->FrameManager()->GetRootFrame(); if (frame) { - nsIFrameDebug* debugFrame = do_QueryFrame(frame); - if (debugFrame) - debugFrame->List(aPresContext, out, aIndent); + frame->List(aPresContext, out, aIndent); } } } @@ -3365,11 +3359,7 @@ static void DumpFrames(FILE* out, fprintf(out, " "); } nsAutoString tmp; - - nsIFrameDebug* frameDebug = do_QueryFrame(child); - if (frameDebug) { - frameDebug->GetFrameName(tmp); - } + child->GetFrameName(tmp); fputs(NS_LossyConvertUTF16toASCII(tmp).get(), out); PRBool isSelected; if (NS_SUCCEEDED(child->IsVisibleForPainting(aPresContext, *aRendContext, PR_TRUE, &isSelected))) { diff --git a/layout/svg/base/src/nsSVGGradientFrame.h b/layout/svg/base/src/nsSVGGradientFrame.h index 6256be4f953..0295d14c785 100644 --- a/layout/svg/base/src/nsSVGGradientFrame.h +++ b/layout/svg/base/src/nsSVGGradientFrame.h @@ -71,7 +71,6 @@ public: PRInt32 aModType); #ifdef DEBUG - // nsIFrameDebug interface: NS_IMETHOD GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("SVGGradient"), aResult); @@ -168,7 +167,6 @@ public: PRInt32 aModType); #ifdef DEBUG - // nsIFrameDebug interface: NS_IMETHOD GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("SVGLinearGradient"), aResult); @@ -209,7 +207,6 @@ public: PRInt32 aModType); #ifdef DEBUG - // nsIFrameDebug interface: NS_IMETHOD GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("SVGRadialGradient"), aResult); diff --git a/layout/svg/base/src/nsSVGPatternFrame.h b/layout/svg/base/src/nsSVGPatternFrame.h index f0217167585..62825efdb18 100644 --- a/layout/svg/base/src/nsSVGPatternFrame.h +++ b/layout/svg/base/src/nsSVGPatternFrame.h @@ -99,7 +99,6 @@ public: virtual nsIAtom* GetType() const; #ifdef DEBUG - // nsIFrameDebug interface: NS_IMETHOD GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("SVGPattern"), aResult); diff --git a/layout/svg/base/src/nsSVGStopFrame.cpp b/layout/svg/base/src/nsSVGStopFrame.cpp index 639300279ab..80fd081f0e7 100644 --- a/layout/svg/base/src/nsSVGStopFrame.cpp +++ b/layout/svg/base/src/nsSVGStopFrame.cpp @@ -82,7 +82,6 @@ public: } #ifdef DEBUG - // nsIFrameDebug interface: NS_IMETHOD GetFrameName(nsAString& aResult) const { return MakeFrameName(NS_LITERAL_STRING("SVGStop"), aResult); diff --git a/layout/xul/base/src/nsPopupSetFrame.cpp b/layout/xul/base/src/nsPopupSetFrame.cpp index 1984019cee1..3bab01e7390 100644 --- a/layout/xul/base/src/nsPopupSetFrame.cpp +++ b/layout/xul/base/src/nsPopupSetFrame.cpp @@ -366,10 +366,7 @@ nsPopupSetFrame::List(FILE* out, PRInt32 aIndent) const NS_ASSERTION(kid->GetParent() == (nsIFrame*)this, "bad parent frame pointer"); // Have the child frame list - nsIFrameDebug* frameDebug = do_QueryFrame(kid); - if (frameDebug) { - frameDebug->List(out, aIndent + 1); - } + kid->List(out, aIndent + 1); kid = kid->GetNextSibling(); } IndentBy(out, aIndent); @@ -393,10 +390,7 @@ nsPopupSetFrame::List(FILE* out, PRInt32 aIndent) const fputs(" <\n", out); ++aIndent; for (nsPopupFrameList* l = mPopupList; l; l = l->mNextPopup) { - nsIFrameDebug* frameDebug = do_QueryFrame(l->mPopupFrame); - if (frameDebug) { - frameDebug->List(out, aIndent); - } + l->mPopupFrame->List(out, aIndent); } --aIndent; IndentBy(out, aIndent);