Closed Bug 1561198 Opened 6 years ago Closed 6 years ago

[wpt-sync] Sync PR 17432 - LayoutNG: Fix sizing and position of abspos tables

Categories

(Core :: CSS Parsing and Computation, defect, P4)

defect

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 17432 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/17432
Details from upstream follow.

David Grogan <dgrogan@chromium.org> wrote:

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/1671851
WPT-Export-Revision: 428697f3fc36ac806b266cc5f2b7dd596ed2b5f3

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Failed to get results from try push
Pushed by james@hoppipolla.co.uk: https://hg.mozilla.org/integration/mozilla-inbound/rev/144ae05e894c [wpt PR 17432] - LayoutNG: Fix sizing and position of abspos tables, a=testonly
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.