Bug 165474

Summary: Scroll position jumps to the origin when scrolling without momentum at the end of a scroll snapping container
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: WebCore Misc.Assignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, cmarcelo, commit-queue, dino, jamesr, luiz, simon.fraser, tonikitoo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Mac   
OS: macOS 10.12   
Attachments:
Description Flags
Patch
none
Patch for landing none

Wenson Hsieh
Reported 2016-12-06 09:51:57 PST
Happens on ToT, after adopting AppKit scroll snapping animations. There are two ways to reproduce this problem: 1. Go to http://whsieh.github.io/examples/iphone-overflow 2. Scroll to the bottom, so that the last image completely fills the container 3. End the scroll gesture without momentum - This will occasionally result in the container's scrollTop jumping to 0. Another way: 0. Go to any website 1. Navigate to http://whsieh.github.io/examples/iphone-mainframe 2. Scroll left slightly to reveal the previous page but release without momentum so the browser doesn't navigate to the previous page - This will result in the mainframe's scrollTop jumping to 0.
Attachments
Patch (8.46 KB, patch)
2016-12-06 10:19 PST, Wenson Hsieh
no flags
Patch for landing (8.48 KB, patch)
2016-12-07 13:12 PST, Wenson Hsieh
no flags
Wenson Hsieh
Comment 1 2016-12-06 09:53:28 PST
Wenson Hsieh
Comment 2 2016-12-06 10:19:58 PST
Simon Fraser (smfr)
Comment 3 2016-12-07 13:06:08 PST
Comment on attachment 296298 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=296298&action=review > Source/WebCore/page/scrolling/mac/ScrollingMomentumCalculatorMac.mm:57 > + return Seconds(0); 0_s
Wenson Hsieh
Comment 4 2016-12-07 13:06:52 PST
Comment on attachment 296298 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=296298&action=review >> Source/WebCore/page/scrolling/mac/ScrollingMomentumCalculatorMac.mm:57 >> + return Seconds(0); > > 0_s Good catch -- fixed!
Wenson Hsieh
Comment 5 2016-12-07 13:12:01 PST
Created attachment 296409 [details] Patch for landing
WebKit Commit Bot
Comment 6 2016-12-07 13:50:39 PST
Comment on attachment 296409 [details] Patch for landing Clearing flags on attachment: 296409 Committed r209477: <http://trac.webkit.org/changeset/209477>
WebKit Commit Bot
Comment 7 2016-12-07 13:50:42 PST
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.