LibWebView+UI: Generate the application debug menu

By migrating the debug menu to LibWebView, the AppKit and Qt UIs are now
in sync - the AppKit UI was previously missing some actions.

Further, this inadvertently fixes bugs around applying debug settings to
new web views, especially across site-isolated processes. We were
previously not applying settings appropriately; this now "just works" in
the LibWebView infra.
This commit is contained in:
Timothy Flynn 2025-09-03 09:00:52 -04:00 committed by Tim Flynn
commit 9c99c48f47
Notes: github-actions[bot] 2025-09-11 18:25:07 +00:00
15 changed files with 212 additions and 632 deletions

View file

@ -74,6 +74,10 @@ public:
Action& select_all_action() { return *m_select_all_action; }
Action& view_source_action() { return *m_view_source_action; }
Menu& debug_menu() { return *m_debug_menu; }
void apply_view_options(Badge<ViewImplementation>, ViewImplementation&);
enum class DevtoolsState {
Disabled,
Enabled,
@ -166,6 +170,14 @@ private:
RefPtr<Action> m_select_all_action;
RefPtr<Action> m_view_source_action;
RefPtr<Menu> m_debug_menu;
RefPtr<Action> m_show_line_box_borders_action;
RefPtr<Action> m_enable_scripting_action;
RefPtr<Action> m_enable_content_filtering_action;
RefPtr<Action> m_block_pop_ups_action;
StringView m_user_agent_string;
StringView m_navigator_compatibility_mode;
#if defined(AK_OS_MACOS)
OwnPtr<MachPortServer> m_mach_port_server;
#endif