Followup to bug 589864: Accidentally dropped needed widget init param. irc-r=tn a=bustage-fix
authorChris Jones <jones.chris.g@gmail.com>
Tue, 24 Aug 2010 02:48:46 -0500
changeset 51353 9a623cc1c5e72c4241a6769b577645dca4df2a25
parent 51352 f203095c85de66f0bd4af79c19490fc5e60c9ec2
child 51354 092ed1804da6e44d37371493b15333956e798cee
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage-fix
bugs589864
milestone2.0b5pre
first release with
nightly linux32
9a623cc1c5e7 / 4.0b5pre / 20100824030112 / files
nightly linux64
9a623cc1c5e7 / 4.0b5pre / 20100824031314 / files
nightly mac
9a623cc1c5e7 / 4.0b5pre / 20100824030533 / files
nightly win32
9a623cc1c5e7 / 4.0b5pre / 20100824040950 / files
nightly win64
9a623cc1c5e7 / 4.0b5pre / 20100824040608 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Followup to bug 589864: Accidentally dropped needed widget init param. irc-r=tn a=bustage-fix
view/src/nsView.cpp
--- a/view/src/nsView.cpp
+++ b/view/src/nsView.cpp
@@ -706,18 +706,22 @@ nsresult nsView::CreateWidget(nsWidgetIn
                               nsContentType aContentType)
 {
   AssertNoWindow();
   NS_ABORT_IF_FALSE(!aWidgetInitData ||
                     aWidgetInitData->mWindowType != eWindowType_popup,
                     "Use CreateWidgetForPopup");
 
   DefaultWidgetInitData defaultInitData;
+  PRBool initDataPassedIn = !!aWidgetInitData;
   aWidgetInitData = aWidgetInitData ? aWidgetInitData : &defaultInitData;
   aWidgetInitData->mContentType = aContentType;
+  defaultInitData.mListenForResizes =
+    (!initDataPassedIn && GetParent() &&
+     GetParent()->GetViewManager() != mViewManager);
 
   nsIntRect trect = CalcWidgetBounds(aWidgetInitData->mWindowType);
 
   nsCOMPtr<nsIDeviceContext> dx;
   mViewManager->GetDeviceContext(*getter_AddRefs(dx));
 
   nsIWidget* parentWidget =
     GetParent() ? GetParent()->GetNearestWidget(nsnull) : nsnull;