Make AbsolutelyPositionedBox be 'static

This commit is contained in:
Anthony Ramine 2020-03-13 12:22:32 +01:00 committed by Patrick Walton
parent 7ade924683
commit c3932185ec
7 changed files with 42 additions and 48 deletions

View file

@ -525,7 +525,7 @@ where
kind,
});
} else {
let box_ = Arc::new(InlineLevelBox::OutOfFlowAbsolutelyPositionedBox(
let box_ = Arc::new(InlineLevelBox::OutOfFlowAbsolutelyPositionedBox(Arc::new(
AbsolutelyPositionedBox::construct(
self.context,
node,
@ -533,7 +533,7 @@ where
display_inside,
contents,
),
));
)));
self.current_inline_level_boxes().push(box_.clone());
box_slot.set(LayoutBox::InlineLevel(box_))
}
@ -687,13 +687,13 @@ where
contents,
} => {
let block_level_box = Arc::new(BlockLevelBox::OutOfFlowAbsolutelyPositionedBox(
AbsolutelyPositionedBox::construct(
Arc::new(AbsolutelyPositionedBox::construct(
context,
node,
style,
display_inside,
contents,
),
)),
));
(block_level_box, ContainsFloats::No)
},