Changeset 44164 in webkit


Ignore:
Timestamp:
May 26, 2009 4:57:23 PM (15 years ago)
Author:
mitz@apple.com
Message:

Reviewed by Darin Adler.

  • fix <rdar://problem/6922371> REGRESSION (r43973): Can't type first character with an umlaut, circumflex, or accent in Mail or in a wiki
  • WebView/WebHTMLView.mm: (isTextInput): Moved here. (isInPasswordField): Moved here. (-[WebHTMLView becomeFirstResponder]): Update the exposeInputContext flag and let NSApplication update the input manager with the new input context if necessary. (-[WebHTMLView _updateSelectionForInputManager]): Changed to use the NSApp global instead of +[NSApplication sharedApplication].
Location:
trunk/WebKit/mac
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/mac/ChangeLog

    r44158 r44164  
     12009-05-26  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        - fix <rdar://problem/6922371> REGRESSION (r43973): Can't type first
     6          character with an umlaut, circumflex, or accent in Mail or in a wiki
     7
     8        * WebView/WebHTMLView.mm:
     9        (isTextInput): Moved here.
     10        (isInPasswordField): Moved here.
     11        (-[WebHTMLView becomeFirstResponder]): Update the exposeInputContext
     12        flag and let NSApplication update the input manager with the new input
     13        context if necessary.
     14        (-[WebHTMLView _updateSelectionForInputManager]): Changed to use the
     15        NSApp global instead of +[NSApplication sharedApplication].
     16
    1172009-05-26  Mark Rowe  <mrowe@apple.com>
    218
  • trunk/WebKit/mac/WebView/WebHTMLView.mm

    r43973 r44164  
    36273627}
    36283628
     3629// Utility function to make sure we don't return anything through the NSTextInput
     3630// API when an editable region is not currently focused.
     3631static BOOL isTextInput(Frame* coreFrame)
     3632{
     3633    return coreFrame && !coreFrame->selection()->isNone() && coreFrame->selection()->isContentEditable();
     3634}
     3635
     3636static BOOL isInPasswordField(Frame* coreFrame)
     3637{
     3638    return coreFrame && coreFrame->selection()->isInPasswordField();
     3639}
     3640
    36293641- (BOOL)becomeFirstResponder
    36303642{
     
    36393651    if (!frame)
    36403652        return YES;
    3641    
     3653
     3654    BOOL exposeInputContext = isTextInput(frame) && !isInPasswordField(frame);
     3655    if (exposeInputContext != _private->exposeInputContext) {
     3656        _private->exposeInputContext = exposeInputContext;
     3657        [NSApp updateWindows];
     3658    }
     3659
    36423660    frame->editor()->setStartNewKillRingSequence(true);
    36433661
     
    54845502}
    54855503
    5486 // Utility function to make sure we don't return anything through the NSTextInput
    5487 // API when an editable region is not currently focused.
    5488 static BOOL isTextInput(Frame* coreFrame)
    5489 {
    5490     return coreFrame && !coreFrame->selection()->isNone() && coreFrame->selection()->isContentEditable();
    5491 }
    5492 
    5493 static BOOL isInPasswordField(Frame* coreFrame)
    5494 {
    5495     return coreFrame && coreFrame->selection()->isInPasswordField();
    5496 }
    5497 
    54985504- (NSTextInputContext *)inputContext
    54995505{
     
    58565862        // Let AppKit cache a potentially input context.
    58575863        _private->exposeInputContext = exposeInputContext;
    5858         [[NSApplication sharedApplication] updateWindows];
     5864        [NSApp updateWindows];
    58595865    }
    58605866
Note: See TracChangeset for help on using the changeset viewer.