Bug 1565003 [wpt PR 17771] - [css-tables] Ignore abspos tables when checking cell descendants, a=testonly

Automatic update from web-platform-tests
[css-tables] Ignore abspos tables when checking cell descendants

If a table is added dynamically as a child of a table cell, the cell
might call innerTable->HasSections() before the inner table has
calculated its sections. The cell was checking HasSections() because
cells change sizing behavior when they have a table with sections as an
immediate descendant.

This only happened in a very narrow scenario -- when an abspos table
with a %height that does not resolve as auto is dynamically added.

Bug: 977507
Change-Id: I7856291dc6508624a81e9b65af909fa8a0d8e749
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1696003
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Commit-Queue: David Grogan <dgrogan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#676116}

--

wpt-commits: e5601b1ba9993f618a1838dbd4b80a9d46013e66
wpt-pr: 17771
This commit is contained in:
David Grogan 2019-07-22 10:23:48 +00:00 коммит произвёл James Graham
Родитель 65baba75a3
Коммит 17679b79b4
1 изменённых файлов: 36 добавлений и 0 удалений

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

@ -0,0 +1,36 @@
<!doctype html>
<link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org">
<link rel="help" href="https://www.w3.org/TR/css-position-3/#def-cb">
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<link rel="bookmark" href="https://crbug.com/977507" />
<meta name="flags" content="" />
<meta name="assert" content="Abspos table works when it is dynamically added" />
<style>
table {
border-spacing: 0px;
}
td {
padding: 0px;
}
.outerTable {
height: 100px;
width: 100px;
position: relative;
}
.innerTable {
position: absolute;
top: 0px;
width: 100px;
height: 100%;
color: green;
background: green;
}
</style>
<p>Test passes if there is a filled green square.</p>
<table class=outerTable>
<td id=outerCell></td>
</table>
<script>
outerCell.innerHTML = "<table class=innerTable><td>some text</td></table>";
</script>