mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-25 18:34:14 +00:00 
			
		
		
		
	 1160d8186b
			
		
	
	
		1160d8186b
		
	
	
	
	
		
			
			Having one StyleValue for `<number>` and `<integer>` is making user code more complicated than it needs to be. We know based on the property being parsed, whether it wants a `<number>` or an `<integer>`, so we can use separate StyleValue types for these.
		
			
				
	
	
		
			16 lines
		
	
	
	
		
			262 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
	
		
			262 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2023, Sam Atkins <atkinssj@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #include "IntegerStyleValue.h"
 | |
| 
 | |
| namespace Web::CSS {
 | |
| 
 | |
| ErrorOr<String> IntegerStyleValue::to_string() const
 | |
| {
 | |
|     return String::number(m_value);
 | |
| }
 | |
| 
 | |
| }
 |