1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:47:44 +00:00

LibWeb: Add pointer from BFC::FloatingBox to its UsedValues

This will allow us to skip a lot more hash lookups.
This commit is contained in:
Andreas Kling 2024-01-17 12:19:52 +01:00
parent 57fd494195
commit 7a34f1a4e2
2 changed files with 4 additions and 0 deletions

View file

@ -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(),