зеркало из https://github.com/mozilla/pjs.git
Bug 582057, part f: Split out window initialization code in preparation for multiple CreateWidget* methods. r=roc
This commit is contained in:
Родитель
0b5654cb18
Коммит
67a2b8c37c
|
@ -745,6 +745,16 @@ nsresult nsView::CreateWidget(const nsIID &aWindowIID,
|
|||
::HandleEvent, dx, nsnull, nsnull, aWidgetInitData);
|
||||
}
|
||||
|
||||
InitializeWindow(aEnableDragDrop, aResetVisibility);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
nsView::InitializeWindow(bool aEnableDragDrop, bool aResetVisibility)
|
||||
{
|
||||
NS_ABORT_IF_FALSE(mWindow, "Must have a window to initialize");
|
||||
|
||||
if (aEnableDragDrop) {
|
||||
mWindow->EnableDragDrop(PR_TRUE);
|
||||
}
|
||||
|
@ -757,8 +767,6 @@ nsresult nsView::CreateWidget(const nsIID &aWindowIID,
|
|||
if (aResetVisibility) {
|
||||
SetVisibility(GetVisibility());
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Attach to a top level widget and start receiving mirrored events.
|
||||
|
|
|
@ -194,6 +194,9 @@ protected:
|
|||
void DoResetWidgetBounds(PRBool aMoveOnly, PRBool aInvalidateChangedSize);
|
||||
|
||||
nsRegion* mDirtyRegion;
|
||||
|
||||
private:
|
||||
void InitializeWindow(bool aEnableDragDrop, bool aResetVisibility);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче