Fixing bug 103638 (and bug 273699). Targets with same name in different windows open in the wrong window. Patch by bzbarsky@mit.edu and myself, r=danm.moz@gmail.com, bzbarsky@mit.edu, sr=dveditz@cruzio.com, a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@167537 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -165,19 +165,21 @@ NS_IMETHODIMP nsChromeTreeOwner::GetInterface(const nsIID& aIID, void** aSink)
|
||||
//*****************************************************************************
|
||||
|
||||
NS_IMETHODIMP nsChromeTreeOwner::FindItemWithName(const PRUnichar* aName,
|
||||
nsIDocShellTreeItem* aRequestor, nsIDocShellTreeItem** aFoundItem)
|
||||
nsIDocShellTreeItem* aRequestor, nsIDocShellTreeItem* aOriginalRequestor,
|
||||
nsIDocShellTreeItem** aFoundItem)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aFoundItem);
|
||||
|
||||
*aFoundItem = nsnull;
|
||||
|
||||
nsAutoString name(aName);
|
||||
|
||||
PRBool fIs_Content = PR_FALSE;
|
||||
|
||||
/* Special Cases */
|
||||
if(name.IsEmpty())
|
||||
if(!aName || !*aName)
|
||||
return NS_OK;
|
||||
|
||||
nsDependentString name(aName);
|
||||
|
||||
if(name.LowerCaseEqualsLiteral("_blank"))
|
||||
return NS_OK;
|
||||
// _main is an IE target which should be case-insensitive but isn't
|
||||
@@ -229,7 +231,8 @@ NS_IMETHODIMP nsChromeTreeOwner::FindItemWithName(const PRUnichar* aName,
|
||||
shellAsTreeItem->GetTreeOwner(getter_AddRefs(shellOwner));
|
||||
nsCOMPtr<nsISupports> shellOwnerSupports(do_QueryInterface(shellOwner));
|
||||
|
||||
shellAsTreeItem->FindItemWithName(aName, shellOwnerSupports, aFoundItem);
|
||||
shellAsTreeItem->FindItemWithName(aName, shellOwnerSupports,
|
||||
aOriginalRequestor, aFoundItem);
|
||||
}
|
||||
}
|
||||
if(*aFoundItem)
|
||||
|
||||
Reference in New Issue
Block a user