From be2171d84f85e6efe2bd8709356c420f2eec4968 Mon Sep 17 00:00:00 2001 From: kipp Date: Mon, 18 May 1998 16:51:37 +0000 Subject: [PATCH] Implement DidReflow to pass it down to children when exiting reflow; dump out state and next-in-flow/prev-in-flow conditionally git-svn-id: svn://10.0.0.236/trunk@1813 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/base/src/nsContainerFrame.cpp | 39 +++++++++++++++++--- 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/mozilla/layout/base/src/nsContainerFrame.cpp b/mozilla/layout/base/src/nsContainerFrame.cpp index 945a8c902fd..d899cb34cbf 100644 --- a/mozilla/layout/base/src/nsContainerFrame.cpp +++ b/mozilla/layout/base/src/nsContainerFrame.cpp @@ -97,6 +97,24 @@ nsContainerFrame::CreateContinuingFrame(nsIPresContext* aPresContext, return rv; } +NS_METHOD +nsContainerFrame::DidReflow(nsIPresContext& aPresContext, + nsDidReflowStatus aStatus) +{ + if (NS_FRAME_REFLOW_FINISHED == aStatus) { + mState &= ~NS_FRAME_IN_REFLOW; + nsFrameState state; + nsIFrame* kid = mFirstChild; + while (nsnull != kid) { + kid->GetFrameState(state); + if (0 != (state & NS_FRAME_IN_REFLOW)) { + kid->DidReflow(aPresContext, aStatus); + } + kid->GetNextSibling(kid); + } + } + return NS_OK; +} ///////////////////////////////////////////////////////////////////////////// // Child frame enumeration @@ -1064,10 +1082,14 @@ NS_METHOD nsContainerFrame::List(FILE* out, PRInt32 aIndent) const ListTag(out); // Output the first/last content offset - fprintf(out, "[%d,%d,%c] pif=%p nif=%p", - mFirstContentOffset, mLastContentOffset, - (mLastContentIsComplete ? 'T' : 'F'), - mPrevInFlow, mNextInFlow); + fprintf(out, "[%d,%d,%c] ", mFirstContentOffset, mLastContentOffset, + (mLastContentIsComplete ? 'T' : 'F')); + if (nsnull != mPrevInFlow) { + fprintf(out, "prev-in-flow=%p ", mPrevInFlow); + } + if (nsnull != mNextInFlow) { + fprintf(out, "next-in-flow=%p ", mNextInFlow); + } // Output the rect out << mRect; @@ -1075,9 +1097,11 @@ NS_METHOD nsContainerFrame::List(FILE* out, PRInt32 aIndent) const // Output the children if (mChildCount > 0) { if (!mLastContentIsComplete) { - fputs(", complete=>false ", out); + fputs(", !complete", out); + } + if (0 != mState) { + fprintf(out, " [state=%08x]", mState); } - fputs("<\n", out); for (nsIFrame* child = mFirstChild; child; NextChild(child, child)) { child->List(out, aIndent + 1); @@ -1085,6 +1109,9 @@ NS_METHOD nsContainerFrame::List(FILE* out, PRInt32 aIndent) const for (PRInt32 i = aIndent; --i >= 0; ) fputs(" ", out); fputs(">\n", out); } else { + if (0 != mState) { + fprintf(out, " [state=%08x]", mState); + } fputs("<>\n", out); }