Bug 1655716 - Introduce TYPE_INTERNAL_FETCH_PRELOAD and use in HTMLLinkElement::AsValueToContentPolicy() - r=emilio,mayhemer,ckerschb

Differential Revision: https://phabricator.services.mozilla.com/D85980
This commit is contained in:
Frederik Braun
2020-08-11 12:33:14 +00:00
parent 519343a499
commit 55eae542f0
12 changed files with 32 additions and 8 deletions

View File

@@ -534,7 +534,7 @@ nsContentPolicyType HTMLLinkElement::AsValueToContentPolicy(
case DESTINATION_STYLE:
return nsIContentPolicy::TYPE_STYLESHEET;
case DESTINATION_FETCH:
return nsIContentPolicy::TYPE_OTHER;
return nsIContentPolicy::TYPE_INTERNAL_FETCH_PRELOAD;
}
return nsIContentPolicy::TYPE_INVALID;
}
@@ -811,7 +811,7 @@ bool HTMLLinkElement::CheckPreloadAttrs(const nsAttrValue& aAs,
nsString type = nsString(aType);
ToLowerCase(type);
if (policyType == nsIContentPolicy::TYPE_OTHER) {
if (policyType == nsIContentPolicy::TYPE_INTERNAL_FETCH_PRELOAD) {
return true;
}
if (policyType == nsIContentPolicy::TYPE_MEDIA) {