diff --git a/Libraries/LibWeb/CSS/Fetch.cpp b/Libraries/LibWeb/CSS/Fetch.cpp index 1fe56501018..8d40d56d898 100644 --- a/Libraries/LibWeb/CSS/Fetch.cpp +++ b/Libraries/LibWeb/CSS/Fetch.cpp @@ -4,10 +4,10 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#include #include #include #include +#include #include #include @@ -38,7 +38,8 @@ static WebIDL::ExceptionOr> fetch_a_styl auto url_string = url_value.visit( [](::URL::URL const& url) { return url.to_string(); }, [](CSS::URL const& url) { return url.url(); }); - auto parsed_url = ::URL::Parser::basic_parse(url_string, base); + + auto parsed_url = DOMURL::parse(url_string, base); if (!parsed_url.has_value()) return WebIDL::SimpleException { WebIDL::SimpleExceptionType::URIError, "Failed to parse URL"sv }; diff --git a/Libraries/LibWeb/CSS/StyleValues/ImageStyleValue.cpp b/Libraries/LibWeb/CSS/StyleValues/ImageStyleValue.cpp index 9bd2489c96d..cbb050cebeb 100644 --- a/Libraries/LibWeb/CSS/StyleValues/ImageStyleValue.cpp +++ b/Libraries/LibWeb/CSS/StyleValues/ImageStyleValue.cpp @@ -7,11 +7,11 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#include #include #include #include #include +#include #include #include #include @@ -208,7 +208,7 @@ ValueComparingNonnullRefPtr ImageStyleValue::absolutized(CSSPi }(); if (base_url.has_value()) { - if (auto resolved_url = ::URL::Parser::basic_parse(m_url.url(), *base_url); resolved_url.has_value()) + if (auto resolved_url = DOMURL::parse(m_url.url(), *base_url); resolved_url.has_value()) return ImageStyleValue::create(*resolved_url); } diff --git a/Libraries/LibWeb/HTML/ImageRequest.cpp b/Libraries/LibWeb/HTML/ImageRequest.cpp index c35df4e580a..b1cc275f8c1 100644 --- a/Libraries/LibWeb/HTML/ImageRequest.cpp +++ b/Libraries/LibWeb/HTML/ImageRequest.cpp @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include #include @@ -71,8 +71,9 @@ void ImageRequest::set_state(State state) void ImageRequest::set_current_url(JS::Realm& realm, String url) { m_current_url = move(url); - if (auto url = URL::Parser::basic_parse(m_current_url); url.has_value()) - m_shared_resource_request = SharedResourceRequest::get_or_create(realm, m_page, url.release_value()); + + if (auto parsed_url = DOMURL::parse(m_current_url); parsed_url.has_value()) + m_shared_resource_request = SharedResourceRequest::get_or_create(realm, m_page, parsed_url.release_value()); } // https://html.spec.whatwg.org/multipage/images.html#abort-the-image-request diff --git a/Tests/LibWeb/Screenshot/expected/css-background-blob-url-ref.html b/Tests/LibWeb/Screenshot/expected/css-background-blob-url-ref.html new file mode 100644 index 00000000000..9ab4c8d8fc5 --- /dev/null +++ b/Tests/LibWeb/Screenshot/expected/css-background-blob-url-ref.html @@ -0,0 +1,12 @@ + + + + diff --git a/Tests/LibWeb/Screenshot/images/css-background-blob-url-ref.png b/Tests/LibWeb/Screenshot/images/css-background-blob-url-ref.png new file mode 100644 index 00000000000..edc00828084 Binary files /dev/null and b/Tests/LibWeb/Screenshot/images/css-background-blob-url-ref.png differ diff --git a/Tests/LibWeb/Screenshot/input/css-background-blob-url.html b/Tests/LibWeb/Screenshot/input/css-background-blob-url.html new file mode 100644 index 00000000000..549af979a49 --- /dev/null +++ b/Tests/LibWeb/Screenshot/input/css-background-blob-url.html @@ -0,0 +1,39 @@ + + + + + + + +
+ + + +