From e2f3aee9d5d8b4aa70950bef98ba688e29e27a8c Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Fri, 2 Sep 2011 18:30:12 -0700 Subject: [PATCH] Notify native that scrolling has stopped correctly bug:5255022 bug:5218838 When the view starts scrolling, we tell native so it can block updates until the view stops scrolling. This change fixes an issue where wouldn't tell native that we stopped scrolling because the view didn't have room to move. Change-Id: I5f2eec31493570937f7b8b2992a85283de06fb60 --- core/java/android/webkit/WebView.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 64fbae6fbd4c8..5bb0ef205beaa 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -6546,6 +6546,13 @@ public class WebView extends AbsoluteLayout } private void stopTouch() { + if (mScroller.isFinished() && !mSelectingText + && (mTouchMode == TOUCH_DRAG_MODE || mTouchMode == TOUCH_DRAG_LAYER_MODE)) { + WebViewCore.resumePriority(); + WebViewCore.resumeUpdatePicture(mWebViewCore); + nativeSetIsScrolling(false); + } + // we also use mVelocityTracker == null to tell us that we are // not "moving around", so we can take the slower/prettier // mode in the drawing code