mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
LibDevTools: Support highlighting DOM nodes hovered in the inspector
This commit is contained in:
parent
2386859e4b
commit
6e8d77ff7f
Notes:
github-actions[bot]
2025-02-24 17:07:00 +00:00
Author: https://github.com/trflynn89
Commit: 6e8d77ff7f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3666
Reviewed-by: https://github.com/AtkinsSJ
10 changed files with 116 additions and 9 deletions
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue