mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:42:44 +00:00 
			
		
		
		
	 bab6796099
			
		
	
	
		bab6796099
		
	
	
	
	
		
			
			This code now works in terms of *intrusion* by left and right side floats into a given box whose insides we're trying to layout. Previously, it worked in terms of space occupied by floats in the root box of the BFC they participated in. That created a bunch of edge cases since the code asking about the information wasn't operating in root coordinate space, but in the coordinate space of some arbitrarily nested block descendant of the root. This finally allows horizontal margins in the containing block chain to affect floats and nested content correctly, and it also allows us to remove a bogus workaround in InlineFormattingContext.
		
			
				
	
	
		
			24 lines
		
	
	
	
		
			695 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
	
		
			695 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <style>
 | |
| * {
 | |
|     font: 20px SerenitySans;
 | |
|     border: 1px solid black;
 | |
| }
 | |
| body {
 | |
|     margin-left: 250px;
 | |
| }
 | |
| .left {
 | |
|     float: left;
 | |
|     background: pink;
 | |
|     width: 300px;
 | |
|     height: 200px;
 | |
| }
 | |
| .right {
 | |
|     float: right;
 | |
|     background: wheat;
 | |
|     width: 300px;
 | |
|     height: 200px;
 | |
| }
 | |
| </style>
 | |
| <div class=left></div>
 | |
| <div class=right></div>
 | |
| Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse a placerat mauris, ut elementum mi. Morbi ut vehicula ipsum, eget placerat augue. Integer rutrum nisi eget dui dictum, eu accumsan enim tristique. Ut lobortis lorem eget est vulputate egestas. Integer laoreet lacinia ante sodales lobortis. Donec a tincidunt ante. Phasellus a arcu tortor. 
 |