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

Unified Diff: android_webview/browser/in_process_view_renderer.cc

Issue 20990009: Handle root layer fling Java-side in android_webview. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix findbugs 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 f5e1762cef69a6bfe3aa1edd2e29bc2d065dfa3e..4ada189eabb32da0f270c9314e3192dddf414db5 100644
--- a/android_webview/browser/in_process_view_renderer.cc
+++ b/android_webview/browser/in_process_view_renderer.cc
@@ -539,7 +539,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