LibWeb+WebContent: Add a page hook to invoke the did-click-link IPC

This commit is contained in:
Timothy Flynn 2024-08-01 13:38:21 -04:00 committed by Andreas Kling
parent 3ff965d672
commit facaf953eb
Notes: github-actions[bot] 2024-08-02 06:08:02 +00:00
3 changed files with 7 additions and 0 deletions

View file

@ -317,6 +317,7 @@ public:
virtual void page_did_request_link_context_menu(CSSPixelPoint, URL::URL const&, [[maybe_unused]] ByteString const& target, [[maybe_unused]] unsigned modifiers) { } virtual void page_did_request_link_context_menu(CSSPixelPoint, URL::URL const&, [[maybe_unused]] ByteString const& target, [[maybe_unused]] unsigned modifiers) { }
virtual void page_did_request_image_context_menu(CSSPixelPoint, URL::URL const&, [[maybe_unused]] ByteString const& target, [[maybe_unused]] unsigned modifiers, Gfx::Bitmap const*) { } virtual void page_did_request_image_context_menu(CSSPixelPoint, URL::URL const&, [[maybe_unused]] ByteString const& target, [[maybe_unused]] unsigned modifiers, Gfx::Bitmap const*) { }
virtual void page_did_request_media_context_menu(CSSPixelPoint, [[maybe_unused]] ByteString const& target, [[maybe_unused]] unsigned modifiers, Page::MediaContextMenu) { } virtual void page_did_request_media_context_menu(CSSPixelPoint, [[maybe_unused]] ByteString const& target, [[maybe_unused]] unsigned modifiers, Page::MediaContextMenu) { }
virtual void page_did_click_link(URL::URL const&, [[maybe_unused]] ByteString const& target, [[maybe_unused]] unsigned modifiers) { }
virtual void page_did_middle_click_link(URL::URL const&, [[maybe_unused]] ByteString const& target, [[maybe_unused]] unsigned modifiers) { } virtual void page_did_middle_click_link(URL::URL const&, [[maybe_unused]] ByteString const& target, [[maybe_unused]] unsigned modifiers) { }
virtual void page_did_request_tooltip_override(CSSPixelPoint, ByteString const&) { } virtual void page_did_request_tooltip_override(CSSPixelPoint, ByteString const&) { }
virtual void page_did_stop_tooltip_override() { } virtual void page_did_stop_tooltip_override() { }

View file

@ -324,6 +324,11 @@ void PageClient::page_did_unhover_link()
client().async_did_unhover_link(m_id); client().async_did_unhover_link(m_id);
} }
void PageClient::page_did_click_link(URL::URL const& url, ByteString const& target, unsigned modifiers)
{
client().async_did_click_link(m_id, url, target, modifiers);
}
void PageClient::page_did_middle_click_link(URL::URL const& url, ByteString const& target, unsigned modifiers) void PageClient::page_did_middle_click_link(URL::URL const& url, ByteString const& target, unsigned modifiers)
{ {
client().async_did_middle_click_link(m_id, url, target, modifiers); client().async_did_middle_click_link(m_id, url, target, modifiers);

View file

@ -122,6 +122,7 @@ private:
virtual void page_did_leave_tooltip_area() override; virtual void page_did_leave_tooltip_area() override;
virtual void page_did_hover_link(URL::URL const&) override; virtual void page_did_hover_link(URL::URL const&) override;
virtual void page_did_unhover_link() override; virtual void page_did_unhover_link() override;
virtual void page_did_click_link(URL::URL const&, ByteString const& target, unsigned modifiers) override;
virtual void page_did_middle_click_link(URL::URL const&, ByteString const& target, unsigned modifiers) override; virtual void page_did_middle_click_link(URL::URL const&, ByteString const& target, unsigned modifiers) override;
virtual void page_did_request_context_menu(Web::CSSPixelPoint) override; virtual void page_did_request_context_menu(Web::CSSPixelPoint) override;
virtual void page_did_request_link_context_menu(Web::CSSPixelPoint, URL::URL const&, ByteString const& target, unsigned modifiers) override; virtual void page_did_request_link_context_menu(Web::CSSPixelPoint, URL::URL const&, ByteString const& target, unsigned modifiers) override;