Bug 635673 - Content inside xul:iframe with type=content is always able to resize top chrome window. r=bz

This commit is contained in:
Jan Varga
2011-06-25 13:42:41 +02:00
parent 787599d4be
commit 246ec1302b
4 changed files with 31 additions and 1 deletions

View File

@@ -737,6 +737,7 @@ nsDocShell::nsDocShell():
mAllowMetaRedirects(PR_TRUE),
mAllowImages(PR_TRUE),
mAllowDNSPrefetch(PR_TRUE),
mAllowWindowControl(PR_TRUE),
mCreatingDocument(PR_FALSE),
mUseErrorPages(PR_FALSE),
mObserveErrorPages(PR_TRUE),
@@ -2036,6 +2037,18 @@ NS_IMETHODIMP nsDocShell::SetAllowDNSPrefetch(PRBool aAllowDNSPrefetch)
return NS_OK;
}
NS_IMETHODIMP nsDocShell::GetAllowWindowControl(PRBool * aAllowWindowControl)
{
*aAllowWindowControl = mAllowWindowControl;
return NS_OK;
}
NS_IMETHODIMP nsDocShell::SetAllowWindowControl(PRBool aAllowWindowControl)
{
mAllowWindowControl = aAllowWindowControl;
return NS_OK;
}
NS_IMETHODIMP
nsDocShell::GetDocShellEnumerator(PRInt32 aItemType, PRInt32 aDirection, nsISimpleEnumerator **outEnum)
{
@@ -2612,6 +2625,10 @@ nsDocShell::SetDocLoaderParent(nsDocLoader * aParent)
{
SetAllowImages(value);
}
if (NS_SUCCEEDED(parentAsDocShell->GetAllowWindowControl(&value)))
{
SetAllowWindowControl(value);
}
if (NS_SUCCEEDED(parentAsDocShell->GetIsActive(&value)))
{
SetIsActive(value);