mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-27 21:42:53 +00:00
LibWeb/CSS: Make fetch_a_style_resource() work with no CSSStyleSheet
See the spec issue in the comments for details. There are situations where we will need to call this but don't have a CSSStyleSheet to pass in, but we always have a Document, so use that where possible.
This commit is contained in:
parent
f4cfdd704b
commit
43950c7342
Notes:
github-actions[bot]
2025-04-15 09:31:05 +00:00
Author: https://github.com/AtkinsSJ
Commit: 43950c7342
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4319
3 changed files with 22 additions and 9 deletions
|
@ -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,
|
||||
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] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue