1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 05:07:35 +00:00

Ladybird+LibWebView+Browser: Remove ability to run with AST interpreter

This commit is contained in:
Andreas Kling 2023-08-07 16:44:20 +02:00
parent e769776bdd
commit 99ac34eeae
24 changed files with 28 additions and 68 deletions

View file

@ -57,10 +57,9 @@ static DeprecatedString search_engines_file_path()
return builder.to_deprecated_string();
}
BrowserWindow::BrowserWindow(CookieJar& cookie_jar, URL url, WebView::UseJavaScriptBytecode use_javascript_bytecode)
BrowserWindow::BrowserWindow(CookieJar& cookie_jar, URL url)
: m_cookie_jar(cookie_jar)
, m_window_actions(*this)
, m_use_javascript_bytecode(use_javascript_bytecode)
{
auto app_icon = GUI::Icon::default_icon("app-browser"sv);
m_bookmarks_bar = Browser::BookmarksBarWidget::construct(Browser::bookmarks_file_path(), true);
@ -564,7 +563,7 @@ void BrowserWindow::set_window_title_for_tab(Tab const& tab)
Tab& BrowserWindow::create_new_tab(URL url, Web::HTML::ActivateTab activate)
{
auto& new_tab = m_tab_widget->add_tab<Browser::Tab>("New tab"_string, *this, m_use_javascript_bytecode);
auto& new_tab = m_tab_widget->add_tab<Browser::Tab>("New tab"_string, *this);
m_tab_widget->set_bar_visible(!is_fullscreen() && m_tab_widget->children().size() > 1);

View file

@ -51,7 +51,7 @@ public:
void broadcast_window_size(Gfx::IntSize);
private:
BrowserWindow(CookieJar&, URL, WebView::UseJavaScriptBytecode);
BrowserWindow(CookieJar&, URL);
void build_menus();
ErrorOr<void> load_search_engines(GUI::Menu& settings_menu);
@ -87,8 +87,6 @@ private:
RefPtr<GUI::Action> m_disable_user_agent_spoofing;
RefPtr<GUI::Action> m_disable_search_engine_action;
RefPtr<GUI::Action> m_change_homepage_action;
WebView::UseJavaScriptBytecode m_use_javascript_bytecode {};
};
}

View file

@ -114,7 +114,7 @@ void Tab::update_status(Optional<String> text_override, i32 count_waiting)
}
}
Tab::Tab(BrowserWindow& window, WebView::UseJavaScriptBytecode use_javascript_bytecode)
Tab::Tab(BrowserWindow& window)
{
load_from_gml(tab_gml).release_value_but_fixme_should_propagate_errors();
@ -123,7 +123,7 @@ Tab::Tab(BrowserWindow& window, WebView::UseJavaScriptBytecode use_javascript_by
auto& webview_container = *find_descendant_of_type_named<GUI::Widget>("webview_container");
m_web_content_view = webview_container.add<WebView::OutOfProcessWebView>(use_javascript_bytecode);
m_web_content_view = webview_container.add<WebView::OutOfProcessWebView>();
auto preferred_color_scheme = Web::CSS::preferred_color_scheme_from_string(Config::read_string("Browser"sv, "Preferences"sv, "ColorScheme"sv, Browser::default_color_scheme));
m_web_content_view->set_preferred_color_scheme(preferred_color_scheme);

View file

@ -99,7 +99,7 @@ public:
WebView::OutOfProcessWebView& view() { return *m_web_content_view; }
private:
Tab(BrowserWindow&, WebView::UseJavaScriptBytecode);
explicit Tab(BrowserWindow&);
virtual void show_event(GUI::ShowEvent&) override;
virtual void hide_event(GUI::HideEvent&) override;

View file

@ -173,7 +173,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
first_url = TRY(url_from_argument_string(specified_urls.first()));
auto cookie_jar = TRY(Browser::CookieJar::create(*database));
auto window = Browser::BrowserWindow::construct(cookie_jar, first_url, WebView::UseJavaScriptBytecode::Yes);
auto window = Browser::BrowserWindow::construct(cookie_jar, first_url);
auto content_filters_watcher = TRY(Core::FileWatcher::create());
content_filters_watcher->on_change = [&](Core::FileWatcherEvent const&) {