mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:42:44 +00:00 
			
		
		
		
	 df2bc8187c
			
		
	
	
		df2bc8187c
		
	
	
	
	
		
			
			Before, we were using the line height from NodeWithStyle::line_height() to calculate the y offset for floats inside the IFC. However, this value doesn't always correspond to the actual height of a line box. For instance, adding a fragment for an inline-block might change the height of the line box. With this change, we recalculate the height of the line box after adding a new fragment and use this recalculated height value to determine the y position for floats. Fixes https://github.com/SerenityOS/serenity/issues/20982
		
			
				
	
	
		
			18 lines
		
	
	
		
			No EOL
		
	
	
		
			473 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			No EOL
		
	
	
		
			473 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!DOCTYPE html><style type="text/css">
 | |
|     * {
 | |
|       border: 1px solid black;
 | |
|     }
 | |
|     .float-left {
 | |
|       float: left;
 | |
|       font-size: 100px;
 | |
|     }
 | |
|     .d-inline-block {
 | |
|       display: inline-block;
 | |
|       width: 100px;
 | |
|       background-color: sandybrown;
 | |
|     }
 | |
|     .Layout-sidebar {
 | |
|       width: 220px;
 | |
|       background-color: beige;
 | |
|     }
 | |
|   </style><div class="Layout-sidebar"><div class="d-inline-block">floats!!!!!!</div><div class="float-left">float left</div></div> |