Handle inline-block as block for now in layout 2020

That makes Servo not panic when loading servo.org.
This commit is contained in:
Anthony Ramine 2019-10-11 16:43:52 +02:00
parent 0e503a0e0c
commit 6345e353d4

View file

@ -331,7 +331,9 @@ where
contents: replaced, contents: replaced,
}), }),
Ok(non_replaced) => match display_inside { Ok(non_replaced) => match display_inside {
DisplayInside::Flow => { DisplayInside::Flow |
// TODO: Properly implement display: inline-block.
DisplayInside::FlowRoot => {
// Whatever happened before, we just found an inline level element, so // Whatever happened before, we just found an inline level element, so
// all we need to do is to remember this ongoing inline level box. // all we need to do is to remember this ongoing inline level box.
self.ongoing_inline_boxes_stack.push(InlineBox { self.ongoing_inline_boxes_stack.push(InlineBox {
@ -350,10 +352,6 @@ where
inline_box.last_fragment = true; inline_box.last_fragment = true;
Arc::new(InlineLevelBox::InlineBox(inline_box)) Arc::new(InlineLevelBox::InlineBox(inline_box))
}, },
DisplayInside::FlowRoot => {
// a.k.a. `inline-block`
unimplemented!()
},
DisplayInside::None | DisplayInside::Contents => panic!(":("), DisplayInside::None | DisplayInside::Contents => panic!(":("),
}, },
}; };