Bug 1528828 [wpt PR 15449] - [css-tables] Add some subpixel collapsed border tests, a=testonly
authorDavid Grogan <dgrogan@chromium.org>
Wed, 06 Mar 2019 10:35:05 +0000
changeset 525500 3a39e45af185cdada307e0e2b4d161928d980817
parent 525499 5c0b9b9702ee7f456d59ef06304a93dfd0938851
child 525501 aef3f8d081d1cd507984b6a1ec092eac86616a41
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1528828, 15449, 17763, 377847, 1477334, 633538
milestone67.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 1528828 [wpt PR 15449] - [css-tables] Add some subpixel collapsed border tests, a=testonly Automatic update from web-platform-tests [css-tables] Add some subpixel collapsed border tests This CL contains tests only, no behavior change. Chrome passes only 001, no matter the device pixels. Safari-lodpi and Firefox-lodpi pass only 001 and 002. EdgeHTML 18.17763-lodpi, Firefox-hidpi, and Safari-hidpi pass 001, 002, and 003. From a plain reading of the tables spec the 003 test is correct. But given its rampant failure (only EdgeHTML passes when 1x device pixel per CSS pixel), it'd be reasonable to codify the current empirical behavior somewhere, if it's not already in a place that I missed. Chrome probably passes 001 but fails 002 because of LayoutUnit's 1/64 pixel precision but that's not confirmed. Note that these tests will become invalid if the proposal in https://github.com/w3c/csswg-drafts/issues/606 is adopted. Bug: 377847 Change-Id: Ifc9e8f9f878f7462cb949670350eadb17c7c2940 Reviewed-on: https://chromium-review.googlesource.com/c/1477334 Reviewed-by: Morten Stenshorne <mstensho@chromium.org> Reviewed-by: David Grogan <dgrogan@chromium.org> Commit-Queue: David Grogan <dgrogan@chromium.org> Cr-Commit-Position: refs/heads/master@{#633538} -- wpt-commits: 41a8506f54e688d655e662f59584dcbf777990f2 wpt-pr: 15449
testing/web-platform/tests/css/css-tables/subpixel-collapsed-borders-001.html
testing/web-platform/tests/css/css-tables/subpixel-collapsed-borders-002.html
testing/web-platform/tests/css/css-tables/subpixel-collapsed-borders-003-ref.html
testing/web-platform/tests/css/css-tables/subpixel-collapsed-borders-003.html
testing/web-platform/tests/css/css-tables/subpixel-collapsed-borders-ref.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-tables/subpixel-collapsed-borders-001.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org">
+<link rel="help" href="https://www.w3.org/TR/CSS22/tables.html#collapsing-borders">
+<link rel="help" href="https://drafts.csswg.org/css-tables-3/#border-conflict-resolution-algorithm">
+<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/606">
+<link rel="match" href="subpixel-collapsed-borders-ref.html">
+<meta name="flags" content="" />
+<meta name="assert" content="When collapsed border tables have border widths larger than cells', the table border wins." />
+
+<style>
+table {
+  border: 5px solid green;
+  border-collapse: collapse;
+}
+
+td {
+  width: 50px;
+  height: 50px;
+  border: 4.95px solid red;
+}
+</style>
+
+<p>There should be a square with a green border, not a red border.
+</p>
+
+<table>
+  <tr>
+    <td></td>
+  </tr>
+</table>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-tables/subpixel-collapsed-borders-002.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org">
+<link rel="help" href="https://www.w3.org/TR/CSS22/tables.html#collapsing-borders">
+<link rel="help" href="https://drafts.csswg.org/css-tables-3/#border-conflict-resolution-algorithm">
+<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/606">
+<link rel="match" href="subpixel-collapsed-borders-ref.html">
+<meta name="flags" content="" />
+<meta name="assert" content="When collapsed border tables have border widths larger than cells', the table border wins even when the cell border is merely 0.01 pixels narrower" />
+
+<style>
+table {
+  border: 5px solid green;
+  border-collapse: collapse;
+}
+
+td {
+  width: 50px;
+  height: 50px;
+  border: 4.99px solid red;
+}
+</style>
+
+<p>There should be a square with a green border, not a red border.
+</p>
+
+<table>
+  <tr>
+    <td></td>
+  </tr>
+</table>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-tables/subpixel-collapsed-borders-003-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<style>
+table {
+  border: 5.95px solid green;
+  border-collapse: collapse;
+}
+
+td {
+  width: 50px;
+  height: 50px;
+  border: 1px solid red;
+}
+</style>
+
+<p>There should be a square with a green border, not a red border.
+</p>
+
+<table>
+  <tr>
+    <td></td>
+  </tr>
+</table>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-tables/subpixel-collapsed-borders-003.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org">
+<link rel="help" href="https://www.w3.org/TR/CSS22/tables.html#collapsing-borders">
+<link rel="help" href="https://drafts.csswg.org/css-tables-3/#border-conflict-resolution-algorithm">
+<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/606">
+<link rel="match" href="subpixel-collapsed-borders-003-ref.html">
+<meta name="flags" content="" />
+<meta name="assert" content="When collapsed border tables have border widths larger than cells', the table border wins even when the floored table border is the same size as the cell's." />
+
+<style>
+table {
+  border: 5.95px solid green;
+  border-collapse: collapse;
+}
+
+td {
+  width: 50px;
+  height: 50px;
+  border: 5px solid red;
+}
+</style>
+
+<p>There should be a square with a green border, not a red border.
+</p>
+
+<table>
+  <tr>
+    <td></td>
+  </tr>
+</table>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-tables/subpixel-collapsed-borders-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<style>
+table {
+  border: 5px solid green;
+  border-collapse: collapse;
+}
+
+td {
+  width: 50px;
+  height: 50px;
+  border: 1px solid red;
+}
+</style>
+
+<p>There should be a square with a green border, not a red border.
+</p>
+
+<table>
+  <tr>
+    <td></td>
+  </tr>
+</table>