LibWeb: Don't store Page on ResourceLoader

We only need a Page for file:// urls. At some point we probably
needed it for other kinds of requests, but the current functionality
doesn't need to store the Page pointer on the ResourceLoader.
This commit is contained in:
Andrew Kaster 2025-01-15 15:06:39 -07:00 committed by Andrew Kaster
commit 8760825bb4
Notes: github-actions[bot] 2025-02-18 18:37:01 +00:00
4 changed files with 11 additions and 7 deletions

View file

@ -27,6 +27,7 @@
#include <LibGfx/Font/WOFF2/Loader.h>
#include <LibWeb/Animations/AnimationEffect.h>
#include <LibWeb/Animations/DocumentTimeline.h>
#include <LibWeb/Bindings/PrincipalHostDefined.h>
#include <LibWeb/CSS/AnimationEvent.h>
#include <LibWeb/CSS/CSSAnimation.h>
#include <LibWeb/CSS/CSSFontFaceRule.h>
@ -242,8 +243,12 @@ void FontLoader::start_loading_next_url()
return;
if (m_urls.is_empty())
return;
auto& style_computer_realm = m_style_computer.document().realm();
auto& page = Bindings::principal_host_defined_page(HTML::principal_realm(style_computer_realm));
LoadRequest request;
request.set_url(m_urls.take_first());
request.set_page(page);
// HACK: We're crudely computing the referer value and shoving it into the
// request until fetch infrastructure is used here.