mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 968334 Allow disabling content retargeting on child docshells only r=smaug
This commit is contained in:
parent
008fdfcf89
commit
bd9d1512b5
@ -859,6 +859,7 @@ nsDocShell::nsDocShell()
|
||||
, mAllowDNSPrefetch(true)
|
||||
, mAllowWindowControl(true)
|
||||
, mAllowContentRetargeting(true)
|
||||
, mAllowContentRetargetingOnChildren(true)
|
||||
, mCreatingDocument(false)
|
||||
, mUseErrorPages(false)
|
||||
, mObserveErrorPages(true)
|
||||
@ -2587,10 +2588,25 @@ nsDocShell::GetAllowContentRetargeting(bool* aAllowContentRetargeting)
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::SetAllowContentRetargeting(bool aAllowContentRetargeting)
|
||||
{
|
||||
mAllowContentRetargetingOnChildren = aAllowContentRetargeting;
|
||||
mAllowContentRetargeting = aAllowContentRetargeting;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetAllowContentRetargetingOnChildren(bool* aAllowContentRetargetingOnChildren)
|
||||
{
|
||||
*aAllowContentRetargetingOnChildren = mAllowContentRetargetingOnChildren;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::SetAllowContentRetargetingOnChildren(bool aAllowContentRetargetingOnChildren)
|
||||
{
|
||||
mAllowContentRetargetingOnChildren = aAllowContentRetargetingOnChildren;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetFullscreenAllowed(bool* aFullscreenAllowed)
|
||||
{
|
||||
@ -3461,7 +3477,7 @@ nsDocShell::SetDocLoaderParent(nsDocLoader* aParent)
|
||||
if (NS_SUCCEEDED(parentAsDocShell->GetAllowWindowControl(&value))) {
|
||||
SetAllowWindowControl(value);
|
||||
}
|
||||
SetAllowContentRetargeting(parentAsDocShell->GetAllowContentRetargeting());
|
||||
SetAllowContentRetargeting(parentAsDocShell->GetAllowContentRetargetingOnChildren());
|
||||
if (NS_SUCCEEDED(parentAsDocShell->GetIsActive(&value))) {
|
||||
SetIsActive(value);
|
||||
}
|
||||
@ -8738,6 +8754,7 @@ nsDocShell::RestoreFromHistory()
|
||||
childShell->GetAllowDNSPrefetch(&allowDNSPrefetch);
|
||||
|
||||
bool allowContentRetargeting = childShell->GetAllowContentRetargeting();
|
||||
bool allowContentRetargetingOnChildren = childShell->GetAllowContentRetargetingOnChildren();
|
||||
|
||||
uint32_t defaultLoadFlags;
|
||||
childShell->GetDefaultLoadFlags(&defaultLoadFlags);
|
||||
@ -8756,6 +8773,7 @@ nsDocShell::RestoreFromHistory()
|
||||
childShell->SetAllowMedia(allowMedia);
|
||||
childShell->SetAllowDNSPrefetch(allowDNSPrefetch);
|
||||
childShell->SetAllowContentRetargeting(allowContentRetargeting);
|
||||
childShell->SetAllowContentRetargetingOnChildren(allowContentRetargetingOnChildren);
|
||||
childShell->SetDefaultLoadFlags(defaultLoadFlags);
|
||||
|
||||
rv = childShell->BeginRestore(nullptr, false);
|
||||
|
@ -883,6 +883,7 @@ protected:
|
||||
bool mAllowDNSPrefetch;
|
||||
bool mAllowWindowControl;
|
||||
bool mAllowContentRetargeting;
|
||||
bool mAllowContentRetargetingOnChildren;
|
||||
bool mCreatingDocument; // (should be) debugging only
|
||||
bool mUseErrorPages;
|
||||
bool mObserveErrorPages;
|
||||
|
@ -54,7 +54,7 @@ interface nsITabParent;
|
||||
|
||||
typedef unsigned long nsLoadFlags;
|
||||
|
||||
[scriptable, builtinclass, uuid(f84b1ae4-2f78-4bad-b36a-6a8516ee6e40)]
|
||||
[scriptable, builtinclass, uuid(68ba7610-e33d-47ce-8fa2-af07af2422bc)]
|
||||
interface nsIDocShell : nsIDocShellTreeItem
|
||||
{
|
||||
/**
|
||||
@ -289,6 +289,12 @@ interface nsIDocShell : nsIDocShellTreeItem
|
||||
*/
|
||||
[infallible] attribute boolean allowContentRetargeting;
|
||||
|
||||
/**
|
||||
* True if new child docshells should allow content retargeting.
|
||||
* Setting allowContentRetargeting also overwrites this value.
|
||||
*/
|
||||
[infallible] attribute boolean allowContentRetargetingOnChildren;
|
||||
|
||||
/**
|
||||
* Get an enumerator over this docShell and its children.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user