Bug 1865610: part 4) Add fetchpriority attribute support for rel=modulepreload and rel=preload as=script. r=smaug,valentin

Differential Revision: https://phabricator.services.mozilla.com/D192331
This commit is contained in:
Mirko Brodesser
2023-11-23 14:45:21 +00:00
parent e0ed5f88d3
commit f5cbfb7ac3
8 changed files with 151 additions and 59 deletions

View File

@@ -462,13 +462,8 @@ nsIContentHandle* nsHtml5TreeBuilder::createElement(
nsHtml5AttributeName::ATTR_INTEGRITY);
nsHtml5String referrerPolicy = aAttributes->getValue(
nsHtml5AttributeName::ATTR_REFERRERPOLICY);
// Bug 1839315: get the attribute's value instead.
// Use the empty string and rely on the
// "invalid value default" state being used later.
// Compared to using a non-empty string, this doesn't
// require calling `Release()` for the string.
nsHtml5String fetchPriority = nsHtml5String::EmptyString();
nsHtml5String fetchPriority = aAttributes->getValue(
nsHtml5AttributeName::ATTR_FETCHPRIORITY);
mSpeculativeLoadQueue.AppendElement()->InitScript(
url, charset, type, crossOrigin, media, nonce,