mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
LibWeb: Call Document::set_window() from Document::make_active()
This commit is contained in:
parent
24b3e315a0
commit
3171abe92a
Notes:
sideshowbarker
2024-07-17 21:16:31 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/3171abe92a Pull-request: https://github.com/SerenityOS/serenity/pull/18219
@ -3011,6 +3011,8 @@ void Document::make_active()
|
||||
// 1. Let window be document's relevant global object.
|
||||
auto& window = verify_cast<HTML::Window>(HTML::relevant_global_object(*this));
|
||||
|
||||
set_window(window);
|
||||
|
||||
// 2. Set document's browsing context's WindowProxy's [[Window]] internal slot value to window.
|
||||
m_browsing_context->window_proxy()->set_window(window);
|
||||
|
||||
|
@ -207,7 +207,6 @@ JS::NonnullGCPtr<BrowsingContext> BrowsingContext::create_a_new_browsing_context
|
||||
auto document = HTML::HTMLDocument::create(window->realm());
|
||||
|
||||
// Non-standard
|
||||
document->set_window(*window);
|
||||
window->set_associated_document(*document);
|
||||
|
||||
document->set_quirks_mode(DOM::QuirksMode::Yes);
|
||||
@ -365,7 +364,6 @@ WebIDL::ExceptionOr<BrowsingContext::BrowsingContextAndDocument> BrowsingContext
|
||||
auto document = HTML::HTMLDocument::create(window->realm());
|
||||
|
||||
// Non-standard
|
||||
document->set_window(*window);
|
||||
window->set_associated_document(*document);
|
||||
|
||||
// type: "html"
|
||||
|
Loading…
Reference in New Issue
Block a user