Bug 1700169 - Add a reftest. r=tnikkel

Depends on D114457

Differential Revision: https://phabricator.services.mozilla.com/D114458
This commit is contained in:
Botond Ballo 2021-05-07 21:30:59 +00:00
Родитель 1fe3fda8d3
Коммит 96095f7835
3 изменённых файлов: 63 добавлений и 0 удалений

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

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<style>
body {
/* The 3028 here was arrived at experimentally to match to
produce a scrollbar of approximately the same length as
the one of the test page squished by the overscroll. */
height: 3028px;
margin: 0;
}
div {
position: absolute;
top: 8px;
width: 200px;
height: 200px;
background: green;
}
</style>
</head>
<body>
<div></div>
</body>
</html>

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

@ -0,0 +1,36 @@
<!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="-200">
<head>
<style>
body {
height: 3000px;
margin: 0;
}
div {
position: absolute;
top: 0px;
width: 200px;
height: 200px;
background: green;
}
</style>
</head>
<body >
<!-- Test that an overscroll past one end of a viewport is rendered
as having the content create a gutter, and that
the overscroll is reduced by some factor such that
a 100px scroll must produce a rendered translation of less than
100px.
Current overscroll physics mean that an instantaneous overscroll
by 200px produces an 8px gutter. This is governed by the logic in
Axis::ApplyResistance(); if that logic is changed, this test will
need to be modified to account for the new result.
-->
<div></div>
</body>
</html>

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

@ -101,6 +101,9 @@ fuzzy-if(!webrender,111-112,600-600) pref(apz.allow_zooming,true) == async-scrol
skip-if(!asyncPan||Android) pref(apz.overscroll.enabled,true) pref(apz.overscroll.test_async_scroll_offset.enabled,true) == overscroll.html overscroll-ref.html
skip-if(!asyncPan||Android) pref(apz.overscroll.enabled,true) pref(apz.overscroll.test_async_scroll_offset.enabled,true) == overscroll-subframe.html overscroll-ref.html
skip-if(!asyncPan||Android) pref(apz.overscroll.enabled,true) pref(apz.overscroll.test_async_scroll_offset.enabled,true) == overscroll-fixed.html overscroll-ref.html
# This one needs to be fuzzed due to the fact that squishing a scrollbar
# thumb on the compositor doesn't preserve its shape exactly.
skip-if(!asyncPan||Android) fuzzy(0-56,0-33) pref(apz.overscroll.enabled,true) pref(apz.overscroll.test_async_scroll_offset.enabled,true) == overscroll-scrollbar.html overscroll-scrollbar-ref.html
skip-if(!asyncPan||Android) pref(ui.prefersReducedMotion,1) pref(apz.overscroll.enabled,true) pref(apz.overscroll.test_async_scroll_offset.enabled,true) == overscroll-reduced-motion.html no-overscroll-ref.html
# for this test, apz.allow_zooming is needed to ensure we take the containerless scrolling codepath that creates