Skip to content

Commit

Permalink
Handle inline-block as block for now in layout 2020
Browse files Browse the repository at this point in the history
That makes Servo not panic when loading servo.org.
  • Loading branch information
nox committed Oct 11, 2019
1 parent 0e503a0 commit 6345e35
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions components/layout_2020/flow/construct.rs
Expand Up @@ -331,7 +331,9 @@ where
contents: replaced,
}),
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
// all we need to do is to remember this ongoing inline level box.
self.ongoing_inline_boxes_stack.push(InlineBox {
Expand All @@ -350,10 +352,6 @@ where
inline_box.last_fragment = true;
Arc::new(InlineLevelBox::InlineBox(inline_box))
},
DisplayInside::FlowRoot => {
// a.k.a. `inline-block`
unimplemented!()
},
DisplayInside::None | DisplayInside::Contents => panic!(":("),
},
};
Expand Down

0 comments on commit 6345e35

Please sign in to comment.