1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:17:44 +00:00

LibWeb: Implement ad-hoc steps to allow LibWeb to load resource:// URLs

The resource:// scheme is used for Core::Resource files. Currently, any
users of resource:// URLs in Ladybird must manually create the Resource
and extract its data. This will allow for passing the resource:// URL
along for LibWeb to handle.
This commit is contained in:
Timothy Flynn 2023-12-23 15:42:05 -05:00 committed by Andreas Kling
parent 48f39f0555
commit e511a264fe
3 changed files with 40 additions and 8 deletions

View file

@ -27,7 +27,10 @@ inline constexpr Array HTTP_SCHEMES = {
// https://fetch.spec.whatwg.org/#fetch-scheme
// A fetch scheme is "about", "blob", "data", "file", or an HTTP(S) scheme.
inline constexpr Array FETCH_SCHEMES = {
"about"sv, "blob"sv, "data"sv, "file"sv, "http"sv, "https"sv
"about"sv, "blob"sv, "data"sv, "file"sv, "http"sv, "https"sv,
// AD-HOC: Internal fetch schemes:
"resource"sv
};
[[nodiscard]] bool is_local_url(AK::URL const&);