[FastTextAutosizer] Implement table autosizing logic

This patch changes how tables are autosized in the fast text autosizer.
Tables are shrink-wrapped and do not follow the block layout
algorithm (see comment in RenderBox::computePreferredLogicalWidths). To
work around this, RenderTable creates a FTA LayoutScope before its
width is known, and we special-case the inflation step for tables.

The big ideas in this patch:
1) All tables become clusters.
2) All table cells become clusters.
3) A table cell cluster's multipler will be 1.0 if the table itself does
not have enough text to autosize.
4) The width we use for autosizing cells is based on the table's width.
If it has fixed size, we use the table's width directly. Otherwise, we
use the table's containing block's width.
5) When laying out a table we compute the column widths based on the
cell's preferred widths (before laying out the cells). Therefore, we
need to pre-inflate the column widths before entering the main layout
code for RenderTable. This logic is now handled in inflateTable, where
we walk the table cells and inflate them as necessary.
6) Once a table cell is laid out we cannot change its width. Therefore,
descendants of table cells only inflate text up to the table's multiplier.

Because we will be iterating on tables for a little while, the tests
have been added as pixel tests.

clusters-sufficient-width has been updated to reflect FTA's slightly
different algorithm.

NOTRY=true
BUG=302005

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

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