diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp index 96cfb4808ca..e9ebc835fe1 100644 --- a/layout/base/nsDocumentViewer.cpp +++ b/layout/base/nsDocumentViewer.cpp @@ -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"); } } } diff --git a/widget/src/windows/nsWindow.cpp b/widget/src/windows/nsWindow.cpp index fc2b283eb41..481b8fb8f27 100644 --- a/widget/src/windows/nsWindow.cpp +++ b/widget/src/windows/nsWindow.cpp @@ -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) {