WebKit Bugzilla
Attachment 372660 Details for
Bug 199122
: [iOS] Should not process key events in non-editable elements using IME
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-199122-20190621164857.patch (text/plain), 20.46 KB, created by
Daniel Bates
on 2019-06-21 16:48:58 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Daniel Bates
Created:
2019-06-21 16:48:58 PDT
Size:
20.46 KB
patch
obsolete
>Subversion Revision: 246682 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 3aa5caa0c97aca9d2ce927750442a18f2e3a94d2..1533a9dddfb874353629c6dcd3b56ac864711ced 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,18 @@ >+2019-06-21 Daniel Bates <dabates@apple.com> >+ >+ [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 NOBODY (OOPS!). >+ >+ 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:]): >+ > 2019-05-16 Daniel Bates <dabates@apple.com> > > [iOS] Select all with existing range selection replaces range instead of selecting all text >diff --git a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >index b552e6fec56aba05fed454cd90537ad513955cf7..b3e16f2417b133ce6c98171a62daf1e30df3528f 100644 >--- a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >+++ b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >@@ -4611,7 +4611,7 @@ - (void)handleKeyWebEvent:(::WebEvent *)theEvent withCompletionHandler:(void (^) > using HandledByInputMethod = WebKit::NativeWebKeyboardEvent::HandledByInputMethod; > #if USE(UIKIT_KEYBOARD_ADDITIONS) > auto* keyboard = [UIKeyboardImpl sharedInstance]; >- if ([keyboard respondsToSelector:@selector(handleKeyInputMethodCommandForCurrentEvent)] && [keyboard handleKeyInputMethodCommandForCurrentEvent]) { >+ if (_page->editorState().isContentEditable && [keyboard respondsToSelector:@selector(handleKeyInputMethodCommandForCurrentEvent)] && [keyboard handleKeyInputMethodCommandForCurrentEvent]) { > completionHandler(theEvent, YES); > _page->handleKeyboardEvent(WebKit::NativeWebKeyboardEvent(theEvent, HandledByInputMethod::Yes)); > return; >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 47928190fd90e6022852d3d1c65fd3956c18885c..15147ed26309bc99fcba3eef78c7509fa2d5e7d2 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,17 @@ >+2019-06-21 Daniel Bates <dabates@apple.com> >+ >+ [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 NOBODY (OOPS!). >+ >+ 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. >+ > 2019-05-16 Daniel Bates <dabates@apple.com> > > [iOS] Select all with existing range selection replaces range instead of selecting all text >diff --git a/LayoutTests/fast/events/ios/keydown-keyup-keypress-keys-in-non-editable-using-chinese-keyboard-expected.txt b/LayoutTests/fast/events/ios/keydown-keyup-keypress-keys-in-non-editable-using-chinese-keyboard-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..3188cd4cf7178739ba2d102518e6288592dc69bc >--- /dev/null >+++ b/LayoutTests/fast/events/ios/keydown-keyup-keypress-keys-in-non-editable-using-chinese-keyboard-expected.txt >@@ -0,0 +1,138 @@ >+This tests that DOM keydown, keyup, and keypress events are dispatched to a non-editable <body> on iOS using a Chinese keyboard. >+ >+type: keydown, key: a, code: KeyA, keyIdentifier: U+0041, keyCode: 65, charCode: 0, keyCode: 65, which: 65 >+type: keypress, key: a, code: KeyA, keyIdentifier: , keyCode: 97, charCode: 97, keyCode: 97, which: 97 >+type: keyup, key: a, code: KeyA, keyIdentifier: U+0041, keyCode: 65, charCode: 0, keyCode: 65, which: 65 >+type: keydown, key: b, code: KeyB, keyIdentifier: U+0042, keyCode: 66, charCode: 0, keyCode: 66, which: 66 >+type: keypress, key: b, code: KeyB, keyIdentifier: , keyCode: 98, charCode: 98, keyCode: 98, which: 98 >+type: keyup, key: b, code: KeyB, keyIdentifier: U+0042, keyCode: 66, charCode: 0, keyCode: 66, which: 66 >+type: keydown, key: c, code: KeyC, keyIdentifier: U+0043, keyCode: 67, charCode: 0, keyCode: 67, which: 67 >+type: keypress, key: c, code: KeyC, keyIdentifier: , keyCode: 99, charCode: 99, keyCode: 99, which: 99 >+type: keyup, key: c, code: KeyC, keyIdentifier: U+0043, keyCode: 67, charCode: 0, keyCode: 67, which: 67 >+type: keydown, key: d, code: KeyD, keyIdentifier: U+0044, keyCode: 68, charCode: 0, keyCode: 68, which: 68 >+type: keypress, key: d, code: KeyD, keyIdentifier: , keyCode: 100, charCode: 100, keyCode: 100, which: 100 >+type: keyup, key: d, code: KeyD, keyIdentifier: U+0044, keyCode: 68, charCode: 0, keyCode: 68, which: 68 >+type: keydown, key: e, code: KeyE, keyIdentifier: U+0045, keyCode: 69, charCode: 0, keyCode: 69, which: 69 >+type: keypress, key: e, code: KeyE, keyIdentifier: , keyCode: 101, charCode: 101, keyCode: 101, which: 101 >+type: keyup, key: e, code: KeyE, keyIdentifier: U+0045, keyCode: 69, charCode: 0, keyCode: 69, which: 69 >+type: keydown, key: f, code: KeyF, keyIdentifier: U+0046, keyCode: 70, charCode: 0, keyCode: 70, which: 70 >+type: keypress, key: f, code: KeyF, keyIdentifier: , keyCode: 102, charCode: 102, keyCode: 102, which: 102 >+type: keyup, key: f, code: KeyF, keyIdentifier: U+0046, keyCode: 70, charCode: 0, keyCode: 70, which: 70 >+type: keydown, key: g, code: KeyG, keyIdentifier: U+0047, keyCode: 71, charCode: 0, keyCode: 71, which: 71 >+type: keypress, key: g, code: KeyG, keyIdentifier: , keyCode: 103, charCode: 103, keyCode: 103, which: 103 >+type: keyup, key: g, code: KeyG, keyIdentifier: U+0047, keyCode: 71, charCode: 0, keyCode: 71, which: 71 >+type: keydown, key: h, code: KeyH, keyIdentifier: U+0048, keyCode: 72, charCode: 0, keyCode: 72, which: 72 >+type: keypress, key: h, code: KeyH, keyIdentifier: , keyCode: 104, charCode: 104, keyCode: 104, which: 104 >+type: keyup, key: h, code: KeyH, keyIdentifier: U+0048, keyCode: 72, charCode: 0, keyCode: 72, which: 72 >+type: keydown, key: i, code: KeyI, keyIdentifier: U+0049, keyCode: 73, charCode: 0, keyCode: 73, which: 73 >+type: keypress, key: i, code: KeyI, keyIdentifier: , keyCode: 105, charCode: 105, keyCode: 105, which: 105 >+type: keyup, key: i, code: KeyI, keyIdentifier: U+0049, keyCode: 73, charCode: 0, keyCode: 73, which: 73 >+type: keydown, key: j, code: KeyJ, keyIdentifier: U+004A, keyCode: 74, charCode: 0, keyCode: 74, which: 74 >+type: keypress, key: j, code: KeyJ, keyIdentifier: , keyCode: 106, charCode: 106, keyCode: 106, which: 106 >+type: keyup, key: j, code: KeyJ, keyIdentifier: U+004A, keyCode: 74, charCode: 0, keyCode: 74, which: 74 >+type: keydown, key: k, code: KeyK, keyIdentifier: U+004B, keyCode: 75, charCode: 0, keyCode: 75, which: 75 >+type: keypress, key: k, code: KeyK, keyIdentifier: , keyCode: 107, charCode: 107, keyCode: 107, which: 107 >+type: keyup, key: k, code: KeyK, keyIdentifier: U+004B, keyCode: 75, charCode: 0, keyCode: 75, which: 75 >+type: keydown, key: l, code: KeyL, keyIdentifier: U+004C, keyCode: 76, charCode: 0, keyCode: 76, which: 76 >+type: keypress, key: l, code: KeyL, keyIdentifier: , keyCode: 108, charCode: 108, keyCode: 108, which: 108 >+type: keyup, key: l, code: KeyL, keyIdentifier: U+004C, keyCode: 76, charCode: 0, keyCode: 76, which: 76 >+type: keydown, key: m, code: KeyM, keyIdentifier: U+004D, keyCode: 77, charCode: 0, keyCode: 77, which: 77 >+type: keypress, key: m, code: KeyM, keyIdentifier: , keyCode: 109, charCode: 109, keyCode: 109, which: 109 >+type: keyup, key: m, code: KeyM, keyIdentifier: U+004D, keyCode: 77, charCode: 0, keyCode: 77, which: 77 >+type: keydown, key: n, code: KeyN, keyIdentifier: U+004E, keyCode: 78, charCode: 0, keyCode: 78, which: 78 >+type: keypress, key: n, code: KeyN, keyIdentifier: , keyCode: 110, charCode: 110, keyCode: 110, which: 110 >+type: keyup, key: n, code: KeyN, keyIdentifier: U+004E, keyCode: 78, charCode: 0, keyCode: 78, which: 78 >+type: keydown, key: o, code: KeyO, keyIdentifier: U+004F, keyCode: 79, charCode: 0, keyCode: 79, which: 79 >+type: keypress, key: o, code: KeyO, keyIdentifier: , keyCode: 111, charCode: 111, keyCode: 111, which: 111 >+type: keyup, key: o, code: KeyO, keyIdentifier: U+004F, keyCode: 79, charCode: 0, keyCode: 79, which: 79 >+type: keydown, key: p, code: KeyP, keyIdentifier: U+0050, keyCode: 80, charCode: 0, keyCode: 80, which: 80 >+type: keypress, key: p, code: KeyP, keyIdentifier: , keyCode: 112, charCode: 112, keyCode: 112, which: 112 >+type: keyup, key: p, code: KeyP, keyIdentifier: U+0050, keyCode: 80, charCode: 0, keyCode: 80, which: 80 >+type: keydown, key: q, code: KeyQ, keyIdentifier: U+0051, keyCode: 81, charCode: 0, keyCode: 81, which: 81 >+type: keypress, key: q, code: KeyQ, keyIdentifier: , keyCode: 113, charCode: 113, keyCode: 113, which: 113 >+type: keyup, key: q, code: KeyQ, keyIdentifier: U+0051, keyCode: 81, charCode: 0, keyCode: 81, which: 81 >+type: keydown, key: r, code: KeyR, keyIdentifier: U+0052, keyCode: 82, charCode: 0, keyCode: 82, which: 82 >+type: keypress, key: r, code: KeyR, keyIdentifier: , keyCode: 114, charCode: 114, keyCode: 114, which: 114 >+type: keyup, key: r, code: KeyR, keyIdentifier: U+0052, keyCode: 82, charCode: 0, keyCode: 82, which: 82 >+type: keydown, key: s, code: KeyS, keyIdentifier: U+0053, keyCode: 83, charCode: 0, keyCode: 83, which: 83 >+type: keypress, key: s, code: KeyS, keyIdentifier: , keyCode: 115, charCode: 115, keyCode: 115, which: 115 >+type: keyup, key: s, code: KeyS, keyIdentifier: U+0053, keyCode: 83, charCode: 0, keyCode: 83, which: 83 >+type: keydown, key: t, code: KeyT, keyIdentifier: U+0054, keyCode: 84, charCode: 0, keyCode: 84, which: 84 >+type: keypress, key: t, code: KeyT, keyIdentifier: , keyCode: 116, charCode: 116, keyCode: 116, which: 116 >+type: keyup, key: t, code: KeyT, keyIdentifier: U+0054, keyCode: 84, charCode: 0, keyCode: 84, which: 84 >+type: keydown, key: u, code: KeyU, keyIdentifier: U+0055, keyCode: 85, charCode: 0, keyCode: 85, which: 85 >+type: keypress, key: u, code: KeyU, keyIdentifier: , keyCode: 117, charCode: 117, keyCode: 117, which: 117 >+type: keyup, key: u, code: KeyU, keyIdentifier: U+0055, keyCode: 85, charCode: 0, keyCode: 85, which: 85 >+type: keydown, key: v, code: KeyV, keyIdentifier: U+0056, keyCode: 86, charCode: 0, keyCode: 86, which: 86 >+type: keypress, key: v, code: KeyV, keyIdentifier: , keyCode: 118, charCode: 118, keyCode: 118, which: 118 >+type: keyup, key: v, code: KeyV, keyIdentifier: U+0056, keyCode: 86, charCode: 0, keyCode: 86, which: 86 >+type: keydown, key: w, code: KeyW, keyIdentifier: U+0057, keyCode: 87, charCode: 0, keyCode: 87, which: 87 >+type: keypress, key: w, code: KeyW, keyIdentifier: , keyCode: 119, charCode: 119, keyCode: 119, which: 119 >+type: keyup, key: w, code: KeyW, keyIdentifier: U+0057, keyCode: 87, charCode: 0, keyCode: 87, which: 87 >+type: keydown, key: x, code: KeyX, keyIdentifier: U+0058, keyCode: 88, charCode: 0, keyCode: 88, which: 88 >+type: keypress, key: x, code: KeyX, keyIdentifier: , keyCode: 120, charCode: 120, keyCode: 120, which: 120 >+type: keyup, key: x, code: KeyX, keyIdentifier: U+0058, keyCode: 88, charCode: 0, keyCode: 88, which: 88 >+type: keydown, key: y, code: KeyY, keyIdentifier: U+0059, keyCode: 89, charCode: 0, keyCode: 89, which: 89 >+type: keypress, key: y, code: KeyY, keyIdentifier: , keyCode: 121, charCode: 121, keyCode: 121, which: 121 >+type: keyup, key: y, code: KeyY, keyIdentifier: U+0059, keyCode: 89, charCode: 0, keyCode: 89, which: 89 >+type: keydown, key: z, code: KeyZ, keyIdentifier: U+005A, keyCode: 90, charCode: 0, keyCode: 90, which: 90 >+type: keypress, key: z, code: KeyZ, keyIdentifier: , keyCode: 122, charCode: 122, keyCode: 122, which: 122 >+type: keyup, key: z, code: KeyZ, keyIdentifier: U+005A, keyCode: 90, charCode: 0, keyCode: 90, which: 90 >+type: keydown, key: 0, code: Digit0, keyIdentifier: U+0030, keyCode: 48, charCode: 0, keyCode: 48, which: 48 >+type: keypress, key: 0, code: Digit0, keyIdentifier: , keyCode: 48, charCode: 48, keyCode: 48, which: 48 >+type: keyup, key: 0, code: Digit0, keyIdentifier: U+0030, keyCode: 48, charCode: 0, keyCode: 48, which: 48 >+type: keydown, key: 1, code: Digit1, keyIdentifier: U+0031, keyCode: 49, charCode: 0, keyCode: 49, which: 49 >+type: keypress, key: 1, code: Digit1, keyIdentifier: , keyCode: 49, charCode: 49, keyCode: 49, which: 49 >+type: keyup, key: 1, code: Digit1, keyIdentifier: U+0031, keyCode: 49, charCode: 0, keyCode: 49, which: 49 >+type: keydown, key: 2, code: Digit2, keyIdentifier: U+0032, keyCode: 50, charCode: 0, keyCode: 50, which: 50 >+type: keypress, key: 2, code: Digit2, keyIdentifier: , keyCode: 50, charCode: 50, keyCode: 50, which: 50 >+type: keyup, key: 2, code: Digit2, keyIdentifier: U+0032, keyCode: 50, charCode: 0, keyCode: 50, which: 50 >+type: keydown, key: 3, code: Digit3, keyIdentifier: U+0033, keyCode: 51, charCode: 0, keyCode: 51, which: 51 >+type: keypress, key: 3, code: Digit3, keyIdentifier: , keyCode: 51, charCode: 51, keyCode: 51, which: 51 >+type: keyup, key: 3, code: Digit3, keyIdentifier: U+0033, keyCode: 51, charCode: 0, keyCode: 51, which: 51 >+type: keydown, key: 4, code: Digit4, keyIdentifier: U+0034, keyCode: 52, charCode: 0, keyCode: 52, which: 52 >+type: keypress, key: 4, code: Digit4, keyIdentifier: , keyCode: 52, charCode: 52, keyCode: 52, which: 52 >+type: keyup, key: 4, code: Digit4, keyIdentifier: U+0034, keyCode: 52, charCode: 0, keyCode: 52, which: 52 >+type: keydown, key: 5, code: Digit5, keyIdentifier: U+0035, keyCode: 53, charCode: 0, keyCode: 53, which: 53 >+type: keypress, key: 5, code: Digit5, keyIdentifier: , keyCode: 53, charCode: 53, keyCode: 53, which: 53 >+type: keyup, key: 5, code: Digit5, keyIdentifier: U+0035, keyCode: 53, charCode: 0, keyCode: 53, which: 53 >+type: keydown, key: 6, code: Digit6, keyIdentifier: U+0036, keyCode: 54, charCode: 0, keyCode: 54, which: 54 >+type: keypress, key: 6, code: Digit6, keyIdentifier: , keyCode: 54, charCode: 54, keyCode: 54, which: 54 >+type: keyup, key: 6, code: Digit6, keyIdentifier: U+0036, keyCode: 54, charCode: 0, keyCode: 54, which: 54 >+type: keydown, key: 7, code: Digit7, keyIdentifier: U+0037, keyCode: 55, charCode: 0, keyCode: 55, which: 55 >+type: keypress, key: 7, code: Digit7, keyIdentifier: , keyCode: 55, charCode: 55, keyCode: 55, which: 55 >+type: keyup, key: 7, code: Digit7, keyIdentifier: U+0037, keyCode: 55, charCode: 0, keyCode: 55, which: 55 >+type: keydown, key: 8, code: Digit8, keyIdentifier: U+0038, keyCode: 56, charCode: 0, keyCode: 56, which: 56 >+type: keypress, key: 8, code: Digit8, keyIdentifier: , keyCode: 56, charCode: 56, keyCode: 56, which: 56 >+type: keyup, key: 8, code: Digit8, keyIdentifier: U+0038, keyCode: 56, charCode: 0, keyCode: 56, which: 56 >+type: keydown, key: 9, code: Digit9, keyIdentifier: U+0039, keyCode: 57, charCode: 0, keyCode: 57, which: 57 >+type: keypress, key: 9, code: Digit9, keyIdentifier: , keyCode: 57, charCode: 57, keyCode: 57, which: 57 >+type: keyup, key: 9, code: Digit9, keyIdentifier: U+0039, keyCode: 57, charCode: 0, keyCode: 57, which: 57 >+type: keydown, key: -, code: Minus, keyIdentifier: U+002D, keyCode: 189, charCode: 0, keyCode: 189, which: 189 >+type: keypress, key: -, code: Minus, keyIdentifier: , keyCode: 45, charCode: 45, keyCode: 45, which: 45 >+type: keyup, key: -, code: Minus, keyIdentifier: U+002D, keyCode: 189, charCode: 0, keyCode: 189, which: 189 >+type: keydown, key: =, code: Equal, keyIdentifier: U+003D, keyCode: 187, charCode: 0, keyCode: 187, which: 187 >+type: keypress, key: =, code: Equal, keyIdentifier: , keyCode: 61, charCode: 61, keyCode: 61, which: 61 >+type: keyup, key: =, code: Equal, keyIdentifier: U+003D, keyCode: 187, charCode: 0, keyCode: 187, which: 187 >+type: keydown, key: ã, code: BracketLeft, keyIdentifier: U+005B, keyCode: 219, charCode: 0, keyCode: 219, which: 219 >+type: keypress, key: ã, code: BracketLeft, keyIdentifier: , keyCode: 12304, charCode: 12304, keyCode: 12304, which: 12304 >+type: keyup, key: ã, code: BracketLeft, keyIdentifier: U+005B, keyCode: 219, charCode: 0, keyCode: 219, which: 219 >+type: keydown, key: ã, code: BracketRight, keyIdentifier: U+005D, keyCode: 221, charCode: 0, keyCode: 221, which: 221 >+type: keypress, key: ã, code: BracketRight, keyIdentifier: , keyCode: 12305, charCode: 12305, keyCode: 12305, which: 12305 >+type: keyup, key: ã, code: BracketRight, keyIdentifier: U+005D, keyCode: 221, charCode: 0, keyCode: 221, which: 221 >+type: keydown, key: ï¼, code: Semicolon, keyIdentifier: U+003B, keyCode: 186, charCode: 0, keyCode: 186, which: 186 >+type: keypress, key: ï¼, code: Semicolon, keyIdentifier: , keyCode: 65307, charCode: 65307, keyCode: 65307, which: 65307 >+type: keyup, key: ï¼, code: Semicolon, keyIdentifier: U+003B, keyCode: 186, charCode: 0, keyCode: 186, which: 186 >+type: keydown, key: ', code: Quote, keyIdentifier: U+0027, keyCode: 222, charCode: 0, keyCode: 222, which: 222 >+type: keypress, key: ', code: Quote, keyIdentifier: , keyCode: 39, charCode: 39, keyCode: 39, which: 39 >+type: keyup, key: ', code: Quote, keyIdentifier: U+0027, keyCode: 222, charCode: 0, keyCode: 222, which: 222 >+type: keydown, key: ï¼, code: Comma, keyIdentifier: U+002C, keyCode: 188, charCode: 0, keyCode: 188, which: 188 >+type: keypress, key: ï¼, code: Comma, keyIdentifier: , keyCode: 65292, charCode: 65292, keyCode: 65292, which: 65292 >+type: keyup, key: ï¼, code: Comma, keyIdentifier: U+002C, keyCode: 188, charCode: 0, keyCode: 188, which: 188 >+type: keydown, key: ã, code: Period, keyIdentifier: U+002E, keyCode: 190, charCode: 0, keyCode: 190, which: 190 >+type: keypress, key: ã, code: Period, keyIdentifier: , keyCode: 12290, charCode: 12290, keyCode: 12290, which: 12290 >+type: keyup, key: ã, code: Period, keyIdentifier: U+002E, keyCode: 190, charCode: 0, keyCode: 190, which: 190 >+type: keydown, key: /, code: Slash, keyIdentifier: U+002F, keyCode: 191, charCode: 0, keyCode: 191, which: 191 >+type: keypress, key: /, code: Slash, keyIdentifier: , keyCode: 47, charCode: 47, keyCode: 47, which: 47 >+type: keyup, key: /, code: Slash, keyIdentifier: U+002F, keyCode: 191, charCode: 0, keyCode: 191, which: 191 >+ >diff --git a/LayoutTests/fast/events/ios/keydown-keyup-keypress-keys-in-non-editable-using-chinese-keyboard.html b/LayoutTests/fast/events/ios/keydown-keyup-keypress-keys-in-non-editable-using-chinese-keyboard.html >new file mode 100644 >index 0000000000000000000000000000000000000000..3b2ceccaf50d6370c6b003ed72b9dcccc13d70e1 >--- /dev/null >+++ b/LayoutTests/fast/events/ios/keydown-keyup-keypress-keys-in-non-editable-using-chinese-keyboard.html >@@ -0,0 +1,74 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<meta name="viewport" content="width=device-width"> >+<meta charset="utf8"> >+<script src="../../../resources/ui-helper.js"></script> >+<script> >+if (window.testRunner) { >+ testRunner.dumpAsText(); >+ testRunner.waitUntilDone(); >+} >+</script> >+</head> >+<body onkeydown="handleKeyDown(event)" onkeyup="handleKeyUp(event)" onkeypress="handleKeyPress(event)"> >+<p>This tests that DOM keydown, keyup, and keypress events are dispatched to a non-editable <body> on iOS using a Chinese keyboard.</p> >+<pre id="console"></pre> >+<script> >+// FIXME: Key down \ causes a timeout. >+let remainingKeysToPress = "abcdefghijklmnopqrstuvwxyz0123456789-=[];',./".split(""); >+ >+async function nextKeyPress() >+{ >+ if (!remainingKeysToPress.length) { >+ if (window.testRunner) { >+ await UIHelper.setKeyboardInputModeIdentifier("en_US"); >+ testRunner.notifyDone(); >+ } >+ return; >+ } >+ let nextKey = remainingKeysToPress.shift(); >+ UIHelper.keyDown(nextKey); >+} >+ >+function handleKeyDown(event) >+{ >+ logKeyEvent(event); >+} >+ >+function handleKeyUp(event) >+{ >+ logKeyEvent(event); >+ nextKeyPress(); >+} >+ >+function handleKeyPress(event) >+{ >+ logKeyEvent(event); >+} >+ >+function log(message) >+{ >+ document.getElementById("console").appendChild(document.createTextNode(message + "\n")); >+} >+ >+function logKeyEvent(event) >+{ >+ let pieces = []; >+ for (let propertyName of ["type", "key", "code", "keyIdentifier", "keyCode", "charCode", "keyCode", "which"]) >+ pieces.push(`${propertyName}: ${event[propertyName]}`); >+ log(pieces.join(", ")); >+} >+ >+async function runTest() >+{ >+ if (!window.testRunner) >+ return; >+ await UIHelper.setKeyboardInputModeIdentifier("zh_Hans-Pinyin@sw=Pinyin-Simplified;hw=Automatic"); >+ nextKeyPress(); >+} >+ >+runTest(); >+</script> >+</body> >+</html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 199122
: 372660