Removed mChildCount from nsContainerFrame

This commit is contained in:
troy%netscape.com 1998-09-24 17:56:35 +00:00
Родитель 0f80d4a261
Коммит f54279e62f
12 изменённых файлов: 3 добавлений и 44 удалений

Просмотреть файл

@ -59,7 +59,6 @@ nsContainerFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList)
NS_PRECONDITION(nsnull == mFirstChild, "already initialized");
mFirstChild = aChildList;
mChildCount = LengthOf(mFirstChild);
return NS_OK;
}
@ -398,7 +397,6 @@ nsContainerFrame::DeleteChildsNextInFlow(nsIPresContext& aPresContext, nsIFrame*
// Delete the next-in-flow frame and adjust its parents child count
WillDeleteNextInFlowFrame(nextInFlow);
nextInFlow->DeleteFrame(aPresContext);
parent->mChildCount--;
#ifdef NS_DEBUG
aChild->GetNextInFlow(nextInFlow);
@ -445,10 +443,6 @@ void nsContainerFrame::PushChildren(nsIFrame* aFromChild, nsIFrame* aPrevSibling
PRInt32 numChildren = 0;
nsIFrame* lastChild = nsnull;
#ifdef NOISY
ListTag(stdout);
printf(": pushing kids (childCount=%d)\n", mChildCount);
#endif
// Compute the number of children being pushed, and for each child change
// its geometric parent. Remember the last child
for (nsIFrame* f = aFromChild; nsnull != f; f->GetNextSibling(f)) {
@ -473,12 +467,7 @@ void nsContainerFrame::PushChildren(nsIFrame* aFromChild, nsIFrame* aPrevSibling
// Prepend the frames to our next-in-flow's child list
lastChild->SetNextSibling(nextInFlow->mFirstChild);
nextInFlow->mFirstChild = aFromChild;
nextInFlow->mChildCount += numChildren;
#ifdef NOISY
ListTag(stdout);
printf(": push kids done (childCount=%d)\n", mChildCount);
#endif
} else {
// Add the frames to our overflow list
NS_ASSERTION(nsnull == mOverflowList, "bad overflow list");
@ -549,7 +538,6 @@ void nsContainerFrame::AppendChildren(nsIFrame* aChild, PRBool aSetParent)
nsIFrame* lastChild;
for (nsIFrame* f = aChild; nsnull != f; f->GetNextSibling(f)) {
lastChild = f;
mChildCount++;
// Reset the geometric parent if requested
if (aSetParent) {
@ -642,17 +630,7 @@ NS_METHOD nsContainerFrame::VerifyTree() const
{
#ifdef NS_DEBUG
NS_ASSERTION(0 == (mState & NS_FRAME_IN_REFLOW), "frame is in reflow");
// Check our child count
PRInt32 len = LengthOf(mFirstChild);
VERIFY_ASSERT(len == mChildCount, "bad child count");
nsIFrame* lastChild = LastFrame(mFirstChild);
if (len != 0) {
VERIFY_ASSERT(nsnull != lastChild, "bad last child");
}
VERIFY_ASSERT(nsnull == mOverflowList, "bad overflow list");
#endif
return NS_OK;
}

Просмотреть файл

@ -169,7 +169,6 @@ protected:
#endif
nsIFrame* mFirstChild;
PRInt32 mChildCount;
nsIFrame* mOverflowList;
};

Просмотреть файл

@ -213,7 +213,6 @@ NS_IMETHODIMP nsFileControlFrame::Reflow(nsIPresContext& aPresContext,
childFrame->SetStyleContext(&aPresContext, mStyleContext);
mFirstChild->SetNextSibling(childFrame);
mChildCount = 2;
NS_RELEASE(text);
NS_RELEASE(browse);

Просмотреть файл

@ -310,7 +310,6 @@ nsHTMLFrameOuterFrame::Reflow(nsIPresContext& aPresContext,
mFirstChild = new nsHTMLFrameInnerFrame(mContent, this);
// XXX temporary! use style system to get correct style!
mFirstChild->SetStyleContext(&aPresContext, mStyleContext);
mChildCount = 1;
}
// nsContainerFrame::PaintBorder has some problems, kludge it here

Просмотреть файл

@ -195,6 +195,7 @@ protected:
nsHTMLFramesetBorderFrame* mDragger;
nsPoint mLastDragPoint;
PRInt32 mMinDrag;
PRInt32 mChildCount;
};
#if 0

Просмотреть файл

@ -212,12 +212,6 @@ nsHTMLContainerFrame::ContentDeleted(nsIPresShell* aShell,
flow->mFirstChild = nextSib;
}
// Update flows child count and last-content-offset. Note that
// only the last content needs updating when a deadFrame is
// removed from flow (because only the children that follow the
// deletion need renumbering).
flow->mChildCount--;
// Break frame out of its flow and then destroy it
nsIFrame* nextInFlow;
deadFrame->GetNextInFlow(nextInFlow);

Просмотреть файл

@ -113,6 +113,7 @@ protected:
private:
nsSpaceManager* mSpaceManager;
nsVoidArray mAbsoluteItems;
PRInt32 mChildCount;
nsSize GetColumnAvailSpace(nsIPresContext* aPresContext,
const nsMargin& aBorderPadding,

Просмотреть файл

@ -212,12 +212,6 @@ nsHTMLContainerFrame::ContentDeleted(nsIPresShell* aShell,
flow->mFirstChild = nextSib;
}
// Update flows child count and last-content-offset. Note that
// only the last content needs updating when a deadFrame is
// removed from flow (because only the children that follow the
// deletion need renumbering).
flow->mChildCount--;
// Break frame out of its flow and then destroy it
nsIFrame* nextInFlow;
deadFrame->GetNextInFlow(nextInFlow);

Просмотреть файл

@ -61,7 +61,6 @@ nsScrollBodyFrame::CreateFirstChild(nsIPresContext* aPresContext)
if (aPresContext->IsPaginated()) {
// Yes. Create the first page frame
mFirstChild = new nsPageFrame(mContent, this);/* XXX mContent won't work here */
mChildCount = 1;
} else {
if (nsnull != mContent) {
#if 0
@ -81,7 +80,6 @@ nsScrollBodyFrame::CreateFirstChild(nsIPresContext* aPresContext)
}
#else
nsBodyFrame::NewFrame(&mFirstChild, mContent, this);
mChildCount = 1;
#endif
}
}
@ -205,7 +203,6 @@ nsScrollBodyFrame::Reflow(nsIPresContext& aPresContext,
NS_ASSERTION(nsnull == kidNextSibling, "unexpected sibling");
#endif
kidFrame->SetNextSibling(continuingPage);
mChildCount++;
}
// Get the next page
@ -368,7 +365,6 @@ nsScrollInnerFrame::Reflow(nsIPresContext& aPresContext,
if (nsnull == mFirstChild) {
mFirstChild = new nsScrollBodyFrame(mContent, this);
mChildCount = 1;
}
// Allow the child frame to be as wide as our max width (minus a
@ -465,7 +461,6 @@ nsScrollOuterFrame::Reflow(nsIPresContext& aPresContext,
if (nsnull == mFirstChild) {
mFirstChild = new nsScrollInnerFrame(mContent, this);
mChildCount = 1;
}
const nsStyleSpacing* spacing = (const nsStyleSpacing*)

Просмотреть файл

@ -310,7 +310,6 @@ nsHTMLFrameOuterFrame::Reflow(nsIPresContext& aPresContext,
mFirstChild = new nsHTMLFrameInnerFrame(mContent, this);
// XXX temporary! use style system to get correct style!
mFirstChild->SetStyleContext(&aPresContext, mStyleContext);
mChildCount = 1;
}
// nsContainerFrame::PaintBorder has some problems, kludge it here

Просмотреть файл

@ -195,6 +195,7 @@ protected:
nsHTMLFramesetBorderFrame* mDragger;
nsPoint mLastDragPoint;
PRInt32 mMinDrag;
PRInt32 mChildCount;
};
#if 0

Просмотреть файл

@ -213,7 +213,6 @@ NS_IMETHODIMP nsFileControlFrame::Reflow(nsIPresContext& aPresContext,
childFrame->SetStyleContext(&aPresContext, mStyleContext);
mFirstChild->SetNextSibling(childFrame);
mChildCount = 2;
NS_RELEASE(text);
NS_RELEASE(browse);