Bug 1685756 - Part 2: Add reftests for explicitly sized viewports. r=hiro

Touching layout.css.devPixelsPerPx during a reftest seems to cause a few
peculiarities:
- On OS X, increasing layout.css.devPixelsPerPx almost immediately runs into
  bug 1263092, so I'm skipping that test there.
- Likewise, under Webrender on Android using a value > 1 causes some weird
  display corruption issues during all subsequent tests running within the same
  task (bug 1724608).
- We're randomly hitting the "can't mark frame dirty during reflow" assertion
  again (bug 1724623).

Differential Revision: https://phabricator.services.mozilla.com/D122058
This commit is contained in:
Jan Henning 2021-08-10 19:36:24 +00:00
Родитель 030f9901f0
Коммит 51801cf11b
4 изменённых файлов: 58 добавлений и 0 удалений

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

@ -0,0 +1,18 @@
<!DOCTYPE html>
<!--
In a 450px container, the minimum font size at 15em per line is 30px.
This means we map 0px-45px into 30px-45px, so 12px gets mapped to 34px.
-->
<html>
<head>
<meta name="viewport" content="width=801"/>
<style>
div { width: 450px; font-size: 34px; line-height: 1.0; }
</style>
</head>
<body>
<div id="outer">
<div>Some inflated text.</div>
</div>
</body>
</html>

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

@ -0,0 +1,18 @@
<!DOCTYPE html>
<!--
In a 450px container, the minimum font size at 15em per line is 30px.
This means we map 0px-45px into 30px-45px, so 12px gets mapped to 34px.
-->
<html>
<head>
<meta name="viewport" content="width=801"/>
<style>
div { width: 450px; font-size: 12px; line-height: 1.0; }
</style>
</head>
<body>
<div id="outer">
<div>Some inflated text.</div>
</div>
</body>
</html>

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

@ -0,0 +1,18 @@
<!DOCTYPE html>
<!--
In a 450px container, the minimum font size at 15em per line is 30px.
This means we map 0px-45px into 30px-45px, so 12px gets mapped to 34px.
-->
<html>
<head>
<meta name="viewport" content="width=800"/>
<style>
div { width: 450px; font-size: 12px; line-height: 1.0; }
</style>
</head>
<body>
<div id="outer">
<div>Some uninflated text.</div>
</div>
</body>
</html>

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

@ -69,6 +69,10 @@ test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceE
test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == form-button-fixed-height.html form-button-fixed-height-ref.html test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == form-button-fixed-height.html form-button-fixed-height-ref.html
test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == form-button-fixed-width.html form-button-fixed-width-ref.html test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == form-button-fixed-width.html form-button-fixed-width-ref.html
test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == form-button.html form-button-ref.html test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == form-button.html form-button-ref.html
test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == fixed-width-viewport-no-inflation.html fixed-width-viewport-no-inflation.html
fails asserts(0-2) pref(layout.css.devPixelsPerPx,"0.5") test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == fixed-width-viewport-no-inflation.html fixed-width-viewport-no-inflation.html
test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == fixed-width-viewport-inflation.html fixed-width-viewport-inflation-ref.html
fails skip-if(Android&&webrender||cocoaWidget) asserts(0-2) pref(layout.css.devPixelsPerPx,"2.0") test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == fixed-width-viewport-inflation.html fixed-width-viewport-inflation-ref.html
# Ordinarily, reftests use a browser.viewport.desktopWidth of 800px, same as the # Ordinarily, reftests use a browser.viewport.desktopWidth of 800px, same as the
# size of the reftest document. The failure condition of the test below however # size of the reftest document. The failure condition of the test below however