layout: Float table wrappers directly instead of generating a block

wrapper around them.

Fixes Wikipedia tables leaking out.

Along the way, I refactored tables' width calculation significantly.
This was necessary in order to properly handle floated tables, as some
of the logic had to be ported over from block flows.
This commit is contained in:
Patrick Walton 2014-09-19 22:46:41 -07:00
parent e9a7b44f68
commit 62bb9093d7
9 changed files with 270 additions and 217 deletions

View file

@ -295,6 +295,10 @@ impl Flow for TableFlow {
_ => {}
}
// As tables are always wrapped inside a table wrapper, they are never impacted by floats.
self.block_flow.base.flags.set_impacted_by_left_floats(false);
self.block_flow.base.flags.set_impacted_by_right_floats(false);
self.block_flow.propagate_assigned_inline_size_to_children(inline_start_content_edge, content_inline_size, Some(self.col_inline_sizes.clone()));
}