Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d84e7d53 authored by Leon Scroggins's avatar Leon Scroggins
Browse files

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
parent fff0b4a6
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -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);