commit | 33a968d6ba9f803b48d97c8f7bbc57641492f582 | [log] [tgz] |
---|---|---|
author | David Grogan <dgrogan@chromium.org> | Sun Jul 07 23:54:38 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Sun Jul 07 23:54:38 2019 |
tree | 2bccbcefdf4870f5666be3dc660f2356357b0941 | |
parent | c928bc10887a71edd24d6ef0020f7e085d7ab5c0 [diff] |
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}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .