reftests for bug 481751

--HG--
extra : rebase_source : b9a54218d11b7abb5ac01c299a92f47d36bbb976
This commit is contained in:
Karl Tomlinson 2009-05-19 10:15:37 +12:00
parent 3bbadcfb42
commit 844139449a
7 changed files with 191 additions and 0 deletions

View File

@ -0,0 +1,21 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en-US">
<head>
<title>Text baseline positioning reference</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
@font-face {
font-family: "MarkA";
src: url(../fonts/markA.ttf);
}
input {
font-family: "MarkA", sans-serif;
font-size: 32px;
}
</style>
</head>
<body>
<input size="2" value="AAAAAAAA">
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en-US">
<head>
<title>Text baseline positioning test</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!--
The primary font MarkA has a small line height. The fallback font
(used for the character '1') will probably have a maximum ascent
greater than the ascent plus half leading of MarkA, but this
should not adversly affect the positioning of characters from the
primary font. Currently the maximum ascent of the fallback font
has no effect on the position, but if a future implementation
considers the fallback font in the position, this test may need to
be modified to accommodate.
-->
<style type="text/css">
@font-face {
font-family: "MarkA";
src: url(../fonts/markA.ttf);
}
input {
font-family: "MarkA", sans-serif;
font-size: 32px;
}
</style>
</head>
<body>
<input size="2" value="AAAAAAAA1">
</body>
</html>

View File

@ -0,0 +1,28 @@
<?xml version="1.0"?>
<window title="Text input text centering reference"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:style type="text/css">
@font-face {
font-family: "Ahem";
src: url(../fonts/Ahem.ttf);
}
hbox {
height: 128px;
background-color: white;
}
input {
height: 64px;
background-color: white;
border: none;
margin: 0px;
padding: 0px;
font-family: "Ahem", sans-serif;
font-size: 32px;
}
</html:style>
<hbox align="center">
<html:input value="Ahem"/>
</hbox>
</window>

View File

@ -0,0 +1,39 @@
<?xml version="1.0"?>
<window title="Text input text centering test"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<!--
There is no spec that says where text within an html text input element
should be placed, but some sort of centering reduces the likelihood or
extent of clipping.
This test uses a font where every character used has an ascent and
descent equal to typographical ascent of the font. This makes it
unlikely that using a different concept of centering will change the
results of this test.
-->
<html:style type="text/css">
@font-face {
font-family: "Ahem";
src: url(../fonts/Ahem.ttf);
}
hbox {
height: 128px;
background-color: white;
}
input {
background-color: white;
border: none;
margin: 0px;
padding: 0px;
font-family: "Ahem", sans-serif;
font-size: 32px;
}
</html:style>
<hbox align="stretch">
<html:input value="Ahem"/>
</hbox>
</window>

View File

@ -1,9 +1,14 @@
== checkbox-label-dynamic.html checkbox-label-dynamic-ref.html
== checkbox-radio-stretched.html checkbox-radio-stretched-ref.html # bug 464589
== input-file-width-clip-1.html input-file-width-clip-ref.html # bug 409587
== input-text-size-1.html input-text-size-1-ref.html
== input-text-size-2.html input-text-size-2-ref.html
HTTP(..) == input-text-baseline-1.html input-text-baseline-1-ref.html
HTTP(..) == input-text-centering-1.xul input-text-centering-1-ref.xul
HTTP(..) == text-control-baseline-1.html text-control-baseline-1-ref.html
== radio-label-dynamic.html radio-label-dynamic-ref.html
== out-of-bounds-selectedindex.html out-of-bounds-selectedindex-ref.html # bug 471741
!= indeterminate-checked.html indeterminate-checked-notref.html

View File

@ -0,0 +1,30 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en-US">
<head>
<title>Reference for bug 481751</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
@font-face {
font-family: "MarkA";
src: url(../fonts/markA.ttf);
}
body {
background-color: white;
}
input, textarea {
font-family: "MarkA", sans-serif;
font-size: 32px;
background-color: black;
color: black;
vertical-align: baseline;
}
</style>
</head>
<body>
<input size="2" value="A">
<input size="2" value="A">
<textarea cols="2">A</textarea>
<textarea cols="2">A</textarea>
</body>
</html>

View File

@ -0,0 +1,37 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en-US">
<head>
<title>Test for bug 481751</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!--
The primary font MarkA has a small line height. The default font
(used for the character '1') will probably have a maximum ascent
greater than the ascent plus half leading of MarkA, but this
should not change the baseline (and thus position) of the text
control.
-->
<style type="text/css">
@font-face {
font-family: "MarkA";
src: url(../fonts/markA.ttf);
}
body {
background-color: white;
}
input, textarea {
font-family: "MarkA", sans-serif;
font-size: 32px;
background-color: black;
color: black;
vertical-align: baseline;
}
</style>
</head>
<body>
<input size="2" value="A">
<input size="2" value="A1">
<textarea cols="2">A</textarea>
<textarea cols="2">A1</textarea>
</body>
</html>