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

@ -11,6 +11,8 @@
#include <AK/NonnullRefPtr.h>
#include <AK/Optional.h>
#include <LibDevTools/Actor.h>
#include <LibWeb/CSS/Selector.h>
#include <LibWeb/Forward.h>
namespace DevTools {
@ -26,6 +28,13 @@ public:
static bool is_suitable_for_dom_inspection(JsonValue const&);
JsonValue serialize_root() const;
struct DOMNode {
JsonObject const& node;
Web::UniqueNodeID id { 0 };
Optional<Web::CSS::Selector::PseudoElement::Type> pseudo_element;
};
Optional<DOMNode> dom_node(StringView actor);
private:
WalkerActor(DevToolsServer&, String name, WeakPtr<TabActor>, JsonObject dom_tree);