mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-16 22:04:36 +00:00
Bug 645538. Remove bogus warning. r=roc
This commit is contained in:
parent
eaa64ca885
commit
d328ef8584
@ -2383,6 +2383,9 @@ DocumentViewerImpl::FindContainerView()
|
||||
nsCOMPtr<nsPIDOMWindow> pwin(do_GetInterface(docShellItem));
|
||||
if (pwin) {
|
||||
nsCOMPtr<nsIContent> containerElement = do_QueryInterface(pwin->GetFrameElementInternal());
|
||||
if (!containerElement) {
|
||||
return nsnull;
|
||||
}
|
||||
nsCOMPtr<nsIPresShell> parentPresShell;
|
||||
if (docShellItem) {
|
||||
nsCOMPtr<nsIDocShellTreeItem> parentDocShellItem;
|
||||
@ -2392,15 +2395,13 @@ DocumentViewerImpl::FindContainerView()
|
||||
parentDocShell->GetPresShell(getter_AddRefs(parentPresShell));
|
||||
}
|
||||
}
|
||||
if (!parentPresShell && containerElement) {
|
||||
if (!parentPresShell) {
|
||||
nsCOMPtr<nsIDocument> parentDoc = containerElement->GetCurrentDoc();
|
||||
if (parentDoc) {
|
||||
parentPresShell = parentDoc->GetShell();
|
||||
}
|
||||
}
|
||||
if (!containerElement) {
|
||||
NS_WARNING("Subdocument container has no content");
|
||||
} else if (!parentPresShell) {
|
||||
if (!parentPresShell) {
|
||||
NS_WARNING("Subdocument container has no presshell");
|
||||
} else {
|
||||
nsIFrame* f = parentPresShell->GetRealPrimaryFrameFor(containerElement);
|
||||
@ -3531,7 +3532,7 @@ nsDocViewerFocusListener::HandleEvent(nsIDOMEvent* aEvent)
|
||||
NS_ENSURE_STATE(mDocViewer);
|
||||
|
||||
nsCOMPtr<nsIPresShell> shell;
|
||||
nsresult rv = mDocViewer->GetPresShell(getter_AddRefs(shell));
|
||||
mDocViewer->GetPresShell(getter_AddRefs(shell));
|
||||
NS_ENSURE_TRUE(shell, NS_ERROR_FAILURE);
|
||||
|
||||
nsCOMPtr<nsISelectionController> selCon = do_QueryInterface(shell);
|
||||
|
Loading…
x
Reference in New Issue
Block a user