Fix for bug 110729. Prevent mail display pane to open a pluging in full page mode. Fix also an uninitialized pointer. Patch provided by av. R=ducarroz, SR=beard

git-svn-id: svn://10.0.0.236/trunk@134105 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ducarroz%netscape.com
2002-11-19 15:30:03 +00:00
parent 7bfdf9ceaf
commit ed544e36f2
2 changed files with 10 additions and 5 deletions

View File

@@ -4497,12 +4497,18 @@ nsDocShell::NewContentViewerObj(const char *aContentType,
aViewer),
NS_ERROR_FAILURE);
(*aViewer)->SetContainer(NS_STATIC_CAST(nsIContentViewerContainer *, this));
nsCOMPtr<nsIPluginViewer> pv(do_QueryInterface(*aViewer));
if (pv)
SetTitle(nsnull); // clear title bar for full-page plugin
if (pv) {
if (mName.EqualsIgnoreCase("messagepane")) {
NS_IF_RELEASE(*aViewer);
NS_IF_RELEASE(*aContentHandler);
return NS_ERROR_FAILURE;
}
else
SetTitle(nsnull); // clear title bar for full-page plugin
}
(*aViewer)->SetContainer(NS_STATIC_CAST(nsIContentViewerContainer *, this));
return NS_OK;
}