Merge anonymous table boxes when appropriate.

When a table part box is removed from the layout tree, we may end up
with two anonymous layout part siblings which needs to be merged. We
move the children of the latter into the former. When children of the
latter are themselves anonymous, skip down the layout tree until we find
non-anonymous boxes. This will make sure we merge multiple levels of
anonymous boxes although it means we will have to recreate the anonymous
ancestors of the moved box when the preceding box we are moving it to
does not have anonymous descendants.

Bug: 181374
Change-Id: I8a14cec2e036fb4e5b937f89c4a35411dcc98785
Reviewed-on: https://chromium-review.googlesource.com/846861
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526969}
13 files changed