mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 14:22:43 +00:00 
			
		
		
		
	 40b9d248be
			
		
	
	
		40b9d248be
		
	
	
	
	
		
			
			This will allow for implementing the screenshot action closer to the spec, as we can now use HTMLCanvasElement to encode the bitmap, and capture the screenshot on the animation frame loop.
		
			
				
	
	
		
			19 lines
		
	
	
	
		
			461 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
	
		
			461 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2022, Tim Flynn <trflynn89@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <AK/Function.h>
 | |
| #include <LibGfx/Forward.h>
 | |
| #include <LibWeb/Forward.h>
 | |
| #include <LibWeb/WebDriver/Response.h>
 | |
| 
 | |
| namespace Web::WebDriver {
 | |
| 
 | |
| using Painter = Function<void(Gfx::IntRect const&, Gfx::Bitmap&)>;
 | |
| Response capture_element_screenshot(Painter const& painter, Page& page, DOM::Element& element, Gfx::IntRect& rect);
 | |
| 
 | |
| }
 |