mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-23 00:19:18 +00: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:
parent
6430b215af
commit
39da2d9a2f
Notes:
github-actions[bot]
2025-06-11 11:27:28 +00:00
Author: https://github.com/trflynn89
Commit: 39da2d9a2f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5054
10 changed files with 80 additions and 91 deletions
|
@ -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()));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue