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

Unified Diff: content/browser/renderer_host/render_widget_host_view_android.cc

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: Created 5 years, 2 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/browser/renderer_host/render_widget_host_view_android.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index c182e2982a386ead45fdc64039a74409dc498795..9495d102daef1789eae4ac18eec9717f89211ef0 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -616,9 +616,20 @@ gfx::Rect RenderWidgetHostViewAndroid::GetViewBounds() const {
if (!content_view_core_)
return gfx::Rect(default_size_);
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableOSKOverscroll))
+ return gfx::Rect(content_view_core_->GetViewSizeWithoutOSK());
ymalik 2015/10/08 19:39:02 @jdduke GetViewBounds has a bunch of callers. Hav
+
return gfx::Rect(content_view_core_->GetViewSize());
}
+gfx::Size RenderWidgetHostViewAndroid::GetVisibleViewportSize() const {
+ if (!content_view_core_)
+ return gfx::Rect(default_size_).size();
+
+ return gfx::Rect(content_view_core_->GetViewSize()).size();
+}
+
gfx::Size RenderWidgetHostViewAndroid::GetPhysicalBackingSize() const {
if (!content_view_core_)
return gfx::Size();

Powered by Google App Engine
This is Rietveld 408576698