Ladybird+LibWebView: Add an Inspector action to screenshot a DOM node

This commit is contained in:
Timothy Flynn 2023-12-06 11:56:16 -05:00 committed by Andreas Kling
commit 71fdf0860e
Notes: sideshowbarker 2024-07-17 06:35:16 +09:00
7 changed files with 31 additions and 0 deletions

View file

@ -245,6 +245,15 @@ void InspectorClient::context_menu_copy_dom_node()
m_context_menu_data.clear();
}
void InspectorClient::context_menu_screenshot_dom_node()
{
VERIFY(m_context_menu_data.has_value());
m_content_web_view.take_dom_node_screenshot(m_context_menu_data->dom_node_id).release_value_but_fixme_should_propagate_errors();
m_context_menu_data.clear();
}
void InspectorClient::context_menu_remove_dom_node()
{
VERIFY(m_context_menu_data.has_value());

View file

@ -28,6 +28,7 @@ public:
void context_menu_edit_dom_node();
void context_menu_copy_dom_node();
void context_menu_screenshot_dom_node();
void context_menu_remove_dom_node();
void context_menu_add_dom_node_attribute();
void context_menu_remove_dom_node_attribute();