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

Unified Diff: android_webview/browser/in_process_view_renderer.cc

Issue 15029006: Make it possible for the scroll offset delegate to intercept fling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reactivate the patch! Created 7 years, 5 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 | android_webview/java/src/org/chromium/android_webview/AwContents.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/in_process_view_renderer.cc
diff --git a/android_webview/browser/in_process_view_renderer.cc b/android_webview/browser/in_process_view_renderer.cc
index 4cb053a734adfe10b4b61512c5f18078df47958e..87603c69add078eece7046f2019b6a04caf13cb9 100644
--- a/android_webview/browser/in_process_view_renderer.cc
+++ b/android_webview/browser/in_process_view_renderer.cc
@@ -538,7 +538,11 @@ void InProcessViewRenderer::ScrollTo(gfx::Vector2d new_value) {
gfx::Vector2dF new_value_css = gfx::ToRoundedVector2d(
gfx::ScaleVector2d(new_value, 1.0f / (dip_scale_ * page_scale_factor_)));
- DCHECK(scroll_offset_css_ != new_value_css);
+ // It's possible that more than one set of unique physical coordinates maps
+ // to the same set of CSS coordinates which means we can't reliably early-out
+ // earlier in the call stack.
+ if (scroll_offset_css_ == new_value_css)
+ return;
scroll_offset_css_ = new_value_css;
« no previous file with comments | « no previous file | android_webview/java/src/org/chromium/android_webview/AwContents.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698