mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 16:22:43 +00:00 
			
		
		
		
	 8163ee1500
			
		
	
	
		8163ee1500
		
	
	
	
	
		
			
			When a rect value is passed to the clip property via CSS, keep it in ComputedValues so that at a later stage can make use of it.
		
			
				
	
	
		
			29 lines
		
	
	
	
		
			519 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
	
		
			519 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2022, the SerenityOS developers.
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #include "Clip.h"
 | |
| #include <LibWeb/CSS/StyleValue.h>
 | |
| 
 | |
| namespace Web::CSS {
 | |
| 
 | |
| Clip::Clip(Type type, EdgeRect edge_rect)
 | |
|     : m_type(type)
 | |
|     , m_edge_rect(edge_rect)
 | |
| {
 | |
| }
 | |
| 
 | |
| Clip::Clip(EdgeRect edge_rect)
 | |
|     : m_type(Type::Rect)
 | |
|     , m_edge_rect(edge_rect)
 | |
| {
 | |
| }
 | |
| 
 | |
| Clip Clip::make_auto()
 | |
| {
 | |
|     return Clip(Type::Auto, EdgeRect { Length::make_auto(), Length::make_auto(), Length::make_auto(), Length::make_auto() });
 | |
| }
 | |
| 
 | |
| }
 |