mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:57:35 +00:00
LibWeb+WebContent: Set ConsoleClient for nested browsing contexts
Before page_did_create_main_document() only initialized ConsoleClient for top-level browsing context which means that nested browsing context could not print into the console. With this change, ConsoleClient is initialized for documents created for nested browsing context too. One ConsoleClient is shared between all browsing contexts within the same page.
This commit is contained in:
parent
490949c6a8
commit
b4fe118dff
6 changed files with 10 additions and 10 deletions
|
@ -325,7 +325,7 @@ void FrameLoader::resource_did_load()
|
|||
|
||||
browsing_context().set_active_document(document);
|
||||
if (auto* page = browsing_context().page())
|
||||
page->client().page_did_create_main_document();
|
||||
page->client().page_did_create_new_document(*document);
|
||||
|
||||
if (!parse_document(*document, resource()->encoded_data())) {
|
||||
load_error_page(url, "Failed to parse content.");
|
||||
|
|
|
@ -200,7 +200,7 @@ public:
|
|||
virtual Gfx::IntRect page_did_request_minimize_window() { return {}; }
|
||||
virtual Gfx::IntRect page_did_request_fullscreen_window() { return {}; }
|
||||
virtual void page_did_start_loading(const AK::URL&, bool is_redirect) { (void)is_redirect; }
|
||||
virtual void page_did_create_main_document() { }
|
||||
virtual void page_did_create_new_document(Web::DOM::Document&) { }
|
||||
virtual void page_did_finish_loading(const AK::URL&) { }
|
||||
virtual void page_did_change_selection() { }
|
||||
virtual void page_did_request_cursor_change(Gfx::StandardCursor) { }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue