mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-11-04 07:10:57 +00:00 
			
		
		
		
	This was a weird case of layout results being stored in the layout tree instead of in the paint tree like everything else.
		
			
				
	
	
		
			32 lines
		
	
	
	
		
			542 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
	
		
			542 B
		
	
	
	
		
			C++
		
	
	
	
	
	
/*
 | 
						|
 * Copyright (c) 2018-2025, Andreas Kling <andreas@ladybird.org>
 | 
						|
 *
 | 
						|
 * SPDX-License-Identifier: BSD-2-Clause
 | 
						|
 */
 | 
						|
 | 
						|
#pragma once
 | 
						|
 | 
						|
#include <LibWeb/PixelUnits.h>
 | 
						|
 | 
						|
namespace Web::Painting {
 | 
						|
 | 
						|
struct PixelBox {
 | 
						|
    CSSPixels top { 0 };
 | 
						|
    CSSPixels right { 0 };
 | 
						|
    CSSPixels bottom { 0 };
 | 
						|
    CSSPixels left { 0 };
 | 
						|
};
 | 
						|
 | 
						|
struct BoxModelMetrics {
 | 
						|
public:
 | 
						|
    PixelBox margin;
 | 
						|
    PixelBox padding;
 | 
						|
    PixelBox border;
 | 
						|
    PixelBox inset;
 | 
						|
 | 
						|
    PixelBox margin_box() const;
 | 
						|
    PixelBox padding_box() const;
 | 
						|
    PixelBox border_box() const;
 | 
						|
};
 | 
						|
 | 
						|
}
 |