Add support for vertical alignment within table cells.

Fixes #10621
This commit is contained in:
Michael Howell 2016-04-19 14:47:55 -07:00
parent f051028ee8
commit 8953207f83
9 changed files with 184 additions and 5 deletions

View file

@ -1,3 +0,0 @@
[vertical-align-applies-to-007.htm]
type: reftest
expected: FAIL

View file

@ -5791,6 +5791,30 @@
"url": "/_mozilla/mozilla/sslfail.html"
}
],
"mozilla/table_valign_bottom.html": [
{
"path": "mozilla/table_valign_bottom.html",
"references": [
[
"/_mozilla/mozilla/table_valign_bottom_ref.html",
"=="
]
],
"url": "/_mozilla/mozilla/table_valign_bottom.html"
}
],
"mozilla/table_valign_middle.html": [
{
"path": "mozilla/table_valign_middle.html",
"references": [
[
"/_mozilla/mozilla/table_valign_middle_ref.html",
"=="
]
],
"url": "/_mozilla/mozilla/table_valign_middle.html"
}
],
"mozilla/webgl/clearcolor.html": [
{
"path": "mozilla/webgl/clearcolor.html",
@ -12465,6 +12489,30 @@
"url": "/_mozilla/mozilla/sslfail.html"
}
],
"mozilla/table_valign_bottom.html": [
{
"path": "mozilla/table_valign_bottom.html",
"references": [
[
"/_mozilla/mozilla/table_valign_bottom_ref.html",
"=="
]
],
"url": "/_mozilla/mozilla/table_valign_bottom.html"
}
],
"mozilla/table_valign_middle.html": [
{
"path": "mozilla/table_valign_middle.html",
"references": [
[
"/_mozilla/mozilla/table_valign_middle_ref.html",
"=="
]
],
"url": "/_mozilla/mozilla/table_valign_middle.html"
}
],
"mozilla/webgl/clearcolor.html": [
{
"path": "mozilla/webgl/clearcolor.html",

View file

@ -0,0 +1,17 @@
<!doctype html>
<meta charset="utf-8">
<title>Table align bottom</title>
<link rel="match" href="table_valign_bottom_ref.html">
<style>
td {
height: 5em;
width: 5em;
border: 1px solid black;
vertical-align: bottom;
}
</style>
<table>
<tr>
<td>Foo</td>
</tr>
</table>

View file

@ -0,0 +1,25 @@
<!doctype html>
<meta charset="utf-8">
<title>Reference: table align bottom</title>
<style>
td {
height: 5em;
width: 5em;
border: 1px solid black;
}
div {
position: relative;
height: 5em;
width: 5em;
}
span {
position: absolute;
bottom: 0;
}
</style>
<table>
<tr>
<td><div><span>Foo</span></div></td>
</tr>
</table>

View file

@ -0,0 +1,16 @@
<!doctype html>
<meta charset="utf-8">
<title>Middle alignment in tables</title>
<link rel="match" href="table_valign_middle_ref.html">
<style>
td {
height: 5em;
width: 5em;
border: 1px solid black;
}
</style>
<table>
<tr>
<td>Foo</td>
</tr>
</table>

View file

@ -0,0 +1,23 @@
<!doctype html>
<meta charset="utf-8">
<title>Reference: middle alignment in tables</title>
<style>
td {
height: 5em;
width: 5em;
border: 1px solid black;
vertical-align: top;
}
div {
width: 5em;
height: 5em;
line-height: 5em;
vertical-align: middle;
}
</style>
<table>
<tr>
<td><div>Foo</div></td>
</tr>
</table>