Bug 1685900 - Split internal and external contentPolicyType. r=ckerschb,smaug

Differential Revision: https://phabricator.services.mozilla.com/D101271
This commit is contained in:
Masatoshi Kimura
2021-01-15 04:02:41 +02:00
parent 922d64bb4f
commit 666d7f8e2b
53 changed files with 375 additions and 365 deletions

View File

@@ -331,7 +331,7 @@ static bool IsTopLevelDoc(BrowsingContext* aBrowsingContext,
MOZ_ASSERT(aLoadInfo);
if (aLoadInfo->GetExternalContentPolicyType() !=
nsIContentPolicy::TYPE_DOCUMENT) {
ExtContentPolicy::TYPE_DOCUMENT) {
return false;
}
@@ -10467,10 +10467,10 @@ nsresult nsDocShell::OpenRedirectedChannel(nsDocShellLoadState* aLoadState) {
LoadInfo* li = static_cast<LoadInfo*>(loadInfo.get());
if (loadInfo->GetExternalContentPolicyType() ==
nsIContentPolicy::TYPE_DOCUMENT) {
ExtContentPolicy::TYPE_DOCUMENT) {
li->UpdateBrowsingContextID(mBrowsingContext->Id());
} else if (loadInfo->GetExternalContentPolicyType() ==
nsIContentPolicy::TYPE_SUBDOCUMENT) {
ExtContentPolicy::TYPE_SUBDOCUMENT) {
li->UpdateFrameBrowsingContextID(mBrowsingContext->Id());
}
// TODO: more attributes need to be updated on the LoadInfo (bug 1561706)