Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=57260 Clean up text input code a little WebKit/mac: * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::handleKeyboardEvent): (WebEditorClient::handleInputMethodKeydown): * WebView/WebHTMLViewInternal.h: Renamed _interceptEditingKeyEvent:shouldSaveCommand:, becasue it doesn't really intercept anything. It's just a version it interpretKeyEvents: that tells us whether it was handled, and also possibly saves resulting commands for later execution. * WebView/WebHTMLView.mm: (-[WebHTMLView _interpretKeyEvent:savingCommands:]): Changed to use early return. Changed return value in case platformEvent is null to be less mysterious. Moved receivedNOOP from WebHTMLViewPrivate to WebHTMLViewInterpretKeyEventsParameters, as this is just part of event handling state, like the other booleans there. Don't call interpretKeyEvents: again simply because the first call resulted in no saved commands, becasue it's confusing and apparently useless (I couldn't find any broken behavior). (-[WebHTMLView unmarkText]): Cleaned upo BOOL vs. bool constants. (-[WebHTMLView setMarkedText:selectedRange:]): Ditto. (-[WebHTMLView doCommandBySelector:]): Ditto. (-[WebHTMLView insertText:]): Ditto. * WebView/WebViewInternal.h: There was no _interceptEditingKeyEvent:shouldSaveCommand: method on WebView. WebKit2: * UIProcess/API/mac/WKView.mm: (-[WKView doCommandBySelector:]): This NSTextInput protocol method lacked a LOG() call. (-[WKView keyDown:]): Added (possibly useless) event protection to match performKeyEquivalent: and also WebKit1. * WebProcess/WebPage/mac/WebPageMac.mm: Removed an obsolete comment. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82148 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Showing with 110 additions and 60 deletions