mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 12:15:07 +00:00
LibWeb: Add about base url to the various AOs that construct documents
And some assorted cleanup along the way. The browsing context and document AOs in particular need re-alignment with the spec.
This commit is contained in:
parent
dc0f7c4c54
commit
7e277797ad
5 changed files with 28 additions and 2 deletions
|
@ -121,11 +121,17 @@ WebIDL::ExceptionOr<BrowsingContext::BrowsingContextAndDocument> BrowsingContext
|
|||
// 3. Let creatorOrigin be null.
|
||||
Optional<Origin> creator_origin = {};
|
||||
|
||||
// FIXME: This algorithm needs re-aligned with the spec
|
||||
Optional<AK::URL> creator_base_url = {};
|
||||
|
||||
// 4. If creator is non-null, then:
|
||||
if (creator) {
|
||||
// 1. Set creatorOrigin to creator's origin.
|
||||
creator_origin = creator->origin();
|
||||
|
||||
// FIXME: This algorithm needs re-aligned with the spec
|
||||
creator_base_url = creator->base_url();
|
||||
|
||||
// FIXME: 2. Set browsingContext's creator base URL to an algorithm which returns creator's base URL.
|
||||
|
||||
// FIXME: 3. Set browsingContext's virtual browsing context group ID to creator's browsing context's top-level browsing context's virtual browsing context group ID.
|
||||
|
@ -211,6 +217,9 @@ WebIDL::ExceptionOr<BrowsingContext::BrowsingContextAndDocument> BrowsingContext
|
|||
// is initial about:blank: true
|
||||
document->set_is_initial_about_blank(true);
|
||||
|
||||
// about base URL: creatorBaseURL
|
||||
document->set_about_base_url(creator_base_url);
|
||||
|
||||
// 15. If creator is non-null, then:
|
||||
if (creator) {
|
||||
// 1. Set document's referrer to the serialization of creator's URL.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue