mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +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
Notes:
sideshowbarker
2024-07-17 09:41:18 +09:00
Author: https://github.com/ADKaster
Commit: 7e277797ad
Pull-request: https://github.com/SerenityOS/serenity/pull/21184
Reviewed-by: https://github.com/kalenikaliaksandr
5 changed files with 28 additions and 2 deletions
|
@ -80,12 +80,18 @@ WebIDL::ExceptionOr<void> NavigableContainer::create_new_child_navigable()
|
|||
target_name = String::from_deprecated_string(value).release_value_but_fixme_should_propagate_errors();
|
||||
|
||||
// 6. Let documentState be a new document state, with
|
||||
// document: document
|
||||
// navigable target name: targetName
|
||||
// - document: document
|
||||
// - initiator origin: document's origin
|
||||
// - origin: document's origin
|
||||
// - navigable target name: targetName
|
||||
// - about base URL: document's about base URL
|
||||
JS::NonnullGCPtr<DocumentState> document_state = *heap().allocate_without_realm<HTML::DocumentState>();
|
||||
document_state->set_document(document);
|
||||
document_state->set_initiator_origin(document->origin());
|
||||
document_state->set_origin(document->origin());
|
||||
if (target_name.has_value())
|
||||
document_state->set_navigable_target_name(*target_name);
|
||||
document_state->set_about_base_url(document->about_base_url());
|
||||
|
||||
// 7. Let navigable be a new navigable.
|
||||
JS::NonnullGCPtr<Navigable> navigable = *heap().allocate_without_realm<Navigable>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue