Improve multicol preferred/intrinsic width calculation.

Using http://dev.w3.org/csswg/css-sizing/#multicol-intrinsic as
guidance, but implementing that spec 100% is hard, and probably
unnecessary, since it's not finished.

While we wait for a perfect intrinsic width calculation spec, all we
have is CSS 2.1 ("shrink to fit") and common sense:

The idea with preferred/intrinsic minimum width is to allow content to
become as narrow as possible without causing overflow (unless it would
have caused it no matter what width).

The idea with preferred/intrinsic maximum width is to find the
narrowest width larger than or equal to minimum width where no
avoidable automatic/soft wrapping occurs.

We were nowhere close to this behavior for multicol. Now we should be.

Note about the LayoutTests/css3/unicode-bidi-isolate-basic.html
change: The expectation seems to be that the columns should be as many
as necessary and narrow as possible, and that the multicol container's
width should be that of one column. The previous CSS didn't really ask
for this, although that's how it happened to be rendered without this
fix. Added declarations to make sure this is still happening.

Also turn
LayoutTests/fast/multicol/positioned-with-constrained-height.html into
a reftest, rather than requiring a rebaseline, now that rendering has
changed.

This fix is ported from https://bugs.webkit.org/show_bug.cgi?id=116677
Reviewed in WebKit by David Hyatt.

BUG=281451

Review URL: https://chromiumcodereview.appspot.com/23763002

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