2011-05-13  Martin Robinson  <mrobinson@igalia.com>

        Reviewed by Eric Seidel.

        [GTK] Share the GTK+ key binding code between WebKit1 and WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=59765

        Move the keybinding code form WebKit1/WebKit2 to this utility class. This code is
        almost directly moved from the WebKit layer.

        No new tests. This is covered by the editing tests.

        * GNUmakefile.list.am:
        * platform/gtk/KeyBindingTranslator.cpp: Added.
        (WebCore::backspaceCallback):Added.
        (WebCore::selectAllCallback):Added.
        (WebCore::cutClipboardCallback):Added.
        (WebCore::copyClipboardCallback):Added.
        (WebCore::pasteClipboardCallback):Added.
        (WebCore::toggleOverwriteCallback):Added.
        (WebCore::popupMenuCallback):Added.
        (WebCore::showHelpCallback):Added.
        (WebCore::deleteFromCursorCallback):Added.
        (WebCore::moveCursorCallback):Added.
        (WebCore::KeyBindingTranslator::KeyBindingTranslator):Added.
        (WebCore::KeyBindingTranslator::getEditorCommandsForKeyEvent):Added.
        * platform/gtk/KeyBindingTranslator.h: Added.
        (WebCore::KeyBindingTranslator::addPendingEditorCommand):Added.
2011-05-13  Martin Robinson  <mrobinson@igalia.com>

        Reviewed by Eric Seidel.

        [GTK] Share the GTK+ key binding code between WebKit1 and WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=59765

        Use the new KeyBindingTranslator class from WebCore/platform/gtk. With this utility
        class we can now share the code with WebKit2.

        * WebCoreSupport/EditorClientGtk.cpp:
        (WebKit::EditorClient::executePendingEditorCommands): Updated to reflect the fact that
        the command vector now contains WTF::string.
        (WebKit::EditorClient::handleKeyboardEvent): Use the new helper utility class.
        (WebKit::EditorClient::EditorClient):
        * WebCoreSupport/EditorClientGtk.h: Remove unnecessary member. Add the utility class.
2011-05-13  Martin Robinson  <mrobinson@igalia.com>

        Reviewed by Eric Seidel.

        [GTK] Share the GTK+ key binding code between WebKit1 and WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=59765

        Use the new KeyBindingTranslator class from WebCore/platform/gtk. With this utility
        class we can now share the code with WebKit2.

        * UIProcess/API/gtk/PageClientImpl.cpp:
        (WebKit::PageClientImpl::PageClientImpl): No longer need to initialize keybinding code.
        (WebKit::PageClientImpl::getEditorCommandsForKeyEvent): Use the new utility class.
        * UIProcess/API/gtk/PageClientImpl.h: Remove unnecessary members. Add utility class member.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86436 268f45cc-cd09-0410-ab3c-d52691b4dbfc
10 files changed