[New Multicolumn] Rebalance properly when child content changes.

Some refactoring and cleanup in layoutColumns() & friends was necessary
to get this a bit more robust and consistent.

Always prepare column sets for layout when we're going to lay out the
flow thread. Even when the sets themselves are not going to be laid
out, laying out the flow thread will update things in the sets, so we
need a clean slate. This includes making sure that the list of old content
runs is empty (clean it when the initial column height has been calculated).
This fixes an assertion failure in the beginning of distributeImplicitBreaks().
Added a test that used to trigger this.

Make sure that we always validate regions after layout. Doing it from the
last set was just bogus. There may be no sets, or the last set may not
have been marked for layout. In both cases we'd end up failing to
validate. This would result in assertion failures and inability to map
from a flow thread coordinate to a set.

BUG=370813

Review URL: https://codereview.chromium.org/288263002

git-svn-id: svn://svn.chromium.org/blink/trunk@174854 bbb929c8-8fbe-4397-9dbb-9b2b20218538
9 files changed
tree: f248e8ec80016522f5468a0ddd51bdb93c7850f5
  1. third_party/