WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
178519
[GTK] Scrolling sometimes jumps around
https://bugs.webkit.org/show_bug.cgi?id=178519
Summary
[GTK] Scrolling sometimes jumps around
Gustavo Noronha (kov)
Reported
2017-10-19 09:54:38 PDT
I noticed after updating to a more recent WebKitGTK+ that sometimes when I'm panning through a page using two-finger scrolling it will jump to the end of the page (or to the top if panning towards the top). I haven't investigated deeply yet, but I have a gut feeling it may be related to
Bug 155750
. I think the kinetic scrolling might be getting triggered with bad values. I added this debugging printf to the top of ScrollAnimationKinetic::start: fprintf(stderr, "%s: %.2fx%.2f\n", __func__, velocity.x(), velocity.y()); It prints this when the jump happens: start: -136363,47x534090,25
Attachments
Patch
(1.64 KB, patch)
2018-02-09 01:50 PST
,
Gustavo Noronha (kov)
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Michael Catanzaro
Comment 1
2017-10-19 18:20:09 PDT
(In reply to Gustavo Noronha (kov) from
comment #0
)
> I haven't investigated > deeply yet, but I have a gut feeling it may be related to
Bug 155750
.
Almost surely.
Gustavo Noronha (kov)
Comment 2
2017-10-20 06:22:27 PDT
Yes, I think computeVelocity() is going nuts and calculating something that causes a very speedy kinetic scrolling animation to be started when a non-momentum scroll ends. computeVelocity: -28410,07x308959,53 accumDelta.y(): -27,19 (last - first).value(): 0,09 The first values are what computeVelocity is about to return, with the components of the formula it uses following it. Remember that accumDelta.y() is multiplied by -1000 before it is divided by last - first. I forgot to say I'm on Wayland, unsure if it is relevant, but hey. Adding Adrien to CC as he's probably the one who understands what's intended for computeVelocity() better =)
Michael Catanzaro
Comment 3
2017-10-20 09:34:15 PDT
This code was actually written by Adrien Plazas, not Adrian Perez. Adrien was just doing an internship with Igalia, so I doubt we can CC him directly on this bug. But he as active in the gamepad thread on the webkit-gtk mailing list, so it shouldn't be hard to get his attention.
Gustavo Noronha (kov)
Comment 4
2018-02-09 01:50:37 PST
Created
attachment 333468
[details]
Patch
Carlos Garcia Campos
Comment 5
2018-02-09 02:29:26 PST
Comment on
attachment 333468
[details]
Patch hmm, it would be interesting to know why GTK+ has 1000 there if we are going to diverge.
Michael Catanzaro
Comment 6
2018-02-10 09:45:08 PST
***
Bug 182669
has been marked as a duplicate of this bug. ***
ManDay
Comment 7
2018-02-11 00:46:47 PST
Thanks for the patch. Works on my end on 2.19.90.
Michael Catanzaro
Comment 8
2018-02-11 11:46:06 PST
Comment on
attachment 333468
[details]
Patch I have other users complaining about this, so if it fixes the regression, let's land it.
Michael Catanzaro
Comment 9
2018-02-11 11:47:16 PST
(In reply to Carlos Garcia Campos from
comment #5
)
> Comment on
attachment 333468
[details]
> Patch > > hmm, it would be interesting to know why GTK+ has 1000 there if we are going > to diverge.
I'd be interested to know this too.
Michael Catanzaro
Comment 10
2018-02-11 11:49:07 PST
^ Christian, you might be the best person to answer the question above. IIRC you wrote the original code that we copied from GTK+ (right?)
WebKit Commit Bot
Comment 11
2018-02-11 12:10:02 PST
Comment on
attachment 333468
[details]
Patch Clearing flags on attachment: 333468 Committed
r228368
: <
https://trac.webkit.org/changeset/228368
>
WebKit Commit Bot
Comment 12
2018-02-11 12:10:03 PST
All reviewed patches have been landed. Closing bug.
Christian Hergert
Comment 13
2018-02-11 15:09:44 PST
(In reply to Michael Catanzaro from
comment #10
)
> ^ Christian, you might be the best person to answer the question above. IIRC > you wrote the original code that we copied from GTK+ (right?)
I only wrote the patch to make it settle without jitter. But looking quickly over that code, the 1000 is probably related to the adjustment scaling in gtkscrolledwindow.c get_scroll_unit().
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug