mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 08:10:02 +00:00
LibWeb+LibURL: Consolidate Origin parsing and serialization into LibURL
Because of the previous awkward factoring of Origin we had two implementations of Origin serializing and creation. Move the implementation of DOMURL::url_origin into URL::origin, and instead use the implemenation of URL::Origin::serialize for serialization (replacing URL::serialize_origin). This happens to fix 8 URL subtests as the two implemenations had diverged, and URL::serialize_origin was previously missing the spec changes of: whatwg/url@eee49fd and whatwg/url@fff33c3
This commit is contained in:
parent
12ea470417
commit
501f92b54e
Notes:
github-actions[bot]
2024-10-05 08:47:31 +00:00
Author: https://github.com/shannonbooth
Commit: 501f92b54e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1636
21 changed files with 77 additions and 101 deletions
|
@ -139,7 +139,7 @@ WebIDL::ExceptionOr<String> Location::origin() const
|
|||
return WebIDL::SecurityError::create(realm(), "Location's relevant document is not same origin-domain with the entry settings object's origin"_fly_string);
|
||||
|
||||
// 2. Return the serialization of this's url's origin.
|
||||
return TRY_OR_THROW_OOM(vm, String::from_byte_string(url().serialize_origin()));
|
||||
return TRY_OR_THROW_OOM(vm, String::from_byte_string(url().origin().serialize()));
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/history.html#dom-location-protocol
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue