Bug 159421 - Method getCharNumAtPosition doesn't work with textPath
Summary: Method getCharNumAtPosition doesn't work with textPath
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: Safari 9
Hardware: Mac OS X 10.11
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-05 08:11 PDT by Andrii Mamchur
Modified: 2016-07-05 09:33 PDT (History)
2 users (show)

See Also:


Attachments
getCharNumAtPosition work for first glyph only (123.99 KB, image/png)
2016-07-05 08:11 PDT, Andrii Mamchur
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrii Mamchur 2016-07-05 08:11:08 PDT
Created attachment 282791 [details]
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 http://tutorials.jenkov.com/svg/textpath-element.html)
2. Call SVGTextElement.getCharNumAtPosition method to get char index by specified x, y position

See online example http://mamchur.net/issues/getCharNumAtPositionIssue/index.html
Just press "Monte Carlo Hit Test" several times & observe issue

Actual Results:

SVGTextElement.getCharNumAtPosition returns -1 and 0 values only

Expected Results:
See https://www.w3.org/TR/SVG/text.html#__svg__SVGTextContentElement__getCharNumAtPosition