Changeset 245162 in webkit


Ignore:
Timestamp:
May 9, 2019 4:04:40 PM (5 years ago)
Author:
dbates@webkit.org
Message:

[iOS] Right command key has wrong value for property code
https://bugs.webkit.org/show_bug.cgi?id=193876
<rdar://problem/47577308>

Reviewed by Brent Fulgham.

Source/WebCore:

We're looking for the wrong Windows virtual key code for the right command key.
Substitute VK_APPS for VK_RWIN so we can identify the right command key and return
the correct value for the code property of the DOM key event.

  • platform/ios/PlatformEventFactoryIOS.mm:

(WebCore::codeForKeyEvent):

LayoutTests:

Update test result.

  • fast/events/ios/keydown-keyup-special-keys-in-non-editable-element-expected.txt:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r245161 r245162  
     12019-05-09  Daniel Bates  <dabates@apple.com>
     2
     3        [iOS] Right command key has wrong value for property code
     4        https://bugs.webkit.org/show_bug.cgi?id=193876
     5        <rdar://problem/47577308>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        Update test result.
     10
     11        * fast/events/ios/keydown-keyup-special-keys-in-non-editable-element-expected.txt:
     12
    1132019-05-09  Daniel Bates  <dabates@apple.com>
    214
  • trunk/LayoutTests/fast/events/ios/keydown-keyup-special-keys-in-non-editable-element-expected.txt

    r245161 r245162  
    3939type: keydown, key: Alt, code: Unidentified, keyIdentifier: Alt, keyCode: 18, charCode: 0, keyCode: 18, which: 18
    4040type: keyup, key: Alt, code: Unidentified, keyIdentifier: Alt, keyCode: 18, charCode: 0, keyCode: 18, which: 18
    41 type: keydown, key: Meta, code: Unidentified, keyIdentifier: Meta, keyCode: 93, charCode: 0, keyCode: 93, which: 93
    42 type: keyup, key: Meta, code: Unidentified, keyIdentifier: Meta, keyCode: 93, charCode: 0, keyCode: 93, which: 93
     41type: keydown, key: Meta, code: MetaRight, keyIdentifier: Meta, keyCode: 93, charCode: 0, keyCode: 93, which: 93
     42type: keyup, key: Meta, code: MetaRight, keyIdentifier: Meta, keyCode: 93, charCode: 0, keyCode: 93, which: 93
    4343type: keydown, key: Control, code: ControlRight, keyIdentifier: Control, keyCode: 17, charCode: 0, keyCode: 17, which: 17
    4444type: keyup, key: Control, code: ControlRight, keyIdentifier: Control, keyCode: 17, charCode: 0, keyCode: 17, which: 17
  • trunk/Source/WebCore/ChangeLog

    r245161 r245162  
     12019-05-09  Daniel Bates  <dabates@apple.com>
     2
     3        [iOS] Right command key has wrong value for property code
     4        https://bugs.webkit.org/show_bug.cgi?id=193876
     5        <rdar://problem/47577308>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        We're looking for the wrong Windows virtual key code for the right command key.
     10        Substitute VK_APPS for VK_RWIN so we can identify the right command key and return
     11        the correct value for the code property of the DOM key event.
     12
     13        * platform/ios/PlatformEventFactoryIOS.mm:
     14        (WebCore::codeForKeyEvent):
     15
    1162019-05-09  Daniel Bates  <dabates@apple.com>
    217
  • trunk/Source/WebCore/platform/ios/PlatformEventFactoryIOS.mm

    r245161 r245162  
    276276    case VK_RETURN: return "Enter"_s; //  Labeled Return on Apple keyboards.
    277277    case VK_LWIN: return "MetaLeft"_s;
    278     case VK_RWIN: return "MetaRight"_s;
     278    case VK_APPS: return "MetaRight"_s;
    279279    case VK_LSHIFT: return "ShiftLeft"_s;
    280280    case VK_RSHIFT: return "ShiftRight"_s;
Note: See TracChangeset for help on using the changeset viewer.