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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user