LibWeb: Port Document encoding_parse_url and parse_url to Optional<URL>

This ports two more APIs away from URL::is_valid.
This commit is contained in:
Shannon Booth 2025-01-23 19:40:57 +13:00 committed by Tim Ledbetter
parent cfe9b7a82b
commit 22a7cd9700
Notes: github-actions[bot] 2025-01-27 00:04:07 +00:00
26 changed files with 135 additions and 107 deletions

View file

@ -146,11 +146,10 @@ void SVGImageElement::process_the_url(Optional<String> const& href)
}
m_href = document().parse_url(*href);
if (!m_href.is_valid())
if (!m_href.has_value())
return;
fetch_the_document(m_href);
fetch_the_document(*m_href);
}
// https://svgwg.org/svg2-draft/linking.html#processingURL-fetch