Web Inspector: refactor some reusable functionality from BraceHighlighter
https://bugs.webkit.org/show_bug.cgi?id=109574

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

Source/WebCore:

New test: inspector/editor/text-editor-brace-highlighter.html

Extract functionality which, for given line and cursor position, will
return position for a brace that should be highlighted. Add a layout
test to verify brace highlighter funcionality.

* inspector/front-end/DefaultTextEditor.js:
(WebInspector.TextEditorMainPanel.BraceHighlightController.prototype.activeBraceColumnForCursorPosition):
(WebInspector.TextEditorMainPanel.BraceHighlightController.prototype.handleSelectionChange):
* inspector/front-end/TextUtils.js:
(WebInspector.TextUtils.isOpeningBraceChar):
(WebInspector.TextUtils.isClosingBraceChar):
(WebInspector.TextUtils.isBraceChar):

LayoutTests:

Add layout test to verify brace highlighter functionality.

* inspector/editor/text-editor-brace-highlighter-expected.txt: Added.
* inspector/editor/text-editor-brace-highlighter.html: Added.

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