LibWeb: Add a PageClient callback for image context menu requests

When the user right-clicks on an image, you might want to show a
special context menu, separate from the regular link context menu.

This patch only implements enough of the functionality to get this
working in a single-process context.
This commit is contained in:
Andreas Kling 2020-10-02 19:01:51 +02:00
parent d00bfd0eaa
commit 91b49dd9d0
Notes: sideshowbarker 2024-07-19 02:05:48 +09:00
5 changed files with 22 additions and 0 deletions

View file

@ -94,6 +94,7 @@ private:
virtual void page_did_request_cursor_change(Gfx::StandardCursor) override;
virtual void page_did_request_context_menu(const Gfx::IntPoint&) override;
virtual void page_did_request_link_context_menu(const Gfx::IntPoint&, const URL&, const String& target, unsigned modifiers) override;
virtual void page_did_request_image_context_menu(const Gfx::IntPoint&, const URL&, const String& target, unsigned modifiers, const Gfx::Bitmap*) override;
virtual void page_did_click_link(const URL&, const String& target, unsigned modifiers) override;
virtual void page_did_middle_click_link(const URL&, const String& target, unsigned modifiers) override;
virtual void page_did_enter_tooltip_area(const Gfx::IntPoint&, const String&) override;