summaryrefslogtreecommitdiff
path: root/Userland/Services/WebContent
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2022-04-01 20:58:27 +0300
committerLinus Groh <mail@linusgroh.de>2022-04-01 21:24:45 +0100
commit086969277e74d8ba065bf8145d3aeb0dec0bfee5 (patch)
tree02b3699a66735ef806d9b46353491f18f8e4e7b4 /Userland/Services/WebContent
parent0376c127f6e98e03607700d0b3f5154b7014b2f8 (diff)
downloadserenity-086969277e74d8ba065bf8145d3aeb0dec0bfee5.zip
Everywhere: Run clang-format
Diffstat (limited to 'Userland/Services/WebContent')
-rw-r--r--Userland/Services/WebContent/ConnectionFromClient.cpp26
-rw-r--r--Userland/Services/WebContent/ConnectionFromClient.h2
-rw-r--r--Userland/Services/WebContent/PageHost.cpp32
-rw-r--r--Userland/Services/WebContent/PageHost.h38
4 files changed, 49 insertions, 49 deletions
diff --git a/Userland/Services/WebContent/ConnectionFromClient.cpp b/Userland/Services/WebContent/ConnectionFromClient.cpp
index 6bd2887e70..a2c5891cae 100644
--- a/Userland/Services/WebContent/ConnectionFromClient.cpp
+++ b/Userland/Services/WebContent/ConnectionFromClient.cpp
@@ -51,12 +51,12 @@ Web::Page& ConnectionFromClient::page()
return m_page_host->page();
}
-const Web::Page& ConnectionFromClient::page() const
+Web::Page const& ConnectionFromClient::page() const
{
return m_page_host->page();
}
-void ConnectionFromClient::update_system_theme(const Core::AnonymousBuffer& theme_buffer)
+void ConnectionFromClient::update_system_theme(Core::AnonymousBuffer const& theme_buffer)
{
Gfx::set_system_theme(theme_buffer);
auto impl = Gfx::PaletteImpl::create_with_anonymous_buffer(theme_buffer);
@@ -69,7 +69,7 @@ void ConnectionFromClient::update_system_fonts(String const& default_font_query,
Gfx::FontDatabase::set_fixed_width_font_query(fixed_width_font_query);
}
-void ConnectionFromClient::update_screen_rects(const Vector<Gfx::IntRect>& rects, u32 main_screen)
+void ConnectionFromClient::update_screen_rects(Vector<Gfx::IntRect> const& rects, u32 main_screen)
{
m_page_host->set_screen_rects(rects, main_screen);
}
@@ -89,19 +89,19 @@ void ConnectionFromClient::load_url(const URL& url)
page().load(url);
}
-void ConnectionFromClient::load_html(const String& html, const URL& url)
+void ConnectionFromClient::load_html(String const& html, const URL& url)
{
dbgln_if(SPAM_DEBUG, "handle: WebContentServer::LoadHTML: html={}, url={}", html, url);
page().load_html(html, url);
}
-void ConnectionFromClient::set_viewport_rect(const Gfx::IntRect& rect)
+void ConnectionFromClient::set_viewport_rect(Gfx::IntRect const& rect)
{
dbgln_if(SPAM_DEBUG, "handle: WebContentServer::SetViewportRect: rect={}", rect);
m_page_host->set_viewport_rect(rect);
}
-void ConnectionFromClient::add_backing_store(i32 backing_store_id, const Gfx::ShareableBitmap& bitmap)
+void ConnectionFromClient::add_backing_store(i32 backing_store_id, Gfx::ShareableBitmap const& bitmap)
{
m_backing_stores.set(backing_store_id, *bitmap.bitmap());
}
@@ -111,7 +111,7 @@ void ConnectionFromClient::remove_backing_store(i32 backing_store_id)
m_backing_stores.remove(backing_store_id);
}
-void ConnectionFromClient::paint(const Gfx::IntRect& content_rect, i32 backing_store_id)
+void ConnectionFromClient::paint(Gfx::IntRect const& content_rect, i32 backing_store_id)
{
for (auto& pending_paint : m_pending_paint_requests) {
if (pending_paint.bitmap_id == backing_store_id) {
@@ -140,22 +140,22 @@ void ConnectionFromClient::flush_pending_paint_requests()
m_pending_paint_requests.clear();
}
-void ConnectionFromClient::mouse_down(const Gfx::IntPoint& position, unsigned int button, [[maybe_unused]] unsigned int buttons, unsigned int modifiers)
+void ConnectionFromClient::mouse_down(Gfx::IntPoint const& position, unsigned int button, [[maybe_unused]] unsigned int buttons, unsigned int modifiers)
{
page().handle_mousedown(position, button, modifiers);
}
-void ConnectionFromClient::mouse_move(const Gfx::IntPoint& position, [[maybe_unused]] unsigned int button, unsigned int buttons, unsigned int modifiers)
+void ConnectionFromClient::mouse_move(Gfx::IntPoint const& position, [[maybe_unused]] unsigned int button, unsigned int buttons, unsigned int modifiers)
{
page().handle_mousemove(position, buttons, modifiers);
}
-void ConnectionFromClient::mouse_up(const Gfx::IntPoint& position, unsigned int button, [[maybe_unused]] unsigned int buttons, unsigned int modifiers)
+void ConnectionFromClient::mouse_up(Gfx::IntPoint const& position, unsigned int button, [[maybe_unused]] unsigned int buttons, unsigned int modifiers)
{
page().handle_mouseup(position, button, modifiers);
}
-void ConnectionFromClient::mouse_wheel(const Gfx::IntPoint& position, unsigned int button, [[maybe_unused]] unsigned int buttons, unsigned int modifiers, i32 wheel_delta_x, i32 wheel_delta_y)
+void ConnectionFromClient::mouse_wheel(Gfx::IntPoint const& position, unsigned int button, [[maybe_unused]] unsigned int buttons, unsigned int modifiers, i32 wheel_delta_x, i32 wheel_delta_y)
{
page().handle_mousewheel(position, button, modifiers, wheel_delta_x, wheel_delta_y);
}
@@ -170,7 +170,7 @@ void ConnectionFromClient::key_up(i32 key, unsigned int modifiers, u32 code_poin
page().handle_keyup((KeyCode)key, modifiers, code_point);
}
-void ConnectionFromClient::debug_request(const String& request, const String& argument)
+void ConnectionFromClient::debug_request(String const& request, String const& argument)
{
if (request == "dump-dom-tree") {
if (auto* doc = page().top_level_browsing_context().active_document())
@@ -384,7 +384,7 @@ void ConnectionFromClient::initialize_js_console(Badge<PageHost>)
interpreter->global_object().console().set_client(*m_console_client.ptr());
}
-void ConnectionFromClient::js_console_input(const String& js_source)
+void ConnectionFromClient::js_console_input(String const& js_source)
{
if (m_console_client)
m_console_client->handle_input(js_source);
diff --git a/Userland/Services/WebContent/ConnectionFromClient.h b/Userland/Services/WebContent/ConnectionFromClient.h
index f0a4a3f34b..00063a939b 100644
--- a/Userland/Services/WebContent/ConnectionFromClient.h
+++ b/Userland/Services/WebContent/ConnectionFromClient.h
@@ -35,7 +35,7 @@ private:
explicit ConnectionFromClient(NonnullOwnPtr<Core::Stream::LocalSocket>);
Web::Page& page();
- const Web::Page& page() const;
+ Web::Page const& page() const;
virtual void update_system_theme(Core::AnonymousBuffer const&) override;
virtual void update_system_fonts(String const&, String const&) override;
diff --git a/Userland/Services/WebContent/PageHost.cpp b/Userland/Services/WebContent/PageHost.cpp
index de45226257..e7cd81d63b 100644
--- a/Userland/Services/WebContent/PageHost.cpp
+++ b/Userland/Services/WebContent/PageHost.cpp
@@ -50,7 +50,7 @@ Gfx::Palette PageHost::palette() const
return Gfx::Palette(*m_palette_impl);
}
-void PageHost::set_palette_impl(const Gfx::PaletteImpl& impl)
+void PageHost::set_palette_impl(Gfx::PaletteImpl const& impl)
{
m_palette_impl = impl;
}
@@ -75,7 +75,7 @@ Web::Layout::InitialContainingBlock* PageHost::layout_root()
return document->layout_node();
}
-void PageHost::paint(const Gfx::IntRect& content_rect, Gfx::Bitmap& target)
+void PageHost::paint(Gfx::IntRect const& content_rect, Gfx::Bitmap& target)
{
Gfx::Painter painter(target);
Gfx::IntRect bitmap_rect { {}, content_rect.size() };
@@ -96,7 +96,7 @@ void PageHost::paint(const Gfx::IntRect& content_rect, Gfx::Bitmap& target)
layout_root->paint_all_phases(context);
}
-void PageHost::set_viewport_rect(const Gfx::IntRect& rect)
+void PageHost::set_viewport_rect(Gfx::IntRect const& rect)
{
page().top_level_browsing_context().set_viewport_rect(rect);
}
@@ -130,7 +130,7 @@ void PageHost::page_did_layout()
m_client.async_did_layout(content_size);
}
-void PageHost::page_did_change_title(const String& title)
+void PageHost::page_did_change_title(String const& title)
{
m_client.async_did_change_title(title);
}
@@ -145,12 +145,12 @@ void PageHost::page_did_request_scroll_to(Gfx::IntPoint const& scroll_position)
m_client.async_did_request_scroll_to(scroll_position);
}
-void PageHost::page_did_request_scroll_into_view(const Gfx::IntRect& rect)
+void PageHost::page_did_request_scroll_into_view(Gfx::IntRect const& rect)
{
m_client.async_did_request_scroll_into_view(rect);
}
-void PageHost::page_did_enter_tooltip_area(const Gfx::IntPoint& content_position, const String& title)
+void PageHost::page_did_enter_tooltip_area(Gfx::IntPoint const& content_position, String const& title)
{
m_client.async_did_enter_tooltip_area(content_position, title);
}
@@ -170,12 +170,12 @@ void PageHost::page_did_unhover_link()
m_client.async_did_unhover_link();
}
-void PageHost::page_did_click_link(const URL& url, const String& target, unsigned modifiers)
+void PageHost::page_did_click_link(const URL& url, String const& target, unsigned modifiers)
{
m_client.async_did_click_link(url, target, modifiers);
}
-void PageHost::page_did_middle_click_link(const URL& url, [[maybe_unused]] const String& target, [[maybe_unused]] unsigned modifiers)
+void PageHost::page_did_middle_click_link(const URL& url, [[maybe_unused]] String const& target, [[maybe_unused]] unsigned modifiers)
{
m_client.async_did_middle_click_link(url, target, modifiers);
}
@@ -193,17 +193,17 @@ void PageHost::page_did_finish_loading(const URL& url)
m_client.async_did_finish_loading(url);
}
-void PageHost::page_did_request_context_menu(const Gfx::IntPoint& content_position)
+void PageHost::page_did_request_context_menu(Gfx::IntPoint const& content_position)
{
m_client.async_did_request_context_menu(content_position);
}
-void PageHost::page_did_request_link_context_menu(const Gfx::IntPoint& content_position, const URL& url, const String& target, unsigned modifiers)
+void PageHost::page_did_request_link_context_menu(Gfx::IntPoint const& content_position, const URL& url, String const& target, unsigned modifiers)
{
m_client.async_did_request_link_context_menu(content_position, url, target, modifiers);
}
-void PageHost::page_did_request_alert(const String& message)
+void PageHost::page_did_request_alert(String const& message)
{
auto response = m_client.send_sync_but_allow_failure<Messages::WebContentClient::DidRequestAlert>(message);
if (!response) {
@@ -212,7 +212,7 @@ void PageHost::page_did_request_alert(const String& message)
}
}
-bool PageHost::page_did_request_confirm(const String& message)
+bool PageHost::page_did_request_confirm(String const& message)
{
auto response = m_client.send_sync_but_allow_failure<Messages::WebContentClient::DidRequestConfirm>(message);
if (!response) {
@@ -222,7 +222,7 @@ bool PageHost::page_did_request_confirm(const String& message)
return response->take_result();
}
-String PageHost::page_did_request_prompt(const String& message, const String& default_)
+String PageHost::page_did_request_prompt(String const& message, String const& default_)
{
auto response = m_client.send_sync_but_allow_failure<Messages::WebContentClient::DidRequestPrompt>(message, default_);
if (!response) {
@@ -232,12 +232,12 @@ String PageHost::page_did_request_prompt(const String& message, const String& de
return response->take_response();
}
-void PageHost::page_did_change_favicon(const Gfx::Bitmap& favicon)
+void PageHost::page_did_change_favicon(Gfx::Bitmap const& favicon)
{
m_client.async_did_change_favicon(favicon.to_shareable_bitmap());
}
-void PageHost::page_did_request_image_context_menu(const Gfx::IntPoint& content_position, const URL& url, const String& target, unsigned modifiers, const Gfx::Bitmap* bitmap_pointer)
+void PageHost::page_did_request_image_context_menu(Gfx::IntPoint const& content_position, const URL& url, String const& target, unsigned modifiers, Gfx::Bitmap const* bitmap_pointer)
{
auto bitmap = bitmap_pointer ? bitmap_pointer->to_shareable_bitmap() : Gfx::ShareableBitmap();
m_client.async_did_request_image_context_menu(content_position, url, target, modifiers, bitmap);
@@ -253,7 +253,7 @@ String PageHost::page_did_request_cookie(const URL& url, Web::Cookie::Source sou
return response->take_cookie();
}
-void PageHost::page_did_set_cookie(const URL& url, const Web::Cookie::ParsedCookie& cookie, Web::Cookie::Source source)
+void PageHost::page_did_set_cookie(const URL& url, Web::Cookie::ParsedCookie const& cookie, Web::Cookie::Source source)
{
m_client.async_did_set_cookie(url, cookie, static_cast<u8>(source));
}
diff --git a/Userland/Services/WebContent/PageHost.h b/Userland/Services/WebContent/PageHost.h
index 6ccc38d04c..a9815f2fec 100644
--- a/Userland/Services/WebContent/PageHost.h
+++ b/Userland/Services/WebContent/PageHost.h
@@ -22,13 +22,13 @@ public:
virtual ~PageHost() = default;
Web::Page& page() { return *m_page; }
- const Web::Page& page() const { return *m_page; }
+ Web::Page const& page() const { return *m_page; }
- void paint(const Gfx::IntRect& content_rect, Gfx::Bitmap&);
+ void paint(Gfx::IntRect const& content_rect, Gfx::Bitmap&);
- void set_palette_impl(const Gfx::PaletteImpl&);
- void set_viewport_rect(const Gfx::IntRect&);
- void set_screen_rects(const Vector<Gfx::IntRect, 4>& rects, size_t main_screen_index) { m_screen_rect = rects[main_screen_index]; };
+ void set_palette_impl(Gfx::PaletteImpl const&);
+ void set_viewport_rect(Gfx::IntRect const&);
+ void set_screen_rects(Vector<Gfx::IntRect, 4> const& rects, size_t main_screen_index) { m_screen_rect = rects[main_screen_index]; };
void set_preferred_color_scheme(Web::CSS::PreferredColorScheme);
void set_should_show_line_box_borders(bool b) { m_should_show_line_box_borders = b; }
@@ -40,31 +40,31 @@ private:
virtual Gfx::Palette palette() const override;
virtual Gfx::IntRect screen_rect() const override { return m_screen_rect; }
virtual Web::CSS::PreferredColorScheme preferred_color_scheme() const override { return m_preferred_color_scheme; }
- virtual void page_did_invalidate(const Gfx::IntRect&) override;
+ virtual void page_did_invalidate(Gfx::IntRect const&) override;
virtual void page_did_change_selection() override;
virtual void page_did_request_cursor_change(Gfx::StandardCursor) override;
virtual void page_did_layout() override;
- virtual void page_did_change_title(const String&) override;
+ virtual void page_did_change_title(String const&) override;
virtual void page_did_request_scroll(i32, i32) override;
virtual void page_did_request_scroll_to(Gfx::IntPoint const&) override;
- virtual void page_did_request_scroll_into_view(const Gfx::IntRect&) override;
- virtual void page_did_enter_tooltip_area(const Gfx::IntPoint&, const String&) override;
+ virtual void page_did_request_scroll_into_view(Gfx::IntRect const&) override;
+ virtual void page_did_enter_tooltip_area(Gfx::IntPoint const&, String const&) override;
virtual void page_did_leave_tooltip_area() override;
virtual void page_did_hover_link(const URL&) override;
virtual void page_did_unhover_link() 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_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_click_link(const URL&, String const& target, unsigned modifiers) override;
+ virtual void page_did_middle_click_link(const URL&, String const& target, unsigned modifiers) override;
+ virtual void page_did_request_context_menu(Gfx::IntPoint const&) override;
+ virtual void page_did_request_link_context_menu(Gfx::IntPoint const&, const URL&, String const& target, unsigned modifiers) override;
virtual void page_did_start_loading(const URL&) override;
virtual void page_did_finish_loading(const URL&) override;
- virtual void page_did_request_alert(const String&) override;
- virtual bool page_did_request_confirm(const String&) override;
- virtual String page_did_request_prompt(const String&, const String&) override;
- virtual void page_did_change_favicon(const Gfx::Bitmap&) 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_request_alert(String const&) override;
+ virtual bool page_did_request_confirm(String const&) override;
+ virtual String page_did_request_prompt(String const&, String const&) override;
+ virtual void page_did_change_favicon(Gfx::Bitmap const&) override;
+ virtual void page_did_request_image_context_menu(Gfx::IntPoint const&, const URL&, String const& target, unsigned modifiers, Gfx::Bitmap const*) override;
virtual String page_did_request_cookie(const URL&, Web::Cookie::Source) override;
- virtual void page_did_set_cookie(const URL&, const Web::Cookie::ParsedCookie&, Web::Cookie::Source) override;
+ virtual void page_did_set_cookie(const URL&, Web::Cookie::ParsedCookie const&, Web::Cookie::Source) override;
virtual void page_did_update_resource_count(i32) override;
explicit PageHost(ConnectionFromClient&);