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: http://svn.webkit.org/repository/webkit/trunk@28772
268f45cc-cd09-0410-ab3c-
d52691b4dbfc