[Cocoa] Web Automation: wrong modifiers sent for 'Help' virtual key
authorbburg@apple.com <bburg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Jun 2018 20:29:08 +0000 (20:29 +0000)
committerbburg@apple.com <bburg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Jun 2018 20:29:08 +0000 (20:29 +0000)
https://bugs.webkit.org/show_bug.cgi?id=186600
<rdar://problem/41088912>

Reviewed by Timothy Hatcher.

This fixes a hang when running W3C test:

    special_keys.py::test_webdriver_special_key_sends_keydown[HELP-expected2]

* UIProcess/Automation/mac/WebAutomationSessionMac.mm:
(WebKit::eventModifierFlagsForVirtualKey):
The help modifier doesn't seem to be used when pressing the Help key.
I verified this using the Help key on the Keyboard Viewer, since no
keyboards from the past decade actually have this physical button.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232807 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm

index e9d9dde..e676741 100644 (file)
@@ -1,3 +1,21 @@
+2018-06-13  Brian Burg  <bburg@apple.com>
+
+        [Cocoa] Web Automation: wrong modifiers sent for 'Help' virtual key
+        https://bugs.webkit.org/show_bug.cgi?id=186600
+        <rdar://problem/41088912>
+
+        Reviewed by Timothy Hatcher.
+
+        This fixes a hang when running W3C test:
+
+            special_keys.py::test_webdriver_special_key_sends_keydown[HELP-expected2]
+
+        * UIProcess/Automation/mac/WebAutomationSessionMac.mm:
+        (WebKit::eventModifierFlagsForVirtualKey):
+        The help modifier doesn't seem to be used when pressing the Help key.
+        I verified this using the Help key on the Keyboard Viewer, since no
+        keyboards from the past decade actually have this physical button.
+
 2018-06-13  Thibault Saunier  <tsaunier@igalia.com>
 
         [WPE] Build getUserMedia support
index f460a38..bd471fc 100644 (file)
@@ -372,8 +372,6 @@ static NSEventModifierFlags eventModifierFlagsForVirtualKey(VirtualKey key)
         return NSEventModifierFlagCommand;
 
     case VirtualKey::Help:
-        return NSEventModifierFlagHelp | NSEventModifierFlagFunction;
-
     case VirtualKey::PageUp:
     case VirtualKey::PageDown:
     case VirtualKey::End: