Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2055)

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwScrollOffsetManager.java

Issue 149963002: [android_webview] Set 'fling active' flag only from computeScroll. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@deleteme
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/java/src/org/chromium/android_webview/AwScrollOffsetManager.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwScrollOffsetManager.java b/android_webview/java/src/org/chromium/android_webview/AwScrollOffsetManager.java
index 4cc39b311a5a200d57912aa2bf192dbba71a625c..e13daa2ce1744873296caf40da6d206f742f67bb 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwScrollOffsetManager.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwScrollOffsetManager.java
@@ -26,7 +26,11 @@ public class AwScrollOffsetManager {
// Time for the longest scroll animation.
private static final int MAX_SCROLL_ANIMATION_DURATION_MILLISEC = 750;
- // The unit of all the values in this delegate are physical pixels.
+ /**
+ * The interface that all users of AwScrollOffsetManager should implement.
+ *
+ * The unit of all the values in this delegate are physical pixels.
+ */
public interface Delegate {
// Call View#overScrollBy on the containerView.
void overScrollContainerViewBy(int deltaX, int deltaY, int scrollX, int scrollY,
@@ -269,15 +273,13 @@ public class AwScrollOffsetManager {
mScroller.fling(scrollX, scrollY, velocityX, velocityY,
0, scrollRangeX, 0, scrollRangeY);
- mFlinging = true;
mDelegate.invalidate();
}
// Called immediately before the draw to update the scroll offset.
public void computeScrollAndAbsorbGlow(OverScrollGlow overScrollGlow) {
- final boolean stillAnimating = mScroller.computeScrollOffset();
- if (!stillAnimating) {
- mFlinging = false;
+ mFlinging = mScroller.computeScrollOffset();
+ if (!mFlinging) {
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698