diff --git a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp index 701ce3fe82..8a490447aa 100644 --- a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp @@ -1058,6 +1058,7 @@ void BlockFormattingContext::layout_floating_box(Box const& box, BlockContainer auto top_margin_edge = y - box_state.margin_box_top(); side_data.all_boxes.append(adopt_own(*new FloatingBox { .box = box, + .used_values = box_state, .offset_from_edge = offset_from_edge, .top_margin_edge = top_margin_edge, .bottom_margin_edge = y + box_state.content_height() + box_state.margin_box_bottom(), diff --git a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.h b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.h index 089d915789..3eb3789657 100644 --- a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.h +++ b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.h @@ -89,6 +89,9 @@ private: struct FloatingBox { JS::NonnullGCPtr box; + + LayoutState::UsedValues& used_values; + // Offset from left/right edge to the left content edge of `box`. CSSPixels offset_from_edge { 0 };