Bug 1607913 - Use Consolas instead of Courier New in Windows monospace font prefs. r=jfkthame

A number of tests (and expectations) are updated here to either avoid
accidentally relying on the size of Courier New on Windows, or to
explicitly use Courier New instead of monospace, where it's harder to
work out how to rewrite the test correctly.

Differential Revision: https://phabricator.services.mozilla.com/D87222
This commit is contained in:
Cameron McCormack 2022-03-01 11:03:42 +00:00
Родитель 5d9af4370c
Коммит 844fb17be9
25 изменённых файлов: 56 добавлений и 37 удалений

Просмотреть файл

@ -10,7 +10,7 @@ const MAX_WIDTH = 300;
const START_TEXT = "Start text";
const LONG_TEXT =
"I am a long text and I will not fit in a 300px container. " +
"I expect the inplace editor to wrap.";
"I expect the inplace editor to wrap over more than two lines.";
// Test the inplace-editor behavior with a maxWidth configuration option
// defined.

Просмотреть файл

@ -9,7 +9,7 @@
</head>
<body onload="bodyLoaded()">
<p id="display"></p>
<div id="scrollable" style="font-family:monospace; font-size: 18px; line-height: 1; overflow: auto; width: 200px; height: 200px;">
<div id="scrollable" style="font-family: 'Courier New', monospace; font-size: 18px; line-height: 1; overflow: auto; width: 200px; height: 200px;">
<div id="scrolled" style="font-size: 64px; width: 5000px; height: 5000px;">
Tere is a lot of text. Tere is a lot of text. Tere is a lot of text. Tere is a lot of text. Tere is a lot of text.<br>
Tere is a lot of text. Tere is a lot of text. Tere is a lot of text. Tere is a lot of text. Tere is a lot of text.<br>

Просмотреть файл

@ -179,6 +179,6 @@ random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == brackets-3b-rtl.html bra
== 1366623-1.html 1366623-1-ref.html
random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == 1426042-1.html 1426042-1-ref.html # Bug 1392106
== clone-intrinsic-size-bidi.html clone-intrinsic-size-bidi-ref.html
== slice-intrinsic-size-bidi.html slice-intrinsic-size-bidi-ref.html
fuzzy-if(winWidget,70-112,8-8) == slice-intrinsic-size-bidi.html slice-intrinsic-size-bidi-ref.html
== 1556414-1.html 1556414-1-ref.html
== 1567036-1.html 1567036-1-ref.html

Просмотреть файл

@ -1,6 +1,6 @@
== bounds-1.html bounds-1-ref.html
fuzzy(0-65,0-3) == size-1.html size-1-ref.html
== size-2.html size-2-ref.html
fuzzy-if(winWidget,0-36,0-1) == size-2.html size-2-ref.html
== baseline-1.html baseline-1-ref.html
== chrome://reftest/content/forms/input/text/centering-1.xhtml chrome://reftest/content/forms/input/text/centering-1-ref.xhtml
== chrome://reftest/content/forms/input/text/dynamic-height-1.xhtml chrome://reftest/content/forms/input/text/dynamic-height-1-ref.xhtml

Просмотреть файл

