Bug 233463, patch 0 - Use nsFrameList methods instead of nsIFrame::SetNextSibling. r=bzbarsky

This commit is contained in:
Mats Palmgren
2009-09-18 13:09:35 +02:00
parent b4e82464ba
commit 6247c7c4c6
22 changed files with 225 additions and 208 deletions

View File

@@ -68,6 +68,17 @@ public:
#endif
}
nsFrameList(nsIFrame* aFirstFrame, nsIFrame* aLastFrame) :
mFirstChild(aFirstFrame)
{
NS_ASSERTION(aLastFrame == LastChild(), "wrong last frame");
MOZ_COUNT_CTOR(nsFrameList);
#ifdef DEBUG
CheckForLoops();
#endif
}
nsFrameList(const nsFrameList& aOther) :
mFirstChild(aOther.mFirstChild)
{
@@ -136,6 +147,13 @@ public:
*/
PRBool RemoveFrame(nsIFrame* aFrame, nsIFrame* aPrevSiblingHint = nsnull);
/**
* Take the frames after aAfterFrame out of the frame list.
* @param aAfterFrame a frame in this list
* @return the removed frames, if any
*/
nsFrameList RemoveFramesAfter(nsIFrame* aAfterFrame);
/**
* Remove the first child from the list. The caller is assumed to be
* holding a reference to the first child. This call is equivalent