Bug 1316172 - Add a reftest for logical properties; r=dbaron
authorManish Goregaokar <manishearth@gmail.com>
Tue, 08 Nov 2016 15:03:08 -0800
changeset 352035 742ff7058a1efa990fe9eacb1b3c1bdeaad60c6b
parent 352034 666b8f65e279ffb0a2b4c02c702beba3ecdfca4b
child 352036 8e9417d751751e136173b092ccf119d08499cdc4
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs1316172
milestone52.0a1
Bug 1316172 - Add a reftest for logical properties; r=dbaron MozReview-Commit-ID: J9PZVBoK0Fg
layout/reftests/w3c-css/submitted/writing-modes-3/logical-physical-mapping-001-ref.html
layout/reftests/w3c-css/submitted/writing-modes-3/logical-physical-mapping-001.html
layout/reftests/w3c-css/submitted/writing-modes-3/reftest-stylo.list
layout/reftests/w3c-css/submitted/writing-modes-3/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/writing-modes-3/logical-physical-mapping-001-ref.html
@@ -0,0 +1,85 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<link rel="author" title="Manish Goregaokar" href="mailto:manishearth@gmail.com">
+<style>
+#body tr td:nth-child(2) div {
+  writing-mode: horizontal-tb;
+}
+#body tr td:nth-child(3) div {
+  writing-mode: horizontal-tb;
+}
+#body tr td:nth-child(4) div {
+  writing-mode: vertical-rl;
+}
+#body tr td:nth-child(5) div {
+  writing-mode: vertical-rl;
+}
+#body tr td:nth-child(6) div {
+  writing-mode: vertical-lr;
+}
+#body tr td:nth-child(7) div {
+  writing-mode: vertical-lr;
+}
+#body tr td:nth-child(8) div {
+  writing-mode: sideways-lr;
+}
+#body tr td:nth-child(9) div {
+  writing-mode: sideways-lr;
+}
+
+
+#body tr td:nth-child(2n+2) div {
+  direction: ltr;
+}
+#body tr td:nth-child(2n+3) div {
+  direction: rtl;
+}
+
+
+td {
+  padding: 10px;
+  font-size: 15px;
+  background-color: grey;
+}
+
+
+.top {
+  border-bottom: 2px dotted blue;
+  border-top: 2px dotted orange;
+}
+.right {
+  border-left: 2px dotted blue;
+  border-right: 2px dotted orange;
+}
+
+.bottom {
+  border-top: 2px dotted blue;
+  border-bottom: 2px dotted orange;
+}
+.left {
+  border-right: 2px dotted blue;
+  border-left: 2px dotted orange;
+}
+</style>
+</head>
+<body>
+<p>
+  Test passes if orange dots are opposite to the blue dots in each cell. Orange dots should be on the (physical) side specified by the text in the cell.
+</p>
+<table>
+<thead>
+  <tr><th>writing mode</th><th colspan=2>horizontal-tb</th><th colspan=2>vertical-rl</th><th colspan=2>vertical-lr</th><th colspan=2>sideways-lr</th></tr>
+  <tr><th>direction</th><th>ltr</th><th>rtl</th><th>ltr</th><th>rtl</th><th>ltr</th><th>rtl</th><th>ltr</th><th>rtl</th></tr>
+</thead>
+<tbody id=body>
+  <tr id=block-start><th>block-start</th>   <td><div class=outer><div class=top>top</div></div></td><td><div class=outer><div class=top>top</div></div></td><td><div class=outer><div class=right>right</div></div></td><td><div class=outer><div class=right>right</div></div></td><td><div class=outer><div class=left>left</div></div></td><td><div class=outer><div class=left>left</div></div></td><td><div class=outer><div class=left>left</div></div></td><td><div class=outer><div class=left>left</div></div></td></tr>
+  <tr id=block-end><th>block-end</th>       <td><div class=outer><div class=bottom>bottom</div></div></td><td><div class=outer><div class=bottom>bottom</div></div></td><td><div class=outer><div class=left>left</div></div></td><td><div class=outer><div class=left>left</div></div></td><td><div class=outer><div class=right>right</div></div></td><td><div class=outer><div class=right>right</div></div></td><td><div class=outer><div class=right>right</div></div></td><td><div class=outer><div class=right>right</div></div></td></tr>
+  <tr id=inline-start><th>inline-start</th> <td><div class=outer><div class=left>left</div></div></td><td><div class=outer><div class=right>right</div></div></td><td><div class=outer><div class=top>top</div></div></td><td><div class=outer><div class=bottom>bottom</div></div></td><td><div class=outer><div class=top>top</div></div></td><td><div class=outer><div class=bottom>bottom</div></div></td><td><div class=outer><div class=bottom>bottom</div></div></td><td><div class=outer><div class=top>top</div></div></td></tr>
+  <tr id=inline-end><th>inline-end</th>     <td><div class=outer><div class=right>right</div></div></td><td><div class=outer><div class=left>left</div></div></td><td><div class=outer><div class=bottom>bottom</div></div></td><td><div class=outer><div class=top>top</div></div></td><td><div class=outer><div class=bottom>bottom</div></div></td><td><div class=outer><div class=top>top</div></div></td><td><div class=outer><div class=top>top</div></div></td><td><div class=outer><div class=bottom>bottom</div></div></td></tr>
+</tbody>
+</table>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/writing-modes-3/logical-physical-mapping-001.html
@@ -0,0 +1,96 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<link rel="author" title="Manish Goregaokar" href="mailto:manishearth@gmail.com">
+<link rel="help" href="https://drafts.csswg.org/css-writing-modes/#logical-to-physical">
+<link rel="match" href="logical-physical-mapping-001-ref.html">
+<style>
+#block-start div.outer div {
+  border-block-start: dotted 2px orange;
+}
+#block-end div.outer div {
+  border-block-end: dotted 2px orange;
+}
+#inline-start div.outer div {
+  border-inline-start: dotted 2px orange;
+}
+#inline-end div.outer div {
+  border-inline-end: dotted 2px orange;
+}
+
+#body tr td:nth-child(2) div {
+  writing-mode: horizontal-tb;
+}
+#body tr td:nth-child(3) div {
+  writing-mode: horizontal-tb;
+}
+#body tr td:nth-child(4) div {
+  writing-mode: vertical-rl;
+}
+#body tr td:nth-child(5) div {
+  writing-mode: vertical-rl;
+}
+#body tr td:nth-child(6) div {
+  writing-mode: vertical-lr;
+}
+#body tr td:nth-child(7) div {
+  writing-mode: vertical-lr;
+}
+#body tr td:nth-child(8) div {
+  writing-mode: sideways-lr;
+}
+#body tr td:nth-child(9) div {
+  writing-mode: sideways-lr;
+}
+
+
+#body tr td:nth-child(2n+2) div {
+  direction: ltr;
+}
+#body tr td:nth-child(2n+3) div {
+  direction: rtl;
+}
+
+
+td {
+  padding: 10px;
+  font-size: 15px;
+  background-color: grey;
+}
+
+
+.top {
+  border-bottom: 2px dotted blue;
+}
+.right {
+  border-left: 2px dotted blue;
+}
+
+.bottom {
+  border-top: 2px dotted blue;
+}
+.left {
+  border-right: 2px dotted blue;
+}
+</style>
+</head>
+<body>
+<p>
+  Test passes if orange dots are opposite to the blue dots in each cell. Orange dots should be on the (physical) side specified by the text in the cell.
+</p>
+<table>
+<thead>
+  <tr><th>writing mode</th><th colspan=2>horizontal-tb</th><th colspan=2>vertical-rl</th><th colspan=2>vertical-lr</th><th colspan=2>sideways-lr</th></tr>
+  <tr><th>direction</th><th>ltr</th><th>rtl</th><th>ltr</th><th>rtl</th><th>ltr</th><th>rtl</th><th>ltr</th><th>rtl</th></tr>
+</thead>
+<tbody id=body>
+  <tr id=block-start><th>block-start</th>   <td><div class=outer><div class=top>top</div></div></td><td><div class=outer><div class=top>top</div></div></td><td><div class=outer><div class=right>right</div></div></td><td><div class=outer><div class=right>right</div></div></td><td><div class=outer><div class=left>left</div></div></td><td><div class=outer><div class=left>left</div></div></td><td><div class=outer><div class=left>left</div></div></td><td><div class=outer><div class=left>left</div></div></td></tr>
+  <tr id=block-end><th>block-end</th>       <td><div class=outer><div class=bottom>bottom</div></div></td><td><div class=outer><div class=bottom>bottom</div></div></td><td><div class=outer><div class=left>left</div></div></td><td><div class=outer><div class=left>left</div></div></td><td><div class=outer><div class=right>right</div></div></td><td><div class=outer><div class=right>right</div></div></td><td><div class=outer><div class=right>right</div></div></td><td><div class=outer><div class=right>right</div></div></td></tr>
+  <tr id=inline-start><th>inline-start</th> <td><div class=outer><div class=left>left</div></div></td><td><div class=outer><div class=right>right</div></div></td><td><div class=outer><div class=top>top</div></div></td><td><div class=outer><div class=bottom>bottom</div></div></td><td><div class=outer><div class=top>top</div></div></td><td><div class=outer><div class=bottom>bottom</div></div></td><td><div class=outer><div class=bottom>bottom</div></div></td><td><div class=outer><div class=top>top</div></div></td></tr>
+  <tr id=inline-end><th>inline-end</th>     <td><div class=outer><div class=right>right</div></div></td><td><div class=outer><div class=left>left</div></div></td><td><div class=outer><div class=bottom>bottom</div></div></td><td><div class=outer><div class=top>top</div></div></td><td><div class=outer><div class=bottom>bottom</div></div></td><td><div class=outer><div class=top>top</div></div></td><td><div class=outer><div class=top>top</div></div></td><td><div class=outer><div class=bottom>bottom</div></div></td></tr>
+</tbody>
+</table>
+
+</body>
+</html>
--- a/layout/reftests/w3c-css/submitted/writing-modes-3/reftest-stylo.list
+++ b/layout/reftests/w3c-css/submitted/writing-modes-3/reftest-stylo.list
@@ -9,8 +9,10 @@ default-preferences pref(layout.css.text
 == text-combine-upright-compression-004.html text-combine-upright-compression-004.html
 == text-combine-upright-compression-005.html text-combine-upright-compression-005.html
 == text-combine-upright-compression-005a.html text-combine-upright-compression-005a.html
 == text-combine-upright-compression-006.html text-combine-upright-compression-006.html
 == text-combine-upright-compression-006a.html text-combine-upright-compression-006a.html
 == text-combine-upright-compression-007.html text-combine-upright-compression-007.html
 
 == text-orientation-upright-directionality-001.html text-orientation-upright-directionality-001.html
+
+== logical-physical-mapping-001.html logical-physical-mapping-001.html
--- a/layout/reftests/w3c-css/submitted/writing-modes-3/reftest.list
+++ b/layout/reftests/w3c-css/submitted/writing-modes-3/reftest.list
@@ -8,8 +8,10 @@ default-preferences pref(layout.css.text
 == text-combine-upright-compression-004.html text-combine-upright-compression-004-ref.html
 == text-combine-upright-compression-005.html text-combine-upright-compression-005-ref.html
 == text-combine-upright-compression-005a.html text-combine-upright-compression-005-ref.html
 == text-combine-upright-compression-006.html text-combine-upright-compression-006-ref.html
 == text-combine-upright-compression-006a.html text-combine-upright-compression-006-ref.html
 == text-combine-upright-compression-007.html text-combine-upright-compression-007-ref.html
 
 == text-orientation-upright-directionality-001.html text-orientation-upright-directionality-001-ref.html
+
+== logical-physical-mapping-001.html logical-physical-mapping-001-ref.html