LibDevTools: Support highlighting DOM nodes hovered in the inspector

This commit is contained in:
Timothy Flynn 2025-02-20 08:58:35 -05:00 committed by Tim Flynn
commit 6e8d77ff7f
Notes: github-actions[bot] 2025-02-24 17:07:00 +00:00
10 changed files with 116 additions and 9 deletions

View file

@ -7,6 +7,7 @@
#include <AK/JsonObject.h>
#include <LibDevTools/Actors/TabActor.h>
#include <LibDevTools/Actors/WatcherActor.h>
#include <LibDevTools/DevToolsDelegate.h>
#include <LibDevTools/DevToolsServer.h>
namespace DevTools {
@ -22,7 +23,10 @@ TabActor::TabActor(DevToolsServer& devtools, String name, TabDescription descrip
{
}
TabActor::~TabActor() = default;
TabActor::~TabActor()
{
reset_selected_node();
}
void TabActor::handle_message(StringView type, JsonObject const&)
{
@ -69,4 +73,9 @@ JsonObject TabActor::serialize_description() const
return description;
}
void TabActor::reset_selected_node()
{
devtools().delegate().clear_highlighted_dom_node(description());
}
}