mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 08:08:43 +00:00
LibDevTools: Support inspecting DOM node box models and computed styles
This commit is contained in:
parent
3f8b65e45c
commit
afb0a0a394
Notes:
github-actions[bot]
2025-02-24 17:06:41 +00:00
Author: https://github.com/trflynn89
Commit: afb0a0a394
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3666
Reviewed-by: https://github.com/AtkinsSJ
6 changed files with 170 additions and 7 deletions
|
@ -15,14 +15,22 @@ class PageStyleActor final : public Actor {
|
|||
public:
|
||||
static constexpr auto base_name = "page-style"sv;
|
||||
|
||||
static NonnullRefPtr<PageStyleActor> create(DevToolsServer&, String name);
|
||||
static NonnullRefPtr<PageStyleActor> create(DevToolsServer&, String name, WeakPtr<InspectorActor>);
|
||||
virtual ~PageStyleActor() override;
|
||||
|
||||
virtual void handle_message(StringView type, JsonObject const&) override;
|
||||
JsonValue serialize_style() const;
|
||||
|
||||
private:
|
||||
PageStyleActor(DevToolsServer&, String name);
|
||||
PageStyleActor(DevToolsServer&, String name, WeakPtr<InspectorActor>);
|
||||
|
||||
template<typename Callback>
|
||||
void inspect_dom_node(StringView node_actor, Callback&&);
|
||||
|
||||
void received_layout(JsonObject const& computed_style, JsonObject const& node_box_sizing, BlockToken);
|
||||
void received_computed_style(JsonObject const& computed_style, BlockToken);
|
||||
|
||||
WeakPtr<InspectorActor> m_inspector;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue