Fix for 215041, add support for WinIE's _main target for sidebars (it's identical to _content), r=hixie, sr=ben

This commit is contained in:
hyatt%mozilla.org 2003-08-04 18:33:24 +00:00
Родитель 22d6a96abf
Коммит afa87ac239
3 изменённых файлов: 6 добавлений и 5 удалений

Просмотреть файл

@ -1005,7 +1005,7 @@ nsresult nsDocShell::FindTarget(const PRUnichar *aWindowTarget,
if(!treeItem)
*aResult = this;
}
else if(name.EqualsIgnoreCase("_content"))
else if(name.EqualsIgnoreCase("_content") || name.EqualsIgnoreCase("_main"))
{
if (mTreeOwner) {
mTreeOwner->FindItemWithName(name.get(), nsnull,
@ -4975,7 +4975,7 @@ nsDocShell::InternalLoad(nsIURI * aURI,
if (mUseExternalProtocolHandler && aLoadType == LOAD_LINK) {
// don't do it for javascript urls!
if (!bIsJavascript &&
(name.EqualsIgnoreCase("_content") ||
(name.EqualsIgnoreCase("_content") || name.EqualsIgnoreCase("_main") ||
name.EqualsIgnoreCase("_blank")))
{
nsCOMPtr<nsIExternalProtocolService> extProtService;
@ -5018,7 +5018,8 @@ nsDocShell::InternalLoad(nsIURI * aURI,
}
else if (!name.EqualsIgnoreCase("_parent") &&
!name.EqualsIgnoreCase("_self") &&
!name.EqualsIgnoreCase("_content")) {
!name.EqualsIgnoreCase("_content") &&
!name.EqualsIgnoreCase("_main")) {
nsCOMPtr<nsIDocShellTreeItem> targetTreeItem;
FindItemWithName(name.get(),
NS_STATIC_CAST(nsIInterfaceRequestor *, this),

Просмотреть файл

@ -208,7 +208,7 @@ NS_IMETHODIMP nsDocShellTreeOwner::FindItemWithName(const PRUnichar* aName,
return NS_OK;
if(name.EqualsIgnoreCase("_blank"))
return NS_OK;
if(name.EqualsIgnoreCase("_content")) {
if(name.EqualsIgnoreCase("_content") || name.EqualsIgnoreCase("_main")) {
*aFoundItem = mWebBrowser->mDocShellAsItem;
NS_IF_ADDREF(*aFoundItem);
return NS_OK;

Просмотреть файл

@ -120,7 +120,7 @@ NS_IMETHODIMP nsChromeTreeOwner::FindItemWithName(const PRUnichar* aName,
return NS_OK;
if(name.EqualsIgnoreCase("_blank"))
return NS_OK;
if(name.EqualsIgnoreCase("_content"))
if(name.EqualsIgnoreCase("_content") || name.EqualsIgnoreCase("_main"))
{
fIs_Content = PR_TRUE;
mXULWindow->GetPrimaryContentShell(aFoundItem);