ported from mozilla: Bug 1460920 - Part 1 - Speculative loading script should take referrerpolicy attribute in script element into account r=hsivonen (045f98957a)

This commit is contained in:
roytam1 2024-10-01 11:43:05 +08:00
commit 281e3f4d1b
5 changed files with 67 additions and 29 deletions

View file

@ -249,6 +249,7 @@ class nsHtml5TreeOpExecutor final : public nsHtml5DocumentBuilder,
const nsAString& aType,
const nsAString& aCrossOrigin,
const nsAString& aIntegrity,
ReferrerPolicy aReferrerPolicy,
bool aScriptFromHead,
bool aAsync,
bool aDefer,
@ -305,6 +306,8 @@ class nsHtml5TreeOpExecutor final : public nsHtml5DocumentBuilder,
* list of preloaded URIs
*/
bool ShouldPreloadURI(nsIURI *aURI);
ReferrerPolicy GetPreloadReferrerPolicy(const nsAString& aReferrerPolicy);
};
#endif // nsHtml5TreeOpExecutor_h