mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 03:42:44 +00:00 
			
		
		
		
	 9c0e9a1a20
			
		
	
	
		9c0e9a1a20
		
	
	
	
	
		
			
			There was nothing left in ComputedStyle except the box model metrics, so this patch gives it a more representative name. Note that style information is fetched directly from StyleProperties, which is basically the CSS property name/value pairs that apply to an element.
		
			
				
	
	
		
			19 lines
		
	
	
	
		
			539 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
	
		
			539 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #include <LibHTML/Layout/BoxModelMetrics.h>
 | |
| 
 | |
| BoxModelMetrics::BoxModelMetrics()
 | |
| {
 | |
| }
 | |
| 
 | |
| BoxModelMetrics::~BoxModelMetrics()
 | |
| {
 | |
| }
 | |
| 
 | |
| BoxModelMetrics::PixelBox BoxModelMetrics::full_margin() const
 | |
| {
 | |
|     return {
 | |
|         m_margin.top.to_px() + m_border.top.to_px() + m_padding.top.to_px(),
 | |
|         m_margin.right.to_px() + m_border.right.to_px() + m_padding.right.to_px(),
 | |
|         m_margin.bottom.to_px() + m_border.bottom.to_px() + m_padding.bottom.to_px(),
 | |
|         m_margin.left.to_px() + m_border.left.to_px() + m_padding.left.to_px(),
 | |
|     };
 | |
| }
 |