mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 18:50:50 +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
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue