From d768abffa0b876f006fa275d4e7a6223bd97f206 Mon Sep 17 00:00:00 2001 From: MacDue Date: Tue, 6 Dec 2022 22:00:08 +0000 Subject: [PATCH] Ladybird: Pass Gfx::IntPoint by value --- Ladybird/WebContentView.cpp | 12 ++++++------ Ladybird/WebContentView.h | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Ladybird/WebContentView.cpp b/Ladybird/WebContentView.cpp index aa2bb9f8c0e..2edc91d2b3d 100644 --- a/Ladybird/WebContentView.cpp +++ b/Ladybird/WebContentView.cpp @@ -743,7 +743,7 @@ void WebContentView::notify_server_did_request_scroll(Badge, i verticalScrollBar()->setValue(verticalScrollBar()->value() + y_delta); } -void WebContentView::notify_server_did_request_scroll_to(Badge, Gfx::IntPoint const& scroll_position) +void WebContentView::notify_server_did_request_scroll_to(Badge, Gfx::IntPoint scroll_position) { horizontalScrollBar()->setValue(scroll_position.x()); verticalScrollBar()->setValue(scroll_position.y()); @@ -761,7 +761,7 @@ void WebContentView::notify_server_did_request_scroll_into_view(Badge, Gfx::IntPoint const& content_position, DeprecatedString const& tooltip) +void WebContentView::notify_server_did_enter_tooltip_area(Badge, Gfx::IntPoint content_position, DeprecatedString const& tooltip) { auto widget_position = to_widget(content_position); QToolTip::showText( @@ -828,20 +828,20 @@ void WebContentView::notify_server_did_request_refresh(Badge) emit refresh(); } -void WebContentView::notify_server_did_request_context_menu(Badge, Gfx::IntPoint const& content_position) +void WebContentView::notify_server_did_request_context_menu(Badge, Gfx::IntPoint content_position) { // FIXME (void)content_position; } -void WebContentView::notify_server_did_request_link_context_menu(Badge, Gfx::IntPoint const& content_position, AK::URL const& url, DeprecatedString const&, unsigned) +void WebContentView::notify_server_did_request_link_context_menu(Badge, Gfx::IntPoint content_position, AK::URL const& url, DeprecatedString const&, unsigned) { // FIXME (void)content_position; (void)url; } -void WebContentView::notify_server_did_request_image_context_menu(Badge, Gfx::IntPoint const& content_position, AK::URL const& url, DeprecatedString const&, unsigned, Gfx::ShareableBitmap const& bitmap) +void WebContentView::notify_server_did_request_image_context_menu(Badge, Gfx::IntPoint content_position, AK::URL const& url, DeprecatedString const&, unsigned, Gfx::ShareableBitmap const& bitmap) { // FIXME (void)content_position; @@ -991,7 +991,7 @@ void WebContentView::notify_server_did_request_restore_window() emit restore_window(); } -Gfx::IntPoint WebContentView::notify_server_did_request_reposition_window(Gfx::IntPoint const& position) +Gfx::IntPoint WebContentView::notify_server_did_request_reposition_window(Gfx::IntPoint position) { return emit reposition_window(position); } diff --git a/Ladybird/WebContentView.h b/Ladybird/WebContentView.h index d4725f498eb..9b4a2906b39 100644 --- a/Ladybird/WebContentView.h +++ b/Ladybird/WebContentView.h @@ -54,10 +54,10 @@ public: void load(AK::URL const&); void load_html(StringView html, AK::URL const&); - Function on_context_menu_request; + Function on_context_menu_request; Function on_link_click; - Function on_link_context_menu_request; - Function on_image_context_menu_request; + Function on_link_context_menu_request; + Function on_image_context_menu_request; Function on_link_middle_click; Function on_link_hover; Function on_title_change; @@ -115,9 +115,9 @@ public: virtual void notify_server_did_request_cursor_change(Badge, Gfx::StandardCursor cursor) override; virtual void notify_server_did_change_title(Badge, DeprecatedString const&) override; virtual void notify_server_did_request_scroll(Badge, i32, i32) override; - virtual void notify_server_did_request_scroll_to(Badge, Gfx::IntPoint const&) override; + virtual void notify_server_did_request_scroll_to(Badge, Gfx::IntPoint) override; virtual void notify_server_did_request_scroll_into_view(Badge, Gfx::IntRect const&) override; - virtual void notify_server_did_enter_tooltip_area(Badge, Gfx::IntPoint const&, DeprecatedString const&) override; + virtual void notify_server_did_enter_tooltip_area(Badge, Gfx::IntPoint, DeprecatedString const&) override; virtual void notify_server_did_leave_tooltip_area(Badge) override; virtual void notify_server_did_hover_link(Badge, const AK::URL&) override; virtual void notify_server_did_unhover_link(Badge) override; @@ -128,9 +128,9 @@ public: virtual void notify_server_did_request_navigate_back(Badge) override; virtual void notify_server_did_request_navigate_forward(Badge) override; virtual void notify_server_did_request_refresh(Badge) override; - virtual void notify_server_did_request_context_menu(Badge, Gfx::IntPoint const&) override; - virtual void notify_server_did_request_link_context_menu(Badge, Gfx::IntPoint const&, const AK::URL&, DeprecatedString const& target, unsigned modifiers) override; - virtual void notify_server_did_request_image_context_menu(Badge, Gfx::IntPoint const&, const AK::URL&, DeprecatedString const& target, unsigned modifiers, Gfx::ShareableBitmap const&) override; + virtual void notify_server_did_request_context_menu(Badge, Gfx::IntPoint) override; + virtual void notify_server_did_request_link_context_menu(Badge, Gfx::IntPoint, const AK::URL&, DeprecatedString const& target, unsigned modifiers) override; + virtual void notify_server_did_request_image_context_menu(Badge, Gfx::IntPoint, const AK::URL&, DeprecatedString const& target, unsigned modifiers, Gfx::ShareableBitmap const&) override; virtual void notify_server_did_request_alert(Badge, DeprecatedString const& message) override; virtual void notify_server_did_request_confirm(Badge, DeprecatedString const& message) override; virtual void notify_server_did_request_prompt(Badge, DeprecatedString const& message, DeprecatedString const& default_) override; @@ -150,7 +150,7 @@ public: virtual void notify_server_did_update_cookie(Badge, AK::URL const& url, Web::Cookie::Cookie const& cookie) override; virtual void notify_server_did_update_resource_count(i32 count_waiting) override; virtual void notify_server_did_request_restore_window() override; - virtual Gfx::IntPoint notify_server_did_request_reposition_window(Gfx::IntPoint const&) override; + virtual Gfx::IntPoint notify_server_did_request_reposition_window(Gfx::IntPoint) override; virtual Gfx::IntSize notify_server_did_request_resize_window(Gfx::IntSize) override; virtual Gfx::IntRect notify_server_did_request_maximize_window() override; virtual Gfx::IntRect notify_server_did_request_minimize_window() override; @@ -171,7 +171,7 @@ signals: void navigate_forward(); void refresh(); void restore_window(); - Gfx::IntPoint reposition_window(Gfx::IntPoint const&); + Gfx::IntPoint reposition_window(Gfx::IntPoint); Gfx::IntSize resize_window(Gfx::IntSize); Gfx::IntRect maximize_window(); Gfx::IntRect minimize_window();