mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 16:52:43 +00: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("add_library({} SHARED IMPORTED GLOBAL)\n", library.key); | ||||||
|         builder.appendff("set_target_properties({} PROPERTIES IMPORTED_LOCATION {})\n", library.key, library.value->path); |         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; |             continue; | ||||||
| 
 | 
 | ||||||
|         // We need to specify the dependencies for each defined library in CMake because some applications do not specify
 |         // 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) | serenity_lib(LibWebView webview) | ||||||
| target_link_libraries(LibWebView PRIVATE LibCore LibFileSystemAccessClient LibGfx LibGUI LibIPC LibProtocol LibWeb) | 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
		Add a link
		
	
		Reference in a new issue
	
	 Timothy Flynn
						Timothy Flynn