Bug 1064172 - Add WPT reftests for properties that inhibit text shaping across inline element boundaries. r=jwatt

--HG--
rename : layout/reftests/fonts/LinLibertine_Re-4.7.5.woff => testing/web-platform/tests/css/css-text/boundary-shaping/resources/LinLibertine_Re-4.7.5.woff
This commit is contained in:
Jonathan Kew 2018-12-04 23:48:33 -05:00
parent 9ce81d127e
commit 49f58b6031
21 changed files with 522 additions and 0 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>