Changeset 245161 in webkit
- Timestamp:
- May 9, 2019, 3:59:36 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/events/ios/keydown-keyup-special-keys-in-non-editable-element-expected.txt (modified) (2 diffs)
-
LayoutTests/fast/events/ios/keydown-keyup-special-keys-in-non-editable-element.html (modified) (2 diffs)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/PAL/ChangeLog (modified) (1 diff)
-
Source/WebCore/PAL/pal/spi/cocoa/IOKitSPI.h (modified) (1 diff)
-
Source/WebCore/platform/ios/KeyEventIOS.mm (modified) (1 diff)
-
Source/WebCore/platform/ios/PlatformEventFactoryIOS.mm (modified) (3 diffs)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/WebKitTestRunner/ios/HIDEventGenerator.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r245158 r245161 1 2019-05-09 Daniel Bates <dabates@apple.com> 2 3 [iOS] Numpad comma key has incorrect keyIdentifier property 4 https://bugs.webkit.org/show_bug.cgi?id=197753 5 <rdar://problem/50636274> 6 7 Reviewed by Brent Fulgham. 8 9 Update test results. 10 11 * fast/events/ios/keydown-keyup-special-keys-in-non-editable-element-expected.txt: 12 * fast/events/ios/keydown-keyup-special-keys-in-non-editable-element.html: 13 1 14 2019-05-08 Zalan Bujtas <zalan@apple.com> 2 15 -
trunk/LayoutTests/fast/events/ios/keydown-keyup-special-keys-in-non-editable-element-expected.txt
r241734 r245161 1 This tests that DOM keydown and keyup events are dispatched to a non-editable <body> on iOS when pressing special keys on a hardware keyboard. To run this test manually, verify that two messages are emitted when you press the following keys: Tab, ↑, ↓, ←, →, Delete, End, Enter, Escape, Home, left Alt, left ⌘ Command, left Ctrl, left ⇧ Shift, Page Down, Page Up, Return, right Alt, right ⌘ Command, right Ctrl, right ⇧ Shift, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16.1 This tests that DOM keydown and keyup events are dispatched to a non-editable <body> on iOS when pressing special keys on a hardware keyboard. To run this test manually, verify that two messages are emitted when you press the following keys: Tab, ↑, ↓, ←, →, Delete, End, Enter, Escape, Home, left Alt, left ⌘ Command, left Ctrl, left ⇧ Shift, Page Down, Page Up, Return, right Alt, right ⌘ Command, right Ctrl, right ⇧ Shift, Numpad ,, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16. 2 2 3 3 type: keydown, key: Tab, code: Tab, keyIdentifier: U+0009, keyCode: 9, charCode: 0, keyCode: 9, which: 9 … … 45 45 type: keydown, key: Shift, code: ShiftRight, keyIdentifier: Shift, keyCode: 16, charCode: 0, keyCode: 16, which: 16 46 46 type: keyup, key: Shift, code: ShiftRight, keyIdentifier: Shift, keyCode: 16, charCode: 0, keyCode: 16, which: 16 47 type: keydown, key: ,, code: NumpadComma, keyIdentifier: U+002C, keyCode: 108, charCode: 0, keyCode: 108, which: 108 48 type: keyup, key: ,, code: NumpadComma, keyIdentifier: U+002C, keyCode: 108, charCode: 0, keyCode: 108, which: 108 47 49 type: keydown, key: , code: F1, keyIdentifier: U+0010, keyCode: 112, charCode: 0, keyCode: 112, which: 112 48 50 type: keyup, key: Dead, code: F1, keyIdentifier: Unidentified, keyCode: 112, charCode: 0, keyCode: 112, which: 112 -
trunk/LayoutTests/fast/events/ios/keydown-keyup-special-keys-in-non-editable-element.html
r241734 r245161 13 13 </head> 14 14 <body onkeydown="handleKeyDown(event)" onkeyup="handleKeyUp(event)"> 15 <p>This tests that DOM keydown and keyup events are dispatched to a non-editable <body> on iOS when pressing special keys on a hardware keyboard. To run this test manually, verify that two messages are emitted when you press the following keys: <kbd>Tab</kbd>, <kbd>↑</kbd>, <kbd>↓</kbd>, <kbd>←</kbd>, <kbd>→</kbd>, <kbd>Delete</kbd>, <kbd>End</kbd>, <kbd>Enter</kbd>, <kbd>Escape</kbd>, <kbd>Home</kbd><!-- FIXME: Add <kbd>Insert</kbd> once <rdar://problem/47128940> is fixed. -->, left <kbd>Alt</kbd>, left <kbd>⌘ Command</kbd>, left <kbd>Ctrl</kbd>, left <kbd>⇧ Shift</kbd>, <kbd>Page Down</kbd>, <kbd>Page Up</kbd>, <kbd>Return</kbd>, right <kbd>Alt</kbd>, right <kbd>⌘ Command</kbd>, right <kbd>Ctrl</kbd>, right <kbd>⇧ Shift</kbd>, <kbd> F1</kbd>, <kbd>F2</kbd>, <kbd>F3</kbd>, <kbd>F4</kbd>, <kbd>F5</kbd>, <kbd>F6</kbd>, <kbd>F7</kbd>, <kbd>F8</kbd>, <kbd>F9</kbd>, <kbd>F10</kbd>, <kbd>F11</kbd>, <kbd>F12</kbd>, <kbd>F13</kbd>, <kbd>F14</kbd>, <kbd>F15</kbd>, <kbd>F16</kbd><!-- FIXME: Add <kbd>F17</kbd>, <kbd>F18</kbd>, <kbd>F19</kbd>, <kbd>F20</kbd>, <kbd>F21</kbd>, <kbd>F22</kbd>, <kbd>F23</kbd>, <kbd>F24</kbd> once <rdar://problem/47128940> is fixed.-->.15 <p>This tests that DOM keydown and keyup events are dispatched to a non-editable <body> on iOS when pressing special keys on a hardware keyboard. To run this test manually, verify that two messages are emitted when you press the following keys: <kbd>Tab</kbd>, <kbd>↑</kbd>, <kbd>↓</kbd>, <kbd>←</kbd>, <kbd>→</kbd>, <kbd>Delete</kbd>, <kbd>End</kbd>, <kbd>Enter</kbd>, <kbd>Escape</kbd>, <kbd>Home</kbd><!-- FIXME: Add <kbd>Insert</kbd> once <rdar://problem/47128940> is fixed. -->, left <kbd>Alt</kbd>, left <kbd>⌘ Command</kbd>, left <kbd>Ctrl</kbd>, left <kbd>⇧ Shift</kbd>, <kbd>Page Down</kbd>, <kbd>Page Up</kbd>, <kbd>Return</kbd>, right <kbd>Alt</kbd>, right <kbd>⌘ Command</kbd>, right <kbd>Ctrl</kbd>, right <kbd>⇧ Shift</kbd>, <kbd>Numpad ,</kbd>, </kbd><kbd>F1</kbd>, <kbd>F2</kbd>, <kbd>F3</kbd>, <kbd>F4</kbd>, <kbd>F5</kbd>, <kbd>F6</kbd>, <kbd>F7</kbd>, <kbd>F8</kbd>, <kbd>F9</kbd>, <kbd>F10</kbd>, <kbd>F11</kbd>, <kbd>F12</kbd>, <kbd>F13</kbd>, <kbd>F14</kbd>, <kbd>F15</kbd>, <kbd>F16</kbd><!-- FIXME: Add <kbd>F17</kbd>, <kbd>F18</kbd>, <kbd>F19</kbd>, <kbd>F20</kbd>, <kbd>F21</kbd>, <kbd>F22</kbd>, <kbd>F23</kbd>, <kbd>F24</kbd> once <rdar://problem/47128940> is fixed.-->. 16 16 </p> 17 17 <pre id="console"></pre> … … 40 40 "rightControl", 41 41 "rightShift", 42 "numpadComma", 42 43 ]; 43 44 -
trunk/Source/WebCore/ChangeLog
r245158 r245161 1 2019-05-09 Daniel Bates <dabates@apple.com> 2 3 [iOS] Numpad comma key has incorrect keyIdentifier property 4 https://bugs.webkit.org/show_bug.cgi?id=197753 5 <rdar://problem/50636274> 6 7 Reviewed by Brent Fulgham. 8 9 Map the Numpad Comma HID usage code to its Window virtual key code, VK_SEPARATOR, 10 so that can compute the keyIdentifier property for the Numpad Comma key. Also 11 consider this key as a keypad key just like we do on Mac. There is no discernable 12 difference for doing so on iOS because the non-keypad code path computes the same result 13 due to GraphicsServices having fixed up the input string for the Numpad Comma to be 14 ",", which is want. 15 16 * platform/ios/KeyEventIOS.mm: 17 (WebCore::windowsKeyCodeForKeyCode): Map kHIDUsage_KeypadComma to VK_SEPARATOR. 18 * platform/ios/PlatformEventFactoryIOS.mm: 19 (WebCore::codeForKeyEvent): Add a comment to explain that this key is only on 20 JIS keyboards. 21 (WebCore::isKeypadEvent): Return true for the Numpad Comma key. 22 1 23 2019-05-09 Zalan Bujtas <zalan@apple.com> 2 24 -
trunk/Source/WebCore/PAL/ChangeLog
r245075 r245161 1 2019-05-09 Daniel Bates <dabates@apple.com> 2 3 [iOS] Numpad comma key has incorrect keyIdentifier property 4 https://bugs.webkit.org/show_bug.cgi?id=197753 5 <rdar://problem/50636274> 6 7 Reviewed by Brent Fulgham. 8 9 Expose enumerator for Numpad Comma. 10 11 * pal/spi/cocoa/IOKitSPI.h: 12 1 13 2019-05-08 Alex Christensen <achristensen@webkit.org> 2 14 -
trunk/Source/WebCore/PAL/pal/spi/cocoa/IOKitSPI.h
r242325 r245161 198 198 kHIDUsage_KeyboardF24 = 0x73, 199 199 kHIDUsage_KeyboardMenu = 0x76, 200 kHIDUsage_KeypadComma = 0x85, 200 201 kHIDUsage_KeyboardLeftControl = 0xE0, 201 202 kHIDUsage_KeyboardLeftShift = 0xE1, -
trunk/Source/WebCore/platform/ios/KeyEventIOS.mm
r242915 r245161 173 173 /* 0x81 */ VK_VOLUME_DOWN, // Volume Down 174 174 }; 175 // Check if key is a modifier .175 // Check if key is a modifier or the keypad comma (on JIS keyboard). 176 176 switch (keyCode) { 177 case kHIDUsage_KeypadComma: 178 return VK_SEPARATOR; 177 179 case kHIDUsage_KeyboardLeftControl: 178 180 return VK_LCONTROL; -
trunk/Source/WebCore/platform/ios/PlatformEventFactoryIOS.mm
r241282 r245161 323 323 // NumpadClear. 324 324 // NumpadClearEntry. 325 case VK_SEPARATOR: return "NumpadComma"_s; 325 case VK_SEPARATOR: return "NumpadComma"_s; // On JIS keyboard 326 326 case VK_DECIMAL: return "NumpadDecimal"_s; 327 327 case VK_DIVIDE: return "NumpadDivide"_s; … … 428 428 return false; 429 429 430 // With the exception of keypad comma, the following corresponds to the criterion for UIKeyModifierNumericPad.431 // FIXME: Recognize keypad comma.432 430 switch (event.keyCode) { 433 431 case VK_CLEAR: // Num Pad Clear … … 439 437 case VK_RETURN: // Num Pad Enter 440 438 case VK_DECIMAL: // Num Pad . 439 case VK_SEPARATOR: // Num Pad , (on JIS keyboard) 441 440 case VK_NUMPAD0: 442 441 case VK_NUMPAD1: -
trunk/Tools/ChangeLog
r245156 r245161 1 2019-05-09 Daniel Bates <dabates@apple.com> 2 3 [iOS] Numpad comma key has incorrect keyIdentifier property 4 https://bugs.webkit.org/show_bug.cgi?id=197753 5 <rdar://problem/50636274> 6 7 Reviewed by Brent Fulgham. 8 9 Recognize "numpadComma" and return the appropriate HID usage code. 10 11 * WebKitTestRunner/ios/HIDEventGenerator.mm: 12 (hidUsageCodeForCharacter): 13 1 14 2019-05-09 Eric Carlson <eric.carlson@apple.com> 2 15 -
trunk/Tools/WebKitTestRunner/ios/HIDEventGenerator.mm
r244955 r245161 974 974 if ([key isEqualToString:@"rightAlt"]) 975 975 return kHIDUsage_KeyboardRightAlt; 976 if ([key isEqualToString:@"numpadComma"]) 977 return kHIDUsage_KeypadComma; 976 978 977 979 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.