Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9aaabd386a2fd8d1c1689cae9c4d3716ec8cc71a
      
https://github.com/WebKit/WebKit/commit/9aaabd386a2fd8d1c1689cae9c4d3716ec8cc71a
  Author: Patrick Angle <pan...@apple.com>
  Date:   2022-12-06 (Tue, 06 Dec 2022)

  Changed paths:
    M Source/WebKit/UIProcess/Automation/Automation.json
    M Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp
    M Source/WebKit/UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm
    M Source/WebKit/UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp
    M Source/WebKit/UIProcess/Automation/ios/WebAutomationSessionIOS.mm
    M Source/WebKit/UIProcess/Automation/libwpe/WebAutomationSessionLibWPE.cpp
    M Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm

  Log Message:
  -----------
  WebDriver: [Cocoa] [Actions] [Key] Right-hand modifier keys report as their 
left-hand counterpart
https://bugs.webkit.org/show_bug.cgi?id=248674
rdar://100588604

Reviewed by BJ Burg.

Add support to the Cocoa ports for properly handling right-hand modifiers 
which, when paired with safaridriver changes,
will allow the left and right modifier keys to be distiguished from one 
another. Most of the support is already done,
this just adds the missing `CommandRight` virtual key to the automation 
protocol and adds handling so that these keys
are properly considered to be a modifier key when combined with other 
subsequent actions.

This progresses the following WPT test cases:
webdriver/tests/perform_actions/key_events.py::test_modifier_key_sends_correct_events[\ue052-R_ALT]
webdriver/tests/perform_actions/key_events.py::test_modifier_key_sends_correct_events[\ue051-R_CONTROL]
webdriver/tests/perform_actions/key_events.py::test_modifier_key_sends_correct_events[\ue050-R_SHIFT]
webdriver/tests/perform_actions/key_events.py::test_special_key_sends_keydown[R_ALT-expected48]
webdriver/tests/perform_actions/key_events.py::test_special_key_sends_keydown[R_CONTROL-expected53]
webdriver/tests/perform_actions/key_events.py::test_special_key_sends_keydown[R_SHIFT-expected61]

* Source/WebKit/UIProcess/Automation/Automation.json:
* Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::normalizedVirtualKey):
* Source/WebKit/UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm:
(WebKit::WebAutomationSession::charCodeForVirtualKey const):
* Source/WebKit/UIProcess/Automation/ios/WebAutomationSessionIOS.mm:
(WebKit::WebAutomationSession::platformSimulateKeyboardInteraction):
* Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm:
(WebKit::virtualKeyHasStickyModifier):
(WebKit::keyCodeForVirtualKey):
(WebKit::eventModifierFlagsForVirtualKey):
* Source/WebKit/UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp:
(WebKit::keyCodeForVirtualKey):
* Source/WebKit/UIProcess/Automation/libwpe/WebAutomationSessionLibWPE.cpp:
(WebKit::keyCodeForVirtualKey):

Canonical link: https://commits.webkit.org/257406@main


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to