Bug 92210 - Window steals focus if you switch to another app during "Transferring data from...". r=saari, sr=hyatt.
git-svn-id: svn://10.0.0.236/trunk@101548 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -961,6 +961,31 @@ nsresult nsDocShell::FindTarget(const PRUnichar *aWindowTarget,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetEldestPresContext(nsIPresContext** aPresContext)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
NS_ENSURE_ARG_POINTER(aPresContext);
|
||||
*aPresContext = nsnull;
|
||||
|
||||
nsCOMPtr<nsIContentViewer> viewer = mContentViewer;
|
||||
while (viewer) {
|
||||
nsCOMPtr<nsIContentViewer> prevViewer;
|
||||
viewer->GetPreviousViewer(getter_AddRefs(prevViewer));
|
||||
if (prevViewer)
|
||||
viewer = prevViewer;
|
||||
else {
|
||||
nsCOMPtr<nsIDocumentViewer> docv(do_QueryInterface(viewer));
|
||||
if (docv)
|
||||
rv = docv->GetPresContext(*aPresContext);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetPresContext(nsIPresContext ** aPresContext)
|
||||
{
|
||||
@@ -999,6 +1024,24 @@ nsDocShell::GetPresShell(nsIPresShell ** aPresShell)
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetEldestPresShell(nsIPresShell** aPresShell)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
NS_ENSURE_ARG_POINTER(aPresShell);
|
||||
*aPresShell = nsnull;
|
||||
|
||||
nsCOMPtr<nsIPresContext> presContext;
|
||||
(void) GetEldestPresContext(getter_AddRefs(presContext));
|
||||
|
||||
if (presContext) {
|
||||
rv = presContext->GetShell(aPresShell);
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetContentViewer(nsIContentViewer ** aContentViewer)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user