From 173bbe4a4b83354b5e336e0ce0d80ef4d061a06c Mon Sep 17 00:00:00 2001 From: "kipp%netscape.com" Date: Mon, 8 Feb 1999 17:56:00 +0000 Subject: [PATCH] Revamp regression data dumping --- layout/generic/nsFrame.cpp | 38 +++++++++++++++----------------- layout/html/base/src/nsFrame.cpp | 38 +++++++++++++++----------------- 2 files changed, 36 insertions(+), 40 deletions(-) diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index e3e4f2713f8..cd6325f4e7c 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -70,7 +70,9 @@ nsIDocument *gDoc = nsnull; // [HACK] Foward Declarations void ForceDrawFrame(nsFrame * aFrame); +#if 0 static void RefreshContentFrames(nsIPresContext& aPresContext, nsIContent * aStartContent, nsIContent * aEndContent); +#endif PRBool nsFrame::mDoingSelection = PR_FALSE; PRBool nsFrame::mDidDrag = PR_FALSE; @@ -1696,12 +1698,13 @@ NS_IMETHODIMP nsFrame::DumpRegressionData(FILE* out, PRInt32 aIndent) { IndentBy(out, aIndent); - fprintf(out, "\n"); + fprintf(out, "\" state=\"%d\" parent=\"%ld\">\n", + mState, PRUptrdiff(mParent)); aIndent++; DumpBaseRegressionData(out, aIndent); @@ -1716,27 +1719,14 @@ nsFrame::DumpRegressionData(FILE* out, PRInt32 aIndent) void nsFrame::DumpBaseRegressionData(FILE* out, PRInt32 aIndent) { - IndentBy(out, aIndent); - fprintf(out, "\n", this); - - if (nsnull != mParent) { - IndentBy(out, aIndent); - fprintf(out, "\n", mParent); - } - if (nsnull != mNextSibling) { IndentBy(out, aIndent); - fprintf(out, "\n", mNextSibling); - } - - if (0 != mState) { - IndentBy(out, aIndent); - fprintf(out, "\n", mState); + fprintf(out, "\n", PRUptrdiff(mNextSibling)); } if (nsnull != mView) { IndentBy(out, aIndent); - fprintf(out, "\n", mView); + fprintf(out, "\n", PRUptrdiff(mView)); aIndent++; // XXX add in code to dump out view state too... aIndent--; @@ -1745,7 +1735,7 @@ nsFrame::DumpBaseRegressionData(FILE* out, PRInt32 aIndent) } IndentBy(out, aIndent); - fprintf(out, "\n", + fprintf(out, "\n", mRect.x, mRect.y, mRect.width, mRect.height); // Now dump all of the children on all of the child lists @@ -1956,6 +1946,7 @@ static void RefreshAllContentFrames(nsIFrame * aFrame, nsIContent * aContent) /******************************************************** * Refreshes each content's frame *********************************************************/ +#if 0 static void RefreshContentFrames(nsIPresContext& aPresContext, nsIContent * aStartContent, nsIContent * aEndContent) @@ -1991,6 +1982,7 @@ static void RefreshContentFrames(nsIPresContext& aPresContext, NS_RELEASE(shell); //------------------------------------- } +#endif /******************************************************** * Handles a when the cursor enters new content that is After @@ -2161,6 +2153,7 @@ void ForceDrawFrame(nsFrame * aFrame)//, PRBool) //---------------------------- // //---------------------------- +#if 0 static void resetContentTrackers() { PRInt32 i; for (i=0;iFindFrameWithContent(fTrackerContentArrayRemoveList[i])); - if (SELECTION_DEBUG) printf("ForceDrawFrame (remove) content 0x%X\n", fTrackerContentArrayRemoveList[i]); + if (SELECTION_DEBUG) printf("ForceDrawFrame (remove) content %p\n", fTrackerContentArrayRemoveList[i]); } for (i=0;iFindFrameWithContent(fTrackerContentArrayAddList[i]); //ForceDrawFrame((nsFrame *)frame); RefreshAllContentFrames(rootFrame, fTrackerContentArrayAddList[i]); - if (SELECTION_DEBUG) printf("ForceDrawFrame (add) content 0x%X\n", fTrackerContentArrayAddList[i]); + if (SELECTION_DEBUG) printf("ForceDrawFrame (add) content %p\n", fTrackerContentArrayAddList[i]); } NS_RELEASE(shell); resetContentTrackers(); } +#endif //---------------------------- // //---------------------------- +#if 0 static void addRangeToSelectionTrackers(nsIContent * aStartContent, nsIContent * aEndContent, PRUint32 aType) { if (aStartContent == nsnull || aEndContent == nsnull) { @@ -2233,6 +2230,7 @@ static void addRangeToSelectionTrackers(nsIContent * aStartContent, nsIContent * fTrackerAddListMax = inx; } } +#endif #ifdef NS_DEBUG diff --git a/layout/html/base/src/nsFrame.cpp b/layout/html/base/src/nsFrame.cpp index e3e4f2713f8..cd6325f4e7c 100644 --- a/layout/html/base/src/nsFrame.cpp +++ b/layout/html/base/src/nsFrame.cpp @@ -70,7 +70,9 @@ nsIDocument *gDoc = nsnull; // [HACK] Foward Declarations void ForceDrawFrame(nsFrame * aFrame); +#if 0 static void RefreshContentFrames(nsIPresContext& aPresContext, nsIContent * aStartContent, nsIContent * aEndContent); +#endif PRBool nsFrame::mDoingSelection = PR_FALSE; PRBool nsFrame::mDidDrag = PR_FALSE; @@ -1696,12 +1698,13 @@ NS_IMETHODIMP nsFrame::DumpRegressionData(FILE* out, PRInt32 aIndent) { IndentBy(out, aIndent); - fprintf(out, "\n"); + fprintf(out, "\" state=\"%d\" parent=\"%ld\">\n", + mState, PRUptrdiff(mParent)); aIndent++; DumpBaseRegressionData(out, aIndent); @@ -1716,27 +1719,14 @@ nsFrame::DumpRegressionData(FILE* out, PRInt32 aIndent) void nsFrame::DumpBaseRegressionData(FILE* out, PRInt32 aIndent) { - IndentBy(out, aIndent); - fprintf(out, "\n", this); - - if (nsnull != mParent) { - IndentBy(out, aIndent); - fprintf(out, "\n", mParent); - } - if (nsnull != mNextSibling) { IndentBy(out, aIndent); - fprintf(out, "\n", mNextSibling); - } - - if (0 != mState) { - IndentBy(out, aIndent); - fprintf(out, "\n", mState); + fprintf(out, "\n", PRUptrdiff(mNextSibling)); } if (nsnull != mView) { IndentBy(out, aIndent); - fprintf(out, "\n", mView); + fprintf(out, "\n", PRUptrdiff(mView)); aIndent++; // XXX add in code to dump out view state too... aIndent--; @@ -1745,7 +1735,7 @@ nsFrame::DumpBaseRegressionData(FILE* out, PRInt32 aIndent) } IndentBy(out, aIndent); - fprintf(out, "\n", + fprintf(out, "\n", mRect.x, mRect.y, mRect.width, mRect.height); // Now dump all of the children on all of the child lists @@ -1956,6 +1946,7 @@ static void RefreshAllContentFrames(nsIFrame * aFrame, nsIContent * aContent) /******************************************************** * Refreshes each content's frame *********************************************************/ +#if 0 static void RefreshContentFrames(nsIPresContext& aPresContext, nsIContent * aStartContent, nsIContent * aEndContent) @@ -1991,6 +1982,7 @@ static void RefreshContentFrames(nsIPresContext& aPresContext, NS_RELEASE(shell); //------------------------------------- } +#endif /******************************************************** * Handles a when the cursor enters new content that is After @@ -2161,6 +2153,7 @@ void ForceDrawFrame(nsFrame * aFrame)//, PRBool) //---------------------------- // //---------------------------- +#if 0 static void resetContentTrackers() { PRInt32 i; for (i=0;iFindFrameWithContent(fTrackerContentArrayRemoveList[i])); - if (SELECTION_DEBUG) printf("ForceDrawFrame (remove) content 0x%X\n", fTrackerContentArrayRemoveList[i]); + if (SELECTION_DEBUG) printf("ForceDrawFrame (remove) content %p\n", fTrackerContentArrayRemoveList[i]); } for (i=0;iFindFrameWithContent(fTrackerContentArrayAddList[i]); //ForceDrawFrame((nsFrame *)frame); RefreshAllContentFrames(rootFrame, fTrackerContentArrayAddList[i]); - if (SELECTION_DEBUG) printf("ForceDrawFrame (add) content 0x%X\n", fTrackerContentArrayAddList[i]); + if (SELECTION_DEBUG) printf("ForceDrawFrame (add) content %p\n", fTrackerContentArrayAddList[i]); } NS_RELEASE(shell); resetContentTrackers(); } +#endif //---------------------------- // //---------------------------- +#if 0 static void addRangeToSelectionTrackers(nsIContent * aStartContent, nsIContent * aEndContent, PRUint32 aType) { if (aStartContent == nsnull || aEndContent == nsnull) { @@ -2233,6 +2230,7 @@ static void addRangeToSelectionTrackers(nsIContent * aStartContent, nsIContent * fTrackerAddListMax = inx; } } +#endif #ifdef NS_DEBUG