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

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

Issue 210213002: [android_webview] Update max scroll offset from page scale change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | « android_webview/browser/browser_view_renderer.cc ('k') | 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/AwContents.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
index 23e1a053b0e2f451919e019ce28983f8f8b2b40f..c8796acaf8241abfeae43317af42c4830bf8c2ab 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -1977,6 +1977,9 @@ public class AwContents {
if (mPageScaleFactor != pageScaleFactor) {
float oldPageScaleFactor = mPageScaleFactor;
mPageScaleFactor = pageScaleFactor;
+ // NOTE: if this ever needs to become synchronous then we need to make sure the scroll
+ // bounds are correctly updated before calling the method, otherwise embedder code that
+ // attempts to scroll on scale change might cause weird results.
mContentsClient.getCallbackHelper().postOnScaleChangedScaled(
(float)(oldPageScaleFactor * mDIPScale),
(float)(mPageScaleFactor * mDIPScale));
« no previous file with comments | « android_webview/browser/browser_view_renderer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698