mirror of
https://github.com/servo/servo.git
synced 2025-10-01 09:09:15 +01:00
Auto merge of #13870 - pcwalton:anonymous-table-rewrite, r=mbrubeck
layout: Rewrite anonymous table code, simplify and fix table intrinsic width calculation, and improve safety of flexbox code. Closes #13782. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13870) <!-- Reviewable:end -->
This commit is contained in:
commit
6b40f97289
139 changed files with 932 additions and 896 deletions
|
@ -1424,6 +1424,18 @@
|
|||
"url": "/_mozilla/css/dirty_viewport.html"
|
||||
}
|
||||
],
|
||||
"css/display_table_cell_intrinsic_width_a.html": [
|
||||
{
|
||||
"path": "css/display_table_cell_intrinsic_width_a.html",
|
||||
"references": [
|
||||
[
|
||||
"/_mozilla/css/display_table_cell_intrinsic_width_ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
"url": "/_mozilla/css/display_table_cell_intrinsic_width_a.html"
|
||||
}
|
||||
],
|
||||
"css/empty_cells_a.html": [
|
||||
{
|
||||
"path": "css/empty_cells_a.html",
|
||||
|
@ -5994,18 +6006,6 @@
|
|||
"url": "/_mozilla/css/white-space-mixed-002.htm"
|
||||
}
|
||||
],
|
||||
"css/white-space-normal-001.htm": [
|
||||
{
|
||||
"path": "css/white-space-normal-001.htm",
|
||||
"references": [
|
||||
[
|
||||
"/_mozilla/css/white-space-normal-001-ref.htm",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
"url": "/_mozilla/css/white-space-normal-001.htm"
|
||||
}
|
||||
],
|
||||
"css/white-space-pre-line.htm": [
|
||||
{
|
||||
"path": "css/white-space-pre-line.htm",
|
||||
|
@ -15284,6 +15284,18 @@
|
|||
"url": "/_mozilla/css/dirty_viewport.html"
|
||||
}
|
||||
],
|
||||
"css/display_table_cell_intrinsic_width_a.html": [
|
||||
{
|
||||
"path": "css/display_table_cell_intrinsic_width_a.html",
|
||||
"references": [
|
||||
[
|
||||
"/_mozilla/css/display_table_cell_intrinsic_width_ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
"url": "/_mozilla/css/display_table_cell_intrinsic_width_a.html"
|
||||
}
|
||||
],
|
||||
"css/empty_cells_a.html": [
|
||||
{
|
||||
"path": "css/empty_cells_a.html",
|
||||
|
@ -19866,18 +19878,6 @@
|
|||
"url": "/_mozilla/css/white-space-mixed-002.htm"
|
||||
}
|
||||
],
|
||||
"css/white-space-normal-001.htm": [
|
||||
{
|
||||
"path": "css/white-space-normal-001.htm",
|
||||
"references": [
|
||||
[
|
||||
"/_mozilla/css/white-space-normal-001-ref.htm",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
"url": "/_mozilla/css/white-space-normal-001.htm"
|
||||
}
|
||||
],
|
||||
"css/white-space-pre-line.htm": [
|
||||
{
|
||||
"path": "css/white-space-pre-line.htm",
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<link rel="match" href="display_table_cell_intrinsic_width_ref.html">
|
||||
<style>
|
||||
body, html {
|
||||
margin: 0;
|
||||
}
|
||||
table, tbody, tr, td {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: none;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
</style>
|
||||
<div style="display: table-cell">Hello world</div>
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<style>
|
||||
body, html {
|
||||
margin: 0;
|
||||
}
|
||||
table, tbody, tr, td {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: none;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
</style>
|
||||
<table><tr><td>Hello world</td></tr></table>
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<!-- This is a lightly modified copy of
|
||||
tests/wpt/css-tests/css21_dev/html4/reference/white-space-normal-001-ref.htm,
|
||||
changed to work around a bug in Servo's margin handling (?).
|
||||
-->
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<title>CSS Reftest Reference</title>
|
||||
|
||||
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
|
||||
|
||||
<style type="text/css">
|
||||
div
|
||||
{
|
||||
background-color: green;
|
||||
border: black solid medium;
|
||||
height: 120px;
|
||||
text-align: center;
|
||||
width: 60px;
|
||||
margin-top: 19px;
|
||||
}
|
||||
|
||||
img
|
||||
{
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<p>Test passes if there is a rectangle with 3 columns (1 dark green, 1 light green and then 1 dark green) and if there is <strong>no red</strong>.</p>
|
||||
|
||||
<div><img src="swatch-lime.png" width="20" height="120" alt="Image download support must be enabled"></div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,50 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<!-- This is an exact copy of tests/wpt/css-tests/css21_dev/html4/white-space-normal-001.htm;
|
||||
the corresponding reference page is modified so Servo passes.
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>CSS Test: white-space normal: simple tests</title>
|
||||
<link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
|
||||
<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> <!-- 2012-06-29 -->
|
||||
<link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/text/white-space/normal/001.html" type="text/html">
|
||||
<link rel="help" href="http://www.w3.org/TR/CSS21/text.html#white-space-model">
|
||||
<link rel="match" href="white-space-normal-001-ref.htm">
|
||||
|
||||
<meta name="flags" content="ahem">
|
||||
|
||||
<style type="text/css">
|
||||
* { white-space: normal; }
|
||||
div { display: block; }
|
||||
span { display: inline; }
|
||||
table { padding: 0; border-spacing: 0; border: solid; }
|
||||
td { font: 20px/1 Ahem; color: red; background: red; padding: 0; }
|
||||
.red { background: red; }
|
||||
.green { color: green; background: lime; }
|
||||
.check { width: 3em; background: lime; color: green; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if there is a rectangle with 3 columns (1 dark green, 1 light green and then 1 dark green) and if there is <strong>no red</strong>.</p>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="red"> </div>
|
||||
<div class="red"> <div></div></div>
|
||||
<div class="red"> <div> </div></div>
|
||||
<div class="red"><div> </div></div>
|
||||
<div class="red"><div> </div> </div>
|
||||
<div class="red"><div></div> </div>
|
||||
<div class="red"> <div></div> </div>
|
||||
<div class="red"> <div> </div> </div>
|
||||
<div class="green"><span>X</span> <span>X</span></div>
|
||||
<div class="green"> <span>X</span> <span>X</span></div>
|
||||
<div class="green"><span>X</span> <span>X</span> </div>
|
||||
<div class="green"> <div></div> <span>X</span> <span>X</span> </div>
|
||||
<div class="green"> <span>X</span> <span>X</span> <div></div> </div>
|
||||
<div class="check">X X</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue