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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 1386403003: Resize only the virtual viewport when the OSK triggers a resize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/InsetConsumerView/InsetObserverView Created 4 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
Index: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
index 2e2b36a3a1993e81547e68b4ea6cc87c07cf2ac1..f4d0da000814213bb79a3b0de46da64ace2a5b26 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
@@ -1029,6 +1029,14 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen
}
/**
+ * @return Viewport height when the OSK is hidden in physical pixels as set from onSizeChanged.
+ */
+ @CalledByNative
+ public int getViewportHeightWithOSKHiddenPix() {
+ return mViewportHeightPix + getContentViewClient().getSystemWindowInsetBottom();
+ }
+
+ /**
* @return Width of underlying physical surface.
*/
@CalledByNative
@@ -1058,6 +1066,22 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen
}
/**
+ * @return Current device scale factor (maps DIP pixels to physical pixels).
+ */
+ @VisibleForTesting
+ public float getDeviceScaleFactor() {
+ return mRenderCoordinates.getDeviceScaleFactor();
+ }
+
+ /**
+ * @return Current page scale factor (maps CSS pixels to DIP pixels).
+ */
+ @VisibleForTesting
+ public float getPageScaleFactor() {
+ return mRenderCoordinates.getPageScaleFactor();
+ }
+
+ /**
* @see android.webkit.WebView#getContentHeight()
*/
public float getContentHeightCss() {

Powered by Google App Engine
This is Rietveld 408576698