diff options
| author | Leon Scroggins <scroggo@google.com> | 2009-09-29 11:11:45 -0400 |
|---|---|---|
| committer | Leon Scroggins <scroggo@google.com> | 2009-09-29 14:43:05 -0400 |
| commit | d84e7d53d379c9fdfe335f40e89e2dfd6144dfea (patch) | |
| tree | b901fdaa4dc82830e5b777d694f1ce315cadfeb8 /core/java/android | |
| parent | fff0b4a6c22c458b6a05bc1fd8840b4bc09be38e (diff) | |
Allow scrolls to continue when getting a new content size.
In recordNewContentSize, rather than aborting any scrolls in progress,
find the final coordinates of the scroll and pin them to the new size,
and let the scroll continue.
Fixes http://b/issue?id=2141960
Change-Id: I7bfa444b52e70a0ca817221f379df77efc3496b7
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/webkit/WebView.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 8858b81cb756..eb6e0f1c1867 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -1917,12 +1917,15 @@ public class WebView extends AbsoluteLayout int oldY = mScrollY; mScrollX = pinLocX(mScrollX); mScrollY = pinLocY(mScrollY); - // android.util.Log.d("skia", "recordNewContentSize - - // abortAnimation"); - abortAnimation(); // just in case if (oldX != mScrollX || oldY != mScrollY) { sendOurVisibleRect(); } + if (!mScroller.isFinished()) { + // We are in the middle of a scroll. Repin the final scroll + // position. + mScroller.setFinalX(pinLocX(mScroller.getFinalX())); + mScroller.setFinalY(pinLocY(mScroller.getFinalY())); + } } } contentSizeChanged(updateLayout); |
