summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2023-03-13 07:34:01 -0400
committerLinus Groh <mail@linusgroh.de>2023-03-13 12:41:10 +0000
commit50cef4708cfa641d71697c1683e5ff73883af1c4 (patch)
tree64b983d5bfa585f0fbf4ce0728dbaaf1204a51fe
parent127d2e20987d6fbfce3eb2243361371a724b6263 (diff)
downloadserenity-50cef4708cfa641d71697c1683e5ff73883af1c4.zip
Ladybird: Remove the mode to dump the layout tree
This use case is now handled by headless-browser.
-rw-r--r--Ladybird/main.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/Ladybird/main.cpp b/Ladybird/main.cpp
index f4b02b2157..4f04b9e7d9 100644
--- a/Ladybird/main.cpp
+++ b/Ladybird/main.cpp
@@ -67,13 +67,11 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
StringView raw_url;
StringView webdriver_content_ipc_path;
- bool dump_layout_tree = false;
Core::ArgsParser args_parser;
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_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);
auto get_formatted_url = [&](StringView const& raw_url) -> URL {
@@ -85,22 +83,6 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
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_client = TRY(SQL::SQLClient::launch_server_and_create_client(move(sql_server_paths)));
auto database = TRY(Browser::Database::create(move(sql_client)));