summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb
diff options
context:
space:
mode:
authorMacDue <macdue@dueutil.tech>2022-12-06 20:27:44 +0000
committerAndreas Kling <kling@serenityos.org>2022-12-07 11:48:27 +0100
commit7be0b27dd3cd7185c1b8dc52747c50aad479bc6a (patch)
tree30d42673a64ebb4a6274760e0016f78d6fa91fca /Userland/Libraries/LibWeb
parentbbc149ebb935532c9382278ed98cf9fe8a616422 (diff)
downloadserenity-7be0b27dd3cd7185c1b8dc52747c50aad479bc6a.zip
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.
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r--Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp4
-rw-r--r--Userland/Libraries/LibWeb/HTML/BrowsingContext.h6
-rw-r--r--Userland/Libraries/LibWeb/Layout/Label.cpp8
-rw-r--r--Userland/Libraries/LibWeb/Layout/Label.h8
-rw-r--r--Userland/Libraries/LibWeb/Page/EventHandler.cpp12
-rw-r--r--Userland/Libraries/LibWeb/Page/EventHandler.h10
-rw-r--r--Userland/Libraries/LibWeb/Page/Page.cpp10
-rw-r--r--Userland/Libraries/LibWeb/Page/Page.h26
-rw-r--r--Userland/Libraries/LibWeb/Painting/BorderPainting.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Painting/LabelablePaintable.cpp6
-rw-r--r--Userland/Libraries/LibWeb/Painting/LabelablePaintable.h6
-rw-r--r--Userland/Libraries/LibWeb/Painting/PaintContext.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Painting/PaintContext.h2
-rw-r--r--Userland/Libraries/LibWeb/Painting/Paintable.cpp8
-rw-r--r--Userland/Libraries/LibWeb/Painting/Paintable.h8
-rw-r--r--Userland/Libraries/LibWeb/Painting/PaintableBox.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Painting/PaintableBox.h2
-rw-r--r--Userland/Libraries/LibWeb/Painting/TextPaintable.cpp6
-rw-r--r--Userland/Libraries/LibWeb/Painting/TextPaintable.h6
19 files changed, 67 insertions, 67 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp b/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp
index 07cda36dae..4cfcea595c 100644
--- a/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp
+++ b/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp
@@ -383,7 +383,7 @@ void BrowsingContext::set_needs_display(Gfx::IntRect const& rect)
container()->layout_node()->set_needs_display();
}
-void BrowsingContext::scroll_to(Gfx::IntPoint const& position)
+void BrowsingContext::scroll_to(Gfx::IntPoint position)
{
if (active_document())
active_document()->force_layout();
@@ -437,7 +437,7 @@ Gfx::IntRect BrowsingContext::to_top_level_rect(Gfx::IntRect const& a_rect)
return rect;
}
-Gfx::IntPoint BrowsingContext::to_top_level_position(Gfx::IntPoint const& a_position)
+Gfx::IntPoint BrowsingContext::to_top_level_position(Gfx::IntPoint a_position)
{
auto position = a_position;
for (auto ancestor = parent(); ancestor; ancestor = ancestor->parent()) {
diff --git a/Userland/Libraries/LibWeb/HTML/BrowsingContext.h b/Userland/Libraries/LibWeb/HTML/BrowsingContext.h
index 9af4d67659..441aedc9be 100644
--- a/Userland/Libraries/LibWeb/HTML/BrowsingContext.h
+++ b/Userland/Libraries/LibWeb/HTML/BrowsingContext.h
@@ -140,7 +140,7 @@ public:
void set_needs_display();
void set_needs_display(Gfx::IntRect const&);
- Gfx::IntPoint const& viewport_scroll_offset() const { return m_viewport_scroll_offset; }
+ Gfx::IntPoint viewport_scroll_offset() const { return m_viewport_scroll_offset; }
Gfx::IntRect viewport_rect() const { return { m_viewport_scroll_offset, m_size }; }
void set_viewport_rect(Gfx::IntRect const&);
@@ -150,7 +150,7 @@ public:
Web::EventHandler& event_handler() { return m_event_handler; }
Web::EventHandler const& event_handler() const { return m_event_handler; }
- void scroll_to(Gfx::IntPoint const&);
+ void scroll_to(Gfx::IntPoint);
void scroll_to_anchor(DeprecatedString const&);
BrowsingContext& top_level_browsing_context()
@@ -183,7 +183,7 @@ public:
HTML::BrowsingContextContainer* container() { return m_container; }
HTML::BrowsingContextContainer const* container() const { return m_container; }
- Gfx::IntPoint to_top_level_position(Gfx::IntPoint const&);
+ Gfx::IntPoint to_top_level_position(Gfx::IntPoint);
Gfx::IntRect to_top_level_rect(Gfx::IntRect const&);
DOM::Position const& cursor_position() const { return m_cursor_position; }
diff --git a/Userland/Libraries/LibWeb/Layout/Label.cpp b/Userland/Libraries/LibWeb/Layout/Label.cpp
index 7cffc25ae4..8c484c09e0 100644
--- a/Userland/Libraries/LibWeb/Layout/Label.cpp
+++ b/Userland/Libraries/LibWeb/Layout/Label.cpp
@@ -22,7 +22,7 @@ Label::Label(DOM::Document& document, HTML::HTMLLabelElement* element, NonnullRe
Label::~Label() = default;
-void Label::handle_mousedown_on_label(Badge<Painting::TextPaintable>, Gfx::IntPoint const&, unsigned button)
+void Label::handle_mousedown_on_label(Badge<Painting::TextPaintable>, Gfx::IntPoint, unsigned button)
{
if (button != GUI::MouseButton::Primary)
return;
@@ -33,7 +33,7 @@ void Label::handle_mousedown_on_label(Badge<Painting::TextPaintable>, Gfx::IntPo
m_tracking_mouse = true;
}
-void Label::handle_mouseup_on_label(Badge<Painting::TextPaintable>, Gfx::IntPoint const& position, unsigned button)
+void Label::handle_mouseup_on_label(Badge<Painting::TextPaintable>, Gfx::IntPoint position, unsigned button)
{
if (!m_tracking_mouse || button != GUI::MouseButton::Primary)
return;
@@ -49,7 +49,7 @@ void Label::handle_mouseup_on_label(Badge<Painting::TextPaintable>, Gfx::IntPoin
m_tracking_mouse = false;
}
-void Label::handle_mousemove_on_label(Badge<Painting::TextPaintable>, Gfx::IntPoint const& position, unsigned)
+void Label::handle_mousemove_on_label(Badge<Painting::TextPaintable>, Gfx::IntPoint position, unsigned)
{
if (!m_tracking_mouse)
return;
@@ -62,7 +62,7 @@ void Label::handle_mousemove_on_label(Badge<Painting::TextPaintable>, Gfx::IntPo
}
}
-bool Label::is_inside_associated_label(LabelableNode const& control, Gfx::IntPoint const& position)
+bool Label::is_inside_associated_label(LabelableNode const& control, Gfx::IntPoint position)
{
if (auto* label = label_for_control_node(control); label)
return enclosing_int_rect(label->paint_box()->absolute_rect()).contains(position);
diff --git a/Userland/Libraries/LibWeb/Layout/Label.h b/Userland/Libraries/LibWeb/Layout/Label.h
index 3723719046..89806c00c2 100644
--- a/Userland/Libraries/LibWeb/Layout/Label.h
+++ b/Userland/Libraries/LibWeb/Layout/Label.h
@@ -18,15 +18,15 @@ public:
Label(DOM::Document&, HTML::HTMLLabelElement*, NonnullRefPtr<CSS::StyleProperties>);
virtual ~Label() override;
- static bool is_inside_associated_label(LabelableNode const&, Gfx::IntPoint const&);
+ static bool is_inside_associated_label(LabelableNode const&, Gfx::IntPoint);
static bool is_associated_label_hovered(LabelableNode const&);
const HTML::HTMLLabelElement& dom_node() const { return static_cast<const HTML::HTMLLabelElement&>(*BlockContainer::dom_node()); }
HTML::HTMLLabelElement& dom_node() { return static_cast<HTML::HTMLLabelElement&>(*BlockContainer::dom_node()); }
- void handle_mousedown_on_label(Badge<Painting::TextPaintable>, Gfx::IntPoint const&, unsigned button);
- void handle_mouseup_on_label(Badge<Painting::TextPaintable>, Gfx::IntPoint const&, unsigned button);
- void handle_mousemove_on_label(Badge<Painting::TextPaintable>, Gfx::IntPoint const&, unsigned button);
+ void handle_mousedown_on_label(Badge<Painting::TextPaintable>, Gfx::IntPoint, unsigned button);
+ void handle_mouseup_on_label(Badge<Painting::TextPaintable>, Gfx::IntPoint, unsigned button);
+ void handle_mousemove_on_label(Badge<Painting::TextPaintable>, Gfx::IntPoint, unsigned button);
LabelableNode* labeled_control();
diff --git a/Userland/Libraries/LibWeb/Page/EventHandler.cpp b/Userland/Libraries/LibWeb/Page/EventHandler.cpp
index 880aa7e62c..329c5b2409 100644
--- a/Userland/Libraries/LibWeb/Page/EventHandler.cpp
+++ b/Userland/Libraries/LibWeb/Page/EventHandler.cpp
@@ -102,7 +102,7 @@ static Gfx::StandardCursor cursor_css_to_gfx(Optional<CSS::Cursor> cursor)
}
}
-static Gfx::IntPoint compute_mouse_event_offset(Gfx::IntPoint const& position, Layout::Node const& layout_node)
+static Gfx::IntPoint compute_mouse_event_offset(Gfx::IntPoint position, Layout::Node const& layout_node)
{
auto top_left_of_layout_node = layout_node.box_type_agnostic_position();
return {
@@ -147,7 +147,7 @@ Painting::PaintableBox const* EventHandler::paint_root() const
return const_cast<Painting::PaintableBox*>(m_browsing_context.active_document()->paint_box());
}
-bool EventHandler::handle_mousewheel(Gfx::IntPoint const& position, unsigned button, unsigned buttons, unsigned int modifiers, int wheel_delta_x, int wheel_delta_y)
+bool EventHandler::handle_mousewheel(Gfx::IntPoint position, unsigned button, unsigned buttons, unsigned int modifiers, int wheel_delta_x, int wheel_delta_y)
{
if (m_browsing_context.active_document())
m_browsing_context.active_document()->update_layout();
@@ -198,7 +198,7 @@ bool EventHandler::handle_mousewheel(Gfx::IntPoint const& position, unsigned but
return handled_event;
}
-bool EventHandler::handle_mouseup(Gfx::IntPoint const& position, unsigned button, unsigned buttons, unsigned modifiers)
+bool EventHandler::handle_mouseup(Gfx::IntPoint position, unsigned button, unsigned buttons, unsigned modifiers)
{
if (m_browsing_context.active_document())
m_browsing_context.active_document()->update_layout();
@@ -313,7 +313,7 @@ after_node_use:
return handled_event;
}
-bool EventHandler::handle_mousedown(Gfx::IntPoint const& position, unsigned button, unsigned buttons, unsigned modifiers)
+bool EventHandler::handle_mousedown(Gfx::IntPoint position, unsigned button, unsigned buttons, unsigned modifiers)
{
if (m_browsing_context.active_document())
m_browsing_context.active_document()->update_layout();
@@ -404,7 +404,7 @@ bool EventHandler::handle_mousedown(Gfx::IntPoint const& position, unsigned butt
return true;
}
-bool EventHandler::handle_mousemove(Gfx::IntPoint const& position, unsigned buttons, unsigned modifiers)
+bool EventHandler::handle_mousemove(Gfx::IntPoint position, unsigned buttons, unsigned modifiers)
{
if (m_browsing_context.active_document())
m_browsing_context.active_document()->update_layout();
@@ -516,7 +516,7 @@ bool EventHandler::handle_mousemove(Gfx::IntPoint const& position, unsigned butt
return true;
}
-bool EventHandler::handle_doubleclick(Gfx::IntPoint const& position, unsigned button, unsigned buttons, unsigned modifiers)
+bool EventHandler::handle_doubleclick(Gfx::IntPoint position, unsigned button, unsigned buttons, unsigned modifiers)
{
if (m_browsing_context.active_document())
m_browsing_context.active_document()->update_layout();
diff --git a/Userland/Libraries/LibWeb/Page/EventHandler.h b/Userland/Libraries/LibWeb/Page/EventHandler.h
index e5ef43c7e6..71832e5ea3 100644
--- a/Userland/Libraries/LibWeb/Page/EventHandler.h
+++ b/Userland/Libraries/LibWeb/Page/EventHandler.h
@@ -22,11 +22,11 @@ public:
explicit EventHandler(Badge<HTML::BrowsingContext>, HTML::BrowsingContext&);
~EventHandler();
- bool handle_mouseup(Gfx::IntPoint const&, unsigned button, unsigned buttons, unsigned modifiers);
- bool handle_mousedown(Gfx::IntPoint const&, unsigned button, unsigned buttons, unsigned modifiers);
- bool handle_mousemove(Gfx::IntPoint const&, unsigned buttons, unsigned modifiers);
- bool handle_mousewheel(Gfx::IntPoint const&, unsigned button, unsigned buttons, unsigned modifiers, int wheel_delta_x, int wheel_delta_y);
- bool handle_doubleclick(Gfx::IntPoint const&, unsigned button, unsigned buttons, unsigned modifiers);
+ bool handle_mouseup(Gfx::IntPoint, unsigned button, unsigned buttons, unsigned modifiers);
+ bool handle_mousedown(Gfx::IntPoint, unsigned button, unsigned buttons, unsigned modifiers);
+ bool handle_mousemove(Gfx::IntPoint, unsigned buttons, unsigned modifiers);
+ bool handle_mousewheel(Gfx::IntPoint, unsigned button, unsigned buttons, unsigned modifiers, int wheel_delta_x, int wheel_delta_y);
+ bool handle_doubleclick(Gfx::IntPoint, unsigned button, unsigned buttons, unsigned modifiers);
bool handle_keydown(KeyCode, unsigned modifiers, u32 code_point);
bool handle_keyup(KeyCode, unsigned modifiers, u32 code_point);
diff --git a/Userland/Libraries/LibWeb/Page/Page.cpp b/Userland/Libraries/LibWeb/Page/Page.cpp
index 55af1eec74..0377bb58ee 100644
--- a/Userland/Libraries/LibWeb/Page/Page.cpp
+++ b/Userland/Libraries/LibWeb/Page/Page.cpp
@@ -64,27 +64,27 @@ CSS::PreferredColorScheme Page::preferred_color_scheme() const
return m_client.preferred_color_scheme();
}
-bool Page::handle_mousewheel(Gfx::IntPoint const& position, unsigned button, unsigned buttons, unsigned modifiers, int wheel_delta_x, int wheel_delta_y)
+bool Page::handle_mousewheel(Gfx::IntPoint position, unsigned button, unsigned buttons, unsigned modifiers, int wheel_delta_x, int wheel_delta_y)
{
return top_level_browsing_context().event_handler().handle_mousewheel(position, button, buttons, modifiers, wheel_delta_x, wheel_delta_y);
}
-bool Page::handle_mouseup(Gfx::IntPoint const& position, unsigned button, unsigned buttons, unsigned modifiers)
+bool Page::handle_mouseup(Gfx::IntPoint position, unsigned button, unsigned buttons, unsigned modifiers)
{
return top_level_browsing_context().event_handler().handle_mouseup(position, button, buttons, modifiers);
}
-bool Page::handle_mousedown(Gfx::IntPoint const& position, unsigned button, unsigned buttons, unsigned modifiers)
+bool Page::handle_mousedown(Gfx::IntPoint position, unsigned button, unsigned buttons, unsigned modifiers)
{
return top_level_browsing_context().event_handler().handle_mousedown(position, button, buttons, modifiers);
}
-bool Page::handle_mousemove(Gfx::IntPoint const& position, unsigned buttons, unsigned modifiers)
+bool Page::handle_mousemove(Gfx::IntPoint position, unsigned buttons, unsigned modifiers)
{
return top_level_browsing_context().event_handler().handle_mousemove(position, buttons, modifiers);
}
-bool Page::handle_doubleclick(Gfx::IntPoint const& position, unsigned button, unsigned buttons, unsigned modifiers)
+bool Page::handle_doubleclick(Gfx::IntPoint position, unsigned button, unsigned buttons, unsigned modifiers)
{
return top_level_browsing_context().event_handler().handle_doubleclick(position, button, buttons, modifiers);
}
diff --git a/Userland/Libraries/LibWeb/Page/Page.h b/Userland/Libraries/LibWeb/Page/Page.h
index dca9f57b19..0f73fc66d4 100644
--- a/Userland/Libraries/LibWeb/Page/Page.h
+++ b/Userland/Libraries/LibWeb/Page/Page.h
@@ -54,11 +54,11 @@ public:
void load_html(StringView, const AK::URL&);
- bool handle_mouseup(Gfx::IntPoint const&, unsigned button, unsigned buttons, unsigned modifiers);
- bool handle_mousedown(Gfx::IntPoint const&, unsigned button, unsigned buttons, unsigned modifiers);
- bool handle_mousemove(Gfx::IntPoint const&, unsigned buttons, unsigned modifiers);
- bool handle_mousewheel(Gfx::IntPoint const&, unsigned button, unsigned buttons, unsigned modifiers, int wheel_delta_x, int wheel_delta_y);
- bool handle_doubleclick(Gfx::IntPoint const&, unsigned button, unsigned buttons, unsigned modifiers);
+ bool handle_mouseup(Gfx::IntPoint, unsigned button, unsigned buttons, unsigned modifiers);
+ bool handle_mousedown(Gfx::IntPoint, unsigned button, unsigned buttons, unsigned modifiers);
+ bool handle_mousemove(Gfx::IntPoint, unsigned buttons, unsigned modifiers);
+ bool handle_mousewheel(Gfx::IntPoint, unsigned button, unsigned buttons, unsigned modifiers, int wheel_delta_x, int wheel_delta_y);
+ bool handle_doubleclick(Gfx::IntPoint, unsigned button, unsigned buttons, unsigned modifiers);
bool handle_keydown(KeyCode, unsigned modifiers, u32 code_point);
bool handle_keyup(KeyCode, unsigned modifiers, u32 code_point);
@@ -79,8 +79,8 @@ public:
bool is_webdriver_active() const { return m_is_webdriver_active; }
void set_is_webdriver_active(bool b) { m_is_webdriver_active = b; }
- Gfx::IntPoint const& window_position() const { return m_window_position; }
- void set_window_position(Gfx::IntPoint const& position) { m_window_position = position; }
+ Gfx::IntPoint window_position() const { return m_window_position; }
+ void set_window_position(Gfx::IntPoint position) { m_window_position = position; }
Gfx::IntSize const& window_size() const { return m_window_size; }
void set_window_size(Gfx::IntSize const& size) { m_window_size = size; }
@@ -147,7 +147,7 @@ public:
virtual void page_did_request_navigate_forward() { }
virtual void page_did_request_refresh() { }
virtual Gfx::IntSize page_did_request_resize_window(Gfx::IntSize const&) { return {}; }
- virtual Gfx::IntPoint page_did_request_reposition_window(Gfx::IntPoint const&) { return {}; }
+ virtual Gfx::IntPoint page_did_request_reposition_window(Gfx::IntPoint) { return {}; }
virtual void page_did_request_restore_window() { }
virtual Gfx::IntRect page_did_request_maximize_window() { return {}; }
virtual Gfx::IntRect page_did_request_minimize_window() { return {}; }
@@ -157,12 +157,12 @@ public:
virtual void page_did_finish_loading(const AK::URL&) { }
virtual void page_did_change_selection() { }
virtual void page_did_request_cursor_change(Gfx::StandardCursor) { }
- virtual void page_did_request_context_menu(Gfx::IntPoint const&) { }
- virtual void page_did_request_link_context_menu(Gfx::IntPoint const&, const AK::URL&, [[maybe_unused]] DeprecatedString const& target, [[maybe_unused]] unsigned modifiers) { }
- virtual void page_did_request_image_context_menu(Gfx::IntPoint const&, const AK::URL&, [[maybe_unused]] DeprecatedString const& target, [[maybe_unused]] unsigned modifiers, Gfx::Bitmap const*) { }
+ virtual void page_did_request_context_menu(Gfx::IntPoint) { }
+ virtual void page_did_request_link_context_menu(Gfx::IntPoint, const AK::URL&, [[maybe_unused]] DeprecatedString const& target, [[maybe_unused]] unsigned modifiers) { }
+ virtual void page_did_request_image_context_menu(Gfx::IntPoint, const AK::URL&, [[maybe_unused]] DeprecatedString const& target, [[maybe_unused]] unsigned modifiers, Gfx::Bitmap const*) { }
virtual void page_did_click_link(const AK::URL&, [[maybe_unused]] DeprecatedString const& target, [[maybe_unused]] unsigned modifiers) { }
virtual void page_did_middle_click_link(const AK::URL&, [[maybe_unused]] DeprecatedString const& target, [[maybe_unused]] unsigned modifiers) { }
- virtual void page_did_enter_tooltip_area(Gfx::IntPoint const&, DeprecatedString const&) { }
+ virtual void page_did_enter_tooltip_area(Gfx::IntPoint, DeprecatedString const&) { }
virtual void page_did_leave_tooltip_area() { }
virtual void page_did_hover_link(const AK::URL&) { }
virtual void page_did_unhover_link() { }
@@ -170,7 +170,7 @@ public:
virtual void page_did_change_favicon(Gfx::Bitmap const&) { }
virtual void page_did_layout() { }
virtual void page_did_request_scroll(i32, i32) { }
- virtual void page_did_request_scroll_to(Gfx::IntPoint const&) { }
+ virtual void page_did_request_scroll_to(Gfx::IntPoint) { }
virtual void page_did_request_scroll_into_view(Gfx::IntRect const&) { }
virtual void page_did_request_alert(DeprecatedString const&) { }
virtual void page_did_request_confirm(DeprecatedString const&) { }
diff --git a/Userland/Libraries/LibWeb/Painting/BorderPainting.cpp b/Userland/Libraries/LibWeb/Painting/BorderPainting.cpp
index d4a7ff1ffa..93c8bfdfe7 100644
--- a/Userland/Libraries/LibWeb/Painting/BorderPainting.cpp
+++ b/Userland/Libraries/LibWeb/Painting/BorderPainting.cpp
@@ -355,7 +355,7 @@ void paint_all_borders(PaintContext& context, Gfx::FloatRect const& bordered_rec
// TODO: Support dual color corners. Other browsers will render a rounded corner between two borders of
// different colors using both colours, normally split at a 45 degree angle (though the exact angle is interpolated).
- auto blit_corner = [&](Gfx::IntPoint const& position, Gfx::IntRect const& src_rect, Color corner_color) {
+ auto blit_corner = [&](Gfx::IntPoint position, Gfx::IntRect const& src_rect, Color corner_color) {
context.painter().blit_filtered(position, *corner_bitmap, src_rect, [&](auto const& corner_pixel) {
return corner_color.with_alpha((corner_color.alpha() * corner_pixel.alpha()) / 255);
});
diff --git a/Userland/Libraries/LibWeb/Painting/LabelablePaintable.cpp b/Userland/Libraries/LibWeb/Painting/LabelablePaintable.cpp
index 66f469215f..358956e780 100644
--- a/Userland/Libraries/LibWeb/Painting/LabelablePaintable.cpp
+++ b/Userland/Libraries/LibWeb/Painting/LabelablePaintable.cpp
@@ -35,7 +35,7 @@ Layout::FormAssociatedLabelableNode& LabelablePaintable::layout_box()
return static_cast<Layout::FormAssociatedLabelableNode&>(PaintableBox::layout_box());
}
-LabelablePaintable::DispatchEventOfSameName LabelablePaintable::handle_mousedown(Badge<EventHandler>, Gfx::IntPoint const&, unsigned button, unsigned)
+LabelablePaintable::DispatchEventOfSameName LabelablePaintable::handle_mousedown(Badge<EventHandler>, Gfx::IntPoint, unsigned button, unsigned)
{
if (button != GUI::MouseButton::Primary || !layout_box().dom_node().enabled())
return DispatchEventOfSameName::No;
@@ -46,7 +46,7 @@ LabelablePaintable::DispatchEventOfSameName LabelablePaintable::handle_mousedown
return DispatchEventOfSameName::Yes;
}
-LabelablePaintable::DispatchEventOfSameName LabelablePaintable::handle_mouseup(Badge<EventHandler>, Gfx::IntPoint const& position, unsigned button, unsigned)
+LabelablePaintable::DispatchEventOfSameName LabelablePaintable::handle_mouseup(Badge<EventHandler>, Gfx::IntPoint position, unsigned button, unsigned)
{
if (!m_tracking_mouse || button != GUI::MouseButton::Primary || !layout_box().dom_node().enabled())
return DispatchEventOfSameName::No;
@@ -61,7 +61,7 @@ LabelablePaintable::DispatchEventOfSameName LabelablePaintable::handle_mouseup(B
return DispatchEventOfSameName::Yes;
}
-LabelablePaintable::DispatchEventOfSameName LabelablePaintable::handle_mousemove(Badge<EventHandler>, Gfx::IntPoint const& position, unsigned, unsigned)
+LabelablePaintable::DispatchEventOfSameName LabelablePaintable::handle_mousemove(Badge<EventHandler>, Gfx::IntPoint position, unsigned, unsigned)
{
if (!m_tracking_mouse || !layout_box().dom_node().enabled())
return DispatchEventOfSameName::No;
diff --git a/Userland/Libraries/LibWeb/Painting/LabelablePaintable.h b/Userland/Libraries/LibWeb/Painting/LabelablePaintable.h
index 520753826c..7f256f628f 100644
--- a/Userland/Libraries/LibWeb/Painting/LabelablePaintable.h
+++ b/Userland/Libraries/LibWeb/Painting/LabelablePaintable.h
@@ -21,9 +21,9 @@ public:
Layout::FormAssociatedLabelableNode& layout_box();
virtual bool wants_mouse_events() const override { return true; }
- virtual DispatchEventOfSameName handle_mousedown(Badge<EventHandler>, Gfx::IntPoint const&, unsigned button, unsigned modifiers) override;
- virtual DispatchEventOfSameName handle_mouseup(Badge<EventHandler>, Gfx::IntPoint const&, unsigned button, unsigned modifiers) override;
- virtual DispatchEventOfSameName handle_mousemove(Badge<EventHandler>, Gfx::IntPoint const&, unsigned buttons, unsigned modifiers) override;
+ virtual DispatchEventOfSameName handle_mousedown(Badge<EventHandler>, Gfx::IntPoint, unsigned button, unsigned modifiers) override;
+ virtual DispatchEventOfSameName handle_mouseup(Badge<EventHandler>, Gfx::IntPoint, unsigned button, unsigned modifiers) override;
+ virtual DispatchEventOfSameName handle_mousemove(Badge<EventHandler>, Gfx::IntPoint, unsigned buttons, unsigned modifiers) override;
void handle_associated_label_mousedown(Badge<Layout::Label>);
void handle_associated_label_mouseup(Badge<Layout::Label>);
diff --git a/Userland/Libraries/LibWeb/Painting/PaintContext.cpp b/Userland/Libraries/LibWeb/Painting/PaintContext.cpp
index de287bf394..014c56e844 100644
--- a/Userland/Libraries/LibWeb/Painting/PaintContext.cpp
+++ b/Userland/Libraries/LibWeb/Painting/PaintContext.cpp
@@ -8,7 +8,7 @@
namespace Web {
-PaintContext::PaintContext(Gfx::Painter& painter, Palette const& palette, Gfx::IntPoint const& scroll_offset)
+PaintContext::PaintContext(Gfx::Painter& painter, Palette const& palette, Gfx::IntPoint scroll_offset)
: m_painter(painter)
, m_palette(palette)
, m_scroll_offset(scroll_offset)
diff --git a/Userland/Libraries/LibWeb/Painting/PaintContext.h b/Userland/Libraries/LibWeb/Painting/PaintContext.h
index 457b544ad7..d8bea98414 100644
--- a/Userland/Libraries/LibWeb/Painting/PaintContext.h
+++ b/Userland/Libraries/LibWeb/Painting/PaintContext.h
@@ -16,7 +16,7 @@ namespace Web {
class PaintContext {
public:
- PaintContext(Gfx::Painter& painter, Palette const& palette, Gfx::IntPoint const& scroll_offset);
+ PaintContext(Gfx::Painter& painter, Palette const& palette, Gfx::IntPoint scroll_offset);
Gfx::Painter& painter() const { return m_painter; }
Palette const& palette() const { return m_palette; }
diff --git a/Userland/Libraries/LibWeb/Painting/Paintable.cpp b/Userland/Libraries/LibWeb/Painting/Paintable.cpp
index ca931544bc..82307810b3 100644
--- a/Userland/Libraries/LibWeb/Painting/Paintable.cpp
+++ b/Userland/Libraries/LibWeb/Painting/Paintable.cpp
@@ -10,22 +10,22 @@
namespace Web::Painting {
-Paintable::DispatchEventOfSameName Paintable::handle_mousedown(Badge<EventHandler>, Gfx::IntPoint const&, unsigned, unsigned)
+Paintable::DispatchEventOfSameName Paintable::handle_mousedown(Badge<EventHandler>, Gfx::IntPoint, unsigned, unsigned)
{
return DispatchEventOfSameName::Yes;
}
-Paintable::DispatchEventOfSameName Paintable::handle_mouseup(Badge<EventHandler>, Gfx::IntPoint const&, unsigned, unsigned)
+Paintable::DispatchEventOfSameName Paintable::handle_mouseup(Badge<EventHandler>, Gfx::IntPoint, unsigned, unsigned)
{
return DispatchEventOfSameName::Yes;
}
-Paintable::DispatchEventOfSameName Paintable::handle_mousemove(Badge<EventHandler>, Gfx::IntPoint const&, unsigned, unsigned)
+Paintable::DispatchEventOfSameName Paintable::handle_mousemove(Badge<EventHandler>, Gfx::IntPoint, unsigned, unsigned)
{
return DispatchEventOfSameName::Yes;
}
-bool Paintable::handle_mousewheel(Badge<EventHandler>, Gfx::IntPoint const&, unsigned, unsigned, int wheel_delta_x, int wheel_delta_y)
+bool Paintable::handle_mousewheel(Badge<EventHandler>, Gfx::IntPoint, unsigned, unsigned, int wheel_delta_x, int wheel_delta_y)
{
if (auto* containing_block = this->containing_block()) {
if (!containing_block->is_scrollable())
diff --git a/Userland/Libraries/LibWeb/Painting/Paintable.h b/Userland/Libraries/LibWeb/Painting/Paintable.h
index 5bdb06e0dd..c0b335f4cc 100644
--- a/Userland/Libraries/LibWeb/Painting/Paintable.h
+++ b/Userland/Libraries/LibWeb/Painting/Paintable.h
@@ -100,12 +100,12 @@ public:
// When these methods return true, the DOM event with the same name will be
// dispatch at the mouse_event_target if it returns a valid DOM::Node, or
// the layout node's associated DOM node if it doesn't.
- virtual DispatchEventOfSameName handle_mousedown(Badge<EventHandler>, Gfx::IntPoint const&, unsigned button, unsigned modifiers);
- virtual DispatchEventOfSameName handle_mouseup(Badge<EventHandler>, Gfx::IntPoint const&, unsigned button, unsigned modifiers);
- virtual DispatchEventOfSameName handle_mousemove(Badge<EventHandler>, Gfx::IntPoint const&, unsigned buttons, unsigned modifiers);
+ virtual DispatchEventOfSameName handle_mousedown(Badge<EventHandler>, Gfx::IntPoint, unsigned button, unsigned modifiers);
+ virtual DispatchEventOfSameName handle_mouseup(Badge<EventHandler>, Gfx::IntPoint, unsigned button, unsigned modifiers);
+ virtual DispatchEventOfSameName handle_mousemove(Badge<EventHandler>, Gfx::IntPoint, unsigned buttons, unsigned modifiers);
virtual DOM::Node* mouse_event_target() const { return nullptr; }
- virtual bool handle_mousewheel(Badge<EventHandler>, Gfx::IntPoint const&, unsigned buttons, unsigned modifiers, int wheel_delta_x, int wheel_delta_y);
+ virtual bool handle_mousewheel(Badge<EventHandler>, Gfx::IntPoint, unsigned buttons, unsigned modifiers, int wheel_delta_x, int wheel_delta_y);
Layout::Node const& layout_node() const { return m_layout_node; }
Layout::Node& layout_node() { return const_cast<Layout::Node&>(m_layout_node); }
diff --git a/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp b/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp
index c54f758d5f..6bc37f41f6 100644
--- a/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp
+++ b/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp
@@ -630,7 +630,7 @@ void PaintableWithLines::paint(PaintContext& context, PaintPhase phase) const
}
}
-bool PaintableWithLines::handle_mousewheel(Badge<EventHandler>, Gfx::IntPoint const&, unsigned, unsigned, int wheel_delta_x, int wheel_delta_y)
+bool PaintableWithLines::handle_mousewheel(Badge<EventHandler>, Gfx::IntPoint, unsigned, unsigned, int wheel_delta_x, int wheel_delta_y)
{
if (!layout_box().is_scrollable())
return false;
diff --git a/Userland/Libraries/LibWeb/Painting/PaintableBox.h b/Userland/Libraries/LibWeb/Painting/PaintableBox.h
index 345c0d6c9d..fe453aa6b0 100644
--- a/Userland/Libraries/LibWeb/Painting/PaintableBox.h
+++ b/Userland/Libraries/LibWeb/Painting/PaintableBox.h
@@ -188,7 +188,7 @@ public:
virtual void paint(PaintContext&, PaintPhase) const override;
virtual bool wants_mouse_events() const override { return false; }
- virtual bool handle_mousewheel(Badge<EventHandler>, Gfx::IntPoint const&, unsigned buttons, unsigned modifiers, int wheel_delta_x, int wheel_delta_y) override;
+ virtual bool handle_mousewheel(Badge<EventHandler>, Gfx::IntPoint, unsigned buttons, unsigned modifiers, int wheel_delta_x, int wheel_delta_y) override;
virtual Optional<HitTestResult> hit_test(Gfx::FloatPoint const&, HitTestType) const override;
diff --git a/Userland/Libraries/LibWeb/Painting/TextPaintable.cpp b/Userland/Libraries/LibWeb/Painting/TextPaintable.cpp
index a209e8e481..726382f6da 100644
--- a/Userland/Libraries/LibWeb/Painting/TextPaintable.cpp
+++ b/Userland/Libraries/LibWeb/Painting/TextPaintable.cpp
@@ -36,7 +36,7 @@ DOM::Node* TextPaintable::mouse_event_target() const
return nullptr;
}
-TextPaintable::DispatchEventOfSameName TextPaintable::handle_mousedown(Badge<EventHandler>, Gfx::IntPoint const& position, unsigned button, unsigned)
+TextPaintable::DispatchEventOfSameName TextPaintable::handle_mousedown(Badge<EventHandler>, Gfx::IntPoint position, unsigned button, unsigned)
{
auto* label = layout_node().first_ancestor_of_type<Layout::Label>();
if (!label)
@@ -46,7 +46,7 @@ TextPaintable::DispatchEventOfSameName TextPaintable::handle_mousedown(Badge<Eve
return DispatchEventOfSameName::Yes;
}
-TextPaintable::DispatchEventOfSameName TextPaintable::handle_mouseup(Badge<EventHandler>, Gfx::IntPoint const& position, unsigned button, unsigned)
+TextPaintable::DispatchEventOfSameName TextPaintable::handle_mouseup(Badge<EventHandler>, Gfx::IntPoint position, unsigned button, unsigned)
{
auto* label = layout_node().first_ancestor_of_type<Layout::Label>();
if (!label)
@@ -57,7 +57,7 @@ TextPaintable::DispatchEventOfSameName TextPaintable::handle_mouseup(Badge<Event
return DispatchEventOfSameName::Yes;
}
-TextPaintable::DispatchEventOfSameName TextPaintable::handle_mousemove(Badge<EventHandler>, Gfx::IntPoint const& position, unsigned button, unsigned)
+TextPaintable::DispatchEventOfSameName TextPaintable::handle_mousemove(Badge<EventHandler>, Gfx::IntPoint position, unsigned button, unsigned)
{
auto* label = layout_node().first_ancestor_of_type<Layout::Label>();
if (!label)
diff --git a/Userland/Libraries/LibWeb/Painting/TextPaintable.h b/Userland/Libraries/LibWeb/Painting/TextPaintable.h
index 5c029062bb..fb0cd302d7 100644
--- a/Userland/Libraries/LibWeb/Painting/TextPaintable.h
+++ b/Userland/Libraries/LibWeb/Painting/TextPaintable.h
@@ -18,9 +18,9 @@ public:
virtual bool wants_mouse_events() const override;
virtual DOM::Node* mouse_event_target() const override;
- virtual DispatchEventOfSameName handle_mousedown(Badge<EventHandler>, Gfx::IntPoint const&, unsigned button, unsigned modifiers) override;
- virtual DispatchEventOfSameName handle_mouseup(Badge<EventHandler>, Gfx::IntPoint const&, unsigned button, unsigned modifiers) override;
- virtual DispatchEventOfSameName handle_mousemove(Badge<EventHandler>, Gfx::IntPoint const&, unsigned button, unsigned modifiers) override;
+ virtual DispatchEventOfSameName handle_mousedown(Badge<EventHandler>, Gfx::IntPoint, unsigned button, unsigned modifiers) override;
+ virtual DispatchEventOfSameName handle_mouseup(Badge<EventHandler>, Gfx::IntPoint, unsigned button, unsigned modifiers) override;
+ virtual DispatchEventOfSameName handle_mousemove(Badge<EventHandler>, Gfx::IntPoint, unsigned button, unsigned modifiers) override;
private:
explicit TextPaintable(Layout::TextNode const&);