Supplemental fix to 219848 to ensure that JS with UniversalBrowserRead is able to access DOM nodes that it needs to. In particular, this fix allows the XUL <editor> tag to work on remotely-fetched HTML. r+sr=jst@mozilla.jstenback.com

This commit is contained in:
dmose%mozilla.org 2004-06-01 20:19:22 +00:00
Родитель dd579eaa22
Коммит aebbcd23ee
1 изменённых файлов: 11 добавлений и 1 удалений

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

@ -618,8 +618,18 @@ nsContentUtils::CanCallerAccess(nsIDOMNode *aNode)
rv = sSecurityManager->CheckSameOriginPrincipal(subjectPrincipal,
principal);
if (NS_SUCCEEDED(rv)) {
return PR_TRUE;
}
return NS_SUCCEEDED(rv);
// see if the caller has otherwise been given the ability to touch
// input args to DOM methods
PRBool enabled = PR_FALSE;
rv = sSecurityManager->IsCapabilityEnabled("UniversalBrowserRead",
&enabled);
NS_ENSURE_SUCCESS(rv, PR_FALSE);
return enabled;
}
//static