@ -2662,17 +2662,17 @@ pref("font.size.monospace.x-math", 13);
pref("font.name-list.serif.ar", "Times New Roman");
pref("font.name-list.sans-serif.ar", "Segoe UI, Tahoma, Arial");
pref("font.name-list.monospace.ar", "Courier New");
pref("font.name-list.monospace.ar", "Consolas");
pref("font.name-list.cursive.ar", "Comic Sans MS");
pref("font.name-list.serif.el", "Times New Roman");
pref("font.name-list.sans-serif.el", "Arial");
pref("font.name-list.monospace.el", "Courier New");
pref("font.name-list.monospace.el", "Consolas");
pref("font.name-list.cursive.el", "Comic Sans MS");
pref("font.name-list.serif.he", "Narkisim, David");
pref("font.name-list.sans-serif.he", "Arial");
pref("font.name-list.monospace.he", "Fixed Miriam Transparent, Miriam Fixed, Rod, Courier New");
pref("font.name-list.monospace.he", "Fixed Miriam Transparent, Miriam Fixed, Rod, Consolas, Courier New");
pref("font.name-list.cursive.he", "Guttman Yad, Ktav, Arial");
pref("font.name-list.serif.ja", "Yu Mincho, MS PMincho, MS Mincho, Meiryo, Yu Gothic, MS PGothic, MS Gothic");
@ -2691,17 +2691,17 @@ pref("font.size.monospace.x-math", 13);
pref("font.name-list.serif.x-cyrillic", "Times New Roman");
pref("font.name-list.sans-serif.x-cyrillic", "Arial");
pref("font.name-list.monospace.x-cyrillic", "Courier New");
pref("font.name-list.monospace.x-cyrillic", "Consolas");
pref("font.name-list.cursive.x-cyrillic", "Comic Sans MS");
pref("font.name-list.serif.x-unicode", "Times New Roman");
pref("font.name-list.sans-serif.x-unicode", "Arial");
pref("font.name-list.monospace.x-unicode", "Courier New");
pref("font.name-list.monospace.x-unicode", "Consolas");
pref("font.name-list.cursive.x-unicode", "Comic Sans MS");
pref("font.name-list.serif.x-western", "Times New Roman");
pref("font.name-list.sans-serif.x-western", "Arial");
pref("font.name-list.monospace.x-western", "Courier New");
pref("font.name-list.monospace.x-western", "Consolas");
pref("font.name-list.cursive.x-western", "Comic Sans MS");
pref("font.name-list.serif.zh-CN", "SimSun, MS Song, SimSun-ExtB");
@ -2799,7 +2799,7 @@ pref("font.size.monospace.x-math", 13);
pref("font.name-list.serif.x-math", "Latin Modern Math, STIX Two Math, XITS Math, Cambria Math, Libertinus Math, DejaVu Math TeX Gyre, TeX Gyre Bonum Math, TeX Gyre Pagella Math, TeX Gyre Schola, TeX Gyre Termes Math, STIX Math, Asana Math, STIXGeneral, DejaVu Serif, DejaVu Sans, Times New Roman");
pref("font.name-list.sans-serif.x-math", "Arial");
pref("font.name-list.monospace.x-math", "Courier New");
pref("font.name-list.monospace.x-math", "Consolas");
pref("font.name-list.cursive.x-math", "Comic Sans MS");
// ClearType tuning parameters for directwrite/d2d.

Просмотреть файл

@ -1,6 +1,7 @@
[selection-input-011.html]
expected:
if os == "mac": PASS
if os == "win": PASS
if os == "android" and non_native_theme: PASS
FAIL
bug: Test relies on on particular font metrics which are just right on Android.

Просмотреть файл

@ -1,7 +1,2 @@
[selection-textarea-011.html]
fuzzy: maxDifference=0-80;totalPixels=0-4
expected:
if os == "linux": PASS
if os == "android": PASS
if os == "mac": PASS
FAIL
fuzzy: maxDifference=0-80;totalPixels=0-4

Просмотреть файл

@ -0,0 +1,4 @@
[text-emphasis-style-008.html]
bug: Fuzz looks massive but it's just a dot antialiased differently
fuzzy:
if os == "win": maxDifference=0-47;totalPixels=0-54

Просмотреть файл

@ -0,0 +1,2 @@
[line-break-anywhere-001.html]
fuzzy: maxDifference=0-184;totalPixels=0-8

Просмотреть файл

@ -1,3 +0,0 @@
[line-edge-white-space-collapse-001.html]
expected:
[PASS, FAIL]

Просмотреть файл

@ -1,3 +0,0 @@
[text-overflow-027.html]
expected:
if (os == "win"): FAIL

Просмотреть файл

@ -1,6 +1,5 @@
[mousemove-between.html]
expected:
if os == "mac": ERROR
if os == "win": ERROR
[Mousemove events between elements should fire in the correct order.]
expected: [PASS, FAIL]

Просмотреть файл

