mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-11-04 07:10:57 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			30 lines
		
	
	
	
		
			672 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
	
		
			672 B
		
	
	
	
		
			C++
		
	
	
	
	
	
/*
 | 
						|
 * Copyright (c) 2023, MacDue <macdue@dueutil.tech>
 | 
						|
 *
 | 
						|
 * SPDX-License-Identifier: BSD-2-Clause
 | 
						|
 */
 | 
						|
 | 
						|
#include "EdgeStyleValue.h"
 | 
						|
 | 
						|
namespace Web::CSS {
 | 
						|
 | 
						|
String EdgeStyleValue::to_string() const
 | 
						|
{
 | 
						|
    auto to_string = [](PositionEdge edge) {
 | 
						|
        switch (edge) {
 | 
						|
        case PositionEdge::Left:
 | 
						|
            return "left";
 | 
						|
        case PositionEdge::Right:
 | 
						|
            return "right";
 | 
						|
        case PositionEdge::Top:
 | 
						|
            return "top";
 | 
						|
        case PositionEdge::Bottom:
 | 
						|
            return "bottom";
 | 
						|
        }
 | 
						|
        VERIFY_NOT_REACHED();
 | 
						|
    };
 | 
						|
 | 
						|
    return MUST(String::formatted("{} {}", to_string(m_properties.edge), m_properties.offset.to_string()));
 | 
						|
}
 | 
						|
 | 
						|
}
 |