summaryrefslogtreecommitdiffstats
path: root/gfx/layers/apz/test/mochitest/helper_hittest_sticky_bug1478304.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /gfx/layers/apz/test/mochitest/helper_hittest_sticky_bug1478304.html
parentInitial commit. (diff)
downloadfirefox-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_hittest_sticky_bug1478304.html')
-rw-r--r--gfx/layers/apz/test/mochitest/helper_hittest_sticky_bug1478304.html58
1 files changed, 58 insertions, 0 deletions
diff --git a/gfx/layers/apz/test/mochitest/helper_hittest_sticky_bug1478304.html b/gfx/layers/apz/test/mochitest/helper_hittest_sticky_bug1478304.html
new file mode 100644
index 0000000000..395c688a12
--- /dev/null
+++ b/gfx/layers/apz/test/mochitest/helper_hittest_sticky_bug1478304.html
@@ -0,0 +1,58 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <title>APZ hit-testing with sticky element inside a transform (bug 1478304)</title>
+ <script type="application/javascript" src="apz_test_utils.js"></script>
+ <script type="application/javascript" src="apz_test_native_event_utils.js"></script>
+ <script src="/tests/SimpleTest/paint_listener.js"></script>
+ <meta name="viewport" content="width=device-width"/>
+ <style>
+ #subframe {
+ width: 500px;
+ height: 200px;
+ overflow-y: auto;
+ }
+ #transform {
+ transform: translate(0);
+ }
+ #sticky {
+ background-color: white;
+ position: sticky;
+ top: 0;
+ }
+ #spacer {
+ width: 100px;
+ height: 1000px;
+ }
+ </style>
+</head>
+<body>
+ <div id="subframe">
+ <div id="transform">
+ <div id="sticky">sticky with transformed parent (click me or hover me and try a scroll)</div>
+ <div id="spacer"></div>
+ </div>
+ </div>
+</body>
+<script type="application/javascript">
+
+async function test() {
+ var utils = getHitTestConfig().utils;
+
+ var subframe = document.getElementById("subframe");
+ var sticky = document.getElementById("sticky");
+
+ checkHitResult(
+ hitTest(centerOf(sticky)),
+ APZHitResultFlags.VISIBLE,
+ utils.getViewId(subframe),
+ utils.getLayersId(),
+ "subframe was successfully hit");
+}
+
+waitUntilApzStable()
+.then(test)
+.then(subtestDone, subtestFailed);
+
+</script>
+</html>