diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /gfx/layers/apz/test/mochitest/helper_scroll_inactive_perspective.html | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx/layers/apz/test/mochitest/helper_scroll_inactive_perspective.html')
-rw-r--r-- | gfx/layers/apz/test/mochitest/helper_scroll_inactive_perspective.html | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/gfx/layers/apz/test/mochitest/helper_scroll_inactive_perspective.html b/gfx/layers/apz/test/mochitest/helper_scroll_inactive_perspective.html new file mode 100644 index 0000000000..727d0e4fd1 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_scroll_inactive_perspective.html @@ -0,0 +1,45 @@ +<head> + <meta name="viewport" content="width=device-width; initial-scale=1.0"> + <title>Wheel-scrolling over inactive subframe with perspective</title> + <script type="application/javascript" src="apz_test_native_event_utils.js"></script> + <script type="application/javascript" src="apz_test_utils.js"></script> + <script src="/tests/SimpleTest/paint_listener.js"></script> + <script type="application/javascript"> + +async function test() { + var subframe = document.getElementById("scroll"); + + // scroll over the middle of the subframe, to make sure it scrolls, + // not the page + var scrollPos = subframe.scrollTop; + await promiseMoveMouseAndScrollWheelOver(subframe, 100, 100); + dump("after scroll, subframe.scrollTop = " + subframe.scrollTop + "\n"); + ok(subframe.scrollTop > scrollPos, "subframe scrolled after wheeling over it"); +} + +waitUntilApzStable() +.then(test) +.then(subtestDone, subtestFailed); + + </script> + <style> + #scroll { + width: 200px; + height: 200px; + overflow: scroll; + perspective: 400px; + } + #scrolled { + width: 200px; + height: 1000px; /* so the subframe has room to scroll */ + background: linear-gradient(red, blue); /* so you can see it scroll */ + transform: translateZ(0px); /* so the perspective makes it to the display list */ + } + </style> +</head> +<body> + <div id="scroll"> + <div id="scrolled"></div> + </div> + <div style="height: 5000px;"></div><!-- So the page is scrollable as well --> +</body> |