summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-multicol/hit-test-transformed-child.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/css/css-multicol/hit-test-transformed-child.html')
-rw-r--r--testing/web-platform/tests/css/css-multicol/hit-test-transformed-child.html30
1 files changed, 30 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-multicol/hit-test-transformed-child.html b/testing/web-platform/tests/css/css-multicol/hit-test-transformed-child.html
new file mode 100644
index 0000000000..ac0fd54c9f
--- /dev/null
+++ b/testing/web-platform/tests/css/css-multicol/hit-test-transformed-child.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1146975">
+<style>
+ body {
+ margin: 8px;
+ }
+</style>
+<div style="columns:2; column-fill:auto; height:100px;">
+ <div>
+ <div id="target" style="transform:translateX(100px) translateY(200px); width:50px; height:50px; background:blue;"></div>
+ </div>
+</div>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+ test(()=> {
+ assert_equals(document.elementFromPoint(108, 208), target);
+ assert_equals(document.elementFromPoint(157, 208), target);
+ assert_equals(document.elementFromPoint(157, 257), target);
+ }, "inside");
+
+ test(()=> {
+ assert_not_equals(document.elementFromPoint(107, 208), target);
+ assert_not_equals(document.elementFromPoint(108, 207), target);
+ assert_not_equals(document.elementFromPoint(158, 257), target);
+ assert_not_equals(document.elementFromPoint(157, 258), target);
+ assert_not_equals(document.elementFromPoint(8, 8), target);
+ }, "outside");
+</script>