Make InlineLevelBox::Atomic store an IndependentFormattingContext

This commit is contained in:
Anthony Ramine 2019-11-28 16:58:47 +01:00 committed by Simon Sapin
parent ecfb82260c
commit 48a4a82a49
2 changed files with 13 additions and 13 deletions

View file

@ -325,10 +325,14 @@ where
contents: Contents<Node>,
) -> Arc<InlineLevelBox> {
let box_ = match contents.try_into() {
Err(replaced) => Arc::new(InlineLevelBox::Atomic {
style: style.clone(),
contents: replaced,
}),
Err(replaced) => Arc::new(InlineLevelBox::Atomic(
IndependentFormattingContext::construct(
self.context,
style.clone(),
display_inside,
<Contents<Node>>::Replaced(replaced),
),
)),
Ok(non_replaced) => match display_inside {
DisplayInside::Flow |
// TODO: Properly implement display: inline-block.