Bug 429315. Don't reparent toplevel widgets when we reparent a view subtree; they should remain toplevel. r+sr=bzbarsky,a=beltzner

This commit is contained in:
roc+@cs.cmu.edu 2008-04-17 01:17:06 -07:00
parent 25d4009a17
commit f3ae18b328

View File

@ -1428,7 +1428,8 @@ void nsViewManager::ReparentChildWidgets(nsIView* aView, nsIWidget *aNewWidget)
// to do for the view and its descendants
nsIWidget* widget = aView->GetWidget();
nsIWidget* parentWidget = widget->GetParent();
if (parentWidget != aNewWidget) {
// Toplevel widgets should not be reparented!
if (parentWidget && parentWidget != aNewWidget) {
#ifdef DEBUG
nsresult rv =
#endif