1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 18:10:56 +09:00

LibWeb/CSS: Implement "fetch a style resource" algorithm

This commit is contained in:
Sam Atkins 2024-12-20 15:53:18 +00:00 committed by Andreas Kling
parent 00948c4746
commit ae943965dc
Notes: github-actions[bot] 2024-12-22 11:31:16 +00:00
3 changed files with 86 additions and 0 deletions

View file

@ -0,0 +1,23 @@
/*
* Copyright (c) 2024, Sam Atkins <sam@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/String.h>
#include <LibWeb/Fetch/Infrastructure/FetchAlgorithms.h>
#include <LibWeb/Fetch/Infrastructure/HTTP/Requests.h>
namespace Web::CSS {
enum class CorsMode {
NoCors,
Cors,
};
// 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);
}