1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:27:46 +00:00

Browser: Implement "Inspect Element" context menu action

This is finally working for OOPWV! :^)
This commit is contained in:
Sam Atkins 2021-08-27 17:40:25 +01:00 committed by Andreas Kling
parent 1ccf10789e
commit 97379ace25
3 changed files with 44 additions and 14 deletions

View file

@ -18,14 +18,16 @@ public:
virtual ~InspectorWidget();
void set_web_view(NonnullRefPtr<Web::OutOfProcessWebView> web_view) { m_web_view = web_view; }
void set_dom_json(String);
void set_dom_node_properties_json(i32 node_id, String specified_values_json, String computed_values_json);
void set_inspected_node(i32 node_id);
private:
InspectorWidget();
void set_inspected_node(GUI::ModelIndex);
void load_style_json(String specified_values_json, String computed_values_json);
RefPtr<Web::OutOfProcessWebView> m_web_view;
@ -35,8 +37,9 @@ private:
RefPtr<GUI::TableView> m_computed_style_table_view;
// Multi-process mode
Optional<String> m_dom_json;
Optional<i32> m_pending_inspect_node_id;
i32 m_inspected_node_id;
Optional<String> m_dom_json;
Optional<String> m_inspected_node_specified_values_json;
Optional<String> m_inspected_node_computed_values_json;
};