<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Method getCharNumAtPosition doesn't work with textPath"
href="https://bugs.webkit.org/show_bug.cgi?id=159421">159421</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Method getCharNumAtPosition doesn't work with textPath
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>Safari 9
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>OS X 10.11
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>Normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P2
</td>
</tr>
<tr>
<th>Component</th>
<td>SVG
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>andrii@mamchur.net
</td>
</tr>
<tr>
<th>CC</th>
<td>zimmermann@kde.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=282791" name="attach_282791" title="getCharNumAtPosition work for first glyph only">attachment 282791</a> <a href="attachment.cgi?id=282791&action=edit" title="getCharNumAtPosition work for first glyph only">[details]</a></span>
getCharNumAtPosition work for first glyph only
Method SVGTextElement.getCharNumAtPosition doesn't work correctly when SVGTextElement contains SVGTextPathElement.
Steps to reproduce:
1. Create SVG with textPath element (see tutorial <a href="http://tutorials.jenkov.com/svg/textpath-element.html">http://tutorials.jenkov.com/svg/textpath-element.html</a>)
2. Call SVGTextElement.getCharNumAtPosition method to get char index by specified x, y position
See online example <a href="http://mamchur.net/issues/getCharNumAtPositionIssue/index.html">http://mamchur.net/issues/getCharNumAtPositionIssue/index.html</a>
Just press "Monte Carlo Hit Test" several times & observe issue
Actual Results:
SVGTextElement.getCharNumAtPosition returns -1 and 0 values only
Expected Results:
See <a href="https://www.w3.org/TR/SVG/text.html#__svg__SVGTextContentElement__getCharNumAtPosition">https://www.w3.org/TR/SVG/text.html#__svg__SVGTextContentElement__getCharNumAtPosition</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>