OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <svg height="0"> |
| 5 <defs><path id="p" d="M0,20h100"/></defs> |
| 6 <text y="20" font-size="20" font-family="Ahem"><textPath xlink:href="#p">AAAA<
/textPath></text> |
| 7 </svg> |
| 8 <script> |
| 9 test(function() { |
| 10 var text = document.querySelector('text'); |
| 11 var extents = text.getExtentOfChar(0); |
| 12 var point = document.querySelector('svg').createSVGPoint(); |
| 13 point.x = extents.width / 2; |
| 14 point.y = 10; |
| 15 for (var i = 0; i < 4; ++i) { |
| 16 assert_equals(text.getCharNumAtPosition(point), i); |
| 17 |
| 18 point.x += extents.width; |
| 19 } |
| 20 }, 'SVGTextContentElement.getCharNumAtPosition w/ multiple fragments per text bo
x.'); |
| 21 </script> |
OLD | NEW |