Web Inspector: refactor registerShortcuts method of DTE
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Feb 2013 12:27:48 +0000 (12:27 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Feb 2013 12:27:48 +0000 (12:27 +0000)
commitddf9a84a6edab7c2be2e144f92ddae67f2350433
treeff65deb5a157655af1a1944e178a5f548951877a
parent6fb137f7b3d3280616be9e0e436eac7e06a9295d
Web Inspector: refactor registerShortcuts method of DTE
https://bugs.webkit.org/show_bug.cgi?id=109031

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

Source/WebCore:

Implement _registerShortcuts method in TextEditorMainPanel which will
bind its private methods to the different key combinations. Refactor
method handlers handleUndoRedo, handleTabKeyPress and handleEnterKey
from public to private.

No new tests: no change in behaviour.

* inspector/front-end/DefaultTextEditor.js:
(WebInspector.DefaultTextEditor.prototype._registerShortcuts): Remove bindings of TextEditorMainPanel methods
(WebInspector.DefaultTextEditor.prototype._handleKeyDown):
(WebInspector.TextEditorMainPanel):
(WebInspector.TextEditorMainPanel.prototype._registerShortcuts): Added.
(WebInspector.TextEditorMainPanel.prototype._handleUndoRedo):
(WebInspector.TextEditorMainPanel.prototype.handleKeyDown):

LayoutTests:

Fix helper method to correspond to refactoring of handleUndoRedo
method.

* http/tests/inspector/live-edit-test.js:
(initialize_LiveEditTest.InspectorTest.undoSourceEditing):
(initialize_LiveEditTest):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@141986 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/inspector/live-edit-test.js
Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/DefaultTextEditor.js