File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -637,7 +637,7 @@ fn perform_final_layout_on_in_flow_children(
637637 item. node_id ,
638638 Size :: NONE ,
639639 parent_size,
640- Size :: MAX_CONTENT ,
640+ available_space ,
641641 SizingMode :: InherentSize ,
642642 Line :: TRUE ,
643643 ) ;
@@ -646,6 +646,16 @@ fn perform_final_layout_on_in_flow_children(
646646 let mut location =
647647 block_ctx. place_floated_box ( margin_box, y_offset_for_float, float_direction, item. clear ) ;
648648
649+ // Ensure that content that appears after a float does not get positioned before/above the float
650+ //
651+ // FIXME: this isn't quite right, because a second float at the same location
652+ // shouldn't cause content to push down to it's level
653+ // committed_y_offset = committed_y_offset.max(location.y);
654+ // y_offset_for_absolute = y_offset_for_absolute.max(location.y);
655+ // y_offset_for_float = y_offset_for_float.max(location.y);
656+
657+ // Convert the margin-box location returned by float placement into a border-box location
658+ // for the output Layout
649659 location. y += item_non_auto_margin. top ;
650660 location. x += item_non_auto_margin. left ;
651661
You can’t perform that action at this time.
0 commit comments