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

Unified Diff: webkit/glue/fling_animator_impl_android.cc

Issue 10913218: Ignore "range" parameter in Android FlingAnimator (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 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: webkit/glue/fling_animator_impl_android.cc
diff --git a/webkit/glue/fling_animator_impl_android.cc b/webkit/glue/fling_animator_impl_android.cc
index 8304c5aefc72ff58e679fa107240da36f139d442..d663cb73d57f9d1cd45487cf3e9f2b38c6772e3c 100644
--- a/webkit/glue/fling_animator_impl_android.cc
+++ b/webkit/glue/fling_animator_impl_android.cc
@@ -25,7 +25,7 @@ FlingAnimatorImpl::FlingAnimatorImpl()
DCHECK(tmp.obj());
java_scroller_.Reset(tmp);
- fling_method_id_ = GetMethodID(env, cls, "fling", "(IIIIIIIIII)V");
+ fling_method_id_ = GetMethodID(env, cls, "fling", "(IIIIIIII)V");
abort_method_id_ = GetMethodID(env, cls, "abortAnimation", "()V");
compute_method_id_ = GetMethodID(env, cls, "computeScrollOffset", "()Z");
getX_method_id_ = GetMethodID(env, cls, "getCurrX", "()I");
@@ -37,8 +37,12 @@ FlingAnimatorImpl::~FlingAnimatorImpl()
}
void FlingAnimatorImpl::startFling(const WebKit::WebFloatPoint& velocity,
- const WebKit::WebRect& range)
+ const WebKit::WebRect& /* range */)
{
+ // Ignore "range" as it's always empty -- see http://webkit.org/b/96403
+ // Instead, use the largest possible bounds for minX/maxX/minY/maxY. The
+ // compositor will ignore any attempt to scroll beyond the end of the page.
+
DCHECK(velocity.x || velocity.y);
if (is_active_)
cancelFling();
@@ -46,11 +50,11 @@ void FlingAnimatorImpl::startFling(const WebKit::WebFloatPoint& velocity,
is_active_ = true;
JNIEnv* env = AttachCurrentThread();
+
env->CallVoidMethod(java_scroller_.obj(), fling_method_id_, 0, 0,
static_cast<int>(velocity.x),
static_cast<int>(velocity.y),
- range.x, range.x + range.width,
- range.y, range.y + range.height, 0, 0);
+ INT_MIN, INT_MAX, INT_MIN, INT_MAX);
CheckException(env);
}
« 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