LibURL+LibWeb: Port URL::complete_url to Optional

Removing one more source of the URL::is_valid API.
This commit is contained in:
Shannon Booth 2025-02-15 22:55:46 +13:00 committed by Tim Ledbetter
commit 53826995f6
Notes: github-actions[bot] 2025-02-15 17:07:12 +00:00
14 changed files with 57 additions and 52 deletions

View file

@ -25,7 +25,9 @@ GC::Ptr<SVGGeometryElement const> SVGTextPathElement::path_or_shape() const
if (!href.has_value())
return {};
auto url = document().url().complete_url(*href);
return try_resolve_url_to<SVGGeometryElement const>(url);
if (!url.has_value())
return {};
return try_resolve_url_to<SVGGeometryElement const>(*url);
}
void SVGTextPathElement::initialize(JS::Realm& realm)