summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-multicol/hit-test-transformed-child.html
blob: ac0fd54c9f35dda0f01f5b8eb92fd7df7a3b5bb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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>