mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-25 18:34:14 +00:00 
			
		
		
		
	 dd122e2f74
			
		
	
	
		dd122e2f74
		
	
	
	
	
		
			
			Not every user of this requires an `auto` state, but most do. This has quite a big diff but most of that is mechanical: LengthPercentageOrAuto has `resolved_or_auto()` instead of `resolved()`, and `to_px_or_zero()` instead of `to_px()`, to make their output clearer.
		
			
				
	
	
		
			31 lines
		
	
	
	
		
			800 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
	
		
			800 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2018-2020, Andreas Kling <andreas@ladybird.org>
 | |
|  * Copyright (c) 2022, Ben Wiederhake <BenWiederhake.GitHub@gmx.de>
 | |
|  * Copyright (c) 2025, Sam Atkins <sam@ladybird.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #include "LengthBox.h"
 | |
| 
 | |
| namespace Web::CSS {
 | |
| 
 | |
| LengthBox::LengthBox()
 | |
|     : m_top(LengthPercentageOrAuto::make_auto())
 | |
|     , m_right(LengthPercentageOrAuto::make_auto())
 | |
|     , m_bottom(LengthPercentageOrAuto::make_auto())
 | |
|     , m_left(LengthPercentageOrAuto::make_auto())
 | |
| {
 | |
| }
 | |
| 
 | |
| LengthBox::LengthBox(LengthPercentageOrAuto top, LengthPercentageOrAuto right, LengthPercentageOrAuto bottom, LengthPercentageOrAuto left)
 | |
|     : m_top(move(top))
 | |
|     , m_right(move(right))
 | |
|     , m_bottom(move(bottom))
 | |
|     , m_left(move(left))
 | |
| {
 | |
| }
 | |
| 
 | |
| LengthBox::~LengthBox() = default;
 | |
| 
 | |
| }
 |