LibURL+LibWeb: Move data URL processing to LibWeb's fetch infrastructure

This is a fetching AO and is only used by LibWeb in the context of fetch
tasks. Move it to LibWeb with other fetch methods.

The main reason for this is that it requires the use of other LibWeb AOs
such as the forgiving Base64 decoder and MIME sniffing. These AOs aren't
available within LibURL.
This commit is contained in:
Timothy Flynn 2024-03-24 08:37:33 -04:00 committed by Andreas Kling
parent 2118cdfcaa
commit 24ecf31ff5
Notes: sideshowbarker 2024-07-16 20:39:14 +09:00
10 changed files with 219 additions and 187 deletions

View file

@ -805,7 +805,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<PendingResponse>> scheme_fetch(JS::Realm& r
// -> "data"
else if (request->current_url().scheme() == "data"sv) {
// 1. Let dataURLStruct be the result of running the data: URL processor on requests current URL.
auto data_url_struct = request->current_url().process_data_url();
auto data_url_struct = Infrastructure::process_data_url(request->current_url());
// 2. If dataURLStruct is failure, then return a network error.
if (data_url_struct.is_error())