Changed the FindNamedBrowser to be FindNamedBrowserItem. This is important because it's possible that a frame needs to be returned, not just a toplevel browser object. So we need to be able to return a destination frame from this call. So now the API talks in terms of a frame.
git-svn-id: svn://10.0.0.236/trunk@64349 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -111,19 +111,8 @@ NS_IMETHODIMP nsDocShellTreeOwner::FindItemWithName(const PRUnichar* aName,
|
||||
|
||||
NS_ENSURE_TRUE(mWebBrowserChrome, NS_ERROR_FAILURE);
|
||||
|
||||
nsCOMPtr<nsIWebBrowser> foundWebBrowser;
|
||||
NS_ENSURE_SUCCESS(mWebBrowserChrome->FindNamedBrowser(aName,
|
||||
getter_AddRefs(foundWebBrowser)), NS_ERROR_FAILURE);
|
||||
|
||||
if(!foundWebBrowser)
|
||||
return NS_OK;
|
||||
|
||||
nsCOMPtr<nsIDocShell> foundDocShell;
|
||||
foundWebBrowser->GetDocShell(getter_AddRefs(foundDocShell));
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> foundDocShellAsItem;
|
||||
*aFoundItem = foundDocShellAsItem;
|
||||
NS_IF_ADDREF(*aFoundItem);
|
||||
NS_ENSURE_SUCCESS(mWebBrowserChrome->FindNamedBrowserItem(aName, aFoundItem),
|
||||
NS_ERROR_FAILURE);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user