Bug 504221 part 2. Switch ReparentFrameViewList to nsFrameList. r+sr=roc

This commit is contained in:
Boris Zbarsky 2009-07-28 08:51:09 -04:00
Родитель c2e869a252
Коммит fccc6aa55c
2 изменённых файлов: 11 добавлений и 12 удалений

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

@ -611,12 +611,12 @@ nsHTMLContainerFrame::ReparentFrameView(nsPresContext* aPresContext,
}
nsresult
nsHTMLContainerFrame::ReparentFrameViewList(nsPresContext* aPresContext,
nsIFrame* aChildFrameList,
nsIFrame* aOldParentFrame,
nsIFrame* aNewParentFrame)
nsHTMLContainerFrame::ReparentFrameViewList(nsPresContext* aPresContext,
const nsFrameList& aChildFrameList,
nsIFrame* aOldParentFrame,
nsIFrame* aNewParentFrame)
{
NS_PRECONDITION(aChildFrameList, "null child frame list");
NS_PRECONDITION(aChildFrameList.NotEmpty(), "empty child frame list");
NS_PRECONDITION(aOldParentFrame, "null old parent frame pointer");
NS_PRECONDITION(aNewParentFrame, "null new parent frame pointer");
NS_PRECONDITION(aOldParentFrame != aNewParentFrame, "same old and new parent frame");
@ -665,9 +665,8 @@ nsHTMLContainerFrame::ReparentFrameViewList(nsPresContext* aPresContext,
nsIViewManager* viewManager = oldParentView->GetViewManager();
// They're not so we need to reparent any child views
for (nsIFrame* f = aChildFrameList; f; f = f->GetNextSibling()) {
ReparentFrameViewTo(f, viewManager, newParentView,
oldParentView);
for (nsFrameList::Enumerator e(aChildFrameList); !e.AtEnd(); e.Next()) {
ReparentFrameViewTo(e.get(), viewManager, newParentView, oldParentView);
}
}

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

@ -96,10 +96,10 @@ public:
nsIFrame* aOldParentFrame,
nsIFrame* aNewParentFrame);
static nsresult ReparentFrameViewList(nsPresContext* aPresContext,
nsIFrame* aChildFrameList,
nsIFrame* aOldParentFrame,
nsIFrame* aNewParentFrame);
static nsresult ReparentFrameViewList(nsPresContext* aPresContext,
const nsFrameList& aChildFrameList,
nsIFrame* aOldParentFrame,
nsIFrame* aNewParentFrame);
/**
* Displays the standard border, background and outline for the frame