Web Inspector: refactor some reusable functionality from BraceHighlighter
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Feb 2013 15:18:20 +0000 (15:18 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Feb 2013 15:18:20 +0000 (15:18 +0000)
commit4ef835f973e1a0d2ea7ceadef2ae2ba0fa9bbaf5
tree3b8840834033ff842cceee5509bff708693c6bef
parent3b8655ac7d8b48a720ed114b7e229380fd8a6fba
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: https://svn.webkit.org/repository/webkit/trunk@142621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/inspector/editor/text-editor-brace-highlighter-expected.txt [new file with mode: 0644]
LayoutTests/inspector/editor/text-editor-brace-highlighter.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/DefaultTextEditor.js
Source/WebCore/inspector/front-end/TextUtils.js