From 43e6ab37a33a563cde2cd7df8d95a3a498e0c894 Mon Sep 17 00:00:00 2001 From: "troy%netscape.com" Date: Thu, 24 Sep 1998 03:59:30 +0000 Subject: [PATCH] Removed PreReflowCheck() and PostReflowCheck() from nsContainerFrame git-svn-id: svn://10.0.0.236/trunk@10888 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/base/src/nsContainerFrame.cpp | 34 ------------------- mozilla/layout/base/src/nsContainerFrame.h | 28 ++------------- mozilla/layout/generic/nsHTMLFrame.cpp | 13 ------- mozilla/layout/generic/nsPageFrame.cpp | 6 ---- mozilla/layout/html/base/src/nsHTMLFrame.cpp | 13 ------- mozilla/layout/html/base/src/nsPageFrame.cpp | 6 ---- .../layout/html/base/src/nsScrollFrame.cpp | 7 ---- .../layout/html/table/src/nsTableFrame.cpp | 8 ----- .../layout/html/table/src/nsTableRowFrame.cpp | 7 ---- .../html/table/src/nsTableRowGroupFrame.cpp | 7 ---- mozilla/layout/tables/nsTableFrame.cpp | 8 ----- mozilla/layout/tables/nsTableRowFrame.cpp | 7 ---- .../layout/tables/nsTableRowGroupFrame.cpp | 7 ---- 13 files changed, 2 insertions(+), 149 deletions(-) diff --git a/mozilla/layout/base/src/nsContainerFrame.cpp b/mozilla/layout/base/src/nsContainerFrame.cpp index a8f08979459..d0496ce7a97 100644 --- a/mozilla/layout/base/src/nsContainerFrame.cpp +++ b/mozilla/layout/base/src/nsContainerFrame.cpp @@ -814,40 +814,6 @@ void nsContainerFrame::DumpTree() const root->List(); } -void nsContainerFrame::PreReflowCheck() -{ - // XXX CONSTRUCTION -#if 0 - PRInt32 len = LengthOf(mFirstChild); - NS_ASSERTION(len == mChildCount, "bad child count"); - - if (0 == mChildCount) { - NS_ASSERTION(nsnull == mFirstChild, "bad child-count/first-child"); - } else { - NS_ASSERTION(nsnull != mFirstChild, "bad child-count/first-child"); - CheckContentOffsets(); - } - VerifyLastIsComplete(); -#endif -} - -void nsContainerFrame::PostReflowCheck(nsReflowStatus aStatus) -{ - // XXX CONSTRUCTION -#if 0 - PRInt32 len = LengthOf(mFirstChild) ; - NS_ASSERTION(len == mChildCount, "bad child count"); - - if (0 == mChildCount) { - NS_ASSERTION(nsnull == mFirstChild, "bad child-count/first-child"); - } else { - NS_ASSERTION(nsnull != mFirstChild, "bad child-count/first-child"); - CheckContentOffsets(); - } - VerifyLastIsComplete(); -#endif -} - /** * A container is empty if it has no children, or it has exactly one * child and that child is a pseudo-frame and it's empty (recursively diff --git a/mozilla/layout/base/src/nsContainerFrame.h b/mozilla/layout/base/src/nsContainerFrame.h index f1dba6bfe17..6fc97c0fc8c 100644 --- a/mozilla/layout/base/src/nsContainerFrame.h +++ b/mozilla/layout/base/src/nsContainerFrame.h @@ -139,6 +139,7 @@ public: NS_IMETHOD FirstChild(nsIFrame*& aFirstChild) const; // Returns true if this frame is being used a pseudo frame + // XXX deprecated PRBool IsPseudoFrame() const; // Debugging @@ -212,16 +213,6 @@ protected: */ PRBool MoveOverflowToChildList(); - /** - * Remove and delete aChild's next-in-flow(s). Updates the sibling and flow - * pointers. - * - * Updates the child count and content offsets of all containers that are - * affected. - * - * @param aChild child this child's next-in-flow - */ - /** * Push aFromChild and its next siblings to the next-in-flow. Change the * geometric parent of each frame that's pushed. If there is no next-in-flow @@ -255,6 +246,7 @@ protected: void AppendChildren(nsIFrame* aChild, PRBool aSetParent = PR_TRUE); // Returns true if aChild is being used as a pseudo frame + // XXX deprecated PRBool ChildIsPseudoFrame(const nsIFrame* aChild) const; virtual void WillDeleteNextInFlowFrame(nsIFrame* aNextInFlow); @@ -272,22 +264,6 @@ protected: void DumpTree() const; - /** - * Before reflow for this container has started we check that all - * is well. - */ - void PreReflowCheck(); - - /** - * After reflow for this container has finished we check that all - * is well. - * - * @param aStatus status to be returned from the resize reflow. If the status - * is frNotComplete then the next-in-flow content offsets are - * validated as well - */ - void PostReflowCheck(nsReflowStatus aStatus); - PRBool IsEmpty(); #endif diff --git a/mozilla/layout/generic/nsHTMLFrame.cpp b/mozilla/layout/generic/nsHTMLFrame.cpp index 65ff3913fad..045d133c069 100644 --- a/mozilla/layout/generic/nsHTMLFrame.cpp +++ b/mozilla/layout/generic/nsHTMLFrame.cpp @@ -119,10 +119,6 @@ RootFrame::Reflow(nsIPresContext& aPresContext, { NS_FRAME_TRACE_REFLOW_IN("RootFrame::Reflow"); -#ifdef NS_DEBUG - PreReflowCheck(); -#endif - aStatus = NS_FRAME_COMPLETE; if (eReflowReason_Incremental == aReflowState.reason) { @@ -162,9 +158,6 @@ RootFrame::Reflow(nsIPresContext& aPresContext, aDesiredSize.ascent = aDesiredSize.height; aDesiredSize.descent = 0; -#ifdef NS_DEBUG - PostReflowCheck(aStatus); -#endif NS_FRAME_TRACE_REFLOW_OUT("RootFrame::Reflow", aStatus); return NS_OK; } @@ -272,9 +265,6 @@ RootContentFrame::Reflow(nsIPresContext& aPresContext, nsReflowStatus& aStatus) { NS_FRAME_TRACE_REFLOW_IN("RootContentFrame::Reflow"); -#ifdef NS_DEBUG - PreReflowCheck(); -#endif aStatus = NS_FRAME_COMPLETE; @@ -445,9 +435,6 @@ RootContentFrame::Reflow(nsIPresContext& aPresContext, // properly pushed upwards nsContainerFrame* parent = (nsContainerFrame*) mGeometricParent; -#ifdef NS_DEBUG - PostReflowCheck(aStatus); -#endif NS_FRAME_TRACE_REFLOW_OUT("RootContentFrame::Reflow", aStatus); return NS_OK; } diff --git a/mozilla/layout/generic/nsPageFrame.cpp b/mozilla/layout/generic/nsPageFrame.cpp index e309fd51671..fec02aca52c 100644 --- a/mozilla/layout/generic/nsPageFrame.cpp +++ b/mozilla/layout/generic/nsPageFrame.cpp @@ -68,9 +68,6 @@ NS_METHOD nsPageFrame::Reflow(nsIPresContext& aPresContext, const nsReflowState& aReflowState, nsReflowStatus& aStatus) { -#ifdef NS_DEBUG - PreReflowCheck(); -#endif aStatus = NS_FRAME_COMPLETE; // initialize out parameter // XXX Do something sensible in page mode... @@ -158,9 +155,6 @@ NS_METHOD nsPageFrame::Reflow(nsIPresContext& aPresContext, aDesiredSize.height = aReflowState.maxSize.height; } -#ifdef NS_DEBUG - PostReflowCheck(aStatus); -#endif return NS_OK; } diff --git a/mozilla/layout/html/base/src/nsHTMLFrame.cpp b/mozilla/layout/html/base/src/nsHTMLFrame.cpp index 65ff3913fad..045d133c069 100644 --- a/mozilla/layout/html/base/src/nsHTMLFrame.cpp +++ b/mozilla/layout/html/base/src/nsHTMLFrame.cpp @@ -119,10 +119,6 @@ RootFrame::Reflow(nsIPresContext& aPresContext, { NS_FRAME_TRACE_REFLOW_IN("RootFrame::Reflow"); -#ifdef NS_DEBUG - PreReflowCheck(); -#endif - aStatus = NS_FRAME_COMPLETE; if (eReflowReason_Incremental == aReflowState.reason) { @@ -162,9 +158,6 @@ RootFrame::Reflow(nsIPresContext& aPresContext, aDesiredSize.ascent = aDesiredSize.height; aDesiredSize.descent = 0; -#ifdef NS_DEBUG - PostReflowCheck(aStatus); -#endif NS_FRAME_TRACE_REFLOW_OUT("RootFrame::Reflow", aStatus); return NS_OK; } @@ -272,9 +265,6 @@ RootContentFrame::Reflow(nsIPresContext& aPresContext, nsReflowStatus& aStatus) { NS_FRAME_TRACE_REFLOW_IN("RootContentFrame::Reflow"); -#ifdef NS_DEBUG - PreReflowCheck(); -#endif aStatus = NS_FRAME_COMPLETE; @@ -445,9 +435,6 @@ RootContentFrame::Reflow(nsIPresContext& aPresContext, // properly pushed upwards nsContainerFrame* parent = (nsContainerFrame*) mGeometricParent; -#ifdef NS_DEBUG - PostReflowCheck(aStatus); -#endif NS_FRAME_TRACE_REFLOW_OUT("RootContentFrame::Reflow", aStatus); return NS_OK; } diff --git a/mozilla/layout/html/base/src/nsPageFrame.cpp b/mozilla/layout/html/base/src/nsPageFrame.cpp index e309fd51671..fec02aca52c 100644 --- a/mozilla/layout/html/base/src/nsPageFrame.cpp +++ b/mozilla/layout/html/base/src/nsPageFrame.cpp @@ -68,9 +68,6 @@ NS_METHOD nsPageFrame::Reflow(nsIPresContext& aPresContext, const nsReflowState& aReflowState, nsReflowStatus& aStatus) { -#ifdef NS_DEBUG - PreReflowCheck(); -#endif aStatus = NS_FRAME_COMPLETE; // initialize out parameter // XXX Do something sensible in page mode... @@ -158,9 +155,6 @@ NS_METHOD nsPageFrame::Reflow(nsIPresContext& aPresContext, aDesiredSize.height = aReflowState.maxSize.height; } -#ifdef NS_DEBUG - PostReflowCheck(aStatus); -#endif return NS_OK; } diff --git a/mozilla/layout/html/base/src/nsScrollFrame.cpp b/mozilla/layout/html/base/src/nsScrollFrame.cpp index 48edaab8a07..2fb6f3284d7 100644 --- a/mozilla/layout/html/base/src/nsScrollFrame.cpp +++ b/mozilla/layout/html/base/src/nsScrollFrame.cpp @@ -104,9 +104,6 @@ nsScrollBodyFrame::Reflow(nsIPresContext& aPresContext, aReflowState.maxSize.width, aReflowState.maxSize.height)); -#ifdef NS_DEBUG - PreReflowCheck(); -#endif aStatus = NS_FRAME_COMPLETE; // XXX Incremental reflow code doesn't handle page mode at all... @@ -257,10 +254,6 @@ nsScrollBodyFrame::Reflow(nsIPresContext& aPresContext, } } -#ifdef NS_DEBUG - PostReflowCheck(aStatus); -#endif - NS_FRAME_TRACE_MSG(NS_FRAME_TRACE_CALLS, ("exit nsScrollBodyFrame::Reflow: status=%d width=%d height=%d", aStatus, aDesiredSize.width, aDesiredSize.height)); diff --git a/mozilla/layout/html/table/src/nsTableFrame.cpp b/mozilla/layout/html/table/src/nsTableFrame.cpp index 2fdc597dc8e..70d8a30f3ca 100644 --- a/mozilla/layout/html/table/src/nsTableFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableFrame.cpp @@ -1498,10 +1498,6 @@ NS_METHOD nsTableFrame::Reflow(nsIPresContext& aPresContext, this, aReflowState.reason, aReflowState.maxSize.width, aReflowState.maxSize.height); } -#ifdef NS_DEBUG - PreReflowCheck(); -#endif - // Initialize out parameter if (nsnull != aDesiredSize.maxElementSize) { aDesiredSize.maxElementSize->width = 0; @@ -1609,10 +1605,6 @@ NS_METHOD nsTableFrame::Reflow(nsIPresContext& aPresContext, this, aDesiredSize.width, aDesiredSize.height); } -#ifdef NS_DEBUG - PostReflowCheck(aStatus); -#endif - if (PR_TRUE==gsDebug) printf("end reflow for table %p\n", this); return NS_OK; } diff --git a/mozilla/layout/html/table/src/nsTableRowFrame.cpp b/mozilla/layout/html/table/src/nsTableRowFrame.cpp index 40daf18f3cd..2282394fe0d 100644 --- a/mozilla/layout/html/table/src/nsTableRowFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableRowFrame.cpp @@ -929,9 +929,6 @@ nsTableRowFrame::Reflow(nsIPresContext& aPresContext, if (gsDebug==PR_TRUE) printf("nsTableRowFrame::Reflow - aMaxSize = %d, %d\n", aReflowState.maxSize.width, aReflowState.maxSize.height); -#ifdef NS_DEBUG - PreReflowCheck(); -#endif // Initialize 'out' parameters if (nsnull != aDesiredSize.maxElementSize) { @@ -968,10 +965,6 @@ nsTableRowFrame::Reflow(nsIPresContext& aPresContext, } -#ifdef NS_DEBUG - PostReflowCheck(aStatus); -#endif - if (gsDebug==PR_TRUE) { if (nsnull!=aDesiredSize.maxElementSize) diff --git a/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp b/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp index 4e76e66ed3f..88c9ac15a90 100644 --- a/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp @@ -745,9 +745,6 @@ nsTableRowGroupFrame::Reflow(nsIPresContext& aPresContext, if (gsDebug==PR_TRUE) printf("nsTableRowGroupFrame::Reflow - aMaxSize = %d, %d\n", aReflowState.maxSize.width, aReflowState.maxSize.height); -#ifdef NS_DEBUG - PreReflowCheck(); -#endif // Initialize out parameter if (nsnull != aDesiredSize.maxElementSize) { @@ -844,10 +841,6 @@ nsTableRowGroupFrame::Reflow(nsIPresContext& aPresContext, ShrinkWrapChildren(&aPresContext, aDesiredSize); } -#ifdef NS_DEBUG - PostReflowCheck(aStatus); -#endif - if (gsDebug==PR_TRUE) { if (nsnull!=aDesiredSize.maxElementSize) diff --git a/mozilla/layout/tables/nsTableFrame.cpp b/mozilla/layout/tables/nsTableFrame.cpp index 2fdc597dc8e..70d8a30f3ca 100644 --- a/mozilla/layout/tables/nsTableFrame.cpp +++ b/mozilla/layout/tables/nsTableFrame.cpp @@ -1498,10 +1498,6 @@ NS_METHOD nsTableFrame::Reflow(nsIPresContext& aPresContext, this, aReflowState.reason, aReflowState.maxSize.width, aReflowState.maxSize.height); } -#ifdef NS_DEBUG - PreReflowCheck(); -#endif - // Initialize out parameter if (nsnull != aDesiredSize.maxElementSize) { aDesiredSize.maxElementSize->width = 0; @@ -1609,10 +1605,6 @@ NS_METHOD nsTableFrame::Reflow(nsIPresContext& aPresContext, this, aDesiredSize.width, aDesiredSize.height); } -#ifdef NS_DEBUG - PostReflowCheck(aStatus); -#endif - if (PR_TRUE==gsDebug) printf("end reflow for table %p\n", this); return NS_OK; } diff --git a/mozilla/layout/tables/nsTableRowFrame.cpp b/mozilla/layout/tables/nsTableRowFrame.cpp index 40daf18f3cd..2282394fe0d 100644 --- a/mozilla/layout/tables/nsTableRowFrame.cpp +++ b/mozilla/layout/tables/nsTableRowFrame.cpp @@ -929,9 +929,6 @@ nsTableRowFrame::Reflow(nsIPresContext& aPresContext, if (gsDebug==PR_TRUE) printf("nsTableRowFrame::Reflow - aMaxSize = %d, %d\n", aReflowState.maxSize.width, aReflowState.maxSize.height); -#ifdef NS_DEBUG - PreReflowCheck(); -#endif // Initialize 'out' parameters if (nsnull != aDesiredSize.maxElementSize) { @@ -968,10 +965,6 @@ nsTableRowFrame::Reflow(nsIPresContext& aPresContext, } -#ifdef NS_DEBUG - PostReflowCheck(aStatus); -#endif - if (gsDebug==PR_TRUE) { if (nsnull!=aDesiredSize.maxElementSize) diff --git a/mozilla/layout/tables/nsTableRowGroupFrame.cpp b/mozilla/layout/tables/nsTableRowGroupFrame.cpp index 4e76e66ed3f..88c9ac15a90 100644 --- a/mozilla/layout/tables/nsTableRowGroupFrame.cpp +++ b/mozilla/layout/tables/nsTableRowGroupFrame.cpp @@ -745,9 +745,6 @@ nsTableRowGroupFrame::Reflow(nsIPresContext& aPresContext, if (gsDebug==PR_TRUE) printf("nsTableRowGroupFrame::Reflow - aMaxSize = %d, %d\n", aReflowState.maxSize.width, aReflowState.maxSize.height); -#ifdef NS_DEBUG - PreReflowCheck(); -#endif // Initialize out parameter if (nsnull != aDesiredSize.maxElementSize) { @@ -844,10 +841,6 @@ nsTableRowGroupFrame::Reflow(nsIPresContext& aPresContext, ShrinkWrapChildren(&aPresContext, aDesiredSize); } -#ifdef NS_DEBUG - PostReflowCheck(aStatus); -#endif - if (gsDebug==PR_TRUE) { if (nsnull!=aDesiredSize.maxElementSize)