Bug 1647520 Part 2 - Set font and line-height to make column reftests stable across all platforms. r=heycam

Without setting font and line-height, these reftests may yield different
results on different platforms because of the default font are
different. Also, their optimal column balancing height may not be an
integer in CSS pixels.

I discover this because they are failing due to 1px column height
difference after we stop searching optimal balancing height within a
certain threshold on either macOS, Windows, or Android.

Differential Revision: https://phabricator.services.mozilla.com/D83730
This commit is contained in:
Ting-Yu Lin 2020-07-20 22:27:42 +00:00
parent 8d402003a7
commit 07aaed8b60
30 changed files with 30 additions and 9 deletions

View File

@ -7,6 +7,7 @@
column-gap: 0;
border: solid silver;
width: 9em;
font: 16px/1 sans-serif;
}
p { margin: 0; }
</style>

View File

@ -7,6 +7,7 @@
border-collapse: separate;
border-spacing: 0;
border: solid silver;
font: 16px/1 sans-serif;
}
p { width: 3em; display: table-cell;}
</style>

View File

@ -7,6 +7,7 @@
column-gap: 0;
border: solid silver;
width: 9em;
font: 16px/1 sans-serif;
}
p { margin: 0; }
</style>

View File

@ -7,6 +7,7 @@
column-gap: 0;
border: solid silver;
width: 9em;
font: 16px/1 sans-serif;
}
p { margin: 0; }
</style>

View File

@ -7,6 +7,7 @@
border-collapse: separate;
border-spacing: 0;
border: solid silver;
font: 16px/1 sans-serif;
}
p { width: 3em; display: table-cell;}
</style>

View File

@ -7,6 +7,7 @@
column-gap: 0;
border: solid silver;
width: 9em;
font: 16px/1 sans-serif;
}
p { margin: 0; }
</style>

View File

@ -7,6 +7,7 @@
column-gap: 0;
border: solid silver;
width: 9em;
font: 16px/1 sans-serif;
}
p { margin: 0; min-height: 2em; }
</style>

View File

@ -7,6 +7,7 @@
border-collapse: separate;
border-spacing: 0;
border: solid silver;
font: 16px/1 sans-serif;
}
p { width: 3em; display: table-cell;}
</style>

View File

@ -7,6 +7,7 @@
column-gap: 0;
border: solid silver;
width: 9em;
font: 16px/1 sans-serif;
}
p { margin: 0; }
.short { height: 5px; }

View File

@ -7,6 +7,7 @@
column-gap: 0;
border: solid silver;
width: 9em;
font: 16px/1 sans-serif;
}
p { margin: 0; }
</style>

View File

@ -7,6 +7,7 @@
column-gap: 0;
border: solid silver;
width: 9em;
font: 16px/1 sans-serif;
}
p { margin: 0; }
.short { height: 5px; }

View File

@ -7,6 +7,7 @@
column-gap: 0;
border: solid silver;
width: 9em;
font: 16px/1 sans-serif;
}
p { margin: 0; }
.short { height: 5px; }

View File

@ -5,6 +5,7 @@
.colset {
border: solid silver;
width: 9em;
font: 16px/1 sans-serif;
}
p { margin: 0; width: 3em;}
</style>

View File

@ -9,6 +9,7 @@ table {
border: 1px solid;
inline-size: 600px;
box-sizing: content-box;
font: 16px/1 sans-serif;
}
td {

View File

@ -9,6 +9,7 @@ div {
column-gap: 0;
column-count: 4;
inline-size: 600px;
font: 16px/1 sans-serif;
}
/* cosmetics */

View File

@ -12,6 +12,7 @@ html {
table {
border: 1px solid;
inline-size: 100%;
font: 16px/1 sans-serif;
}
td {

View File

@ -12,6 +12,7 @@ html {
div {
column-gap: 0;
column-count: 4;
font: 16px/1 sans-serif;
}
/* cosmetics */

View File

@ -13,6 +13,7 @@ table {
border: 1px solid;
inline-size: 600px;
box-sizing: content-box;
font: 16px/1 sans-serif;
}
td {

View File

@ -13,6 +13,7 @@ div {
column-gap: 0;
column-count: 4;
inline-size: 600px;
font: 16px/1 sans-serif;
}
/* cosmetics */

View File

@ -8,6 +8,7 @@
table {
border: 1px solid;
width: 100%;
font: 16px/1 sans-serif;
}
td {

View File

@ -8,6 +8,7 @@
div {
column-gap: 0;
column-count: 4;
font: 16px/1 sans-serif;
}
/* cosmetics */

View File

@ -4,7 +4,7 @@
<title>616722-1</title>
<style type="text/css">
body,html { margin:0;padding: 10px;}
body,html { margin:0;padding: 10px; font: 20px/1 sans-serif;}
p { margin: 0; background:pink; }
.columns {
-webkit-column-count: 1;

View File

@ -4,7 +4,7 @@
<title>616722-1</title>
<style type="text/css">
body,html { margin:0;padding: 10px;}
body,html { margin:0;padding: 10px; font: 20px/1 sans-serif;}
p { margin: 3px 0; background:pink; }
div {
background-color:lime;

View File

@ -4,7 +4,7 @@
<title>616722-2</title>
<style type="text/css">
body,html { margin:0;padding: 10px;}
body,html { margin:0;padding: 10px; font: 20px/1 sans-serif; }
p { margin: 3px 0; background:pink; }
.no-border p { margin: 0; }

View File

@ -4,7 +4,7 @@
<title>616722-2</title>
<style type="text/css">
body,html { margin:0;padding: 10px;}
body,html { margin:0;padding: 10px; font: 20px/1 sans-serif; }
p { margin: 3px 0; background:pink; }
div {
background-color:lime;

View File

@ -14,7 +14,7 @@
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style type="text/css">
.multicol-wrapper>*{
font-family: Ahem;
font: 20px/1 Ahem;
}
div.multicol-wrapper{

View File

@ -14,7 +14,7 @@
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style type="text/css">
.multicol-wrapper>*{
font-family: Ahem;
font: 20px/1 Ahem;
}
div.multicol-wrapper{

View File

@ -14,7 +14,7 @@
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style type="text/css">
.multicol-wrapper>*{
font-family: Ahem;
font: 20px/1 Ahem;
}
div.multicol-wrapper{

View File

@ -14,7 +14,7 @@
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style type="text/css">
.multicol-wrapper>*{
font-family: Ahem;
font: 20px/1 Ahem;
}
div.multicol-wrapper{

View File

@ -10,7 +10,7 @@
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style type="text/css">
.multicol-wrapper>*{
font-family: Ahem;
font: 20px/1 Ahem;
}
div.multicol-wrapper{