mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-01 06:07:59 +00:00
LibWebView: Clear the Inspector DOM/accessibility trees upon reset
This prevents rendering stale trees while navigating to a new page. The old non-WebView inspector widgets behaved this way.
This commit is contained in:
committed by
Andreas Kling
parent
60c7ff9db1
commit
41ffc69c9d
@@ -181,12 +181,13 @@ void InspectorClient::inspect()
|
||||
|
||||
void InspectorClient::reset()
|
||||
{
|
||||
static constexpr auto script = "inspector.reset();"sv;
|
||||
m_inspector_web_view.run_javascript(script);
|
||||
|
||||
m_body_node_id.clear();
|
||||
m_pending_selection.clear();
|
||||
|
||||
m_dom_tree_loaded = false;
|
||||
|
||||
clear_console_output();
|
||||
m_highest_notified_message_index = -1;
|
||||
m_highest_received_message_index = -1;
|
||||
m_waiting_for_messages = false;
|
||||
|
||||
Reference in New Issue
Block a user