Removed ChildIsPseudoFrame() and IsEmpty() from nsContainerFrame

git-svn-id: svn://10.0.0.236/trunk@10890 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
troy%netscape.com
1998-09-24 04:06:42 +00:00
parent 43e6ab37a3
commit 556f680fca
4 changed files with 0 additions and 40 deletions

View File

@@ -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

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;