Bug 429315. Relanding. Don't reparent widgets that are supposed to be toplevel. r+sr=bzbarsky,a=beltzner

This commit is contained in:
roc+%cs.cmu.edu 2008-04-18 09:49:36 +00:00
Родитель 80c0cd522f
Коммит 5202ea34c5
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

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