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 12:07:16 +00:00
parent 32ed0fae77
commit 12c9fd0669
53 changed files with 373 additions and 362 deletions

View File

@@ -336,7 +336,7 @@ static bool IsTopLevelDoc(BrowsingContext* aBrowsingContext,
MOZ_ASSERT(aLoadInfo);
if (aLoadInfo->GetExternalContentPolicyType() !=
nsIContentPolicy::TYPE_DOCUMENT) {
ExtContentPolicy::TYPE_DOCUMENT) {
return false;
}
@@ -10529,10 +10529,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)