Bug 1135361 - Reftest for ruby positioning in justified vertical text. r=xidorn

This commit is contained in:
Jonathan Kew 2015-02-24 10:17:47 +00:00
parent 253cce7ad9
commit c948b65c1c
3 changed files with 92 additions and 0 deletions

View File

@ -0,0 +1,45 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Test for bug 1135361</title>
<style>
body {
font: 48px sans-serif;
}
div {
display: inline-block;
width: 3em;
border: 1px solid silver;
padding: .5em;
}
p {
writing-mode: vertical-rl;
-webkit-writing-mode: vertical-rl;
-ms-writing-mode: tb-rl; /* old syntax. IE */
text-orientation: upright;
-webkit-text-orientation: upright;
height: 4ch;
}
rt {
font-size: 20%; /* ensure ruby is small enough that it won't affect inline spacing */
}
span {
display: inline-block;
height: .5ch; /* shim for fake justification */
}
</style>
</head>
<body>
<div>
<p>
<span></span><ruby><rt>to</rt></ruby>
</p>
</div>
<div>
<p style="text-align:right;">
<ruby><rt>kyo</rt></ruby><span></span>
</p>
</div>
</body>
</html>

View File

@ -0,0 +1,46 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Test for bug 1135361</title>
<style>
body {
font: 48px sans-serif;
}
div {
display: inline-block;
width: 3em;
border: 1px solid silver;
padding: .5em;
}
p {
writing-mode: vertical-rl;
-webkit-writing-mode: vertical-rl;
-ms-writing-mode: tb-rl; /* old syntax. IE */
text-orientation: upright;
-webkit-text-orientation: upright;
height: 4ch;
text-align: justify;
-moz-text-align-last: justify;
}
rt {
font-size: 20%; /* ensure ruby is small enough that it won't affect inline spacing */
}
.t {
color: transparent;
}
</style>
</head>
<body>
<div>
<p>
<ruby><rt>to</rt></ruby><ruby class="t"><rt>kyo</rt></ruby>
</p>
</div>
<div>
<p>
<ruby class="t"><rt>to</rt></ruby><ruby><rt>kyo</rt></ruby>
</p>
</div>
</body>
</html>

View File

@ -103,3 +103,4 @@ HTTP(..) == 1127488-align-end-vertical-lr-ltr.html 1127488-align-bottom-left-ref
HTTP(..) == 1127488-align-left-vertical-lr-ltr.html 1127488-align-top-left-ref.html
HTTP(..) == 1127488-align-right-vertical-lr-ltr.html 1127488-align-bottom-left-ref.html
== 1131013-vertical-bidi.html 1131013-vertical-bidi-ref.html
fails-if(B2G) == 1135361-ruby-justify-1.html 1135361-ruby-justify-1-ref.html # bug 1136067