1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:24:57 +00:00

Browser+LibWebView: Run with the JavaScript bytecode VM by default

The AST interpreter is still available behind a new `--ast` flag.
This commit is contained in:
Andreas Kling 2023-07-25 17:42:22 +02:00
parent c3e5487f00
commit a3e97ea153
9 changed files with 25 additions and 7 deletions

View file

@ -57,9 +57,10 @@ static DeprecatedString search_engines_file_path()
return builder.to_deprecated_string();
}
BrowserWindow::BrowserWindow(CookieJar& cookie_jar, URL url)
BrowserWindow::BrowserWindow(CookieJar& cookie_jar, URL url, WebView::UseJavaScriptBytecode use_javascript_bytecode)
: 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);
@ -563,7 +564,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"_short_string, *this);
auto& new_tab = m_tab_widget->add_tab<Browser::Tab>("New tab"_short_string, *this, m_use_javascript_bytecode);
m_tab_widget->set_bar_visible(!is_fullscreen() && m_tab_widget->children().size() > 1);