1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 14:37:45 +00:00

Meta+Userland: Pass Gfx::IntPoint by value

This is just two ints or 8 bytes or the size of the reference on
x86_64 or AArch64.
This commit is contained in:
MacDue 2022-12-06 20:27:44 +00:00 committed by Andreas Kling
parent bbc149ebb9
commit 7be0b27dd3
161 changed files with 442 additions and 441 deletions

View file

@ -690,7 +690,7 @@ void BrowserWindow::config_bool_did_change(DeprecatedString const& domain, Depre
// NOTE: CloseDownloadWidgetOnFinish is read each time in DownloadWindow
}
void BrowserWindow::broadcast_window_position(Gfx::IntPoint const& position)
void BrowserWindow::broadcast_window_position(Gfx::IntPoint position)
{
tab_widget().for_each_child_of_type<Browser::Tab>([&](auto& tab) {
tab.window_position_changed(position);

View file

@ -45,7 +45,7 @@ public:
void content_filters_changed();
void proxy_mappings_changed();
void broadcast_window_position(Gfx::IntPoint const&);
void broadcast_window_position(Gfx::IntPoint);
void broadcast_window_size(Gfx::IntSize const&);
private:

View file

@ -272,7 +272,7 @@ Tab::Tab(BrowserWindow& window)
m_web_content_view->set_system_visibility_state(true);
};
view().on_reposition_window = [this](Gfx::IntPoint const& position) {
view().on_reposition_window = [this](Gfx::IntPoint position) {
this->window().move_to(position);
return this->window().position();
};
@ -318,7 +318,7 @@ Tab::Tab(BrowserWindow& window)
m_link_context_menu->add_separator();
m_link_context_menu->add_action(window.inspect_dom_node_action());
view().on_link_context_menu_request = [this](auto& url, auto& screen_position) {
view().on_link_context_menu_request = [this](auto& url, auto screen_position) {
m_link_context_menu_url = url;
m_link_context_menu->popup(screen_position, m_link_context_menu_default_action);
};
@ -345,7 +345,7 @@ Tab::Tab(BrowserWindow& window)
m_image_context_menu->add_separator();
m_image_context_menu->add_action(window.inspect_dom_node_action());
view().on_image_context_menu_request = [this](auto& image_url, auto& screen_position, Gfx::ShareableBitmap const& shareable_bitmap) {
view().on_image_context_menu_request = [this](auto& image_url, auto screen_position, Gfx::ShareableBitmap const& shareable_bitmap) {
m_image_context_menu_url = image_url;
m_image_context_menu_bitmap = shareable_bitmap;
m_image_context_menu->popup(screen_position);
@ -473,7 +473,7 @@ Tab::Tab(BrowserWindow& window)
m_page_context_menu->add_separator();
m_page_context_menu->add_action(window.take_visible_screenshot_action());
m_page_context_menu->add_action(window.take_full_screenshot_action());
view().on_context_menu_request = [&](auto& screen_position) {
view().on_context_menu_request = [&](auto screen_position) {
m_page_context_menu->popup(screen_position);
};
}
@ -586,7 +586,7 @@ void Tab::did_become_active()
update_actions();
}
void Tab::context_menu_requested(Gfx::IntPoint const& screen_position)
void Tab::context_menu_requested(Gfx::IntPoint screen_position)
{
m_tab_context_menu->popup(screen_position);
}
@ -614,7 +614,7 @@ void Tab::action_left(GUI::Action&)
m_statusbar->set_override_text({});
}
void Tab::window_position_changed(Gfx::IntPoint const& position)
void Tab::window_position_changed(Gfx::IntPoint position)
{
m_web_content_view->set_window_position(position);
}

View file

@ -49,14 +49,14 @@ public:
void go_forward(int steps = 1);
void did_become_active();
void context_menu_requested(Gfx::IntPoint const& screen_position);
void context_menu_requested(Gfx::IntPoint screen_position);
void content_filters_changed();
void proxy_mappings_changed();
void action_entered(GUI::Action&);
void action_left(GUI::Action&);
void window_position_changed(Gfx::IntPoint const&);
void window_position_changed(Gfx::IntPoint);
void window_size_changed(Gfx::IntSize const&);
Function<void(DeprecatedString const&)> on_title_change;