Bug 1124661 - Make some vertical writing-mode reftests more robust, and/or mark as fuzzy where minor subpixel differences occur. r=smontagu.

DONTBUILD because these tests are not currently enabled on trunk anyway.
This commit is contained in:
Jonathan Kew 2015-02-05 12:39:11 +00:00
parent e41da3e1be
commit 2f9cde99aa
13 changed files with 99 additions and 43 deletions

View File

@ -3,8 +3,12 @@
<head>
<meta charset="utf-8">
<style>
@font-face {
font-family:test;
src:url(../fonts/sil/GenR102.ttf);
}
body { width: 500px; height: 300px; writing-mode: vertical-rl;
font:16px/24px serif; margin: 0; border: 1px solid gray; }
font:16px/24px test; margin: 0; border: 1px solid gray; }
div { margin: 10px; background: #eee; }
</style>
</head>

View File

@ -3,8 +3,12 @@
<head>
<meta charset="utf-8">
<style>
@font-face {
font-family:test;
src:url(../fonts/sil/GenR102.ttf);
}
body { width: 500px; height: 300px; writing-mode: vertical-rl;
font:16px/24px serif; margin: 0; border: 1px solid gray; }
font:16px/24px test; margin: 0; border: 1px solid gray; }
div { margin: 10px; background: #eee; }
</style>
</head>

View File

@ -2,6 +2,13 @@
<head>
<meta charset="utf-8">
<style>
@font-face {
font-family: test;
src: url(../fonts/mplus/mplus-1p-regular.ttf);
}
body {
font-family: test;
}
body > div {
width:410px;
height:610px;

View File

@ -2,6 +2,13 @@
<head>
<meta charset="utf-8">
<style>
@font-face {
font-family: test;
src: url(../fonts/mplus/mplus-1p-regular.ttf);
}
body {
font-family: test;
}
body > div {
width:410px;
height:610px;

View File

@ -3,18 +3,23 @@
<head>
<meta charset="utf-8">
<style>
@font-face {
font-family: dejavu;
src: url(../fonts/DejaVuSansMono.woff);
}
.test {
margin:10px;
border:1px solid blue;
font-family: monospace;
font-family: dejavu;
font-size: 16px;
letter-spacing: 0.1em;
word-break:break-all;
text-transform:full-width;
width:7.8em;
height:7.8em;
text-orientation:upright;
width:7em;
height:7em;
}
.h { writing-mode:horizontal-tb; }
.h { writing-mode:horizontal-tb; letter-spacing: 0.4em }
.v-lr { writing-mode:vertical-lr; }
.v-rl { writing-mode:vertical-rl; }

View File

@ -3,18 +3,23 @@
<head>
<meta charset="utf-8">
<style>
@font-face {
font-family: dejavu;
src: url(../fonts/DejaVuSansMono.woff);
}
.test {
margin:10px;
border:1px solid blue;
font-family: monospace;
font-family: dejavu;
font-size: 16px;
letter-spacing: 0.1em;
word-break:break-all;
text-transform:full-width;
width:7.8em;
height:7.8em;
text-orientation:upright;
width:7em;
height:7em;
}
.h { writing-mode:horizontal-tb; }
.h { writing-mode:horizontal-tb; letter-spacing: 0.4em }
.v-lr { writing-mode:vertical-lr; }
.v-rl { writing-mode:vertical-rl; }

View File

@ -3,20 +3,27 @@
<head>
<meta charset="utf-8">
<style>
@font-face {
font-family: mplus;
src: url(../fonts/mplus/mplus-1p-regular.ttf);
}
@font-face {
font-family: dejavu;
src: url(../fonts/DejaVuSansMono.woff);
}
.test {
margin:10px;
border:1px solid blue;
font-family: monospace;
font-size: 16px;
word-break:break-all;
text-transform:full-width;
width:7.8em;
height:7.8em;
text-orientation:upright;
width:7.9em;
height:7.9em;
}
.h { writing-mode:horizontal-tb; }
.v-lr { writing-mode:vertical-lr; }
.v-rl { writing-mode:vertical-rl; }
.h { writing-mode:horizontal-tb; font-family: mplus; text-transform:full-width; }
.v-lr { writing-mode:vertical-lr; font-family: dejavu; }
.v-rl { writing-mode:vertical-rl; font-family: dejavu; }
.bgtest {
background: url(blue-32x32.png) no-repeat;

View File

@ -3,20 +3,27 @@
<head>
<meta charset="utf-8">
<style>
@font-face {
font-family: mplus;
src: url(../fonts/mplus/mplus-1p-regular.ttf);
}
@font-face {
font-family: dejavu;
src: url(../fonts/DejaVuSansMono.woff);
}
.test {
margin:10px;
border:1px solid blue;
font-family: monospace;
font-size: 16px;
word-break:break-all;
text-transform:full-width;
width:7.8em;
height:7.8em;
text-orientation:upright;
width:7.9em;
height:7.9em;
}
.h { writing-mode:horizontal-tb; }
.v-lr { writing-mode:vertical-lr; }
.v-rl { writing-mode:vertical-rl; }
.h { writing-mode:horizontal-tb; font-family: mplus; text-transform:full-width; }
.v-lr { writing-mode:vertical-lr; font-family: dejavu; }
.v-rl { writing-mode:vertical-rl; font-family: dejavu; }
.bgtest {
background: url(blue-32x32.png) no-repeat;

View File

@ -3,17 +3,22 @@
<head>
<meta charset="utf-8">
<style>
@font-face {
font-family: dejavu;
src: url(../fonts/DejaVuSansMono.woff);
}
.test {
margin: 10px;
border: 1px solid gray;
font: 16px/24px monospace;
font: 16px/24px dejavu;
word-break: break-all;
width: 10em;
height: 6em;
height: 6.5em;
/* we use text-orientation:upright to improve the chances that our
glyphs will have an advance of exactly 1em, as the reference
rendering relies on this */
text-orientation: upright;
color: rgba(0,0,255,0.2);
}
.v-lr { writing-mode:vertical-lr; }

View File

@ -3,17 +3,22 @@
<head>
<meta charset="utf-8">
<style>
@font-face {
font-family: dejavu;
src: url(../fonts/DejaVuSansMono.woff);
}
.test {
margin: 10px;
border: 1px solid gray;
font: 16px/24px monospace;
font: 16px/24px dejavu;
word-break: break-all;
width: 10em;
height: 6em;
height: 6.5em;
/* we use text-orientation:upright to improve the chances that our
glyphs will have an advance of exactly 1em, as the reference
rendering relies on this */
text-orientation: upright;
color: rgba(0,0,255,0.2);
}
.v-lr { writing-mode:vertical-lr; }

View File

@ -20,15 +20,15 @@ div {
<body>
<div class="h">
<u>方ABC方方</u><i><u>abc</u></i><u>方方方</u><b><u>xyz</u></b><u></u>
<u>方ABC方方</u><i><u>abc</u></i><u>方方方</u><i><u>xyz</u></i><u></u>
</div>
<div class="v-lr">
<u>方ABC方方</u><i><u>abc</u></i><u>方方方</u><b><u>xyz</u></b><u></u>
<u>方ABC方方</u><i><u>abc</u></i><u>方方方</u><i><u>xyz</u></i><u></u>
</div>
<div class="v-rl">
<u>方ABC方方</u><i><u>abc</u></i><u>方方方</u><b><u>xyz</u></b><u></u>
<u>方ABC方方</u><i><u>abc</u></i><u>方方方</u><i><u>xyz</u></i><u></u>
</div>
</body>

View File

@ -20,15 +20,15 @@ div {
<body>
<div class="h">
<u>方ABC方方<i>abc</i>方方方<b>xyz</b></u>
<u>方ABC方方<i>abc</i>方方方<i>xyz</i></u>
</div>
<div class="v-lr">
<u>方ABC方方<i>abc</i>方方方<b>xyz</b></u>
<u>方ABC方方<i>abc</i>方方方<i>xyz</i></u>
</div>
<div class="v-rl">
<u>方ABC方方<i>abc</i>方方方<b>xyz</b></u>
<u>方ABC方方<i>abc</i>方方方<i>xyz</i></u>
</div>
</body>

View File

@ -1,12 +1,12 @@
# This directory contains tests for vertical text and logical layout coordinates
# It should not be included in layout/reftests/reftest.list until vertical layout
# is turned on
== 1079154-1-vertical-rl-columns.html 1079154-1-vertical-rl-columns-ref.html
HTTP(..) == 1079154-1-vertical-rl-columns.html 1079154-1-vertical-rl-columns-ref.html
== 1082844.html 1082844-ref.html
== 1083748.html 1083748-ref.html
== 1083848-1-inline-border.html 1083848-1-inline-border-ref.html
== 1083848-2-inline-background.html 1083848-2-inline-background-ref.html
== 1083848-3-inline-background-repeat.html 1083848-3-inline-background-repeat-ref.html
HTTP(..) == 1083748.html 1083748-ref.html
HTTP(..) == 1083848-1-inline-border.html 1083848-1-inline-border-ref.html
HTTP(..) == 1083848-2-inline-background.html 1083848-2-inline-background-ref.html
fuzzy-if(gtk2Widget,255,2) fuzzy-if(winWidget||Android||B2G,4,8704) HTTP(..) == 1083848-3-inline-background-repeat.html 1083848-3-inline-background-repeat-ref.html
== 1083892-1.html 1083892-1-ref.html
== 1086883-1a.html 1086883-1-ref.html
== 1086883-1b.html 1086883-1-ref.html
@ -17,7 +17,7 @@
== 1090168-1.html 1090168-1-ref.html
!= 1090168-1.html 1090168-1-notref.html
== 1090168-2.html 1090168-2-ref.html
== 1090168-3.html 1090168-3-ref.html
fuzzy-if(B2G,244,173) == 1090168-3.html 1090168-3-ref.html
== 1091058-1.html 1091058-1-ref.html
random-if(gtk2Widget) == 1094434-1.html 1094434-1-ref.html # bug 1094845
random-if(gtk2Widget) == 1094434-2.html 1094434-2-ref.html # bug 1094845
@ -33,7 +33,7 @@ fails == 1102175-1a.html 1102175-1-ref.html
== 1106669-1-intrinsic-for-container.html 1106669-1-intrinsic-for-container-ref.html
== 1108923-1-percentage-margins.html 1108923-1-percentage-margins-ref.html
== 1111944-1-list-marker.html 1111944-1-list-marker-ref.html
HTTP(..) == 1115916-1-vertical-metrics.html 1115916-1-vertical-metrics-ref.html
fuzzy(116,64) HTTP(..) == 1115916-1-vertical-metrics.html 1115916-1-vertical-metrics-ref.html
== 1122366-1-margin-collapse.html 1122366-1-margin-collapse-ref.html
== 1124636-1-fieldset-max-height.html 1124636-1-fieldset-max-height-ref.html
== 1124636-2-fieldset-min-height.html 1124636-2-fieldset-min-height-ref.html