Changeset 238033 in webkit


Ignore:
Timestamp:
Nov 9, 2018 9:06:50 AM (5 years ago)
Author:
dbates@webkit.org
Message:

[iOS] Pressing forward delete key in text field does nothing and we should not invoke an editor
action when forward delete is pressed outside a text field
https://bugs.webkit.org/show_bug.cgi?id=190566
<rdar://problem/45262367>

Reviewed by Wenson Hsieh.

Source/WebKit:

Override -_deleteForwardAndNotify to perform a forward deletion and remove the dead code that
expected UIKit to send us a character string with 0xF728 for the forward delete key. UIKit
ceased doing this many years ago. We may revist this decision once <rdar://problem/45772078>
is fixed.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _interpretKeyEvent:isCharEvent:]):
(-[WKContentView _deleteForwardAndNotify:]):

Source/WebKitLegacy/mac:

Remove dead code. UIKit ceased sending us a character string with 0xF728 for the forward delete
key many years ago. We will need to fix up iOS Legacy WebKit support for the forward delete key
in UIKit. We may revist this decision once <rdar://problem/45772078> is fixed.

  • WebView/WebHTMLView.mm:

(-[WebHTMLView _handleEditingKeyEvent:]):

LayoutTests:

Add a test to ensure that pressing the forward delete key deletes the next character.

  • fast/events/ios/forward-delete-in-editable-expected.txt: Added.
  • fast/events/ios/forward-delete-in-editable.html: Added.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r238030 r238033  
     12018-11-09  Daniel Bates  <dabates@apple.com>
     2
     3        [iOS] Pressing forward delete key in text field does nothing and we should not invoke an editor
     4        action when forward delete is pressed outside a text field
     5        https://bugs.webkit.org/show_bug.cgi?id=190566
     6        <rdar://problem/45262367>
     7
     8        Reviewed by Wenson Hsieh.
     9
     10        Add a test to ensure that pressing the forward delete key deletes the next character.
     11
     12        * fast/events/ios/forward-delete-in-editable-expected.txt: Added.
     13        * fast/events/ios/forward-delete-in-editable.html: Added.
     14
    1152018-11-09  Carlos Garcia Campos  <cgarcia@igalia.com>
    216
  • trunk/Source/WebKit/ChangeLog

    r238020 r238033  
     12018-11-09  Daniel Bates  <dabates@apple.com>
     2
     3        [iOS] Pressing forward delete key in text field does nothing and we should not invoke an editor
     4        action when forward delete is pressed outside a text field
     5        https://bugs.webkit.org/show_bug.cgi?id=190566
     6        <rdar://problem/45262367>
     7
     8        Reviewed by Wenson Hsieh.
     9
     10        Override -_deleteForwardAndNotify to perform a forward deletion and remove the dead code that
     11        expected UIKit to send us a character string with 0xF728 for the forward delete key. UIKit
     12        ceased doing this many years ago. We may revist this decision once <rdar://problem/45772078>
     13        is fixed.
     14
     15        * UIProcess/ios/WKContentViewInteraction.mm:
     16        (-[WKContentView _interpretKeyEvent:isCharEvent:]):
     17        (-[WKContentView _deleteForwardAndNotify:]):
     18
    1192018-11-08  Wenson Hsieh  <wenson_hsieh@apple.com>
    220
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r237945 r238033  
    38243824    static const unsigned kWebReturnKey = 0x000D;
    38253825    static const unsigned kWebDeleteKey = 0x007F;
    3826     static const unsigned kWebDeleteForwardKey = 0xF728;
    38273826    static const unsigned kWebSpaceKey = 0x20;
    38283827
     
    38693868        break;
    38703869
    3871     case kWebDeleteForwardKey:
    3872         _page->executeEditCommand("deleteForward"_s);
    3873         return YES;
    3874 
    38753870    default:
    38763871        if (contentEditable && isCharEvent) {
     
    39413936{
    39423937    [self executeEditCommandWithCallback:@"deleteToEndOfLine"];
     3938}
     3939
     3940- (void)_deleteForwardAndNotify:(BOOL)notify
     3941{
     3942    [self executeEditCommandWithCallback:@"deleteForward"];
    39433943}
    39443944
  • trunk/Source/WebKitLegacy/mac/ChangeLog

    r238014 r238033  
     12018-11-09  Daniel Bates  <dabates@apple.com>
     2
     3        [iOS] Pressing forward delete key in text field does nothing and we should not invoke an editor
     4        action when forward delete is pressed outside a text field
     5        https://bugs.webkit.org/show_bug.cgi?id=190566
     6        <rdar://problem/45262367>
     7
     8        Reviewed by Wenson Hsieh.
     9
     10        Remove dead code. UIKit ceased sending us a character string with 0xF728 for the forward delete
     11        key many years ago. We will need to fix up iOS Legacy WebKit support for the forward delete key
     12        in UIKit. We may revist this decision once <rdar://problem/45772078> is fixed.
     13
     14        * WebView/WebHTMLView.mm:
     15        (-[WebHTMLView _handleEditingKeyEvent:]):
     16
    1172018-11-08  Megan Gardner  <megan_gardner@apple.com>
    218
  • trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm

    r237738 r238033  
    60556055#define kWebReturnKey        0x000d
    60566056#define kWebDeleteKey        0x007F
    6057 #define kWebDeleteForwardKey 0xF728
    60586057   
    60596058- (BOOL)_handleEditingKeyEvent:(KeyboardEvent *)wcEvent
     
    60906089            }
    60916090            break;
    6092         case kWebDeleteForwardKey:
    6093             [self deleteForward:self];
    6094             return YES;
    60956091        default:
    60966092            if (platformEvent->type() == PlatformKeyboardEvent::Char) {
Note: See TracChangeset for help on using the changeset viewer.