Bug 1585178 [wpt PR 19424] - Add/Revise WPT to reflect resolution of calc() in table layout, a=testonly
authorXiaocheng Hu <xiaochengh@chromium.org>
Mon, 07 Oct 2019 22:01:45 +0000
changeset 497386 ffa86f64139eb8d73dbbe409e9bdc3846a0951c6
parent 497385 f4957831e0f42675e5d19fd43469f7ca3654b4c1
child 497387 bb30c80321baabe146cacd464b4af94787f3b1e5
push id114149
push userwptsync@mozilla.com
push dateMon, 14 Oct 2019 13:14:00 +0000
treeherdermozilla-inbound@7dba29552629 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1585178, 19424, 382725, 1832619, 701597
milestone71.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 1585178 [wpt PR 19424] - Add/Revise WPT to reflect resolution of calc() in table layout, a=testonly Automatic update from web-platform-tests Add/Revise WPT to reflect resolution of calc() in table layout https://github.com/w3c/csswg-drafts/issues/94 made a resolution that "Any math expression of a complex type is treated as auto. Simple typed things continue to work as today." This patch adds new tests and revises existing tests to reflect the resolution. Bug: 382725 Change-Id: I522799b51fdd4a7cfa66e137ae31c68aaf2dea73 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1832619 Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org> Reviewed-by: Aleks Totic <atotic@chromium.org> Cr-Commit-Position: refs/heads/master@{#701597} -- wpt-commits: cda40b6ff20c841a6195e95387d09072db8fd6e3 wpt-pr: 19424
testing/web-platform/tests/css/css-tables/auto-layout-calc-width-001.html
testing/web-platform/tests/css/css-tables/calc-percent-plus-0px-auto.html
testing/web-platform/tests/css/css-tables/calc-percent-plus-0px-fixed-ref.html
testing/web-platform/tests/css/css-tables/calc-percent-plus-0px-fixed.html
testing/web-platform/tests/css/css-tables/calc-percent-plus-0px.html
testing/web-platform/tests/css/css-tables/fixed-layout-calc-width-001.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-tables/auto-layout-calc-width-001.html
@@ -0,0 +1,37 @@
+<!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="author" title="Xiaocheng Hu" href="xiaochengh@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-tables-3/#distributing-width-to-columns">
+<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/94">
+
+<style>
+table {
+  width: 200px;
+  border-collapse: collapse;
+  table-layout: auto;
+  height: 20px;
+}
+
+td {
+  padding: 0px;
+  background: lime;
+  outline: 1px solid blue;
+}
+</style>
+
+<h2>Calc width on col is treated as auto in auto tables</h2>
+
+<table id=theTable>
+  <col style="width:calc(20% + 80px)">
+  <tr>
+    <td data-expected-width=100></td>
+    <td data-expected-width=100></td>
+  </tr>
+</table>
+
+<script>
+checkLayout('#theTable')
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-tables/calc-percent-plus-0px-auto.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Simple calc expression in table layout</title>
+<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/94">
+<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3482">
+<link rel="match" href="calc-percent-plus-0px-ref.html">
+<meta name="assert" content="calc(% + 0px) should be handled as calc(%) in auto table layout.">
+<table border style="table-layout: auto">
+  <tr>
+    <td style="width: calc(50% + 0px)">x</td>
+    <td style="width: 100px">y</td>
+  </tr>
+</table>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-tables/calc-percent-plus-0px-fixed-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Simple calc expression in table layout</title>
+<table border style="table-layout: fixed; width: 200px">
+  <tr>
+    <td style="width: 50%">x</td>
+    <td>y</td>
+    <td>z</td>
+  </tr>
+</table>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-tables/calc-percent-plus-0px-fixed.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Simple calc expression in table layout</title>
+<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/94">
+<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3482">
+<link rel="match" href="calc-percent-plus-0px-fixed-ref.html">
+<meta name="assert" content="calc(% + 0px) should be handled as calc(%) in fixed table layout.">
+<table border style="table-layout: fixed; width: 200px">
+  <tr>
+    <td style="width: calc(50% + 0px)">x</td>
+    <td>y</td>
+    <td>z</td>
+  </tr>
+</table>
deleted file mode 100644
--- a/testing/web-platform/tests/css/css-tables/calc-percent-plus-0px.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>Simple calc expression in table layout</title>
-<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3482">
-<link rel="match" href="calc-percent-plus-0px-ref.html">
-<meta name="assert" content="calc(% + 0px) should be handled as calc(%) in table layout.">
-<table border>
-  <tr>
-    <td style="width: calc(50% + 0px)">x</td>
-    <td style="width: 100px">y</td>
-  </tr>
-</table>
--- a/testing/web-platform/tests/css/css-tables/fixed-layout-calc-width-001.html
+++ b/testing/web-platform/tests/css/css-tables/fixed-layout-calc-width-001.html
@@ -1,14 +1,15 @@
 <!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://drafts.csswg.org/css-tables-3/#distributing-width-to-columns">
+<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/94">
 
 <style>
 table {
   width: 200px;
   border-collapse: collapse;
   table-layout: fixed;
   height: 20px;
 }