From 7022cf7841e2bd65fbbb1a2a901d374244b7ca29 Mon Sep 17 00:00:00 2001 From: "roc+@cs.cmu.edu" Date: Fri, 18 Apr 2008 02:49:36 -0700 Subject: [PATCH] Bug 429315. Relanding. Don't reparent widgets that are supposed to be toplevel. r+sr=bzbarsky,a=beltzner --- view/src/nsViewManager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/view/src/nsViewManager.cpp b/view/src/nsViewManager.cpp index fcc40e625447..deaa5c19a1ee 100644 --- a/view/src/nsViewManager.cpp +++ b/view/src/nsViewManager.cpp @@ -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