- Revision
- 235818
- Author
- [email protected]
- Date
- 2018-09-07 16:08:34 -0700 (Fri, 07 Sep 2018)
Log Message
[iOS] uiController.typeCharacterUsingHardwareKeyboard("`", ...) dispatches DOM key events for ~
https://bugs.webkit.org/show_bug.cgi?id=189325
Reviewed by Wenson Hsieh.
Tools:
Fixes an issue where the test infrastructure would incorrectly synthesized a shift key press followed
by a ` key press (i.e. type '~') when instructed to simulate typing a grave accent (`). Typing a
grave accent does not require holding the shift key.
* WebKitTestRunner/ios/HIDEventGenerator.mm:
(shouldWrapWithShiftKeyEventForCharacter):
LayoutTests:
Add a test to ensure that we dispatch the correct DOM key events when using uiController.typeCharacterUsingHardwareKeyboard("`")
(by way of UIHelper.typeCharacter()).
* fast/events/ios/keypress-grave-accent-expected.txt: Added.
* fast/events/ios/keypress-grave-accent.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (235817 => 235818)
--- trunk/LayoutTests/ChangeLog 2018-09-07 23:07:53 UTC (rev 235817)
+++ trunk/LayoutTests/ChangeLog 2018-09-07 23:08:34 UTC (rev 235818)
@@ -1,3 +1,16 @@
+2018-09-07 Daniel Bates <[email protected]>
+
+ [iOS] uiController.typeCharacterUsingHardwareKeyboard("`", ...) dispatches DOM key events for ~
+ https://bugs.webkit.org/show_bug.cgi?id=189325
+
+ Reviewed by Wenson Hsieh.
+
+ Add a test to ensure that we dispatch the correct DOM key events when using uiController.typeCharacterUsingHardwareKeyboard("`")
+ (by way of UIHelper.typeCharacter()).
+
+ * fast/events/ios/keypress-grave-accent-expected.txt: Added.
+ * fast/events/ios/keypress-grave-accent.html: Added.
+
2018-09-07 Basuke Suzuki <[email protected]>
[Curl][WebKitLegacy] Stop sending credential embedded in the url via XHR.
Added: trunk/LayoutTests/fast/events/ios/keypress-grave-accent-expected.txt (0 => 235818)
--- trunk/LayoutTests/fast/events/ios/keypress-grave-accent-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/events/ios/keypress-grave-accent-expected.txt 2018-09-07 23:08:34 UTC (rev 235818)
@@ -0,0 +1,7 @@
+Tests that we dispatch DOM key events with the correct details when the grave accent key (`) is pressed on the keyboard.
+
+
+type: keydown, key: `, code: Backquote, keyIdentifier: U+0060, keyCode: 192, charCode: 0, keyCode: 192, which: 192
+type: keypress, key: `, code: Backquote, keyIdentifier: , keyCode: 96, charCode: 96, keyCode: 96, which: 96
+type: keyup, key: `, code: Unidentified, keyIdentifier: Unidentified, keyCode: 0, charCode: 0, keyCode: 0, which: 0
+
Added: trunk/LayoutTests/fast/events/ios/keypress-grave-accent.html (0 => 235818)
--- trunk/LayoutTests/fast/events/ios/keypress-grave-accent.html (rev 0)
+++ trunk/LayoutTests/fast/events/ios/keypress-grave-accent.html 2018-09-07 23:08:34 UTC (rev 235818)
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta name="viewport" content="width=device-width">
+<script src=""
+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+</script>
+</head>
+<body>
+<p>Tests that we dispatch DOM key events with the correct details when the grave accent key (`) is pressed on the keyboard.</p>
+<input type="text" id="input" _onkeydown_="logKeyEvent(event)" _onkeyup_="logKeyEvent(event)" _onkeypress_="logKeyEvent(event)">
+<hr>
+<pre id="console"></pre>
+<script>
+var numberOfFiredKeyEvents = 0;
+var numberOfFiredKeyEventsForTestComplete = 3;
+
+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(", "));
+ if (++numberOfFiredKeyEvents >= numberOfFiredKeyEventsForTestComplete && window.testRunner)
+ testRunner.notifyDone();
+}
+
+async function runTest()
+{
+ if (!window.testRunner)
+ return;
+ await UIHelper.activateFormControl(document.getElementById("input"));
+ await UIHelper.typeCharacter("`");
+}
+
+runTest();
+</script>
+</body>
+</html>
Modified: trunk/Tools/ChangeLog (235817 => 235818)
--- trunk/Tools/ChangeLog 2018-09-07 23:07:53 UTC (rev 235817)
+++ trunk/Tools/ChangeLog 2018-09-07 23:08:34 UTC (rev 235818)
@@ -1,3 +1,17 @@
+2018-09-07 Daniel Bates <[email protected]>
+
+ [iOS] uiController.typeCharacterUsingHardwareKeyboard("`", ...) dispatches DOM key events for ~
+ https://bugs.webkit.org/show_bug.cgi?id=189325
+
+ Reviewed by Wenson Hsieh.
+
+ Fixes an issue where the test infrastructure would incorrectly synthesized a shift key press followed
+ by a ` key press (i.e. type '~') when instructed to simulate typing a grave accent (`). Typing a
+ grave accent does not require holding the shift key.
+
+ * WebKitTestRunner/ios/HIDEventGenerator.mm:
+ (shouldWrapWithShiftKeyEventForCharacter):
+
2018-09-07 Frederic Wang <[email protected]>
[CSSOM View] Handle the scrollingElement in Element::scroll(Left/Top/Width/Height/To)
Modified: trunk/Tools/WebKitTestRunner/ios/HIDEventGenerator.mm (235817 => 235818)
--- trunk/Tools/WebKitTestRunner/ios/HIDEventGenerator.mm 2018-09-07 23:07:53 UTC (rev 235817)
+++ trunk/Tools/WebKitTestRunner/ios/HIDEventGenerator.mm 2018-09-07 23:08:34 UTC (rev 235818)
@@ -799,7 +799,6 @@
if (65 <= keyCode && keyCode <= 90)
return true;
switch (keyCode) {
- case '`':
case '!':
case '@':
case '#':