From 556f680fcad003598a6e95e976547a36b1609b52 Mon Sep 17 00:00:00 2001 From: "troy%netscape.com" Date: Thu, 24 Sep 1998 04:06:42 +0000 Subject: [PATCH] Removed ChildIsPseudoFrame() and IsEmpty() from nsContainerFrame git-svn-id: svn://10.0.0.236/trunk@10890 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/base/src/nsContainerFrame.cpp | 32 ------------------- mozilla/layout/base/src/nsContainerFrame.h | 6 ---- .../html/table/src/nsTableCellFrame.cpp | 1 - mozilla/layout/tables/nsTableCellFrame.cpp | 1 - 4 files changed, 40 deletions(-) diff --git a/mozilla/layout/base/src/nsContainerFrame.cpp b/mozilla/layout/base/src/nsContainerFrame.cpp index d0496ce7a97..ac245ff8c6e 100644 --- a/mozilla/layout/base/src/nsContainerFrame.cpp +++ b/mozilla/layout/base/src/nsContainerFrame.cpp @@ -299,18 +299,6 @@ PRBool nsContainerFrame::IsPseudoFrame() const return result; } -// Returns true if aChild is being used as a pseudo frame -PRBool nsContainerFrame::ChildIsPseudoFrame(const nsIFrame* aChild) const -{ - nsIContent* childContent; - PRBool result; - - aChild->GetContent(childContent); - result = childContent == mContent; - NS_RELEASE(childContent); - return result; -} - ///////////////////////////////////////////////////////////////////////////// // Helper member functions @@ -814,24 +802,4 @@ void nsContainerFrame::DumpTree() const root->List(); } -/** - * 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 - * applied if that child contains one child which is a - * pseudo-frame...) - */ -PRBool nsContainerFrame::IsEmpty() -{ - if (nsnull == mFirstChild) { - return PR_TRUE; - } - if (mChildCount > 1) { - return PR_FALSE; - } - if (ChildIsPseudoFrame(mFirstChild)) { - return ((nsContainerFrame*)mFirstChild)->IsEmpty(); - } - return PR_FALSE; -} - #endif diff --git a/mozilla/layout/base/src/nsContainerFrame.h b/mozilla/layout/base/src/nsContainerFrame.h index 6fc97c0fc8c..ed0bde78835 100644 --- a/mozilla/layout/base/src/nsContainerFrame.h +++ b/mozilla/layout/base/src/nsContainerFrame.h @@ -245,10 +245,6 @@ 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); #ifdef NS_DEBUG @@ -263,8 +259,6 @@ protected: PRBool IsLastChild(const nsIFrame* aChild) const; void DumpTree() const; - - PRBool IsEmpty(); #endif nsIFrame* mFirstChild; diff --git a/mozilla/layout/html/table/src/nsTableCellFrame.cpp b/mozilla/layout/html/table/src/nsTableCellFrame.cpp index a5863ae20b0..0c9e74c6a50 100644 --- a/mozilla/layout/html/table/src/nsTableCellFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableCellFrame.cpp @@ -203,7 +203,6 @@ void nsTableCellFrame::CreatePsuedoFrame(nsIPresContext* aPresContext) nsTableCellFrame* prevFrame = (nsTableCellFrame *)mPrevInFlow; nsIFrame* prevPseudoFrame = prevFrame->mFirstChild; - NS_ASSERTION(prevFrame->ChildIsPseudoFrame(prevPseudoFrame), "bad previous pseudo-frame"); // Create a continuing column nsIStyleContext* kidSC; diff --git a/mozilla/layout/tables/nsTableCellFrame.cpp b/mozilla/layout/tables/nsTableCellFrame.cpp index a5863ae20b0..0c9e74c6a50 100644 --- a/mozilla/layout/tables/nsTableCellFrame.cpp +++ b/mozilla/layout/tables/nsTableCellFrame.cpp @@ -203,7 +203,6 @@ void nsTableCellFrame::CreatePsuedoFrame(nsIPresContext* aPresContext) nsTableCellFrame* prevFrame = (nsTableCellFrame *)mPrevInFlow; nsIFrame* prevPseudoFrame = prevFrame->mFirstChild; - NS_ASSERTION(prevFrame->ChildIsPseudoFrame(prevPseudoFrame), "bad previous pseudo-frame"); // Create a continuing column nsIStyleContext* kidSC;