Reviewed by Darin.
authorap@webkit.org <ap@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 16 Dec 2007 17:37:42 +0000 (17:37 +0000)
committerap@webkit.org <ap@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 16 Dec 2007 17:37:42 +0000 (17:37 +0000)
commit376bf2f4b3cb92d03b4049f422c02fc37924098a
treef7380c4cb72ecc3d21d7f7996cf046bce93b64a5
parent911612ded61135c2f3fe3a4a3d31cfe0ae03e4f4
    Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=14140
        <rdar://problem/5270958> REGRESSION: Complex system KeyBindings don't work properly

WebCore:
        * dom/KeyboardEvent.h:
        (WebCore::KeypressCommand::KeypressCommand):
        (WebCore::KeyboardEvent::keypressCommands):
        Change stored command class to preserve complete information about commands.

        * editing/EditorCommand.cpp: (WebCore::CommandEntry::): Mark InsertText as a text insertion
        command, which it is. Previously, we couldn't do it because WebKit didn't really treat insertText:
        as a command.

        * page/EventHandler.cpp: (WebCore::EventHandler::keyEvent): Copy commands saved while interpreting
        a keydown event into keypress, to avoid losing state when running interpretKeyEvents: again.

WebKit:
        * WebView/WebHTMLView.mm:
        (-[WebHTMLView _interceptEditingKeyEvent:shouldSaveCommand:]): Made command replaying work
        when handling keypress, too.
        (-[WebHTMLView doCommandBySelector:]): Adapted for the new way to store commands in events.
        (-[WebHTMLView insertText:]): Append a command, not replace the whole existing vector. Also,
        restore the state for additional commands to be saved correctly.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28772 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/dom/KeyboardEvent.h
WebCore/editing/EditorCommand.cpp
WebCore/page/EventHandler.cpp
WebKit/mac/ChangeLog
WebKit/mac/WebView/WebHTMLView.mm