зеркало из https://github.com/mozilla/pjs.git
Bug 582075, part 0.5: Add support for aInitData=NULL to the Windows nsWindow implementation. r=dougt
This commit is contained in:
Родитель
dc1963ed60
Коммит
eb22a77b91
|
@ -527,14 +527,16 @@ nsWindow::Create(nsIWidget *aParent,
|
|||
nsIToolkit *aToolkit,
|
||||
nsWidgetInitData *aInitData)
|
||||
{
|
||||
if (aInitData)
|
||||
mUnicodeWidget = aInitData->mUnicode;
|
||||
nsWidgetInitData defaultInitData;
|
||||
if (!aInitData)
|
||||
aInitData = &defaultInitData;
|
||||
|
||||
nsIWidget *baseParent = aInitData &&
|
||||
(aInitData->mWindowType == eWindowType_dialog ||
|
||||
mUnicodeWidget = aInitData->mUnicode;
|
||||
|
||||
nsIWidget *baseParent = aInitData->mWindowType == eWindowType_dialog ||
|
||||
aInitData->mWindowType == eWindowType_toplevel ||
|
||||
aInitData->mWindowType == eWindowType_invisible) ?
|
||||
nsnull : aParent;
|
||||
aInitData->mWindowType == eWindowType_invisible ?
|
||||
nsnull : aParent;
|
||||
|
||||
mIsTopWidgetWindow = (nsnull == baseParent);
|
||||
mBounds.width = aRect.width;
|
||||
|
@ -552,11 +554,8 @@ nsWindow::Create(nsIWidget *aParent,
|
|||
mParent = aNativeParent ? GetNSWindowPtr((HWND)aNativeParent) : nsnull;
|
||||
}
|
||||
|
||||
if (nsnull != aInitData) {
|
||||
mPopupType = aInitData->mPopupHint;
|
||||
}
|
||||
|
||||
mContentType = aInitData ? aInitData->mContentType : eContentTypeInherit;
|
||||
mPopupType = aInitData->mPopupHint;
|
||||
mContentType = aInitData->mContentType;
|
||||
|
||||
DWORD style = WindowStyle();
|
||||
DWORD extendedStyle = WindowExStyle();
|
||||
|
@ -571,7 +570,7 @@ nsWindow::Create(nsIWidget *aParent,
|
|||
} else if (mWindowType == eWindowType_invisible) {
|
||||
// Make sure CreateWindowEx succeeds at creating a toplevel window
|
||||
style &= ~0x40000000; // WS_CHILDWINDOW
|
||||
} else if (nsnull != aInitData) {
|
||||
} else {
|
||||
// See if the caller wants to explictly set clip children and clip siblings
|
||||
if (aInitData->clipChildren) {
|
||||
style |= WS_CLIPCHILDREN;
|
||||
|
@ -584,7 +583,7 @@ nsWindow::Create(nsIWidget *aParent,
|
|||
}
|
||||
|
||||
mWnd = ::CreateWindowExW(extendedStyle,
|
||||
aInitData && aInitData->mDropShadow ?
|
||||
aInitData->mDropShadow ?
|
||||
WindowPopupClass() : WindowClass(),
|
||||
L"",
|
||||
style,
|
||||
|
|
Загрузка…
Ссылка в новой задаче