Bug 1865610: part 10) Add `fetchpriority` attribute support for `rel=preload as=fetch...
commitfadc450e48ad4ea4c6c6375a92c86f9282c1c471
authorMirko Brodesser <mbrodesser@igalia.com>
Thu, 30 Nov 2023 15:00:10 +0000 (30 15:00 +0000)
committerMirko Brodesser <mbrodesser@igalia.com>
Thu, 30 Nov 2023 15:00:10 +0000 (30 15:00 +0000)
treea8cef9a8515f2e49bb6b9b2ccaf4de26c44d73bc
parent0660a76cd9cf506b16430cd6ed7190bd6296a17b
Bug 1865610: part 10) Add `fetchpriority` attribute support for `rel=preload as=fetch` and `rel=preload as=font`. r=emilio,valentin

Previously, for `rel=preload as=fetch`, the internal priority,
`nsISupportsPriority`, was not adjusted. Now, the adjustment happens in
`FetchPreloader::CreateChannel`.

For `rel=preload as=font`, previously, the internal priority was always
set to high in `FontLoaderUtils::BuildChannelSetup`. Now, the internal
priority is a parameter, whose value potentially depends on the
`fetchpriority` attribute.
Note the minor correction of calling `SetPriority` instead of
`AdjustPriority` in `FontLoaderUtils::BuildChannelSetup`.

Differential Revision: https://phabricator.services.mozilla.com/D194205
16 files changed:
layout/style/FontFaceSetDocumentImpl.cpp
layout/style/FontLoaderUtils.cpp
layout/style/FontLoaderUtils.h
layout/style/FontPreloader.cpp
layout/style/FontPreloader.h
parser/html/nsHtml5SpeculativeLoad.cpp
parser/html/nsHtml5SpeculativeLoad.h
parser/html/nsHtml5TreeBuilderCppSupplement.h
parser/html/nsHtml5TreeOpExecutor.cpp
parser/html/nsHtml5TreeOpExecutor.h
testing/web-platform/mozilla/meta/fetch/fetchpriority/fetchpriority.h2.html.ini
uriloader/preload/FetchPreloader.cpp
uriloader/preload/FetchPreloader.h
uriloader/preload/PreloadService.cpp
uriloader/preload/PreloadService.h
uriloader/preload/gtest/TestFetchPreloader.cpp