mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-24 02:09:28 +00:00
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:
committed by
Tim Ledbetter
parent
cfe9b7a82b
commit
22a7cd9700
@@ -47,8 +47,8 @@ void HTMLHyperlinkElementUtils::set_the_url()
|
||||
auto url = hyperlink_element_utils_document().encoding_parse_url(*href_content_attribute);
|
||||
|
||||
// 4. If url is not failure, then set this element's url to url.
|
||||
if (url.is_valid())
|
||||
m_url = move(url);
|
||||
if (url.has_value())
|
||||
m_url = url.release_value();
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/links.html#dom-hyperlink-origin
|
||||
|
||||
Reference in New Issue
Block a user