Skip to content

Truly independent web browser

LibWebView: Remove unused frontend APIs and state

Andreas Klingad90b3b27a27
diff --git a/Libraries/LibWebView/Application.h b/Libraries/LibWebView/Application.h
index 0bfc466c7b5..8e6ba20cd9d 100644
--- a/Libraries/LibWebView/Application.h
+++ b/Libraries/LibWebView/Application.h
@@ -123,7 +123,6 @@ public:
static ErrorOr<NonnullRefPtr<Requests::RequestClient>> request_server_client(IsPrivate = IsPrivate::No);
// The control connection of the default session's RequestServer with no site.
static Requests::RequestControlClient& request_server_control_client();
- static bool has_request_server_control_client() { return the().m_request_server_manager; }
#if defined(HAVE_WASM_COMPILER_SERVICE)
static WasmCompilerClient::Client& wasm_compiler_client() { return *the().m_wasm_compiler_client; }
#endif
@@ -156,7 +155,6 @@ public:
static BookmarkStore& bookmark_store() { return *the().m_bookmark_store; }
void update_bookmark_action_for_current_web_view();
void bookmarks_changed(Badge<ApplicationBookmarkStoreObserver>);
- void show_bookmarks_bar_changed(Badge<ApplicationSettingsObserver>);
void background_networking_settings_changed(Badge<ApplicationSettingsObserver>);
diff --git a/Libraries/LibWebView/ViewImplementation.cpp b/Libraries/LibWebView/ViewImplementation.cpp
index be602d8b696..c0f5f0f6169 100644
--- a/Libraries/LibWebView/ViewImplementation.cpp
+++ b/Libraries/LibWebView/ViewImplementation.cpp
@@ -1162,8 +1162,6 @@ void ViewImplementation::send_preferences_to_page(WebContentPage& page)
page.async_set_preferred_motion(m_preferred_motion);
page.async_set_preferred_languages(Application::settings().languages());
page.async_set_zoom_level(m_zoom_level);
- if (m_user_style_sheet.has_value())
- page.async_set_user_style(*m_user_style_sheet);
send_browsing_behavior(page);
send_autoplay_settings(page);
send_global_privacy_control(page);
@@ -3929,14 +3927,6 @@ ErrorOr<LexicalPath> ViewImplementation::dump_gc_graph()
return path;
}
-void ViewImplementation::set_user_style_sheet(String const& source)
-{
- m_user_style_sheet = source;
- traversable().for_each_hosting_page([&](WebContentPage& page) {
- page.async_set_user_style(source);
- });
-}
-
void ViewImplementation::initialize_context_menus()
{
auto& application = Application::the();
diff --git a/Libraries/LibWebView/ViewImplementation.h b/Libraries/LibWebView/ViewImplementation.h
index 2082761c691..e39a41f6068 100644
--- a/Libraries/LibWebView/ViewImplementation.h
+++ b/Libraries/LibWebView/ViewImplementation.h
@@ -399,7 +399,6 @@ public:
void did_change_audio_play_state(Badge<WebContentPage>, Web::HTML::AudioPlayState);
Web::HTML::AudioPlayState audio_play_state() const { return m_audio_play_state; }
void did_change_screen_wake_lock_state(Badge<WebContentPage>, Web::ScreenWakeLockState);
- Web::ScreenWakeLockState screen_wake_lock_state() const { return m_screen_wake_lock_state; }
void did_reset_session_history_for_testing(Badge<WebContentPage>, Web::HTML::SessionHistoryEntryDescriptor);
bool capture_session_history_snapshot_for_testing(Badge<WebContentPage>);
@@ -445,8 +444,6 @@ public:
ErrorOr<LexicalPath> dump_gc_graph();
- void set_user_style_sheet(String const& source);
-
void request_close();
void request_close_preflight(Function<void(bool)> on_complete);
void did_complete_close_preflight(Badge<WebContentPage>, u64 request_id, bool approved);
@@ -894,7 +891,6 @@ protected:
Optional<Gfx::IntSize> m_window_size;
Web::CSS::PreferredContrast m_preferred_contrast { Web::CSS::PreferredContrast::Auto };
Web::CSS::PreferredMotion m_preferred_motion { Web::CSS::PreferredMotion::Auto };
- Optional<String> m_user_style_sheet;
HistoryVisitTransition m_history_visit_transition_for_current_load { HistoryVisitTransition::Link };
HistoryVisitTransition m_history_visit_transition_for_next_load { HistoryVisitTransition::Link };
diff --git a/Libraries/LibWebView/WebContentClient.h b/Libraries/LibWebView/WebContentClient.h
index 0c2867f79ec..2e413e5e794 100644
--- a/Libraries/LibWebView/WebContentClient.h
+++ b/Libraries/LibWebView/WebContentClient.h
@@ -160,7 +160,6 @@ public:
Web::CompositorContextId compositor_context_id_for_page(WebContentPage const&);
Web::CompositorContextId allocate_compositor_context(Web::PageId page_id, Web::PagePresentationRegistration);
Optional<Web::PageId> page_id_for_compositor_context_id(Web::CompositorContextId) const;
- void close_if_unused(Badge<CanonicalNavigable>) { close_server_if_unused(); }
bool has_requested_close() const { return m_requested_close; }
pid_t pid() const { return m_process_handle.pid; }