Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Source/WebCore:
[iOS] scroll snap points are animating to the wrong positions... https://bugs.webkit.org/show_bug.cgi?id=142705 <rdar://problem/20136946> Reviewed by Simon Fraser. Avoid adding an extra '0' snap point to our set. We always start with one zero; this extra append just forces us to do more steps in our search for nearest snap point. * page/scrolling/AxisScrollSnapOffsets.cpp: (WebCore::updateFromStyle): Remove extra '0' appended to offsets. Source/WebKit2: [iOS] scroll snap points are animating to the wrong positions. https://bugs.webkit.org/show_bug.cgi?id=142705 <rdar://problem/20136946> Reviewed by Simon Fraser. Scroll snapping was landing in the wrong place on iOS because of two problems: (1) It was searching for the closest snap offset point using unscaled 'screen' pixels, which caused it to always choose one of the earliest snap point options. (2) It was then selecting a scaled snap point coordinate and passing it back to UIKit to animate the snap. This caused it to select a target point beyond the 'screen' pixel we want to hit. The solution to both problems are to scale the scroll destination UIKit suggests so that we search among the scaled points with a valid value. Then, we need to scale the returned value back to screen units before handing it back to UIKit to process. * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView scrollViewWillBeginDragging:]): Drive-by fix. Get rid of extra ';' at the end of the line. * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm: (WebKit::RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling): Canonical link: https://commits.webkit.org/160707@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181504 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
d79ebab
commit 7bc2485
Showing
5 changed files
with
48 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters