Bug 273750 - [WPE][WebDriver] Implement automation keyboard and mouse input handlers for new WPE API
Summary: [WPE][WebDriver] Implement automation keyboard and mouse input handlers for n...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WPE WebKit (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Diego Pino
URL:
Keywords:
Depends on:
Blocks: 265646 274776
  Show dependency treegraph
 
Reported: 2024-05-05 18:46 PDT by Lauro Moura
Modified: 2024-06-12 15:31 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lauro Moura 2024-05-05 18:46:23 PDT
Currently, the handlers in `WebAutomationSessionLibWPE.cpp` expect the old API, causing a segfault when invoked through a WebView using the new API.

The handlers should be modified to generate the new `WPEEvent` instances when running under the new API.

Patch incoming.
Comment 1 Lauro Moura 2024-05-05 19:21:06 PDT
Pull request: https://github.com/WebKit/WebKit/pull/28155
Comment 2 EWS 2024-05-28 04:55:53 PDT
Committed 279376@main (4a97b2ece9b5): <https://commits.webkit.org/279376@main>

Reviewed commits have been landed. Closing PR #28155 and removing active labels.
Comment 3 Diego Pino 2024-05-29 05:04:22 PDT
WPE Debug build bot is failing with error:

https://build.webkit.org/#/builders/66/builds/32268/steps/10/logs/stdio

```
In file included from /app/webkit/WebKitBuild/WPE/Debug/WTF/Headers/wtf/StdLibExtras.h:35,
                 from /app/webkit/WebKitBuild/WPE/Debug/WTF/Headers/wtf/FastMalloc.h:26,
                 from /app/webkit/Source/WebKit/config.h:42,
                 from /app/webkit/Source/WebKit/UIProcess/Automation/libwpe/WebAutomationSessionWPE.cpp:26,
                 from /app/webkit/WebKitBuild/WPE/Debug/DerivedSources/WebKit/unified-sources/UnifiedSource-88d1702b-23.cpp:1:
/app/webkit/Source/WebKit/UIProcess/Automation/libwpe/WebAutomationSessionWPE.cpp: In function ‘void WebKit::doKeyStrokeEvent(WebPageProxy&, bool, uint32_t, uint32_t, bool)’:
/app/webkit/WebKitBuild/WPE/Debug/WTF/Headers/wtf/Assertions.h:162:56: error: ‘LOG_CHANNEL_PREFIXAutomation’ was not declared in this scope; did you mean ‘LOG_CHANNEL_PREFIX’?
  162 | #define LOG_CHANNEL(name) JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, name)
      |                                                        ^~~~~~~~~~~~~~~~~~
```
Comment 4 Diego Pino 2024-05-29 05:04:53 PDT
Re-opening for pull request https://github.com/webkit/webkit/pull/29217
Comment 5 Diego Pino 2024-05-30 07:29:14 PDT
In case unified sources groups files 'UIProcess/Automation/libwpe/WebAutomationSessionLibWPE.cpp' and 'UIProcess/Automation/libwpe/WebAutomationSessionWPE.cpp', a duplicate symbol build error will happen:

```
Source/WebKit/CMakeFiles/WebKit.dir/__/__/DerivedSources/WebKit/unified-sources/UnifiedSource-88d1702b-23.cpp.o.d -o Source/WebKit/CMakeFiles/WebKit.dir/__/__/DerivedSources/WebKit/unified-sources/UnifiedSource-88d1702b-23.cpp.o -c DerivedSources/WebKit/unified-sources/UnifiedSource-88d1702b-23.cpp
In file included from DerivedSources/WebKit/unified-sources/UnifiedSource-88d1702b-23.cpp:8:
../../../Source/WebKit/UIProcess/Automation/libwpe/WebAutomationSessionWPE.cpp:84:17: error: redefinition of 'modifiersToEventState'
   84 | static uint32_t modifiersToEventState(OptionSet<WebEventModifier> modifiers)
      |                 ^
../../../Source/WebKit/UIProcess/Automation/libwpe/WebAutomationSessionLibWPE.cpp:38:17: note: previous definition is here
   38 | static uint32_t modifiersToEventState(OptionSet<WebEventModifier> modifiers)
      |                 ^
In file included from DerivedSources/WebKit/unified-sources/UnifiedSource-88d1702b-23.cpp:8:
../../../Source/WebKit/UIProcess/Automation/libwpe/WebAutomationSessionWPE.cpp:100:17: error: redefinition of 'mouseButtonToWPEButton'
  100 | static unsigned mouseButtonToWPEButton(MouseButton button)
      |                 ^
../../../Source/WebKit/UIProcess/Automation/libwpe/WebAutomationSessionLibWPE.cpp:50:17: note: previous definition is here
   50 | static unsigned mouseButtonToWPEButton(MouseButton button)
      |                 ^
In file included from DerivedSources/WebKit/unified-sources/UnifiedSource-88d1702b-23.cpp:8:
../../../Source/WebKit/UIProcess/Automation/libwpe/WebAutomationSessionWPE.cpp:114:17: error: redefinition of 'stateModifierForWPEButton'
  114 | static unsigned stateModifierForWPEButton(unsigned button)
      |                 ^
../../../Source/WebKit/UIProcess/Automation/libwpe/WebAutomationSessionLibWPE.cpp:64:17: note: previous definition is here
   64 | static unsigned stateModifierForWPEButton(unsigned button)
      |                 ^
```
Comment 6 Diego Pino 2024-05-30 07:31:58 PDT
Pull request: https://github.com/webkit/webkit/pull/29306
Comment 7 EWS 2024-05-30 13:04:12 PDT
Committed 279538@main (5ca7f83342d3): <https://commits.webkit.org/279538@main>

Reviewed commits have been landed. Closing PR #29306 and removing active labels.