Bug 1508544 [wpt PR 14139] - [css-tables] Some interop tests, a=testonly
authorDavid Grogan <dgrogan@chromium.org>
Sat, 24 Nov 2018 10:28:46 +0000
changeset 504470 d82075c6a9d8d685e448e96dcb60845799f37f0c
parent 504469 ac81fa603f9b9921b594cf263169dac81383860f
child 504471 21b7f7092b74af95c578469a6b13e4fd5449da51
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1508544, 14139, 613705, 1343530, 609897
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1508544 [wpt PR 14139] - [css-tables] Some interop tests, a=testonly Automatic update from web-platform-tests[css-tables] Some interop tests The spec doesn't address some behavior that has interop. It also doesn't address some related behavior that doesn't have interop. These tests demonstrate both. Hopeful to spur some discussion on https://github.com/w3c/csswg-drafts/issues/3336 Normally a cell with % width is resized based on an initial measure of the table's intrinsic widths. But this is not done when the table is itself inside of a table cell. Engines agree on this but it's not in the specification. Engines don't agree on ignoring this step when the table is inside a shrink-to-fit block. Edge and Chrome perform the step, FF doesn't. Bug: 613705 Change-Id: I4733b693bed754c3924fe357cdc6d5198d7613df Reviewed-on: https://chromium-review.googlesource.com/c/1343530 Reviewed-by: Morten Stenshorne <mstensho@chromium.org> Commit-Queue: David Grogan <dgrogan@chromium.org> Cr-Commit-Position: refs/heads/master@{#609897} -- wpt-commits: 9528b40ec3f1866a07ac5ccbde0fd8fb8b3df867 wpt-pr: 14139
testing/web-platform/tests/css/css-tables/percent-width-ignored-001.tentative.html
testing/web-platform/tests/css/css-tables/percent-width-ignored-002.tentative.html
testing/web-platform/tests/css/css-tables/percent-width-ignored-003.tentative.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-tables/percent-width-ignored-001.tentative.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<script src='/resources/testharness.js'></script>
+<script src='/resources/testharnessreport.js'></script>
+<script src='/resources/check-layout-th.js'></script>
+<link rel="author" title="David Grogan" href="dgrogan@chromium.org">
+<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3336">
+<meta name="flags" content="" />
+<meta name="assert" content="A cell's percent width is ignored when its table is nested in another cell" />
+No red should show. Yellow and blue rectangles are in proportion to their
+contents' intrinsic widths, not affected by yellow's percent-width bloating the
+inner table.
+<table id="outerTable" style="width: 300px" cellspacing="0" cellpadding="0">
+    <td style="background:red;">
+        <table cellspacing="0" cellpadding="0">
+            <td style="width:1%; background:yellow;" data-expected-width="100">
+                <div style="width:20px; height:150px;"></div>
+            </td>
+        </table>
+    </td>
+    <td style="background:lightblue;" data-expected-width="200">
+        <div style="width:40px; height:150px;"></div>
+    </td>
+</table>
+<script>
+checkLayout('#outerTable');
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-tables/percent-width-ignored-002.tentative.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<script src='/resources/testharness.js'></script>
+<script src='/resources/testharnessreport.js'></script>
+<script src='/resources/check-layout-th.js'></script>
+<link rel="author" title="David Grogan" href="dgrogan@chromium.org">
+<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3336">
+<meta name="flags" content="" />
+<meta name="assert" content="Should cell's percent width be ignored when its table is nested in a shrink to fit block?" />
+<p>Edge 44.17763 and Chrome 70 make this 300px wide. FF makes it 150px wide.</p>
+<div id="stf" style="position:absolute; background:blue;" data-expected-width=300>
+    <table cellspacing="0" cellpadding="0">
+        <td style="width:50%;">
+            <div style="width:150px; height:150px;"></div>
+        </td>
+    </table>
+</div>
+<script>
+checkLayout('#stf');
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-tables/percent-width-ignored-003.tentative.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<script src='/resources/testharness.js'></script>
+<script src='/resources/testharnessreport.js'></script>
+<script src='/resources/check-layout-th.js'></script>
+<link rel="author" title="David Grogan" href="dgrogan@chromium.org">
+<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3336">
+<meta name="flags" content="" />
+<meta name="assert" content="A cell's percent width is ignored when its table is nested in another cell, even if there's an intermediate block." />
+Engines render this same as without the intermediate background:blue block -- yellow 1% width is ignored.
+<table id="outerTable" style="width: 300px" cellspacing="0" cellpadding="0">
+    <td style="background:red;">
+      <div style="background:blue">
+        <table cellspacing="0" cellpadding="0">
+            <td style="width:1%; background:yellow;" data-expected-width="100">
+                <div style="width:20px; height:150px;"></div>
+            </td>
+        </table>
+      </div>
+    </td>
+    <td style="background:lightblue;" data-expected-width="200">
+        <div style="width:40px; height:150px;"></div>
+    </td>
+</table>
+<script>
+checkLayout('#outerTable');
+</script>