[BlackBerry] Page jumps after post-pinch-zoom re-render
authorzhajiang@rim.com <zhajiang@rim.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Jun 2012 21:11:39 +0000 (21:11 +0000)
committerzhajiang@rim.com <zhajiang@rim.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Jun 2012 21:11:39 +0000 (21:11 +0000)
commit0418240c84d35c345f6e76686935b99b650ecce2
treeeb988a7a936691216dfb09bab8db4d85bb7d5712
parentac386a909443cc9c256dd538d3b3effd14b0b33b
[BlackBerry] Page jumps after post-pinch-zoom re-render
https://bugs.webkit.org/show_bug.cgi?id=90282

Reviewed by Antonio Gomes.
Patch by Jacky Jiang <zhajiang@rim.com>

PR: 170255
In r120622, we moved ScrollableArea::setConstrainsScrollingToContentEdge(false|true)
from WebPage::setScrollPosition() to BackingStorePrivate::setScrollingOrZooming()
to address an overscroll reset issue.
However, when we are ending bitmap zooming, UI thread can call
BackingStorePrivate::setScrollingOrZooming(false) before WebKit thread
calls WebPage::setScrollPosition(), in which case it will set
ScrollableArea::m_constrainsScrollingToContentEdge to true earlier.
To fix this, we can cache ScrollableArea::m_constrainsScrollingToContentEdge
and always set it to false before we set scroll position in WebKit
thread to avoid scroll position clamping during scrolling, and restore
it to what it was after that.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::setScrollPosition):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121586 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/blackberry/Api/WebPage.cpp
Source/WebKit/blackberry/ChangeLog