| Summary: | WebDriver: add support for right variations of virtual keys | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Carlos Garcia Campos <cgarcia> | ||||||||||||||
| Component: | WebDriver | Assignee: | Nobody <webkit-unassigned> | ||||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||||
| Severity: | Normal | CC: | aperez, Basuke.Suzuki, bburg, clopez, darin, Hironori.Fujii, webkit-bug-importer | ||||||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||||||
| Version: | WebKit Nightly Build | ||||||||||||||||
| Hardware: | Unspecified | ||||||||||||||||
| OS: | Unspecified | ||||||||||||||||
| Bug Depends on: | |||||||||||||||||
| Bug Blocks: | 166679 | ||||||||||||||||
| Attachments: |
|
||||||||||||||||
|
Description
Carlos Garcia Campos
2020-10-16 05:45:59 PDT
Created attachment 411564 [details]
Patch
Created attachment 411565 [details]
Patch
Created attachment 411569 [details]
Patch
Created attachment 411570 [details]
Patch
Created attachment 411740 [details]
Patch
I don't understand the wincairo failure
Comment on attachment 411740 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=411740&action=review > Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:1865 > +static VirtualKey normalizedVirtualKey(VirtualKey key) Isn’t the type named Inspector::Protocol::Automation::VirtualKey? What injects VirtualKey into the WebKit namespace? Why can we just write VirtualKey in the argument types but then need to write the whole type out in the function body? (In reply to Darin Adler from comment #6) > Comment on attachment 411740 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=411740&action=review > > > Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:1865 > > +static VirtualKey normalizedVirtualKey(VirtualKey key) > > Isn’t the type named Inspector::Protocol::Automation::VirtualKey? What > injects VirtualKey into the WebKit namespace? Why can we just write > VirtualKey in the argument types but then need to write the whole type out > in the function body? The enum names are shortened in SimulatedInputDispatcher.h in order to make the members more readable. This file includes that header. using KeyboardInteraction = Inspector::Protocol::Automation::KeyboardInteractionType; using VirtualKey = Inspector::Protocol::Automation::VirtualKey; using VirtualKeySet = HashSet<VirtualKey, WTF::IntHash<VirtualKey>, WTF::StrongEnumHashTraits<VirtualKey>>; using MouseButton = Inspector::Protocol::Automation::MouseButton; using MouseInteraction = Inspector::Protocol::Automation::MouseInteraction; using MouseMoveOrigin = Inspector::Protocol::Automation::MouseMoveOrigin; Comment on attachment 411740 [details]
Patch
r=me
I think this needs to be rebased again.
(In reply to Carlos Garcia Campos from comment #5) > I don't understand the wincairo failure WinCairo EWS reported: ..\..\Source\WebKit\UIProcess\Automation\WebAutomationSession.cpp(1865): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int VirtualKey is not defined, which is defined in WebKit/UIProcess/Automation/SimulatedInputDispatcher.h. But, ENABLE_WEBDRIVER_ACTIONS_API is not true for WinCairo, which is defined in Source/WebKit/config.h. WinCairo doesn't enable those features. WEBKIT_OPTION_DEFINE(ENABLE_WEBDRIVER_KEYBOARD_INTERACTIONS "Toggle WebDriver keyboard interactions" PRIVATE OFF) WEBKIT_OPTION_DEFINE(ENABLE_WEBDRIVER_MOUSE_INTERACTIONS "Toggle WebDriver mouse interactions" PRIVATE OFF) WEBKIT_OPTION_DEFINE(ENABLE_WEBDRIVER_TOUCH_INTERACTIONS "Toggle WebDriver touch interactions" PRIVATE OFF) Comment on attachment 411740 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=411740&action=review >>> Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:1865 >>> +static VirtualKey normalizedVirtualKey(VirtualKey key) >> >> Isn’t the type named Inspector::Protocol::Automation::VirtualKey? What injects VirtualKey into the WebKit namespace? Why can we just write VirtualKey in the argument types but then need to write the whole type out in the function body? > > The enum names are shortened in SimulatedInputDispatcher.h in order to make the members more readable. This file includes that header. > > > using KeyboardInteraction = Inspector::Protocol::Automation::KeyboardInteractionType; > using VirtualKey = Inspector::Protocol::Automation::VirtualKey; > using VirtualKeySet = HashSet<VirtualKey, WTF::IntHash<VirtualKey>, WTF::StrongEnumHashTraits<VirtualKey>>; > using MouseButton = Inspector::Protocol::Automation::MouseButton; > using MouseInteraction = Inspector::Protocol::Automation::MouseInteraction; > using MouseMoveOrigin = Inspector::Protocol::Automation::MouseMoveOrigin; I don't understand this change at all. Can you put this funciton in #if ENABLE(WEBDRIVER_ACTIONS_API), KaL? Created attachment 411845 [details]
Patch for landing
Committed r268717: <https://trac.webkit.org/changeset/268717> |