From 243c9f3a9612bf4779ce439004f2465f5e0c14d3 Mon Sep 17 00:00:00 2001 From: "joki%netscape.com" Date: Fri, 2 Oct 1998 22:56:52 +0000 Subject: [PATCH] Don't look for new webshell during link clicks if no target specified git-svn-id: svn://10.0.0.236/trunk@11819 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/base/nsWebShell.cpp | 6 +++++- mozilla/webshell/src/nsWebShell.cpp | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp index 810713f653c..ca1e5d4dd17 100644 --- a/mozilla/docshell/base/nsWebShell.cpp +++ b/mozilla/docshell/base/nsWebShell.cpp @@ -1455,9 +1455,13 @@ nsWebShell::OnLinkClick(nsIFrame* aFrame, nsIWebShell* nsWebShell::GetTarget(const PRUnichar* aName) { - nsString name(aName); + nsAutoString name(aName); nsIWebShell* target = nsnull; + if (0 == name.Length()) { + return this; + } + if (name.EqualsIgnoreCase("_blank")) { nsIWebShell *shell; if (NS_OK == NewWebShell(shell)) diff --git a/mozilla/webshell/src/nsWebShell.cpp b/mozilla/webshell/src/nsWebShell.cpp index 810713f653c..ca1e5d4dd17 100644 --- a/mozilla/webshell/src/nsWebShell.cpp +++ b/mozilla/webshell/src/nsWebShell.cpp @@ -1455,9 +1455,13 @@ nsWebShell::OnLinkClick(nsIFrame* aFrame, nsIWebShell* nsWebShell::GetTarget(const PRUnichar* aName) { - nsString name(aName); + nsAutoString name(aName); nsIWebShell* target = nsnull; + if (0 == name.Length()) { + return this; + } + if (name.EqualsIgnoreCase("_blank")) { nsIWebShell *shell; if (NS_OK == NewWebShell(shell))