OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <title>Hit-test of text with fractional (< 1) font-size and small (high scale
factor) viewBox</title> |
| 3 <script src="../../resources/ahem.js"></script> |
| 4 <script src="../../resources/testharness.js"></script> |
| 5 <script src="../../resources/testharnessreport.js"></script> |
| 6 <style> |
| 7 svg { |
| 8 margin: 0px; |
| 9 padding: 0px; |
| 10 position: absolute; |
| 11 top: 0px; |
| 12 left: 0px; |
| 13 width: 800px; |
| 14 } |
| 15 </style> |
| 16 <svg viewBox="0 0 22 28"> |
| 17 <text font-family="Ahem" font-size="0.125" fill="blue" y="2.438"><a xlink:href
="#">ABCDEFGH</a></text> |
| 18 </svg> |
| 19 <script> |
| 20 test(function() { |
| 21 var referenceElement = document.querySelector('a'); |
| 22 [ |
| 23 { x: 2, y: 85 }, |
| 24 { x: 4, y: 87 }, |
| 25 { x: 2, y: 89 }, |
| 26 { x: 6, y: 85 }, |
| 27 { x: 4, y: 87 }, |
| 28 { x: 6, y: 89 }, |
| 29 { x: 10, y: 87 }, |
| 30 { x: 14, y: 87 }, |
| 31 { x: 18, y: 87 }, |
| 32 { x: 22, y: 87 }, |
| 33 { x: 26, y: 87 }, |
| 34 ].forEach(function(point) { |
| 35 assert_equals(document.elementFromPoint(point.x, point.y), referenceElement,
point.x + ',' + point.y); |
| 36 }); |
| 37 }); |
| 38 </script> |
OLD | NEW |