Bug 1613144 - Add reftest. r=botond

Add a reftest that would fail in webrender before the corresponding
fix landed.

Ensures that there is an async zoom and that both the layout and
visual viewports have async scroll offsets. To pass, we must apply
each of the layout and visual offsets in their correct coordinate
spaces.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jamie Nicol 2020-02-07 20:45:39 +00:00
Родитель ec3f3be37b
Коммит 1639434188
3 изменённых файлов: 65 добавлений и 0 удалений

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

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<style>
html {
scrollbar-width: none;
}
body {
height: 3000px;
margin: 0;
}
div {
position: absolute;
top: -100px;
width: 200px;
height: 200px;
background: green;
}
</style>
</head>
<body>
<div></div>
</body>
</html>

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

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html
reftest-async-scroll
reftest-displayport-x="0" reftest-displayport-y="0"
reftest-displayport-w="800" reftest-displayport-h="2000"
reftest-async-scroll-x="0" reftest-async-scroll-y="550"
reftest-async-zoom="2.0">
<head>
<style>
html {
scrollbar-width: none;
}
body {
height: 3000px;
margin: 0;
}
div {
position: absolute;
top: 500px;
width: 100px;
height: 100px;
background: green;
}
</style>
</head>
<body >
<!-- Test that both layout and visual viewport scroll offsets are correctly applied.
An async scroll of 550 CSS pixels at 2.0x async zoom will ensure that
the visual viewport is scrolled beyond the bottom of the previous
layout viewport, meaning that the layout viewport is also scrolled so
that it contains the visual viewport.
Content should be scrolled by both the layout and visual offsets, in the
correct co-ordinate space for each, which should result the top half of
the div being scrolled out of view. -->
<div></div>
</body>
</html>

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

@ -94,6 +94,8 @@ skip-if(!Android) pref(apz.allow_zooming,true) == position-fixed-async-zoom-4.ht
skip-if(!Android) pref(apz.allow_zooming,true) == position-sticky-async-zoom-1.html position-sticky-async-zoom-1-ref.html
skip-if(!Android) pref(apz.allow_zooming,true) == position-sticky-async-zoom-2.html position-sticky-async-zoom-2-ref.html
fuzzy-if(!webrender,111-112,600-600) pref(apz.allow_zooming,true) == async-scroll-and-zoom.html async-scroll-and-zoom-ref.html
# for this test, apz.allow_zooming is needed to ensure we take the containerless scrolling codepath that creates
# an async zoom container (since we are testing a regression in that codepath)
skip-if(!Android) pref(apz.allow_zooming,true) test-pref(apz.fixed-margin-override.enabled,true) test-pref(apz.fixed-margin-override.bottom,50) fails-if(geckoview&&webrender) == dynamic-toolbar-fixed-bottom-1.html dynamic-toolbar-fixed-bottom-1-ref.html