This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GTK3] Pinch zooming from a link activates it
https://bugs.webkit.org/show_bug.cgi?id=235639 Reviewed by Carlos Garcia Campos. Turns out gestures behave differently between GTK3 and 4. On GTK4 it works fine, but on GTK3 starting a pinch zoom triggers the multipress gesture when one finger is down, and completes it when the second finger is down. This results in a bogus click, with no way to prevent it as it happens before any of the zoom callbacks are called. Since we can't know if there will be a zoom afterwards or not, we can't do anything about it. However, what we can do is reorder these gestures. In GTK3 the order the gestures are processed in depends on which order they were created in. At that point, there's a problem with the fact the gestures are grouped. Grouping means that these 2 gestures are triggered at the same time. While somehow the press gesture is still triggered without grouping with the original order, they become properly decoupled in reverse order and ungrouped. At that point, we can safely cancel the press gesture when the zoom gesture starts, and fix the issue. This seems to still work fine for GTK4. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseZoomBegin): (webkitWebViewBaseConstructed): Canonical link: https://commits.webkit.org/246454@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing 2 changed files with 48 additions and 13 deletions.