1 <html xmlns=
"http://www.w3.org/1999/xhtml">
3 https://bugzilla.mozilla.org/show_bug.cgi?id=589648
6 <title>Test hit-testing of line caps
</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 var x = div.offsetLeft;
19 var y = div.offsetTop;
22 got = document.elementFromPoint(
5 + x,
5 + y);
23 expected = document.getElementById(
"zero-length-square-caps");
24 is(got, expected,
"Check hit on zero length subpath's square caps");
31 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=500174">Mozilla Bug
500174</a>
35 <div width=
"100%" height=
"1" id=
"div"></div>
36 <svg xmlns=
"http://www.w3.org/2000/svg" id=
"svg" width=
"400" height=
"300">
37 <path id=
"zero-length-square-caps" stroke=
"blue" stroke-width=
"50"
38 stroke-linecap=
"square" d=
"M25,25 L25,25"/>