Changeset 93670 in webkit


Ignore:
Timestamp:
Aug 23, 2011 5:29:47 PM (13 years ago)
Author:
andersca@apple.com
Message:

Prepare WKTextInputWindowController for the new text input model
https://bugs.webkit.org/show_bug.cgi?id=66826

Reviewed by Sam Weinig.

Add -[WKTextInputWindowController hasMarkedText] and make interpretKeyEvent take an
additional usingLegacyCocoaTextInput flag. No functionality change.

  • UIProcess/API/mac/WKTextInputWindowController.h:
  • UIProcess/API/mac/WKTextInputWindowController.mm:

(-[WKTextInputPanel _interpretKeyEvent:usingLegacyCocoaTextInput:string:]):
(-[WKTextInputPanel _hasMarkedText]):
(-[WKTextInputWindowController hasMarkedText]):
(-[WKTextInputWindowController interpretKeyEvent:usingLegacyCocoaTextInput:string:]):

  • UIProcess/API/mac/WKView.mm:

(-[WKView keyDown:]):

Location:
trunk/Source/WebKit2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r93636 r93670  
     12011-08-23  Anders Carlsson  <andersca@apple.com>
     2
     3        Prepare WKTextInputWindowController for the new text input model
     4        https://bugs.webkit.org/show_bug.cgi?id=66826
     5
     6        Reviewed by Sam Weinig.
     7
     8        Add -[WKTextInputWindowController hasMarkedText] and make interpretKeyEvent take an
     9        additional usingLegacyCocoaTextInput flag. No functionality change.
     10
     11        * UIProcess/API/mac/WKTextInputWindowController.h:
     12        * UIProcess/API/mac/WKTextInputWindowController.mm:
     13        (-[WKTextInputPanel _interpretKeyEvent:usingLegacyCocoaTextInput:string:]):
     14        (-[WKTextInputPanel _hasMarkedText]):
     15        (-[WKTextInputWindowController hasMarkedText]):
     16        (-[WKTextInputWindowController interpretKeyEvent:usingLegacyCocoaTextInput:string:]):
     17        * UIProcess/API/mac/WKView.mm:
     18        (-[WKView keyDown:]):
     19
    1202011-08-23  Gopal Raghavan  <gopal.1.raghavan@nokia.com>
    221
  • trunk/Source/WebKit2/UIProcess/API/mac/WKTextInputWindowController.h

    r74046 r93670  
    3636
    3737- (NSTextInputContext *)inputContext;
    38 - (BOOL)interpretKeyEvent:(NSEvent *)event string:(NSString **)string;
     38- (BOOL)hasMarkedText;
     39- (BOOL)interpretKeyEvent:(NSEvent *)event usingLegacyCocoaTextInput:(BOOL)usingLegacyCocoaTextInput string:(NSString **)string;
    3940
    4041- (void)keyboardInputSourceChanged;
  • trunk/Source/WebKit2/UIProcess/API/mac/WKTextInputWindowController.mm

    r84997 r93670  
    3434
    3535- (NSTextInputContext *)_inputContext;
    36 - (BOOL)_interpretKeyEvent:(NSEvent *)event string:(NSString **)string;
     36- (BOOL)_hasMarkedText;
     37- (BOOL)_interpretKeyEvent:(NSEvent *)event usingLegacyCocoaTextInput:(BOOL)usingLegacyCocoaTextInput string:(NSString **)string;
    3738
    3839@end
     
    8283}
    8384
    84 - (BOOL)_interpretKeyEvent:(NSEvent *)event string:(NSString **)string
     85- (BOOL)_interpretKeyEvent:(NSEvent *)event usingLegacyCocoaTextInput:(BOOL)usingLegacyCocoaTextInput string:(NSString **)string
    8586{
    8687    BOOL hadMarkedText = [_inputTextView hasMarkedText];
     
    123124}
    124125
     126- (BOOL)_hasMarkedText
     127{
     128    return [_inputTextView hasMarkedText];
     129}
     130
    125131@end
    126132
     
    152158}
    153159
    154 - (BOOL)interpretKeyEvent:(NSEvent *)event string:(NSString **)string
     160- (BOOL)hasMarkedText
    155161{
    156     return [_panel _interpretKeyEvent:event string:string];
     162    return [_panel _hasMarkedText];
     163}
     164
     165- (BOOL)interpretKeyEvent:(NSEvent *)event usingLegacyCocoaTextInput:(BOOL)usingLegacyCocoaTextInput string:(NSString **)string
     166{
     167    return [_panel _interpretKeyEvent:event usingLegacyCocoaTextInput:usingLegacyCocoaTextInput string:string];
    157168}
    158169
  • trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm

    r93550 r93670  
    12531253        // Try feeding the keyboard event directly to the plug-in.
    12541254        NSString *string = nil;
    1255         if ([[WKTextInputWindowController sharedTextInputWindowController] interpretKeyEvent:theEvent string:&string]) {
     1255        if ([[WKTextInputWindowController sharedTextInputWindowController] interpretKeyEvent:theEvent usingLegacyCocoaTextInput:NO string:&string]) {
    12561256            if (string)
    12571257                _data->_page->sendComplexTextInputToPlugin(_data->_pluginComplexTextInputIdentifier, string);
Note: See TracChangeset for help on using the changeset viewer.