Reland "Fix table pre-inflation", blink@r174263

This patch relands the table cell inflation patch from [1] but with
a fix for a crash on top sites including amazon.co.jp. The bug was
that tables can have two layout scopes (one from RenderTable::layout
and a second from AutoTableLayout::computeIntrinsicLogicalWidths)
which can cause endLayout to be called twice for the same node. If
the first endLayout removes all clusters, the second will crash
when accessing currentCluster(). This patch fixes this by simply
checking that the cluster stack is non-empty in endLayout.

[1] https://src.chromium.org/viewvc/blink?view=rev&revision=174263

TEST=table-subtree-layout-crash.html
BUG=371611, 375439

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

git-svn-id: svn://svn.chromium.org/blink/trunk@174624 bbb929c8-8fbe-4397-9dbb-9b2b20218538
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations
index 78934ad0..92976e0c 100644
--- a/third_party/WebKit/LayoutTests/TestExpectations
+++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -678,6 +678,18 @@
 crbug.com/322782 fast/text-autosizing/narrow-iframe.html [ ImageOnlyFailure ]
 crbug.com/322782 fast/text-autosizing/clusters-insufficient-text.html [ ImageOnlyFailure ]
 
+crbug.com/371611 fast/text-autosizing/hackernews-comments.html [ NeedsRebaseline ]
+crbug.com/371611 fast/text-autosizing/tables/css-table-single-cell-lots-of-text.html [ NeedsRebaseline ]
+crbug.com/371611 fast/text-autosizing/tables/fixed-table-single-cell-lots-of-text.html [ NeedsRebaseline ]
+crbug.com/371611 fast/text-autosizing/tables/single-cell-lots-of-text.html [ NeedsRebaseline ]
+crbug.com/371611 fast/text-autosizing/tables/single-percent-width-cell-lots-of-text.html [ NeedsRebaseline ]
+crbug.com/371611 fast/text-autosizing/tables/table-for-layout.html [ NeedsRebaseline ]
+crbug.com/371611 fast/text-autosizing/tables/wide-percentage-width.html [ NeedsRebaseline ]
+crbug.com/371611 fast/text-autosizing/tables/wide-specified-width.html [ NeedsRebaseline ]
+
+crbug.com/374643 [ Mac ] fast/text-autosizing/supercluster-multiple-layout.html [ Failure ]
+crbug.com/374643 [ Mac ] fast/text-autosizing/tables/table-with-inline-block.html [ Failure ]
+
 crbug.com/335710 virtual/gpu/canvas/philip/tests/2d.text.draw.fontface.notinpage.html [ Pass Failure ]
 crbug.com/335710 canvas/philip/tests/2d.text.draw.fontface.notinpage.html [ Pass Failure ]