Browse Source

LibWebView: Remove the DumpLayoutTree program

This program's purpose is now achieved with headless-browser, which has
the added benefit of being runnable outside of Serenity.
Timothy Flynn 2 years ago
parent
commit
d1a1b1ab75

+ 1 - 1
Userland/DevTools/HackStudio/ProjectBuilder.cpp

@@ -167,7 +167,7 @@ DeprecatedString ProjectBuilder::generate_cmake_file_content() const
         builder.appendff("add_library({} SHARED IMPORTED GLOBAL)\n", library.key);
         builder.appendff("set_target_properties({} PROPERTIES IMPORTED_LOCATION {})\n", library.key, library.value->path);
 
-        if (library.key == "LibCStaticWithoutDeps"sv || library.key == "DumpLayoutTree"sv)
+        if (library.key == "LibCStaticWithoutDeps"sv)
             continue;
 
         // We need to specify the dependencies for each defined library in CMake because some applications do not specify

+ 0 - 2
Userland/Libraries/LibWebView/CMakeLists.txt

@@ -18,5 +18,3 @@ set(GENERATED_SOURCES
 
 serenity_lib(LibWebView webview)
 target_link_libraries(LibWebView PRIVATE LibCore LibFileSystemAccessClient LibGfx LibGUI LibIPC LibProtocol LibWeb)
-
-add_subdirectory(DumpLayoutTree)

+ 0 - 6
Userland/Libraries/LibWebView/DumpLayoutTree/CMakeLists.txt

@@ -1,6 +0,0 @@
-set(SOURCES
-    main.cpp
-)
-
-serenity_bin(DumpLayoutTree)
-target_link_libraries(DumpLayoutTree PRIVATE LibWebView LibWeb)

+ 0 - 27
Userland/Libraries/LibWebView/DumpLayoutTree/main.cpp

@@ -1,27 +0,0 @@
-/*
- * Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
- *
- * SPDX-License-Identifier: BSD-2-Clause
- */
-
-#include <LibGUI/Application.h>
-#include <LibGUI/Window.h>
-#include <LibWebView/OutOfProcessWebView.h>
-#include <unistd.h>
-
-int main(int argc, char** argv)
-{
-    auto app = GUI::Application::construct(argc, argv);
-    auto window = GUI::Window::construct();
-    window->set_title("DumpLayoutTree");
-    window->resize(800, 600);
-    window->show();
-    auto web_view = window->set_main_widget<WebView::OutOfProcessWebView>().release_value_but_fixme_should_propagate_errors();
-    web_view->load(URL::create_with_file_scheme(argv[1]));
-    web_view->on_load_finish = [&](auto&) {
-        auto dump = web_view->dump_layout_tree();
-        write(STDOUT_FILENO, dump.characters(), dump.length() + 1);
-        _exit(0);
-    };
-    return app->exec();
-}