Auto merge of #10722 - notriddle:table_cell_valign, r=SimonSapin

layout: Add support for vertical alignment within table cells.

Fixes #10621

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10722)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-04-26 11:04:41 -07:00
commit 31a440867d
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

@ -5804,6 +5804,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",
@ -12508,6 +12532,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>