From 451a1c64b26e5462fd6c2e8f73cc8dab073f0a59 Mon Sep 17 00:00:00 2001 From: "kipp%netscape.com" Date: Mon, 3 Aug 1998 17:09:37 +0000 Subject: [PATCH] Stub out VerifyTree to avoid crashes; remove List methods and add in ListTag methods so that listings look better --- layout/html/document/src/nsHTMLFrame.cpp | 20 ++++++++--------- layout/html/document/src/nsHTMLFrameset.cpp | 25 +++++++++++---------- layout/html/document/src/nsHTMLFrameset.h | 4 ++-- 3 files changed, 25 insertions(+), 24 deletions(-) diff --git a/layout/html/document/src/nsHTMLFrame.cpp b/layout/html/document/src/nsHTMLFrame.cpp index 384a37578967..e1f67bcf86f9 100644 --- a/layout/html/document/src/nsHTMLFrame.cpp +++ b/layout/html/document/src/nsHTMLFrame.cpp @@ -103,7 +103,7 @@ class nsHTMLFrameOuterFrame : public nsHTMLContainerFrame { public: nsHTMLFrameOuterFrame(nsIContent* aContent, nsIFrame* aParent); - NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const; + NS_IMETHOD ListTag(FILE* out = stdout) const; NS_IMETHOD Paint(nsIPresContext& aPresContext, nsIRenderingContext& aRenderingContext, @@ -132,7 +132,7 @@ public: nsHTMLFrameInnerFrame(nsIContent* aContent, nsIFrame* aParentFrame); - NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const; + NS_IMETHOD ListTag(FILE* out = stdout) const; NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr); @@ -290,11 +290,11 @@ nsHTMLFrameOuterFrame::Paint(nsIPresContext& aPresContext, } } -NS_IMETHODIMP nsHTMLFrameOuterFrame::List(FILE* out, PRInt32 aIndent) const +NS_IMETHODIMP nsHTMLFrameOuterFrame::ListTag(FILE* out) const { - for (PRInt32 i = aIndent; --i >= 0; ) fputs(" ", out); // Indent - fprintf(out, "%X OUTER \n", this); - return nsHTMLContainerFrame::List(out, aIndent); + nsHTMLContainerFrame::ListTag(out); + fputs(" (OUTER)", out); + return NS_OK; } NS_IMETHODIMP @@ -426,11 +426,11 @@ float nsHTMLFrameInnerFrame::GetTwipsToPixels() #endif -NS_IMETHODIMP nsHTMLFrameInnerFrame::List(FILE* out, PRInt32 aIndent) const +NS_IMETHODIMP nsHTMLFrameInnerFrame::ListTag(FILE* out) const { - for (PRInt32 i = aIndent; --i >= 0; ) fputs(" ", out); // Indent - fprintf(out, "%X INNER \n", this); - return nsFrame::List(out, aIndent); + nsLeafFrame::ListTag(out); + fputs(" (INNER)", out); + return NS_OK; } NS_METHOD diff --git a/layout/html/document/src/nsHTMLFrameset.cpp b/layout/html/document/src/nsHTMLFrameset.cpp index a90ecd77d5e5..e42239dfbf3d 100644 --- a/layout/html/document/src/nsHTMLFrameset.cpp +++ b/layout/html/document/src/nsHTMLFrameset.cpp @@ -79,7 +79,7 @@ enum nsMouseState { class nsHTMLFramesetBorderFrame : public nsLeafFrame { public: - NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const; + NS_IMETHOD ListTag(FILE* out = stdout) const; NS_IMETHOD HandleEvent(nsIPresContext& aPresContext, nsGUIEvent* aEvent, @@ -370,13 +370,6 @@ void nsHTMLFramesetFrame::GetSizeOfChild(nsIFrame* aChild, aSize.height = 0; } -NS_IMETHODIMP nsHTMLFramesetFrame::List(FILE* out, PRInt32 aIndent) const -{ - for (PRInt32 i = aIndent; --i >= 0; ) fputs(" ", out); // Indent - fprintf(out, "%X \n", this); - return nsHTMLContainerFrame::List(out, aIndent); -} - NS_IMETHODIMP nsHTMLFramesetFrame::Paint(nsIPresContext& aPresContext, @@ -731,6 +724,14 @@ nsHTMLFramesetFrame::Reflow(nsIPresContext& aPresContext, return NS_OK; } +NS_IMETHODIMP +nsHTMLFramesetFrame::VerifyTree() const +{ + // XXX Completely disabled for now; once pseud-frames are reworked + // then we can turn it back on. + return NS_OK; +} + /******************************************************************************* * nsHTMLFrameset ******************************************************************************/ @@ -923,10 +924,10 @@ NS_METHOD nsHTMLFramesetBorderFrame::HandleEvent(nsIPresContext& aPresContext, return NS_OK; } -NS_IMETHODIMP nsHTMLFramesetBorderFrame::List(FILE* out, PRInt32 aIndent) const +NS_IMETHODIMP nsHTMLFramesetBorderFrame::ListTag(FILE* out) const { - for (PRInt32 i = aIndent; --i >= 0; ) fputs(" ", out); // Indent - fprintf(out, "%X BORDER \n", this); - return nsLeafFrame::List(out, aIndent); + nsLeafFrame::ListTag(out); + fputs(" (BORDER)", out); + return NS_OK; } diff --git a/layout/html/document/src/nsHTMLFrameset.h b/layout/html/document/src/nsHTMLFrameset.h index 3d6b9dfeb2d1..da6ad313ddc5 100644 --- a/layout/html/document/src/nsHTMLFrameset.h +++ b/layout/html/document/src/nsHTMLFrameset.h @@ -63,8 +63,6 @@ public: static nsHTMLFramesetFrame* GetFramesetParent(nsIFrame* aChild); - NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const; - NS_IMETHOD Paint(nsIPresContext& aPresContext, nsIRenderingContext& aRenderingContext, const nsRect& aDirtyRect); @@ -74,6 +72,8 @@ public: const nsReflowState& aReflowState, nsReflowStatus& aStatus); + NS_IMETHOD VerifyTree() const; + protected: void CalculateRowCol(nsIPresContext* aPresContext, nscoord aSize, PRInt32 aNumSpecs, nsFramesetSpec* aSpecs, nscoord* aValues);