Changeset 246810 in webkit


Ignore:
Timestamp:
Jun 25, 2019 2:47:10 PM (5 years ago)
Author:
dbates@webkit.org
Message:

[iOS] Should not process key events in non-editable elements using IME
https://bugs.webkit.org/show_bug.cgi?id=199122
<rdar://problem/52006654>

Reviewed by Brent Fulgham.

Source/WebKit:

Use the non-Input Method code path (the one we use for US keyboard input) for all key events
targeting a non-editable element. Such key events will never require Input Method support
(i.e. show candidate suggestions). Moreover, this behavior matches the behavior on Mac.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView handleKeyWebEvent:withCompletionHandler:]):

LayoutTests:

Add a test to ensure that we do not process key events as being handled by the Input Manager
when using a Chinese keyboard layout and targeting a non-editable element.

  • fast/events/ios/keydown-keyup-keypress-keys-in-non-editable-using-chinese-keyboard-expected.txt: Added.
  • fast/events/ios/keydown-keyup-keypress-keys-in-non-editable-using-chinese-keyboard.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r246806 r246810  
     12019-06-25  Daniel Bates  <dabates@apple.com>
     2
     3        [iOS] Should not process key events in non-editable elements using IME
     4        https://bugs.webkit.org/show_bug.cgi?id=199122
     5        <rdar://problem/52006654>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        Add a test to ensure that we do not process key events as being handled by the Input Manager
     10        when using a Chinese keyboard layout and targeting a non-editable element.
     11
     12        * fast/events/ios/keydown-keyup-keypress-keys-in-non-editable-using-chinese-keyboard-expected.txt: Added.
     13        * fast/events/ios/keydown-keyup-keypress-keys-in-non-editable-using-chinese-keyboard.html: Added.
     14
    1152019-06-25  Truitt Savell  <tsavell@apple.com>
    216
  • trunk/Source/WebKit/ChangeLog

    r246807 r246810  
     12019-06-25  Daniel Bates  <dabates@apple.com>
     2
     3        [iOS] Should not process key events in non-editable elements using IME
     4        https://bugs.webkit.org/show_bug.cgi?id=199122
     5        <rdar://problem/52006654>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        Use the non-Input Method code path (the one we use for US keyboard input) for all key events
     10        targeting a non-editable element. Such key events will never require Input Method support
     11        (i.e. show candidate suggestions). Moreover, this behavior matches the behavior on Mac.
     12
     13        * UIProcess/ios/WKContentViewInteraction.mm:
     14        (-[WKContentView handleKeyWebEvent:withCompletionHandler:]):
     15
    1162019-06-25  Alex Christensen  <achristensen@webkit.org>
    217
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r246800 r246810  
    46284628#if USE(UIKIT_KEYBOARD_ADDITIONS)
    46294629    auto* keyboard = [UIKeyboardImpl sharedInstance];
    4630     if ([keyboard respondsToSelector:@selector(handleKeyInputMethodCommandForCurrentEvent)] && [keyboard handleKeyInputMethodCommandForCurrentEvent]) {
     4630    if (_page->editorState().isContentEditable && [keyboard respondsToSelector:@selector(handleKeyInputMethodCommandForCurrentEvent)] && [keyboard handleKeyInputMethodCommandForCurrentEvent]) {
    46314631        completionHandler(theEvent, YES);
    46324632        _page->handleKeyboardEvent(WebKit::NativeWebKeyboardEvent(theEvent, HandledByInputMethod::Yes));
Note: See TracChangeset for help on using the changeset viewer.