layout: Don't crash on floated generated content.

It doesn't construct the float correctly, but at least it doesn't crash
anymore.

Fixes Reddit.

Closes #3287.
This commit is contained in:
Patrick Walton 2014-09-11 16:15:23 -07:00
parent 883fc2e404
commit 41ffec0378
4 changed files with 28 additions and 1 deletions

View file

@ -833,7 +833,9 @@ impl<'a, 'b> PostorderNodeMutTraversal for FlowConstructor<'a, 'b> {
}
// Inline items contribute inline fragment construction results.
(display::inline, float::none, _) => {
//
// FIXME(pcwalton, #3307): This is not sufficient to handle floated generated content.
(display::inline, _, _) => {
let construction_result = self.build_fragments_for_inline(node);
node.set_flow_construction_result(construction_result)
}