зеркало из https://github.com/mozilla/pjs.git
unnamed windows can't be a named target. bug 278143 r=bzbarsky
This commit is contained in:
Родитель
07ba174fdb
Коммит
bf11b74145
|
@ -1971,6 +1971,9 @@ nsDocShell::FindItemWithName(const PRUnichar * aName,
|
|||
// If we don't find one, we return NS_OK and a null result
|
||||
*_retval = nsnull;
|
||||
|
||||
if (!*aName)
|
||||
return NS_OK;
|
||||
|
||||
if (!aRequestor)
|
||||
{
|
||||
nsCOMPtr<nsIDocShellTreeItem> foundItem;
|
||||
|
@ -1980,7 +1983,7 @@ nsDocShell::FindItemWithName(const PRUnichar * aName,
|
|||
// for a null aRequestor.
|
||||
|
||||
nsDependentString name(aName);
|
||||
if (name.IsEmpty() || name.LowerCaseEqualsLiteral("_self")) {
|
||||
if (name.LowerCaseEqualsLiteral("_self")) {
|
||||
foundItem = this;
|
||||
}
|
||||
else if (name.LowerCaseEqualsLiteral("_blank") ||
|
||||
|
@ -2424,6 +2427,9 @@ nsDocShell::FindChildWithName(const PRUnichar * aName,
|
|||
|
||||
*_retval = nsnull; // if we don't find one, we return NS_OK and a null result
|
||||
|
||||
if (!*aName)
|
||||
return NS_OK;
|
||||
|
||||
nsXPIDLString childName;
|
||||
PRInt32 i, n = mChildList.Count();
|
||||
for (i = 0; i < n; i++) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче