mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibWeb: Use correct URL parsing methods throughout LibWeb
There are essentially 3 URL parsing AOs defined by the spec: 1. Parse a URL 2. Encoding parse a URL 3. Encoding parse a URL and serialize the result Further, these are replicated between the Document and the ESO. This patch defines these methods in accordance with the spec and updates existing users to invoke the correct method. In places where the correct method is ambiguous, we use the encoding parser to preserve existing ad- hoc behavior.
This commit is contained in:
@@ -197,8 +197,8 @@ WebIDL::ExceptionOr<Window::OpenedWindow> Window::window_open_steps_internal(Str
|
||||
|
||||
// 4. If url is not the empty string, then:
|
||||
if (!url.is_empty()) {
|
||||
// FIXME: 1. Set urlRecord to the result of encoding-parsing a URL given url, relative to sourceDocument.
|
||||
url_record = entry_settings_object().parse_url(url);
|
||||
// 1. Set urlRecord to the result of encoding-parsing a URL given url, relative to sourceDocument.
|
||||
url_record = source_document.encoding_parse_url(url);
|
||||
|
||||
// 2. If urlRecord is failure, then throw a "SyntaxError" DOMException.
|
||||
if (!url_record->is_valid())
|
||||
|
||||
Reference in New Issue
Block a user