LibWeb/HTML: Make HTMLImageRequests currentURL a String

This is the same type as what is spec'd. We cannot use a URL record
for this member as the spec in some scenarios will set and compare
the URL string to an invalid URL value, such as the empty string.

With implicit string constructors for the URL class removed
explicitly using URL::Parser::basic_parse makes the code look
quite silly in those places.
This commit is contained in:
Shannon Booth 2025-02-22 20:16:45 +13:00 committed by Tim Flynn
parent 9b7fb0850d
commit f857c6a6e6
Notes: github-actions[bot] 2025-03-04 21:26:48 +00:00
4 changed files with 30 additions and 34 deletions

View file

@ -134,7 +134,7 @@ private:
void handle_successful_fetch(URL::URL const&, StringView mime_type, ImageRequest&, ByteBuffer, bool maybe_omit_events, URL::URL const& previous_url);
void handle_failed_fetch();
void add_callbacks_to_image_request(GC::Ref<ImageRequest>, bool maybe_omit_events, URL::URL const& url_string, URL::URL const& previous_url);
void add_callbacks_to_image_request(GC::Ref<ImageRequest>, bool maybe_omit_events, URL::URL const& url_string, String const& previous_url);
void animate();