mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:47:44 +00:00
Ladybird: Remove the mode to dump the layout tree
This use case is now handled by headless-browser.
This commit is contained in:
parent
127d2e2098
commit
50cef4708c
1 changed files with 0 additions and 18 deletions
|
@ -67,13 +67,11 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
|
|
||||||
StringView raw_url;
|
StringView raw_url;
|
||||||
StringView webdriver_content_ipc_path;
|
StringView webdriver_content_ipc_path;
|
||||||
bool dump_layout_tree = false;
|
|
||||||
|
|
||||||
Core::ArgsParser args_parser;
|
Core::ArgsParser args_parser;
|
||||||
args_parser.set_general_help("The Ladybird web browser :^)");
|
args_parser.set_general_help("The Ladybird web browser :^)");
|
||||||
args_parser.add_positional_argument(raw_url, "URL to open", "url", Core::ArgsParser::Required::No);
|
args_parser.add_positional_argument(raw_url, "URL to open", "url", Core::ArgsParser::Required::No);
|
||||||
args_parser.add_option(webdriver_content_ipc_path, "Path to WebDriver IPC for WebContent", "webdriver-content-path", 0, "path");
|
args_parser.add_option(webdriver_content_ipc_path, "Path to WebDriver IPC for WebContent", "webdriver-content-path", 0, "path");
|
||||||
args_parser.add_option(dump_layout_tree, "Dump layout tree and exit", "dump-layout-tree", 'd');
|
|
||||||
args_parser.parse(arguments);
|
args_parser.parse(arguments);
|
||||||
|
|
||||||
auto get_formatted_url = [&](StringView const& raw_url) -> URL {
|
auto get_formatted_url = [&](StringView const& raw_url) -> URL {
|
||||||
|
@ -85,22 +83,6 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
return url;
|
return url;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (dump_layout_tree) {
|
|
||||||
WebContentView view({});
|
|
||||||
view.set_viewport_rect(Gfx::IntRect({}, { 800, 600 }));
|
|
||||||
view.on_load_finish = [&](auto&) {
|
|
||||||
auto dump = view.dump_layout_tree().release_value_but_fixme_should_propagate_errors();
|
|
||||||
outln("{}", dump);
|
|
||||||
fflush(stdout);
|
|
||||||
|
|
||||||
event_loop.quit(0);
|
|
||||||
app.quit();
|
|
||||||
};
|
|
||||||
|
|
||||||
view.load(get_formatted_url(raw_url));
|
|
||||||
return app.exec();
|
|
||||||
}
|
|
||||||
|
|
||||||
auto sql_server_paths = TRY(get_paths_for_helper_process("SQLServer"sv));
|
auto sql_server_paths = TRY(get_paths_for_helper_process("SQLServer"sv));
|
||||||
auto sql_client = TRY(SQL::SQLClient::launch_server_and_create_client(move(sql_server_paths)));
|
auto sql_client = TRY(SQL::SQLClient::launch_server_and_create_client(move(sql_server_paths)));
|
||||||
auto database = TRY(Browser::Database::create(move(sql_client)));
|
auto database = TRY(Browser::Database::create(move(sql_client)));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue