mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibWeb/CSS: Make fetch_a_style_resource() take URLs not strings
The spec has this parameter as "a url or `<url>`", so let's match that.
This commit is contained in:
parent
3fe978c8a0
commit
f4cfdd704b
Notes:
github-actions[bot]
2025-04-15 09:31:11 +00:00
Author: https://github.com/AtkinsSJ
Commit: f4cfdd704b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4319
3 changed files with 13 additions and 7 deletions
|
@ -1,12 +1,13 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Sam Atkins <sam@ladybird.org>
|
||||
* Copyright (c) 2024-2025, Sam Atkins <sam@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/String.h>
|
||||
#include <LibURL/URL.h>
|
||||
#include <LibWeb/CSS/URL.h>
|
||||
#include <LibWeb/Fetch/Infrastructure/FetchAlgorithms.h>
|
||||
#include <LibWeb/Fetch/Infrastructure/HTTP/Requests.h>
|
||||
|
||||
|
@ -17,7 +18,9 @@ enum class CorsMode {
|
|||
Cors,
|
||||
};
|
||||
|
||||
using StyleResourceURL = Variant<::URL::URL, CSS::URL>;
|
||||
|
||||
// https://drafts.csswg.org/css-values-4/#fetch-a-style-resource
|
||||
void fetch_a_style_resource(String const& url, CSSStyleSheet const&, Fetch::Infrastructure::Request::Destination, CorsMode, Fetch::Infrastructure::FetchAlgorithms::ProcessResponseConsumeBodyFunction process_response);
|
||||
void fetch_a_style_resource(StyleResourceURL const& url, CSSStyleSheet const&, Fetch::Infrastructure::Request::Destination, CorsMode, Fetch::Infrastructure::FetchAlgorithms::ProcessResponseConsumeBodyFunction process_response);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue