Bug 57026. Do not reparent views whenever we 'MoveChildrenTo()', because this breaks SplitToContainingBlock(): no views will have been created in this case! Instead, alter ConstructInline() to move views. r=karnaze, sr=buster.

git-svn-id: svn://10.0.0.236/trunk@84593 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
waterson%netscape.com
2001-01-08 21:10:44 +00:00
parent 7bb4e544d8
commit 596264480e
2 changed files with 10 additions and 10 deletions

View File

@@ -415,11 +415,6 @@ MoveChildrenTo(nsIPresContext* aPresContext,
nsIFrame* aNewParent,
nsIFrame* aFrameList)
{
// when reparenting a frame, it is critical to also reparent any views associated with the frame.
nsIFrame *oldParent;
aFrameList->GetParent(&oldParent);
nsHTMLContainerFrame::ReparentFrameViewList(aPresContext, aFrameList, oldParent, aNewParent);
while (aFrameList) {
aFrameList->SetParent(aNewParent);
aFrameList->GetNextSibling(&aFrameList);
@@ -12820,6 +12815,11 @@ nsCSSFrameConstructor::ConstructInline(nsIPresShell* aPresShell,
// Relatively positioned frames need a view
nsHTMLContainerFrame::CreateViewForFrame(aPresContext, blockFrame,
aStyleContext, nsnull, PR_FALSE);
// Move list2's frames into the new view
nsIFrame* oldParent;
list2->GetParent(&oldParent);
nsHTMLContainerFrame::ReparentFrameViewList(aPresContext, list2, oldParent, blockFrame);
}
MoveChildrenTo(aPresContext, blockSC, blockFrame, list2);