aFrame->FirstChild(aPresContext, nsLayoutAtoms::overflowList, &childFrame); while (childFrame) { ReparentFrameViewTo(aPresContext, childFrame, aViewManager, aNewParentView, aOldParentView); childFrame->GetNextSibling(&childFrame); }   aFrame->FirstChild(aPresContext, nsLayoutAtoms::floaterList, &childFrame); while (childFrame) { ReparentFrameViewTo(aPresContext, childFrame, aViewManager, aNewParentView, aOldParentView); childFrame->GetNextSibling(&childFrame); }
nsIFrame* childFrame; aFrame->FirstChild(aPresContext, listName, &childFrame); for (; childFrame; childFrame->GetNextSibling(&childFrame)) { ReparentFrameViewTo(aPresContext, childFrame, aViewManager, aNewParentView, aOldParentView); } } while (listName);
ReparentFrameViewTo(nsIPresContext* aPresContext,                    nsIFrame*       aFrame,                    nsIViewManager* aViewManager,                    nsIView*        aNewParentView,                    nsIView*        aOldParentView){  nsIView*  view;  // XXX What to do about placeholder views for "position: fixed" elements?  // They should be reparented too.  // Does aFrame have a view?  aFrame->GetView(aPresContext, &view);  if (view) {    // Verify that the current parent view is what we think it is    //nsIView*  parentView;    //NS_ASSERTION(parentView == aOldParentView, "unexpected parent view");    aViewManager->RemoveChild(view);        // The view will remember the Z-order and other attributes that have been set on it.    // XXX Pretend this view is last of the parent's views in document order    aViewManager->InsertChild(aNewParentView, view, nsnull, PR_TRUE);  } else {    // Iterate the child frames, and check each child frame to see if it has    // a view    nsIFrame* childFrame;    aFrame->FirstChild(aPresContext, nsnull, &childFrame);    while (childFrame) {      ReparentFrameViewTo(aPresContext, childFrame, aViewManager, aNewParentView, aOldParentView);      childFrame->GetNextSibling(&childFrame);    }    // Also check the overflow-list    aFrame->FirstChild(aPresContext, nsLayoutAtoms::overflowList, &childFrame);    while (childFrame) {      ReparentFrameViewTo(aPresContext, childFrame, aViewManager, aNewParentView, aOldParentView);      childFrame->GetNextSibling(&childFrame);    }      // Also check the floater-list    aFrame->FirstChild(aPresContext, nsLayoutAtoms::floaterList, &childFrame);    while (childFrame) {      ReparentFrameViewTo(aPresContext, childFrame, aViewManager, aNewParentView, aOldParentView);      childFrame->GetNextSibling(&childFrame);    }  }  return NS_OK;}