LibWebView: Add context menu support to the Inspector's cookie table

The menu can currently support deleting a specific cookie or all cookies
for the current page.
This commit is contained in:
Timothy Flynn
2024-09-06 13:22:16 -04:00
committed by Andreas Kling
parent 3c5650f846
commit fc809f9755
13 changed files with 73 additions and 0 deletions

View File

@@ -685,6 +685,14 @@ void WebContentClient::inspector_did_request_dom_tree_context_menu(u64 page_id,
}
}
void WebContentClient::inspector_did_request_cookie_context_menu(u64 page_id, size_t cookie_index, Gfx::IntPoint position)
{
if (auto view = view_for_page_id(page_id); view.has_value()) {
if (view->on_inspector_requested_cookie_context_menu)
view->on_inspector_requested_cookie_context_menu(cookie_index, view->to_widget_position(position));
}
}
void WebContentClient::inspector_did_execute_console_script(u64 page_id, String const& script)
{
if (auto view = view_for_page_id(page_id); view.has_value()) {