diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /gfx/layers/apz/test/mochitest/helper_hittest_bug1730606-3.html | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx/layers/apz/test/mochitest/helper_hittest_bug1730606-3.html')
-rw-r--r-- | gfx/layers/apz/test/mochitest/helper_hittest_bug1730606-3.html | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/gfx/layers/apz/test/mochitest/helper_hittest_bug1730606-3.html b/gfx/layers/apz/test/mochitest/helper_hittest_bug1730606-3.html new file mode 100644 index 0000000000..0ae01864a5 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_hittest_bug1730606-3.html @@ -0,0 +1,56 @@ +<!DOCTYPE HTML> +<html> +<head> + <title>A hit testing test involving a scenario with a scale transform</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> + body, html { + margin: 0; + padding: 0; + width: 100%; + height: 100%; + } + #layer1 { + position: absolute; + top: 0px; + left: 0px; + width: 100px; + height: 100px; + background: red; + overflow: scroll; + transform: scale(2.0); + transform-origin: 0 0; + } + </style> +</head> +<body> + <!-- Neither the root nor layer1 actually have room to scroll --> + <div id="layer1"></div> +</body> +<script type="application/javascript"> + +async function test() { + var config = getHitTestConfig(); + var utils = config.utils; + + // Force an APZC for layer1 in spite of it having no scroll range. + utils.setDisplayPortForElement(0, 0, 100, 100, layer1, 1); + await promiseApzFlushedRepaints(); + + // Hit an area on layer1 that would be on the root if layer1 weren't transformed. + checkHitResult(hitTest({x: 150, y: 150}), + APZHitResultFlags.VISIBLE, + utils.getViewId(layer1), + utils.getLayersId(), + "layer1"); +} + +waitUntilApzStable() +.then(test) +.then(subtestDone, subtestFailed); + +</script> +</html> |