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
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 8858b81..eb6e0f1 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -1917,12 +1917,15 @@
                 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);