diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
commit | 8dd16259287f58f9273002717ec4d27e97127719 (patch) | |
tree | 3863e62a53829a84037444beab3abd4ed9dfc7d0 /testing/web-platform/tests/css/css-overflow/scroll-with-ancestor-border-radius.html | |
parent | Releasing progress-linux version 126.0.1-1~progress7.99u1. (diff) | |
download | firefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz firefox-8dd16259287f58f9273002717ec4d27e97127719.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-overflow/scroll-with-ancestor-border-radius.html')
-rw-r--r-- | testing/web-platform/tests/css/css-overflow/scroll-with-ancestor-border-radius.html | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-overflow/scroll-with-ancestor-border-radius.html b/testing/web-platform/tests/css/css-overflow/scroll-with-ancestor-border-radius.html new file mode 100644 index 0000000000..9192c613e9 --- /dev/null +++ b/testing/web-platform/tests/css/css-overflow/scroll-with-ancestor-border-radius.html @@ -0,0 +1,59 @@ +<!doctype html> +<meta charset=utf-8> +<title>Should not scroll out of rounded corner</title> +<link rel="help" href="https://crbug.com/40277896"> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="/resources/testdriver-actions.js"></script> +<script src="/dom/events/scrolling/scroll_support.js"></script> +<style> + #container { + width: 300px; + height: 300px; + border-radius: 100px; + overflow: hidden; + border: 2px solid blue; + } + + #scroller { + overflow: auto; + width: 300px; + height: 300px; + will-change: scroll-position; + } + + .spacer { + height: 200vh; + } + +</style> + +<div id="container"> + <div id="scroller"> + <div class="spacer"></div> + </div> +</div> +<div class="spacer"></div> + +<script> + promise_test(async (t) => { + await waitForCompositorCommit(); + let scrolled = new Promise((resolve) => { + let scrollers = [window, document.getElementById("scroller")]; + let onscroll = (evt) => { + for (const scroller of scrollers) { + scroller.removeEventListener("scroll", onscroll); + } + resolve(evt.target.id || "root"); + } + for (const scroller of scrollers) { + scroller.addEventListener("scroll", onscroll); + } + }); + const actions = new test_driver.Actions().scroll(20, 20, 0, 50, { duration: 50 }); + actions.send(); + assert_equals(await scrolled, "root", "Incorrect element scrolled"); + }, "Wheel-scroll out of rounded corner skips that scroller"); +</script> |