mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 22:38:51 +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:
parent
0b2fe008a3
commit
fe891727dc
Notes:
github-actions[bot]
2024-12-10 18:38:02 +00:00
Author: https://github.com/trflynn89
Commit: fe891727dc
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2826
25 changed files with 119 additions and 57 deletions
|
@ -103,7 +103,7 @@ WebIDL::ExceptionOr<void> WorkerGlobalScope::import_scripts(Vector<String> const
|
|||
// 5. For each url of urls:
|
||||
for (auto const& url : urls) {
|
||||
// 1. Let urlRecord be the result of encoding-parsing a URL given url, relative to settings object.
|
||||
auto url_record = settings_object.parse_url(url);
|
||||
auto url_record = settings_object.encoding_parse_url(url);
|
||||
|
||||
// 2. If urlRecord is failure, then throw a "SyntaxError" DOMException.
|
||||
if (!url_record.is_valid())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue