mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 17:23:59 +00:00
Bug 507926. Make sure CreateWindowEx doesn't fail when we're creating an invisible window. r=jmathies
This commit is contained in:
parent
a5beb085b9
commit
46904b4862
@ -2315,7 +2315,11 @@ DocumentViewerImpl::FindContainerView()
|
||||
parentDocShell->GetPresShell(getter_AddRefs(parentPresShell));
|
||||
}
|
||||
}
|
||||
if (content && parentPresShell) {
|
||||
if (!content) {
|
||||
NS_WARNING("Subdocument container has no content");
|
||||
} else if (!parentPresShell) {
|
||||
NS_WARNING("Subdocument container has no presshell");
|
||||
} else {
|
||||
nsIFrame* f = parentPresShell->GetRealPrimaryFrameFor(content);
|
||||
if (f) {
|
||||
nsIFrame* subdocFrame = f->GetContentInsertionFrame();
|
||||
@ -2329,7 +2333,11 @@ DocumentViewerImpl::FindContainerView()
|
||||
nsIView* innerView = subdocFrameView->GetFirstChild();
|
||||
NS_ASSERTION(innerView, "Subdoc frames must have an inner view too");
|
||||
containerView = innerView;
|
||||
} else {
|
||||
NS_WARNING("Subdocument container has non-subdocument frame");
|
||||
}
|
||||
} else {
|
||||
NS_WARNING("Subdocument container has no frame");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -642,6 +642,9 @@ nsWindow::StandardWindowCreate(nsIWidget *aParent,
|
||||
extendedStyle = WS_EX_TOOLWINDOW;
|
||||
else
|
||||
parent = NULL;
|
||||
} else if (mWindowType == eWindowType_invisible) {
|
||||
// Make sure CreateWindowEx succeeds at creating a toplevel window
|
||||
style &= ~WS_CHILDWINDOW;
|
||||
} else if (nsnull != aInitData) {
|
||||
// See if the caller wants to explictly set clip children and clip siblings
|
||||
if (aInitData->clipChildren) {
|
||||
|
Loading…
Reference in New Issue
Block a user