Changeset 246564 in webkit


Ignore:
Timestamp:
Jun 18, 2019 1:59:35 PM (5 years ago)
Author:
dbates@webkit.org
Message:

[iOS] Pressing key while holding Command should not insert character
https://bugs.webkit.org/show_bug.cgi?id=198925
<rdar://problem/51778811>

Reviewed by Brent Fulgham.

Source/WebKit:

Do not insert a character for an unhandled key command that has a Command modifier.
For example, pressing Command + Shift + v, which is an unhandled key command (at the
time of writing) should not insert v. This matches iOS and Mac platform conventions.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _interpretKeyEvent:isCharEvent:]):

LayoutTests:

Add a test that Command + Shift + v does not insert a v as we don't expect it
to as of the time of writing. A more comprehensive test would be needed to
ensure that all unhandled key commands with Command modifiers do not insert
a character. For now, the added test seems good enough.

  • fast/events/ios/command+shift+v-should-not-insert-v-expected.txt: Added.
  • fast/events/ios/command+shift+v-should-not-insert-v.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r246562 r246564  
     12019-06-18  Daniel Bates  <dabates@apple.com>
     2
     3        [iOS] Pressing key while holding Command should not insert character
     4        https://bugs.webkit.org/show_bug.cgi?id=198925
     5        <rdar://problem/51778811>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        Add a test that Command + Shift + v does not insert a v as we don't expect it
     10        to as of the time of writing. A more comprehensive test would be needed to
     11        ensure that all unhandled key commands with Command modifiers do not insert
     12        a character. For now, the added test seems good enough.
     13
     14        * fast/events/ios/command+shift+v-should-not-insert-v-expected.txt: Added.
     15        * fast/events/ios/command+shift+v-should-not-insert-v.html: Added.
     16
    1172019-06-18  Russell Epstein  <russell_e@apple.com>
    218
  • trunk/Source/WebKit/ChangeLog

    r246561 r246564  
     12019-06-18  Daniel Bates  <dabates@apple.com>
     2
     3        [iOS] Pressing key while holding Command should not insert character
     4        https://bugs.webkit.org/show_bug.cgi?id=198925
     5        <rdar://problem/51778811>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        Do not insert a character for an unhandled key command that has a Command modifier.
     10        For example, pressing Command + Shift + v, which is an unhandled key command (at the
     11        time of writing) should not insert v. This matches iOS and Mac platform conventions.
     12
     13        * UIProcess/ios/WKContentViewInteraction.mm:
     14        (-[WKContentView _interpretKeyEvent:isCharEvent:]):
     15
    1162019-06-18  John Wilander  <wilander@apple.com>
    217
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r246546 r246564  
    46754675#endif
    46764676
     4677    // Don't insert character for an unhandled Command-key key command. This matches iOS and Mac platform conventions.
     4678    if (event.modifierFlags & WebEventFlagMaskCommandKey)
     4679        return NO;
     4680
    46774681    NSString *characters = event.characters;
    46784682    if (!characters.length)
Note: See TracChangeset for help on using the changeset viewer.