Followup to bug 589864: Accidentally dropped needed widget init param. irc-r=tn a=bustage-fix

This commit is contained in:
Chris Jones 2010-08-24 02:48:46 -05:00
Родитель 7c360328a9
Коммит 29350cab06
1 изменённых файлов: 4 добавлений и 0 удалений

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

@ -711,8 +711,12 @@ nsresult nsView::CreateWidget(nsWidgetInitData *aWidgetInitData,
"Use CreateWidgetForPopup"); "Use CreateWidgetForPopup");
DefaultWidgetInitData defaultInitData; DefaultWidgetInitData defaultInitData;
PRBool initDataPassedIn = !!aWidgetInitData;
aWidgetInitData = aWidgetInitData ? aWidgetInitData : &defaultInitData; aWidgetInitData = aWidgetInitData ? aWidgetInitData : &defaultInitData;
aWidgetInitData->mContentType = aContentType; aWidgetInitData->mContentType = aContentType;
defaultInitData.mListenForResizes =
(!initDataPassedIn && GetParent() &&
GetParent()->GetViewManager() != mViewManager);
nsIntRect trect = CalcWidgetBounds(aWidgetInitData->mWindowType); nsIntRect trect = CalcWidgetBounds(aWidgetInitData->mWindowType);