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-14 20:44:54 +00:00
parent 1f46ede3ac
commit fd94179ca1
53 changed files with 372 additions and 361 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)