LibWeb/CSS: Return the FetchController from fetch_a_style_resource()

This commit is contained in:
Sam Atkins 2025-04-30 12:33:29 +01:00
parent 6b762331df
commit f76f8dcce1
Notes: github-actions[bot] 2025-05-03 11:03:34 +00:00
3 changed files with 35 additions and 36 deletions

View file

@ -116,7 +116,7 @@ void CSSImportRule::fetch()
m_document_load_event_delayer.emplace(*m_document);
// 4. Fetch a style resource from parsedUrl, with stylesheet parentStylesheet, destination "style", CORS mode "no-cors", and processResponse being the following steps given response response and byte stream, null or failure byteStream:
fetch_a_style_resource(parsed_url.value(), { parent_style_sheet }, Fetch::Infrastructure::Request::Destination::Style, CorsMode::NoCors,
(void)fetch_a_style_resource(parsed_url.value(), { parent_style_sheet }, Fetch::Infrastructure::Request::Destination::Style, CorsMode::NoCors,
[strong_this = GC::Ref { *this }, parent_style_sheet = GC::Ref { parent_style_sheet }, parsed_url = parsed_url.value()](auto response, auto maybe_byte_stream) {
// AD-HOC: Stop delaying the load event.
ScopeGuard guard = [strong_this] {