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
26 changed files with 135 additions and 107 deletions

View File

@@ -162,8 +162,8 @@ public:
HTML::OpenerPolicy const& opener_policy() const { return m_opener_policy; }
void set_opener_policy(HTML::OpenerPolicy policy) { m_opener_policy = move(policy); }
URL::URL parse_url(StringView) const;
URL::URL encoding_parse_url(StringView) const;
Optional<URL::URL> parse_url(StringView) const;
Optional<URL::URL> encoding_parse_url(StringView) const;
Optional<String> encoding_parse_and_serialize_url(StringView) const;
CSS::StyleComputer& style_computer() { return *m_style_computer; }