Bug 1064172 - Add WPT reftests for properties that inhibit text shaping across inline element boundaries. r=jwatt
authorJonathan Kew <jkew@mozilla.com>
Tue, 04 Dec 2018 23:48:33 -0500
changeset 509307 abad2ed6d90b6cae6cf9368fadd0c5de638ace0e
parent 509306 cfc78c02568f395b46976fb724e40eef9299e628
child 509308 6157629ebfa11147618ffc8322d79958229036ca
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwatt
bugs1064172
milestone66.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 1064172 - Add WPT reftests for properties that inhibit text shaping across inline element boundaries. r=jwatt
testing/web-platform/meta/css/css-text/boundary-shaping/boundary-shaping-004.html.ini
testing/web-platform/meta/css/css-text/boundary-shaping/boundary-shaping-005.html.ini
testing/web-platform/meta/css/css-text/boundary-shaping/boundary-shaping-010.html.ini
testing/web-platform/tests/css/css-text/boundary-shaping/boundary-shaping-001.html
testing/web-platform/tests/css/css-text/boundary-shaping/boundary-shaping-002.html
testing/web-platform/tests/css/css-text/boundary-shaping/boundary-shaping-003.html
testing/web-platform/tests/css/css-text/boundary-shaping/boundary-shaping-004.html
testing/web-platform/tests/css/css-text/boundary-shaping/boundary-shaping-005.html
testing/web-platform/tests/css/css-text/boundary-shaping/boundary-shaping-006.html
testing/web-platform/tests/css/css-text/boundary-shaping/boundary-shaping-007.html
testing/web-platform/tests/css/css-text/boundary-shaping/boundary-shaping-008.html
testing/web-platform/tests/css/css-text/boundary-shaping/boundary-shaping-009.html
testing/web-platform/tests/css/css-text/boundary-shaping/boundary-shaping-010.html
testing/web-platform/tests/css/css-text/boundary-shaping/reference/boundary-shaping-001.ref.html
testing/web-platform/tests/css/css-text/boundary-shaping/reference/boundary-shaping-002.ref.html
testing/web-platform/tests/css/css-text/boundary-shaping/reference/boundary-shaping-003.ref.html
testing/web-platform/tests/css/css-text/boundary-shaping/reference/boundary-shaping-004.ref.html
testing/web-platform/tests/css/css-text/boundary-shaping/reference/boundary-shaping-005.ref.html
testing/web-platform/tests/css/css-text/boundary-shaping/reference/boundary-shaping-006.ref.html
testing/web-platform/tests/css/css-text/boundary-shaping/reference/boundary-shaping-007.ref.html
testing/web-platform/tests/css/css-text/boundary-shaping/reference/boundary-shaping-008.ref.html
testing/web-platform/tests/css/css-text/boundary-shaping/reference/boundary-shaping-009.ref.html
testing/web-platform/tests/css/css-text/boundary-shaping/reference/boundary-shaping-010.ref.html
testing/web-platform/tests/css/css-text/boundary-shaping/resources/LinLibertine_Re-4.7.5.woff
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/css/css-text/boundary-shaping/boundary-shaping-004.html.ini
@@ -0,0 +1,3 @@
+[boundary-shaping-004.html]
+  expected:
+    if webrender and (os == "win"): FAIL
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/css/css-text/boundary-shaping/boundary-shaping-005.html.ini
@@ -0,0 +1,3 @@
+[boundary-shaping-005.html]
+  expected:
+    if webrender and (os == "win"): FAIL
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/css/css-text/boundary-shaping/boundary-shaping-010.html.ini
@@ -0,0 +1,4 @@
+[boundary-shaping-010.html]
+  expected:
+    if (os == "mac"): FAIL
+    if (os == "android"): FAIL
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-text/boundary-shaping/boundary-shaping-001.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<title>Text shaping must not be broken across inline box boundaries when there is no change in formatting</title>
+<link rel=match href="reference/boundary-shaping-001.ref.html">
+<link rel=help href="https://drafts.csswg.org/css-text/#boundary-shaping">
+<style>
+@font-face {
+  font-family: test;
+  src: url(resources/LinLibertine_Re-4.7.5.woff);
+}
+body {
+  font: 36px test; /* use a font that includes ligatures for "fi" etc */
+}
+.a {
+  /* initial values for these properties should not interrupt shaping */
+  vertical-align: initial;
+  padding: initial;
+  margin: initial;
+  border: initial;
+}
+</style>
+</head>
+<body>
+of<span class=a>f</span>ice
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-text/boundary-shaping/boundary-shaping-002.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<title>Text shaping must be broken across inline box boundaries when 'vertical-align' is not 'baseline'</title>
+<link rel=match href="reference/boundary-shaping-002.ref.html">
+<link rel=help href="https://drafts.csswg.org/css-text/#boundary-shaping">
+<style>
+@font-face {
+  font-family: test;
+  src: url(resources/LinLibertine_Re-4.7.5.woff);
+}
+body {
+  font: 36px test; /* use a font that includes ligatures for "fi" etc */
+}
+.a {
+  vertical-align: 0; /* distinct from 'baseline', should break shaping */
+}
+</style>
+</head>
+<body>
+of<span class=a>f</span>ice
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-text/boundary-shaping/boundary-shaping-003.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<title>Text shaping must be broken across inline box boundaries when padding is non-zero</title>
+<link rel=match href="reference/boundary-shaping-003.ref.html">
+<link rel=help href="https://drafts.csswg.org/css-text/#boundary-shaping">
+<style>
+@font-face {
+  font-family: test;
+  src: url(resources/LinLibertine_Re-4.7.5.woff);
+}
+body {
+  font: 36px test; /* use a font that includes ligatures for "fi" etc */
+}
+.a {
+  padding-left: 10px;
+}
+</style>
+</head>
+<body>
+of<span class=a>f</span>ice
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-text/boundary-shaping/boundary-shaping-004.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<title>Text shaping must be broken across inline box boundaries when margin is non-zero</title>
+<link rel=match href="reference/boundary-shaping-004.ref.html">
+<link rel=help href="https://drafts.csswg.org/css-text/#boundary-shaping">
+<style>
+@font-face {
+  font-family: test;
+  src: url(resources/LinLibertine_Re-4.7.5.woff);
+}
+body {
+  font: 36px test; /* use a font that includes ligatures for "fi" etc */
+}
+.a {
+  margin-right: 10px;
+}
+</style>
+</head>
+<body>
+of<span class=a>f</span>ice
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-text/boundary-shaping/boundary-shaping-005.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<title>Text shaping must be broken across inline box boundaries when border is non-zero</title>
+<link rel=match href="reference/boundary-shaping-005.ref.html">
+<link rel=help href="https://drafts.csswg.org/css-text/#boundary-shaping">
+<style>
+@font-face {
+  font-family: test;
+  src: url(resources/LinLibertine_Re-4.7.5.woff);
+}
+body {
+  font: 36px test; /* use a font that includes ligatures for "fi" etc */
+}
+.a {
+  border-right: 10px solid transparent;
+}
+</style>
+</head>
+<body>
+of<span class=a>f</span>ice
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-text/boundary-shaping/boundary-shaping-006.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<title>Text shaping must be broken across inline box boundaries when 'vertical-align' is not 'baseline'</title>
+<link rel=match href="reference/boundary-shaping-006.ref.html">
+<link rel=help href="https://drafts.csswg.org/css-text/#boundary-shaping">
+<style>
+@font-face {
+  font-family: test;
+  src: url(resources/LinLibertine_Re-4.7.5.woff);
+}
+body {
+  font: 36px test; /* use a font that includes ligatures for "fi" etc */
+}
+.a {
+  vertical-align: super;
+}
+</style>
+</head>
+<body>
+of<span><span><span class=a><span><span>f</span></span></span></span></span>ice
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-text/boundary-shaping/boundary-shaping-007.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<title>Text shaping must be broken across inline box boundaries when padding or margin is non-zero</title>
+<link rel=match href="reference/boundary-shaping-007.ref.html">
+<link rel=help href="https://drafts.csswg.org/css-text/#boundary-shaping">
+<style>
+@font-face {
+  font-family: test;
+  src: url(resources/LinLibertine_Re-4.7.5.woff);
+}
+body {
+  font: 36px test; /* use a font that includes ligatures for "fi" etc */
+}
+.a {
+  padding-left: 10px;
+}
+.b {
+  margin-right: 10px;
+}
+</style>
+</head>
+<body>
+of<span><span class=a><span><span class=b><span>f</span></span></span></span></span>ice
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-text/boundary-shaping/boundary-shaping-008.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<title>Text shaping must be broken across inline box boundaries at a bidi isolation boundary</title>
+<link rel=match href="reference/boundary-shaping-008.ref.html">
+<link rel=help href="https://drafts.csswg.org/css-text/#boundary-shaping">
+<style>
+@font-face {
+  font-family: test;
+  src: url(resources/LinLibertine_Re-4.7.5.woff);
+}
+body {
+  font: 36px test; /* use a font that includes ligatures for "fi" etc */
+}
+.a {
+  unicode-bidi: isolate; /* bidi isolation boundaries should break shaping */
+}
+</style>
+</head>
+<body>
+of<span class=a>f</span>ice
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-text/boundary-shaping/boundary-shaping-009.html
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<title>Text shaping must be broken across inline box boundaries when padding or margin is non-zero</title>
+<link rel=match href="reference/boundary-shaping-009.ref.html">
+<link rel=help href="https://drafts.csswg.org/css-text/#boundary-shaping">
+<style>
+body {
+  font: 36px sans-serif;
+}
+div {
+  text-align: center;
+}
+.a {
+  padding-right: 10px;
+}
+.b {
+  margin-left: 10px;
+}
+.c {
+  color: red;
+  padding-left: 10px;
+}
+.d {
+  color: red;
+  margin-right: 10px;
+}
+</style>
+</head>
+<body>
+<div dir=ltr>
+السلام<span class=a>عليكم</span>
+</div>
+<div dir=ltr>
+<span class=b>السلام</span>عليكم
+</div>
+<div dir=rtl>
+السلام<span class=a>عليكم</span>
+</div>
+<div dir=rtl>
+<span class=b>السلام</span>عليكم
+</div>
+<div dir=ltr>
+السلام<span class=c>عليكم</span>
+</div>
+<div dir=ltr>
+<span class=d>السلام</span>عليكم
+</div>
+<div dir=rtl>
+السلام<span class=c>عليكم</span>
+</div>
+<div dir=rtl>
+<span class=d>السلام</span>عليكم
+</div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-text/boundary-shaping/boundary-shaping-010.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<title>Text shaping must not be broken across inline box boundaries when there is no change in formatting</title>
+<link rel=match href="reference/boundary-shaping-010.ref.html">
+<link rel=help href="https://drafts.csswg.org/css-text/#boundary-shaping">
+<style>
+body {
+  font: 36px sans-serif;
+}
+div {
+  text-align: center;
+}
+</style>
+</head>
+<body>
+<div dir=rtl>
+ال<span>سل</span>ام
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-text/boundary-shaping/reference/boundary-shaping-001.ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<style>
+@font-face {
+  font-family: test;
+  src: url(../resources/LinLibertine_Re-4.7.5.woff);
+}
+body {
+  font: 36px test; /* use a font that includes ligatures for "fi" etc */
+}
+</style>
+</head>
+<body>
+office
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-text/boundary-shaping/reference/boundary-shaping-002.ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<style>
+@font-face {
+  font-family: test;
+  src: url(../resources/LinLibertine_Re-4.7.5.woff);
+}
+body {
+  font: 36px test; /* use a font that includes ligatures for "fi" etc */
+}
+.a {
+  display: inline-block;
+}
+</style>
+</head>
+<body>
+of<span class=a>f</span>ice
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-text/boundary-shaping/reference/boundary-shaping-003.ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<style>
+@font-face {
+  font-family: test;
+  src: url(../resources/LinLibertine_Re-4.7.5.woff);
+}
+body {
+  font: 36px test; /* use a font that includes ligatures for "fi" etc */
+}
+.a {
+  display: inline-block;
+  width: 10px;
+}
+</style>
+</head>
+<body>
+of<span class=a>&nbsp;</span>fice
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-text/boundary-shaping/reference/boundary-shaping-004.ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<style>
+@font-face {
+  font-family: test;
+  src: url(../resources/LinLibertine_Re-4.7.5.woff);
+}
+body {
+  font: 36px test; /* use a font that includes ligatures for "fi" etc */
+}
+.a {
+  display: inline-block;
+  width: 10px;
+}
+</style>
+</head>
+<body>
+off<span class=a>&nbsp;</span>ice
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-text/boundary-shaping/reference/boundary-shaping-005.ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<style>
+@font-face {
+  font-family: test;
+  src: url(../resources/LinLibertine_Re-4.7.5.woff);
+}
+body {
+  font: 36px test; /* use a font that includes ligatures for "fi" etc */
+}
+.a {
+  display: inline-block;
+  width: 10px;
+}
+</style>
+</head>
+<body>
+off<span class=a>&nbsp;</span>ice
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-text/boundary-shaping/reference/boundary-shaping-006.ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<style>
+@font-face {
+  font-family: test;
+  src: url(../resources/LinLibertine_Re-4.7.5.woff);
+}
+body {
+  font: 36px test; /* use a font that includes ligatures for "fi" etc */
+}
+.a {
+  vertical-align: super;
+  display: inline-block;
+}
+</style>
+</head>
+<body>
+of<span class=a>f</span>ice
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-text/boundary-shaping/reference/boundary-shaping-007.ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<style>
+@font-face {
+  font-family: test;
+  src: url(../resources/LinLibertine_Re-4.7.5.woff);
+}
+body {
+  font: 36px test; /* use a font that includes ligatures for "fi" etc */
+}
+.a {
+  padding-left: 10px;
+  margin-right: 10px;
+  display: inline-block;
+}
+</style>
+</head>
+<body>
+of<span class=a>f</span>ice
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-text/boundary-shaping/reference/boundary-shaping-008.ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<style>
+@font-face {
+  font-family: test;
+  src: url(../resources/LinLibertine_Re-4.7.5.woff);
+}
+body {
+  font: 36px test; /* use a font that includes ligatures for "fi" etc */
+}
+.a {
+  display: inline-block;
+}
+</style>
+</head>
+<body>
+of<span class=a>f</span>ice
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-text/boundary-shaping/reference/boundary-shaping-009.ref.html
@@ -0,0 +1,56 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<style>
+body {
+  font: 36px sans-serif;
+}
+div {
+  text-align: center;
+}
+.a {
+  display: inline-block;
+  width: 10px;
+}
+.c1 {
+  padding-left: 10px;
+}
+.c {
+  color: red;
+}
+.d1 {
+  margin-right: 10px;
+}
+.d {
+  color: red;
+}
+</style>
+</head>
+<body>
+<div dir=ltr>
+السلام<span class=a>&nbsp;</span>عليكم
+</div>
+<div dir=ltr>
+السلام<span class=a>&nbsp;</span>عليكم
+</div>
+<div dir=rtl>
+السلام<span class=a>&nbsp;</span>عليكم
+</div>
+<div dir=rtl>
+السلام<span class=a>&nbsp;</span>عليكم
+</div>
+<div dir=ltr>
+<span class=c1>السلام<span class=c>عليكم</span></span>
+</div>
+<div dir=ltr>
+<span class=d1><span class=d>السلام</span>عليكم</span>
+</div>
+<div dir=rtl>
+<span class=c1>السلام<span class=c>عليكم</span></span>
+</div>
+<div dir=rtl>
+<span class=d1><span class=d>السلام</span>عليكم</span>
+</div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-text/boundary-shaping/reference/boundary-shaping-010.ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<style>
+body {
+  font: 36px sans-serif;
+}
+div {
+  text-align: center;
+}
+</style>
+</head>
+<body>
+<div dir=rtl>
+السلام
+</body>
+</html>
copy from layout/reftests/fonts/LinLibertine_Re-4.7.5.woff
copy to testing/web-platform/tests/css/css-text/boundary-shaping/resources/LinLibertine_Re-4.7.5.woff