NEW 247123
[WPE] Make hard-coded TouchGestureController properties configurable
https://bugs.webkit.org/show_bug.cgi?id=247123
Summary [WPE] Make hard-coded TouchGestureController properties configurable
Bastian Krause
Reported 2022-10-27 05:50:37 PDT
In Source/WebKit/UIProcess/API/wpe/TouchGestureController.cpp various settings are hard-coded: - scrollCaptureThreshold - axisLockMovementThreshold - axisLockActivationThreshold - axisLockReleaseThreshold On top of that, WebCore::Scrollbar::pixelsPerLineStep() (hard-coded to 40) is used as a threshold (in pixels), determining whether a touch is handled as a gesture or not. I'm especially interested in scrollCaptureThreshold and pixelsPerLineStep. My investigation so far: From what I understand, scrollCaptureThreshold should be a WebKitWebView property, so I've added this to Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp. What I do not understand yet, how do I pass this to the TouchGestureController? I guess this should be handed to its constructor. While looking at backtraces, I have not found the (architecturally) correct way to make that happen. Maybe you have an idea? Regarding pixelsPerLineStep, I think this should either hold or get replaced by a computed value incorporating DPI/PPI. In my case, I have a device with a device scale factor of 1.38. That's why I increased pixelsPerLineStep from 40 to 50 in a hack patch until now. I'm using cog's wl platform with weston. Weston/wayland does not support fractional scaling (see https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/1). So I am probably stuck with the default 1.0 device scale factor, which won't improve the pixel threshold for my case. Do you have any suggestion how to improve this situation? Maybe allow passing a fractional device scale factor from cog for the wl case? That would, however, circumvent the Wayland setting. Or maybe allow setting this via another WebKitWebView setting or environment variable, at least until fractional scaling is implemented in weston? Thanks!
Attachments
Note You need to log in before you can comment on or make changes to this bug.