Skip to content

Commit 5f58419

Browse files
committed
WIP
1 parent 3b15d4b commit 5f58419

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/compute/block.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)