зеркало из https://github.com/mozilla/pjs.git
Bug 217886 frame structure gets lost in builds since 20030826
patch by mpconnor@rogers.com r=bz sr=bz a=brendan
This commit is contained in:
Родитель
2a81605580
Коммит
2994c4573e
|
@ -1009,7 +1009,9 @@ nsresult nsDocShell::FindTarget(const PRUnichar *aWindowTarget,
|
|||
if(!treeItem)
|
||||
*aResult = this;
|
||||
}
|
||||
else if(name.EqualsIgnoreCase("_content") || name.EqualsIgnoreCase("_main"))
|
||||
// _main is an IE target which should be case-insensitive but isn't
|
||||
// see bug 217886 for details
|
||||
else if(name.EqualsIgnoreCase("_content") || name.Equals(NS_LITERAL_STRING("_main")))
|
||||
{
|
||||
if (mTreeOwner) {
|
||||
mTreeOwner->FindItemWithName(name.get(), nsnull,
|
||||
|
@ -4978,8 +4980,10 @@ nsDocShell::InternalLoad(nsIURI * aURI,
|
|||
//
|
||||
if (mUseExternalProtocolHandler && aLoadType == LOAD_LINK) {
|
||||
// don't do it for javascript urls!
|
||||
// _main is an IE target which should be case-insensitive but isn't
|
||||
// see bug 217886 for details
|
||||
if (!bIsJavascript &&
|
||||
(name.EqualsIgnoreCase("_content") || name.EqualsIgnoreCase("_main") ||
|
||||
(name.EqualsIgnoreCase("_content") || name.Equals(NS_LITERAL_STRING("_main")) ||
|
||||
name.EqualsIgnoreCase("_blank")))
|
||||
{
|
||||
nsCOMPtr<nsIExternalProtocolService> extProtService;
|
||||
|
@ -5020,10 +5024,12 @@ nsDocShell::InternalLoad(nsIURI * aURI,
|
|||
name.EqualsIgnoreCase("_new")) {
|
||||
name.Assign(NS_LITERAL_STRING("_top"));
|
||||
}
|
||||
// _main is an IE target which should be case-insensitive but isn't
|
||||
// see bug 217886 for details
|
||||
else if (!name.EqualsIgnoreCase("_parent") &&
|
||||
!name.EqualsIgnoreCase("_self") &&
|
||||
!name.EqualsIgnoreCase("_content") &&
|
||||
!name.EqualsIgnoreCase("_main")) {
|
||||
!name.Equals(NS_LITERAL_STRING("_main"))) {
|
||||
nsCOMPtr<nsIDocShellTreeItem> targetTreeItem;
|
||||
FindItemWithName(name.get(),
|
||||
NS_STATIC_CAST(nsIInterfaceRequestor *, this),
|
||||
|
|
|
@ -3053,11 +3053,13 @@ PRBool GlobalWindowImpl::CheckOpenAllow(const nsAString &aName)
|
|||
// However it might still not be blocked.
|
||||
// Special case items that don't actually open new windows.
|
||||
nsAutoString name(aName);
|
||||
// _main is an IE target which should be case-insensitive but isn't
|
||||
// see bug 217886 for details
|
||||
if (!name.IsEmpty() &&
|
||||
!name.EqualsIgnoreCase("_top") &&
|
||||
!name.EqualsIgnoreCase("_self") &&
|
||||
!name.EqualsIgnoreCase("_content") &&
|
||||
!name.EqualsIgnoreCase("_main")) {
|
||||
!name.Equals(NS_LITERAL_STRING("_main"))) {
|
||||
|
||||
nsCOMPtr<nsIWindowWatcher> wwatch =
|
||||
do_GetService(NS_WINDOWWATCHER_CONTRACTID);
|
||||
|
|
|
@ -208,7 +208,9 @@ NS_IMETHODIMP nsDocShellTreeOwner::FindItemWithName(const PRUnichar* aName,
|
|||
return NS_OK;
|
||||
if(name.EqualsIgnoreCase("_blank"))
|
||||
return NS_OK;
|
||||
if(name.EqualsIgnoreCase("_content") || name.EqualsIgnoreCase("_main")) {
|
||||
// _main is an IE target which should be case-insensitive but isn't
|
||||
// see bug 217886 for details
|
||||
if(name.EqualsIgnoreCase("_content") || name.Equals(NS_LITERAL_STRING("_main"))) {
|
||||
*aFoundItem = mWebBrowser->mDocShellAsItem;
|
||||
NS_IF_ADDREF(*aFoundItem);
|
||||
return NS_OK;
|
||||
|
|
|
@ -120,7 +120,9 @@ NS_IMETHODIMP nsChromeTreeOwner::FindItemWithName(const PRUnichar* aName,
|
|||
return NS_OK;
|
||||
if(name.EqualsIgnoreCase("_blank"))
|
||||
return NS_OK;
|
||||
if(name.EqualsIgnoreCase("_content") || name.EqualsIgnoreCase("_main"))
|
||||
// _main is an IE target which should be case-insensitive but isn't
|
||||
// see bug 217886 for details
|
||||
if(name.EqualsIgnoreCase("_content") || name.Equals(NS_LITERAL_STRING("_main")))
|
||||
{
|
||||
fIs_Content = PR_TRUE;
|
||||
mXULWindow->GetPrimaryContentShell(aFoundItem);
|
||||
|
|
|
@ -166,7 +166,9 @@ NS_IMETHODIMP nsContentTreeOwner::FindItemWithName(const PRUnichar* aName,
|
|||
return NS_OK;
|
||||
if(name.EqualsIgnoreCase("_blank"))
|
||||
return NS_OK;
|
||||
if(name.EqualsIgnoreCase("_content") || name.EqualsIgnoreCase("_main"))
|
||||
// _main is an IE target which should be case-insensitive but isn't
|
||||
// see bug 217886 for details
|
||||
if(name.EqualsIgnoreCase("_content") || name.Equals(NS_LITERAL_STRING("_main")))
|
||||
{
|
||||
fIs_Content = PR_TRUE;
|
||||
mXULWindow->GetPrimaryContentShell(aFoundItem);
|
||||
|
|
Загрузка…
Ссылка в новой задаче