LayoutNG: Fix sizing and position of abspos tables

LayoutBox::ContainingBlockLogicalHeightForPercentageResolution was
adding padding but only for tables. NG already supplies padding so don't
do this table exception if the containing block is NG.

ng_absolute_utils relied on specified table width/height being the final
say, but tables use those as another min size. This patch makes
ng_absolute_utils treat table height/width as Auto for main sizing and
uses it as another min-height/width.

ResolveInlineLengthInternal assumes that anything with inline size Auto
will expand to fill the available space, but tables do not.

The 4-argument version of ComputeMinAndMaxContentContribution makes a
similar assumption to ng_absolute_utils -- if a node has a width set,
that's the final width. The 3-argument version of
ComputeMinAndMaxContentContribution is aware of this so bypasses the
4-argument version for tables and instead uses legacy preferred width
calculations, so I made ComputeMinAndMaxContentSizeForOutOfFlow do the
same.

The tests all at least partially failed in NG before this patch. After
this patch, NG matches legacy everywhere, except for the first 2 cases
of -002.html, which were broken in legacy and NG before this patch. It
is now correct in NG.

We partially fail 003 and 005, but identically to legacy layout.

I added more checks to fast/table/absolute-table-percent-lengths.html
and moved it to the wpt repository as
css/css-tables/absolute-tables-001.html .

Bug: 973390
Change-Id: I8cea275b2ca19492a501b84cd86456ed6745a4b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1671851
Commit-Queue: David Grogan <dgrogan@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Aleks Totic <atotic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#675142}
12 files changed