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

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

Issue 23533051: [android_webview] Use a fraction to calculate scroll offset. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: get rid of NaNs Created 7 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
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 2805af26f729bf2fdf0bbfd2bafbe0f17055a99c..8feca760142eac59648ec39437e00019df5d72ed 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -360,12 +360,8 @@ public class AwContents {
private class AwContentUpdateFrameInfoListener
implements ContentViewCore.UpdateFrameInfoListener {
@Override
- public void onFrameInfoUpdated(float widthCss, float heightCss, float pageScaleFactor) {
+ public void onFrameInfoUpdated(float pageScaleFactor) {
if (mNativeAwContents == 0) return;
- int widthPix = (int) Math.floor(widthCss * mDIPScale * pageScaleFactor);
- int heightPix = (int) Math.floor(heightCss * mDIPScale * pageScaleFactor);
- mScrollOffsetManager.setContentSize(widthPix, heightPix);
-
nativeSetDisplayedPageScaleFactor(mNativeAwContents, pageScaleFactor);
}
}
@@ -1823,6 +1819,11 @@ public class AwContents {
}
@CalledByNative
+ private void setMaxContainerViewScrollOffset(int max_x, int max_y) {
+ mScrollOffsetManager.setMaxScrollOffset(max_x, max_y);
+ }
+
+ @CalledByNative
private void scrollContainerViewTo(int x, int y) {
mScrollOffsetManager.scrollContainerViewTo(x, y);
}

Powered by Google App Engine
This is Rietveld 408576698