@ -16,7 +16,7 @@
{
font-family: monospace;
font-size: 100px;
height: 2.8ch;
height: 3em;
line-height: 1.5; /* computes to 150px */
width: 4ch;

Просмотреть файл

@ -7,7 +7,7 @@
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<link rel="help" href="https://www.w3.org/TR/css-overflow-3/#ink-overflow">
<link rel="help" href="https://www.w3.org/TR/css-contain-1/#containment-layout">
<link rel="match" href="reference/contain-layout-ink-overflow-013-ref.html">
<link rel="match" href="reference/contain-layout-ink-overflow-014-ref.html">
<meta content="This test checks that when the contents of an element with 'contain: layout' overflows, its contents must be treated as ink overflow. In this test, the content overflows the div#inner. If such content was treated as 'overflow: visible', then the div#outer would 'pick up' such content and would make it reachable and accessible via its own generated scrollbar. But the overflowed content must be treated as ink overflow and is therefore treated as a graphical effect that is beyond the scrolling mechanism and outside the scrolling mechanism." name="assert">

Просмотреть файл

@ -7,7 +7,7 @@
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<link rel="help" href="https://www.w3.org/TR/css-overflow-3/#ink-overflow">
<link rel="help" href="https://www.w3.org/TR/css-contain-1/#containment-layout">
<link rel="match" href="reference/contain-layout-ink-overflow-013-ref.html">
<link rel="match" href="reference/contain-layout-ink-overflow-014-ref.html">
<meta content="This test checks that when the contents of an element with 'contain: layout' overflows, its contents must be treated as ink overflow. In this test, the content overflows the div#inner. If such content was treated as 'overflow: visible', then the div#outer would 'pick up' such content and would make it reachable and accessible via its own generated scrollbar. But the overflowed content must be treated as ink overflow and is therefore treated as a graphical effect that is beyond the scrolling mechanism and outside the scrolling mechanism." name="assert">

Просмотреть файл

@ -11,7 +11,7 @@
{
font-family: monospace;
font-size: 100px;
height: 2.8ch;
height: 3em;
overflow: scroll;
width: 4ch;
}

Просмотреть файл

@ -0,0 +1,24 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Reference Test</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<style>
div
{
font-family: monospace;
font-size: 100px;
height: 2.8ch;
overflow: scroll;
width: 4ch;
}
</style>
<body>
<p>Test passes if there is no red.
<div></div>

Просмотреть файл

@ -9,7 +9,7 @@
<link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
<style>
html,body {
color:black; background-color:white; font:15px/1 monospace; padding:0; margin:0;
color:black; background-color:white; font:15px/1 "Courier New", monospace; padding:0; margin:0;
}
grid {
display: inline-grid;

Просмотреть файл

@ -11,7 +11,7 @@
<link rel="match" href="masonry-align-tracks-multi-001-ref.html">
<style>
html,body {
color:black; background-color:white; font:15px/1 monospace; padding:0; margin:0;
color:black; background-color:white; font:15px/1 "Courier New", monospace; padding:0; margin:0;
}
grid {
display: inline-grid;

Просмотреть файл

@ -9,7 +9,7 @@
<link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
<style>
html,body {
color:black; background-color:white; font:25px/1 monospace; padding:0; margin:0;
color:black; background-color:white; font:25px/1 "Courier New", monospace; padding:0; margin:0;
}
grid {

Просмотреть файл

@ -11,7 +11,7 @@
<link rel="match" href="masonry-gap-001-ref.html">
<style>
html,body {
color:black; background-color:white; font:25px/1 monospace; padding:0; margin:0;
color:black; background-color:white; font:25px/1 "Courier New", monospace; padding:0; margin:0;
}
grid {

Просмотреть файл

@ -9,7 +9,7 @@
<link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
<style>
html,body {
color:black; background-color:white; font:15px/1 monospace; padding:0; margin:0;
color:black; background-color:white; font:15px/1 "Courier New", monospace; padding:0; margin:0;
}
grid {
display: inline-grid;

Просмотреть файл

@ -11,7 +11,7 @@
<link rel="match" href="masonry-justify-tracks-multi-001-ref.html">
<style>
html,body {
color:black; background-color:white; font:15px/1 monospace; padding:0; margin:0;
color:black; background-color:white; font:15px/1 "Courier New", monospace; padding:0; margin:0;
}
grid {
display: inline-grid;

Просмотреть файл

@ -4,7 +4,7 @@
.clamp {
display: -webkit-box;
-webkit-box-orient: vertical;
width: 150px;
width: 10ch;
font: 16px / 32px monospace;
background-color: yellow;
padding: 4px;
@ -13,5 +13,5 @@
</style>
<div class="clamp">
supercalifragilisticexpialidocious
supercalifragi
supercali…
</div>

Просмотреть файл

@ -8,7 +8,7 @@
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
width: 150px;
width: 10ch;
font: 16px / 32px monospace;
background-color: yellow;
padding: 4px;