mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 09:28:13 +00:00
LibWeb: Ensure that replaced documents keep the Window of their sibling
The note in the spec says that we're supposed to make sure this new document has the same Window as the old about:blank document, but we forgot to actually assign to the Window pointer.
This commit is contained in:
parent
394f1b3836
commit
a1286f5120
1 changed files with 2 additions and 0 deletions
|
@ -153,6 +153,8 @@ JS::NonnullGCPtr<Document> Document::create_and_initialize(Type type, String con
|
|||
&& navigation_params.history_handling == HTML::HistoryHandlingBehavior::Replace
|
||||
&& (browsing_context->active_document() && browsing_context->active_document()->origin().is_same_origin(navigation_params.origin))) {
|
||||
// Do nothing.
|
||||
// NOTE: This means that both the initial about:blank Document, and the new Document that is about to be created, will share the same Window object.
|
||||
window = browsing_context->active_window();
|
||||
}
|
||||
|
||||
// 6. Otherwise:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue