layout: Don't panic in border collapse when a row has fewer cells than

its previous sibling.

This was seen in Twitter and the Google SERPs (sometimes).
This commit is contained in:
Patrick Walton 2015-04-28 13:16:01 -07:00
parent 32b9c0962b
commit 577f1ea109
4 changed files with 52 additions and 1 deletions

View file

@ -754,7 +754,9 @@ fn perform_border_collapse_for_row(child_table_row: &mut TableRowFlow,
let next_block = next_block.push_or_mutate(i, *this_block_border);
match next_block_borders {
NextBlockCollapsedBorders::FromNextRow(next_block_borders) => {
next_block.combine(&next_block_borders[i]);
if next_block_borders.len() > i {
next_block.combine(&next_block_borders[i])
}
}
NextBlockCollapsedBorders::FromTable(ref next_block_borders) => {
next_block.combine(next_block_borders);