Web Inspector: [DTE] Convertion between text and coordinates
https://bugs.webkit.org/show_bug.cgi?id=113389

Patch by Andrey Lushnikov <lushnikov@chromium.org> on 2013-04-01
Reviewed by Pavel Feldman.

Source/WebCore:

Test: inspector/editor/text-editor-char-to-coordinates.html

Implement cursorPositionToCoordinates and coordinatesToCursorPosition
methods pair in DefaultTextEditor.

* inspector/front-end/DefaultTextEditor.js:
(WebInspector.DefaultTextEditor.prototype.cursorPositionToCoordinates):
(WebInspector.DefaultTextEditor.prototype.coordinatesToCursorPosition):
(WebInspector.TextEditorMainPanel.prototype.cursorPositionToCoordinates):
(WebInspector.TextEditorMainPanel.prototype.coordinatesToCursorPosition):
* inspector/front-end/TextEditor.js:
(WebInspector.TextEditor.prototype.cursorPositionToCoordinates):
(WebInspector.TextEditor.prototype.coordinatesToCursorPosition):

LayoutTests:

Test to verify added functionality.

* inspector/editor/text-editor-char-to-coordinates-expected.txt: Added.
* inspector/editor/text-editor-char-to-coordinates.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147322 268f45cc-cd09-0410-ab3c-d52691b4dbfc