mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
LibWebView+UI: Migrate some UI process init to LibWebView
No need to do this setup in every UI's main().
This commit is contained in:
Notes:
github-actions[bot]
2025-06-11 11:27:28 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/39da2d9a2fb Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5054
@@ -711,14 +711,11 @@ static ErrorOr<int> run_tests(Core::AnonymousBuffer const& theme, Web::DevicePix
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
#if defined(LADYBIRD_BINARY_PATH)
|
||||
WebView::platform_init(LADYBIRD_BINARY_PATH);
|
||||
auto app = TRY(TestWeb::Application::create(arguments, LADYBIRD_BINARY_PATH));
|
||||
#else
|
||||
WebView::platform_init();
|
||||
auto app = TRY(TestWeb::Application::create(arguments, OptionalNone {}));
|
||||
#endif
|
||||
|
||||
auto app = TestWeb::Application::create(arguments);
|
||||
TRY(app->launch_services());
|
||||
|
||||
auto theme_path = LexicalPath::join(WebView::s_ladybird_resource_root, "themes"sv, "Default.ini"sv);
|
||||
auto theme = TRY(Gfx::load_system_theme(theme_path.string()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user