mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
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.
This commit is contained in:
parent
77008d4bac
commit
d1a1b1ab75
4 changed files with 1 additions and 36 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
set(SOURCES
|
||||
main.cpp
|
||||
)
|
||||
|
||||
serenity_bin(DumpLayoutTree)
|
||||
target_link_libraries(DumpLayoutTree PRIVATE LibWebView LibWeb)
|
|
@ -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();
|
||||
}
|
Loading…
Add table
Reference in a new issue