Bug 588337. When looking for a container view try a little harder to find the parent document's presshell. r=roc

This commit is contained in:
Timothy Nikkel 2010-08-21 19:55:55 -05:00
parent e0f7b76a11
commit 25c0749345

View File

@ -2408,6 +2408,12 @@ DocumentViewerImpl::FindContainerView()
parentDocShell->GetPresShell(getter_AddRefs(parentPresShell));
}
}
if (!parentPresShell && containerElement) {
nsCOMPtr<nsIDocument> parentDoc = containerElement->GetCurrentDoc();
if (parentDoc) {
parentPresShell = parentDoc->GetShell();
}
}
if (!containerElement) {
NS_WARNING("Subdocument container has no content");
} else if (!parentPresShell) {