Bug 1508177 - Add reftests to make sure that expanded layout viewport areas that are initially out of the visual viewport are rendered by setting resolution. r=botond

Differential Revision: https://phabricator.services.mozilla.com/D40767

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Hiroyuki Ikezoe 2019-08-13 22:37:50 +00:00
Родитель cd3330b737
Коммит ccb7fd1a3f
4 изменённых файлов: 50 добавлений и 1 удалений

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

@ -18,6 +18,7 @@ default-preferences pref(dom.meta-viewport.enabled,true) pref(apz.allow_zooming,
fails == position-fixed-on-landscape-content.html position-fixed-on-half-height-content-ref.html
fails == position-fixed-on-square-content.html position-fixed-on-square-content-ref.html
fails == async-scroll-to-no-content-area.html async-scroll-to-no-content-area-ref.html
fails == resolution-change-on-landscape-content.html resolution-change-on-landscape-content-ref.html
skip-if(!Android) fails-if(geckoview&&webrender) == position-fixed-on-minimum-scale-size.html position-fixed-on-minimum-scale-size-ref.html
== position-fixed-out-of-view.html about:blank

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

@ -0,0 +1,20 @@
<!DOCTYPE html>
<meta name="viewport" content="width=device-width,initial-scale=1">
<style>
html {
background-color: green;
}
html, body {
margin: 0;
width: 100%;
height: 100%;
scrollbar-width: none; /* avoid drawing scrollbars */
}
#quarter-height {
background-color: red;
width: 100%;
height: 25%;
position: absolute;
}
</style>
<div id="quarter-height"></div>

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

@ -0,0 +1,26 @@
<!DOCTYPE html>
<!--
This test case is initially scaled to 1.x by initial-scale=1 in the meta
viewport tag below, then scaled down to 0.25x by reftest-resolution="0.25"
-->
<html reftest-resolution="0.25">
<meta name="viewport" content="width=device-width,minimum-scale=0.25,initial-scale=1">
<style>
html {
background-color: green;
}
html, body {
margin: 0;
width: 100%;
height: 100%;
scrollbar-width: none; /* avoid drawing scrollbars */
}
#quadruple-width {
background-color: red;
width: 400%;
height: 100%;
position: absolute;
}
</style>
<div id="quadruple-width"></div>
</html>

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

@ -604,7 +604,9 @@ is rendered with the specified resolution (as if the user pinch-zoomed in
to that scale). Note that the difference between reftest-async-zoom and
reftest-resolution is that reftest-async-zoom only applies the scale in
the compositor, while reftest-resolution causes the page to be paint at that
resolution.
resolution. This attribute can be used together with initial-scale in meta
viewport tag, in such cases initial-scale is applied first then
reftest-resolution changes the scale.
This attributes requires the pref apz.allow_zooming=true to have an effect.