aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_2020/flow/construct.rs
diff options
context:
space:
mode:
authorAnthony Ramine <nox@nox.paris>2019-11-28 16:58:47 +0100
committerSimon Sapin <simon.sapin@exyr.org>2019-12-01 10:51:25 +0100
commit48a4a82a496fd0cc76ab21606618de5e408900b6 (patch)
tree7206f25574265eca7820db7706634cec2ce33379 /components/layout_2020/flow/construct.rs
parentecfb82260c76f707dad5acb1a7cc3326dabf699b (diff)
downloadservo-48a4a82a496fd0cc76ab21606618de5e408900b6.tar.gz
servo-48a4a82a496fd0cc76ab21606618de5e408900b6.zip
Make InlineLevelBox::Atomic store an IndependentFormattingContext
Diffstat (limited to 'components/layout_2020/flow/construct.rs')
-rw-r--r--components/layout_2020/flow/construct.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/components/layout_2020/flow/construct.rs b/components/layout_2020/flow/construct.rs
index 07dd6f9765b..e7599bc843a 100644
--- a/components/layout_2020/flow/construct.rs
+++ b/components/layout_2020/flow/construct.rs
@@ -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.