RESOLVED FIXED Bug 197690
[GTK] Support navigation gesture on touchscreens
https://bugs.webkit.org/show_bug.cgi?id=197690
Summary [GTK] Support navigation gesture on touchscreens
Alice Mikhaylenko
Reported 2019-05-08 03:26:18 PDT
See the patch.
Attachments
Patch (6.17 KB, patch)
2019-05-08 03:29 PDT, Alice Mikhaylenko
mcatanzaro: review+
Archive of layout-test-results from ews116 for mac-highsierra (2.93 MB, application/zip)
2019-05-08 05:18 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews213 for win-future (13.46 MB, application/zip)
2019-05-08 05:18 PDT, EWS Watchlist
no flags
Patch (6.22 KB, patch)
2019-05-08 09:20 PDT, Alice Mikhaylenko
no flags
Alice Mikhaylenko
Comment 1 2019-05-08 03:29:34 PDT
EWS Watchlist
Comment 2 2019-05-08 03:30:26 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Alice Mikhaylenko
Comment 3 2019-05-08 03:30:44 PDT
mcatanzaro: I've decided to include the threshold change here at the end, because that change was motivated by wanting to use the same semantics for touchscreen and touchpad, and it's hard to explain on its own.
EWS Watchlist
Comment 4 2019-05-08 05:18:00 PDT Comment hidden (spam)
EWS Watchlist
Comment 5 2019-05-08 05:18:02 PDT Comment hidden (spam)
EWS Watchlist
Comment 6 2019-05-08 05:18:26 PDT Comment hidden (spam)
EWS Watchlist
Comment 7 2019-05-08 05:18:29 PDT Comment hidden (spam)
Michael Catanzaro
Comment 8 2019-05-08 08:25:31 PDT
Comment on attachment 369370 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=369370&action=review > Source/WebKit/UIProcess/gtk/ViewGestureControllerGtk.cpp:40 > +static const double gtkScrollDeltaMultiplier = 10; A lot of users have been complaining that scrolling the web view doesn't move the web content as much as in other browsers. Is that something you'd be interested in trying to improve? > Source/WebKit/UIProcess/gtk/ViewGestureControllerGtk.cpp:190 > + if (isTouchEvent(event)) > + deltaX *= (double) Scrollbar::pixelsPerLineStep() / m_webPageProxy.viewSize().width(); > + else > + deltaX *= gtkScrollDeltaMultiplier / swipeTouchpadBaseWidth; Just make sure the divisors can never be zero.
Alice Mikhaylenko
Comment 9 2019-05-08 08:45:42 PDT
> Just make sure the divisors can never be zero. I.e. the width? One of them is constant, the other one... Can there be a situation where viewport size is zero and you can perform a swipe? :o > A lot of users have been complaining that scrolling the web view doesn't move the web content as much as in other browsers. Is that something you'd be interested in trying to improve? I can look at it, but I need more details. The "other browsers" are presumably Firefox, since Chrome doesn't support pixel-perfect touchpad scrolling in the first place. I'd personally prefer it to match GTK behavior. Links to a request would be appreciated, maybe it meant mouse scrolling, which is a completely different thing anyway.
Michael Catanzaro
Comment 10 2019-05-08 08:55:36 PDT
(In reply to Alexander Mikhaylenko from comment #9) > > Just make sure the divisors can never be zero. > > I.e. the width? One of them is constant, the other one... Can there be a > situation where viewport size is zero and you can perform a swipe? :o Probably not, I just wanted you to think about it. > I can look at it, but I need more details. The "other browsers" are > presumably Firefox, since Chrome doesn't support pixel-perfect touchpad > scrolling in the first place. I'd personally prefer it to match GTK behavior. > > Links to a request would be appreciated, maybe it meant mouse scrolling, > which is a completely different thing anyway. It's a separate issue. Don't worry about it here.
Alice Mikhaylenko
Comment 11 2019-05-08 09:05:51 PDT
Just in case checked with GTK_OVERLAY_SCROLLING=0. Viewport size still doesn't change.
Alice Mikhaylenko
Comment 12 2019-05-08 09:20:58 PDT
Created attachment 369391 [details] Patch Err, I missed "Moved ViewGestureController" in the description, that was a placeholder I meant to fill later. :) Done
WebKit Commit Bot
Comment 13 2019-05-08 13:28:28 PDT
Comment on attachment 369391 [details] Patch Clearing flags on attachment: 369391 Committed r245065: <https://trac.webkit.org/changeset/245065>
WebKit Commit Bot
Comment 14 2019-05-08 13:28:30 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.