Remove an optimisation that prevented views from being reparented in some situations. b=351225 r+sr=roc a=dveditz

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@215988 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mats.palmgren%bredband.net
2006-11-28 18:54:33 +00:00
parent 268b7a04bf
commit 202f2be0b1

View File

@@ -389,17 +389,7 @@ nsHTMLContainerFrame::ReparentFrameView(nsPresContext* aPresContext,
NS_PRECONDITION(aNewParentFrame, "null new parent frame pointer");
NS_PRECONDITION(aOldParentFrame != aNewParentFrame, "same old and new parent frame");
// This code is called often and we need it to be as fast as possible, so
// see if we can trivially detect that no work needs to be done
if (!aChildFrame->HasView()) {
// Child frame doesn't have a view. See if it has any child frames
if (!aChildFrame->GetFirstChild(nsnull)) {
return NS_OK;
}
}
// See if either the old parent frame or the new parent frame have a view
while (!aOldParentFrame->HasView() && !aNewParentFrame->HasView()) {
// Walk up both the old parent frame and the new parent frame nodes
// stopping when we either find a common parent or views for one