mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +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
|
@ -20,7 +20,10 @@ enum class CorsMode {
|
|||
|
||||
using StyleResourceURL = Variant<::URL::URL, CSS::URL>;
|
||||
|
||||
// AD-HOC: See comment inside fetch_a_style_resource() implementation.
|
||||
using StyleSheetOrDocument = Variant<GC::Ref<CSSStyleSheet>, GC::Ref<DOM::Document>>;
|
||||
|
||||
// https://drafts.csswg.org/css-values-4/#fetch-a-style-resource
|
||||
void fetch_a_style_resource(StyleResourceURL const& url, CSSStyleSheet const&, Fetch::Infrastructure::Request::Destination, CorsMode, Fetch::Infrastructure::FetchAlgorithms::ProcessResponseConsumeBodyFunction process_response);
|
||||
void fetch_a_style_resource(StyleResourceURL const& url, StyleSheetOrDocument, Fetch::Infrastructure::Request::Destination, CorsMode, Fetch::Infrastructure::FetchAlgorithms::ProcessResponseConsumeBodyFunction process_response);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue