scroll snap points do not properly account for zoomed pages
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 15 Mar 2015 19:13:36 +0000 (19:13 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 15 Mar 2015 19:13:36 +0000 (19:13 +0000)
commit7d6344eed5adbea9664b16bb3ed89d882add0f03
treee4c9c098e473c9dd0694719b8f78ad932bb7b88d
parent47f90296e33f379d60fb84e30f1d585e8325bb59
scroll snap points do not properly account for zoomed pages
https://bugs.webkit.org/show_bug.cgi?id=142706
<rdar://problem/20165771>

Reviewed by Anders Carlsson.

When a WebView is zoomed (such that it has a non-unity pageScaleFactor), we need to account for this
scaling value when selecting our correct scroll snap point target, as well as when specifying the
pixel location for our animation to target.

* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::pageScaleFactor): Added new delegate method.
* platform/cocoa/ScrollController.h:
(WebCore::ScrollControllerClient::pageScaleFactor): Added new default delegate.
* platform/cocoa/ScrollController.mm:
(WebCore::ScrollController::beginScrollSnapAnimation): Calculate the correct scroll target
based on the page scale factor.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181510 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h
Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm
Source/WebCore/platform/cocoa/ScrollController.h
Source/WebCore/platform/cocoa/ScrollController.mm