mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:37:35 +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:
parent
57fd494195
commit
7a34f1a4e2
2 changed files with 4 additions and 0 deletions
|
@ -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(),
|
||||
|
|
|
@ -89,6 +89,9 @@ private:
|
|||
|
||||
struct FloatingBox {
|
||||
JS::NonnullGCPtr<Box const> box;
|
||||
|
||||
LayoutState::UsedValues& used_values;
|
||||
|
||||
// Offset from left/right edge to the left content edge of `box`.
|
||||
CSSPixels offset_from_edge { 0 };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue