mirror of
https://github.com/servo/servo.git
synced 2025-07-21 14:23:41 +01:00
Store abspos boxes in a RefCell too
We want to mutate them when lazily computing their content sizes, but they are behind an Arc for the hoisting infra, so it also needs its own layer of inner mutability.
This commit is contained in:
parent
e044d8582c
commit
e975d24c4b
7 changed files with 65 additions and 53 deletions
|
@ -571,9 +571,14 @@ where
|
|||
kind,
|
||||
});
|
||||
} else {
|
||||
let box_ = ArcRefCell::new(InlineLevelBox::OutOfFlowAbsolutelyPositionedBox(Arc::new(
|
||||
AbsolutelyPositionedBox::construct(self.context, info, display_inside, contents),
|
||||
)));
|
||||
let box_ = ArcRefCell::new(InlineLevelBox::OutOfFlowAbsolutelyPositionedBox(
|
||||
ArcRefCell::new(AbsolutelyPositionedBox::construct(
|
||||
self.context,
|
||||
info,
|
||||
display_inside,
|
||||
contents,
|
||||
)),
|
||||
));
|
||||
self.current_inline_level_boxes().push(box_.clone());
|
||||
box_slot.set(LayoutBox::InlineLevel(box_))
|
||||
}
|
||||
|
@ -722,10 +727,11 @@ where
|
|||
display_inside,
|
||||
contents,
|
||||
} => {
|
||||
let block_level_box =
|
||||
ArcRefCell::new(BlockLevelBox::OutOfFlowAbsolutelyPositionedBox(Arc::new(
|
||||
let block_level_box = ArcRefCell::new(
|
||||
BlockLevelBox::OutOfFlowAbsolutelyPositionedBox(ArcRefCell::new(
|
||||
AbsolutelyPositionedBox::construct(context, info, display_inside, contents),
|
||||
)));
|
||||
)),
|
||||
);
|
||||
(block_level_box, ContainsFloats::No)
|
||||
},
|
||||
BlockLevelCreator::OutOfFlowFloatBox {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue