Bug 496823. Blocks can implement GetLastChild() much faster than by just getting first child and iterating its siblings. r=roc

This commit is contained in:
Boris Zbarsky
2009-07-26 21:27:32 -04:00
parent f73fbdee66
commit 97e02084ab
5 changed files with 33 additions and 2 deletions
+2 -2
View File
@@ -5725,13 +5725,13 @@ AdjustAppendParentForAfterContent(nsPresContext* aPresContext,
static nsIFrame*
FindAppendPrevSibling(nsIFrame* aParentFrame, nsIFrame* aAfterFrame)
{
nsFrameList childList(aParentFrame->GetFirstChild(nsnull));
if (aAfterFrame) {
nsFrameList childList(aParentFrame->GetFirstChild(nsnull));
NS_ASSERTION(aAfterFrame->GetParent() == aParentFrame, "Wrong parent");
return childList.GetPrevSiblingFor(aAfterFrame);
}
return childList.LastChild();
return aParentFrame->GetLastChild(nsnull);
}
/**