Bug 1720212 [wpt PR 29642] - [TableNG] Fix percentage relative-positioning., a=testonly

Automatic update from web-platform-tests
[TableNG] Fix percentage relative-positioning.

Previously we'd set a fixed block-size on various table parts. The way
that %-based relative positioning would work is to use this fixed
block-size to resolve %-ages against.

We weren't really using this fixed block-size however - as we'd just set
the final block-size as the sum of our children.

Instead of setting the fixed block-size, just use the intrinsic
block-size. This requires a change to the simplified layout algorithm
to "ignore" one of the DCHECKs we perform.

This behaviour now resolves %-relpos against any *specified* size on
the parent. This matches Firefox with the exception of test
position-relative-013.html .

This behaviour seems reasonable - however if we want to restrict this
even more, we can set the IsInitialBlockSizeIndefinite to true (then
all %-respos won't resolve).

Bug: 1227884
Change-Id: Id036a52b954604f1d26528a557053e46ea5aa0be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3021544
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Aleks Totic <atotic@chromium.org>
Reviewed-by: Kurt Catti-Schmidt <kschmi@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#900823}

--

wpt-commits: 766438415f7932e2b3872583bbe6a6a5b890af72
wpt-pr: 29642
This commit is contained in:
Ian Kilpatrick 2021-07-17 09:50:15 +00:00 коммит произвёл moz-wptsync-bot
Родитель c469358e08
Коммит 8473e53e6d
6 изменённых файлов: 84 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,14 @@
<!DOCTYPE html>
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1227884">
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<meta name="assert" content="top: 100% doesn't resolve if the parent doesn't have a height specified.">
<p>Test passes if there is a filled green square.</p>
<table style="border-spacing: 0; background: red;">
<tbody>
<tr style="position: relative; top: 100%;">
<td style="padding: 0;">
<div style="width: 100px; height: 100px; background: green;"></div>
</td>
</tr>
</tbody>
</table>

Просмотреть файл

@ -0,0 +1,14 @@
<!DOCTYPE html>
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1227884">
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<meta name="assert" content="top: 100% doesn't resolve if the parent doesn't have a height specified.">
<p>Test passes if there is a filled green square.</p>
<table style="border-spacing: 0; background: red;">
<tbody style="position: relative; top: 100%;">
<tr>
<td style="padding: 0;">
<div style="width: 100px; height: 100px; background: green;"></div>
</td>
</tr>
</tbody>
</table>

Просмотреть файл

@ -0,0 +1,14 @@
<!DOCTYPE html>
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1227884">
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<meta name="assert" content="top: 100% doesn't resolve if the parent doesn't have a height specified.">
<p>Test passes if there is a filled green square.</p>
<table style="border-spacing: 0; background: red;">
<tbody>
<tr>
<td style="position: relative; top: 100%; padding: 0;">
<div style="width: 100px; height: 100px; background: green;"></div>
</td>
</tr>
</tbody>
</table>

Просмотреть файл

@ -0,0 +1,14 @@
<!DOCTYPE html>
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1227884">
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<meta name="assert" content="top: 100% doesn't resolves against the specified parent height (not the used height).">
<p>Test passes if there is a filled green square.</p>
<table style="border-spacing: 0; background: red;">
<tbody style="height: 10px;">
<tr style="position: relative; top: 100%;">
<td style="padding: 0;">
<div style="position: relative; top: -10px; width: 100px; height: 100px; background: green;"></div>
</td>
</tr>
</tbody>
</table>

Просмотреть файл

@ -0,0 +1,14 @@
<!DOCTYPE html>
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1227884">
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<meta name="assert" content="top: 100% doesn't resolves against the specified parent height (not the used height).">
<p>Test passes if there is a filled green square.</p>
<table style="border-spacing: 0; background: red; height: 10px;">
<tbody style="position: relative; top: 100%;">
<tr>
<td style="padding: 0;">
<div style="position: relative; top: -10px; width: 100px; height: 100px; background: green;"></div>
</td>
</tr>
</tbody>
</table>

Просмотреть файл

@ -0,0 +1,14 @@
<!DOCTYPE html>
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1227884">
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<meta name="assert" content="top: 100% doesn't resolves against the specified parent height (not the used height).">
<p>Test passes if there is a filled green square.</p>
<table style="border-spacing: 0; background: red;">
<tbody>
<tr style="height: 10px;">
<td style="position: relative; top: 100%; padding: 0;">
<div style="position: relative; top: -10px; width: 100px; height: 100px; background: green;"></div>
</td>
</tr>
</tbody>
</table>