LibWeb+LibWebView+WebContent: Convert URL declarations to east-const

This commit is contained in:
Timothy Flynn 2024-03-28 22:02:55 -04:00 committed by Tim Flynn
parent cd73878d8c
commit 1767f405dc
Notes: sideshowbarker 2024-07-17 05:21:12 +09:00
5 changed files with 31 additions and 31 deletions

View file

@ -56,7 +56,7 @@ void Page::set_focused_browsing_context(Badge<EventHandler>, HTML::BrowsingConte
m_focused_context = browsing_context.make_weak_ptr();
}
void Page::load(const URL::URL& url)
void Page::load(URL::URL const& url)
{
(void)top_level_traversable()->navigate({ .url = url, .source_document = *top_level_traversable()->active_document(), .user_involvement = HTML::UserNavigationInvolvement::BrowserUI });
}

View file

@ -70,7 +70,7 @@ public:
void set_focused_browsing_context(Badge<EventHandler>, HTML::BrowsingContext&);
void load(const URL::URL&);
void load(URL::URL const&);
void load_html(StringView);
@ -245,19 +245,19 @@ public:
virtual Gfx::IntRect page_did_request_maximize_window() { return {}; }
virtual Gfx::IntRect page_did_request_minimize_window() { return {}; }
virtual Gfx::IntRect page_did_request_fullscreen_window() { return {}; }
virtual void page_did_start_loading(const URL::URL&, bool is_redirect) { (void)is_redirect; }
virtual void page_did_start_loading(URL::URL const&, bool is_redirect) { (void)is_redirect; }
virtual void page_did_create_new_document(Web::DOM::Document&) { }
virtual void page_did_destroy_document(Web::DOM::Document&) { }
virtual void page_did_finish_loading(const URL::URL&) { }
virtual void page_did_finish_loading(URL::URL const&) { }
virtual void page_did_request_cursor_change(Gfx::StandardCursor) { }
virtual void page_did_request_context_menu(CSSPixelPoint) { }
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_media_context_menu(CSSPixelPoint, [[maybe_unused]] ByteString const& target, [[maybe_unused]] unsigned modifiers, Page::MediaContextMenu) { }
virtual void page_did_middle_click_link(const URL::URL&, [[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_enter_tooltip_area(CSSPixelPoint, ByteString const&) { }
virtual void page_did_leave_tooltip_area() { }
virtual void page_did_hover_link(const URL::URL&) { }
virtual void page_did_hover_link(URL::URL const&) { }
virtual void page_did_unhover_link() { }
virtual void page_did_change_favicon(Gfx::Bitmap const&) { }
virtual void page_did_layout() { }
@ -271,8 +271,8 @@ public:
virtual void page_did_request_dismiss_dialog() { }
virtual Vector<Web::Cookie::Cookie> page_did_request_all_cookies(URL::URL const&) { return {}; }
virtual Optional<Web::Cookie::Cookie> page_did_request_named_cookie(URL::URL const&, String const&) { return {}; }
virtual String page_did_request_cookie(const URL::URL&, Cookie::Source) { return {}; }
virtual void page_did_set_cookie(const URL::URL&, Cookie::ParsedCookie const&, Cookie::Source) { }
virtual String page_did_request_cookie(URL::URL const&, Cookie::Source) { return {}; }
virtual void page_did_set_cookie(URL::URL const&, Cookie::ParsedCookie const&, Cookie::Source) { }
virtual void page_did_update_cookie(Web::Cookie::Cookie) { }
virtual void page_did_update_resource_count(i32) { }
struct NewWebViewResult {

View file

@ -128,16 +128,16 @@ public:
Function<void()> on_activate_tab;
Function<void()> on_close;
Function<void(Gfx::IntPoint screen_position)> on_context_menu_request;
Function<void(const URL::URL&, Gfx::IntPoint screen_position)> on_link_context_menu_request;
Function<void(const URL::URL&, Gfx::IntPoint screen_position, Gfx::ShareableBitmap const&)> on_image_context_menu_request;
Function<void(URL::URL const&, Gfx::IntPoint screen_position)> on_link_context_menu_request;
Function<void(URL::URL const&, Gfx::IntPoint screen_position, Gfx::ShareableBitmap const&)> on_image_context_menu_request;
Function<void(Gfx::IntPoint screen_position, Web::Page::MediaContextMenu const&)> on_media_context_menu_request;
Function<void(const URL::URL&)> on_link_hover;
Function<void(URL::URL const&)> on_link_hover;
Function<void()> on_link_unhover;
Function<void(const URL::URL&, ByteString const& target, unsigned modifiers)> on_link_click;
Function<void(const URL::URL&, ByteString const& target, unsigned modifiers)> on_link_middle_click;
Function<void(URL::URL const&, ByteString const& target, unsigned modifiers)> on_link_click;
Function<void(URL::URL const&, ByteString const& target, unsigned modifiers)> on_link_middle_click;
Function<void(ByteString const&)> on_title_change;
Function<void(const URL::URL&, bool)> on_load_start;
Function<void(const URL::URL&)> on_load_finish;
Function<void(URL::URL const&, bool)> on_load_start;
Function<void(URL::URL const&)> on_load_finish;
Function<void(ByteString const& path, i32)> on_request_file;
Function<void()> on_navigate_back;
Function<void()> on_navigate_forward;
@ -154,7 +154,7 @@ public:
Function<void(String const& message)> on_request_set_prompt_text;
Function<void()> on_request_accept_dialog;
Function<void()> on_request_dismiss_dialog;
Function<void(const URL::URL&, ByteString const&)> on_received_source;
Function<void(URL::URL const&, ByteString const&)> on_received_source;
Function<void(ByteString const&)> on_received_dom_tree;
Function<void(Optional<DOMNodeProperties>)> on_received_dom_node_properties;
Function<void(ByteString const&)> on_received_accessibility_tree;
@ -165,8 +165,8 @@ public:
Function<void(i32 start_index, Vector<ByteString> const& message_types, Vector<ByteString> const& messages)> on_received_console_messages;
Function<Vector<Web::Cookie::Cookie>(URL::URL const& url)> on_get_all_cookies;
Function<Optional<Web::Cookie::Cookie>(URL::URL const& url, String const& name)> on_get_named_cookie;
Function<String(const URL::URL& url, Web::Cookie::Source source)> on_get_cookie;
Function<void(const URL::URL& url, Web::Cookie::ParsedCookie const& cookie, Web::Cookie::Source source)> on_set_cookie;
Function<String(URL::URL const& url, Web::Cookie::Source source)> on_get_cookie;
Function<void(URL::URL const& url, Web::Cookie::ParsedCookie const& cookie, Web::Cookie::Source source)> on_set_cookie;
Function<void(Web::Cookie::Cookie const& cookie)> on_update_cookie;
Function<void(i32 count_waiting)> on_resource_status_change;
Function<void()> on_restore_window;

View file

@ -326,7 +326,7 @@ void PageClient::page_did_leave_tooltip_area()
client().async_did_leave_tooltip_area(m_id);
}
void PageClient::page_did_hover_link(const URL::URL& url)
void PageClient::page_did_hover_link(URL::URL const& url)
{
client().async_did_hover_link(m_id, url);
}
@ -336,12 +336,12 @@ void PageClient::page_did_unhover_link()
client().async_did_unhover_link(m_id);
}
void PageClient::page_did_middle_click_link(const URL::URL& url, [[maybe_unused]] ByteString const& target, [[maybe_unused]] unsigned modifiers)
void PageClient::page_did_middle_click_link(URL::URL const& url, [[maybe_unused]] ByteString const& target, [[maybe_unused]] unsigned modifiers)
{
client().async_did_middle_click_link(m_id, url, target, modifiers);
}
void PageClient::page_did_start_loading(const URL::URL& url, bool is_redirect)
void PageClient::page_did_start_loading(URL::URL const& url, bool is_redirect)
{
client().async_did_start_loading(m_id, url, is_redirect);
}
@ -356,7 +356,7 @@ void PageClient::page_did_destroy_document(Web::DOM::Document& document)
destroy_js_console(document);
}
void PageClient::page_did_finish_loading(const URL::URL& url)
void PageClient::page_did_finish_loading(URL::URL const& url)
{
client().async_did_finish_loading(m_id, url);
}
@ -482,7 +482,7 @@ Optional<Web::Cookie::Cookie> PageClient::page_did_request_named_cookie(URL::URL
return client().did_request_named_cookie(m_id, url, name);
}
String PageClient::page_did_request_cookie(const URL::URL& url, Web::Cookie::Source source)
String PageClient::page_did_request_cookie(URL::URL const& url, Web::Cookie::Source source)
{
auto response = client().send_sync_but_allow_failure<Messages::WebContentClient::DidRequestCookie>(m_id, move(url), source);
if (!response) {
@ -492,7 +492,7 @@ String PageClient::page_did_request_cookie(const URL::URL& url, Web::Cookie::Sou
return response->take_cookie();
}
void PageClient::page_did_set_cookie(const URL::URL& url, Web::Cookie::ParsedCookie const& cookie, Web::Cookie::Source source)
void PageClient::page_did_set_cookie(URL::URL const& url, Web::Cookie::ParsedCookie const& cookie, Web::Cookie::Source source)
{
auto response = client().send_sync_but_allow_failure<Messages::WebContentClient::DidSetCookie>(m_id, url, cookie, source);
if (!response) {

View file

@ -107,17 +107,17 @@ private:
virtual void page_did_request_scroll_to(Web::CSSPixelPoint) override;
virtual void page_did_enter_tooltip_area(Web::CSSPixelPoint, ByteString const&) override;
virtual void page_did_leave_tooltip_area() override;
virtual void page_did_hover_link(const URL::URL&) override;
virtual void page_did_hover_link(URL::URL const&) override;
virtual void page_did_unhover_link() override;
virtual void page_did_middle_click_link(const URL::URL&, 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_link_context_menu(Web::CSSPixelPoint, URL::URL const&, ByteString const& target, unsigned modifiers) override;
virtual void page_did_request_image_context_menu(Web::CSSPixelPoint, const URL::URL&, ByteString const& target, unsigned modifiers, Gfx::Bitmap const*) override;
virtual void page_did_request_image_context_menu(Web::CSSPixelPoint, URL::URL const&, ByteString const& target, unsigned modifiers, Gfx::Bitmap const*) override;
virtual void page_did_request_media_context_menu(Web::CSSPixelPoint, ByteString const& target, unsigned modifiers, Web::Page::MediaContextMenu) override;
virtual void page_did_start_loading(const URL::URL&, bool) override;
virtual void page_did_start_loading(URL::URL const&, bool) override;
virtual void page_did_create_new_document(Web::DOM::Document&) override;
virtual void page_did_destroy_document(Web::DOM::Document&) override;
virtual void page_did_finish_loading(const URL::URL&) override;
virtual void page_did_finish_loading(URL::URL const&) override;
virtual void page_did_request_alert(String const&) override;
virtual void page_did_request_confirm(String const&) override;
virtual void page_did_request_prompt(String const&, String const&) override;
@ -127,8 +127,8 @@ private:
virtual void page_did_change_favicon(Gfx::Bitmap const&) override;
virtual Vector<Web::Cookie::Cookie> page_did_request_all_cookies(URL::URL const&) override;
virtual Optional<Web::Cookie::Cookie> page_did_request_named_cookie(URL::URL const&, String const&) override;
virtual String page_did_request_cookie(const URL::URL&, Web::Cookie::Source) override;
virtual void page_did_set_cookie(const URL::URL&, Web::Cookie::ParsedCookie const&, Web::Cookie::Source) override;
virtual String page_did_request_cookie(URL::URL const&, Web::Cookie::Source) override;
virtual void page_did_set_cookie(URL::URL const&, Web::Cookie::ParsedCookie const&, Web::Cookie::Source) override;
virtual void page_did_update_cookie(Web::Cookie::Cookie) override;
virtual void page_did_update_resource_count(i32) override;
virtual NewWebViewResult page_did_request_new_web_view(Web::HTML::ActivateTab, Web::HTML::WebViewHints, Web::HTML::TokenizedFeature::NoOpener) override;