1 <html xmlns=
"http://www.w3.org/1999/xhtml">
3 https://bugzilla.mozilla.org/show_bug.cgi?id=762679
6 <title>Test pointer events for small objects scaled up
</title>
7 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
8 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
11 <script class=
"testbody" type=
"text/javascript">
14 SimpleTest.waitForExplicitFinish();
17 var div = document.getElementById(
"div");
18 // Get the coords of the origin of the SVG canvas:
19 var originX = div.offsetLeft;
20 var originY = div.offsetTop;
21 var circle = document.getElementById(
"circle");
23 var elementFromPoint = document.elementFromPoint(originX +
150, originY +
52);
24 is(elementFromPoint, circle,
"Top of circle should hit");
26 elementFromPoint = document.elementFromPoint(originX +
249, originY +
150);
27 is(elementFromPoint, circle,
"Right of circle should hit");
29 elementFromPoint = document.elementFromPoint(originX +
150, originY +
249);
30 is(elementFromPoint, circle,
"Bottom of circle should hit");
32 elementFromPoint = document.elementFromPoint(originX +
51, originY +
150);
33 is(elementFromPoint, circle,
"Left of circle should hit");
40 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=762679">Mozilla Bug
762679</a>
44 <div width=
"100%" height=
"1" id=
"div">
45 <svg xmlns=
"http://www.w3.org/2000/svg" width=
"100%" height=
"400" id=
"svg">
46 <circle id=
"circle" cx=
"1.5" cy=
"1.5" r=
"1" transform=
"scale(100, 100)"/>