Don't eat margins when column height isn't yet known.

We ended up thinking that a margin would cross a column boundary, and this even
before the column height was known. When margins cross column boundaries, we
should indeed eat the part of it that doesn't fit in the first column. But when
we don't even know the column height, eating the margin is just nonsense, and
besides it confuses the column balancer. When we only have margins and borders,
and no actual content, no space shortage is reported to the balancer, so we
depend on getting it right in the first balancing pass.

Introduce isPageLogicalHeightKnown(). Since blocks that contain spanners
typically live in multiple column sets, columnSetAtBlockOffset() also needs to
be able to search backwards for the right set for the given offset within the
block. The set currently being worked on may be the one after the spanner,
while we may be interested in the logical top of the block, which is in the
column set before the spanner.

General note: Using LayoutState::pageLogicalHeight() in multicol is bad, since
the columns don't necessarily all have the same height. There's still more
cleaning up to do here.

BUG=493349
R=dsinclair@chromium.org,jchaffraix@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@196161 bbb929c8-8fbe-4397-9dbb-9b2b20218538
7 files changed