| 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 a8f20b0ca3adfb75ad8cdd463d1a479a358f703d..6ebb8384266687afebf4f552ec42e35ec2aea8a4 100644
|
| --- a/content/browser/renderer_host/render_widget_host_view_android.cc
|
| +++ b/content/browser/renderer_host/render_widget_host_view_android.cc
|
| @@ -695,11 +695,13 @@ gfx::Rect RenderWidgetHostViewAndroid::GetViewBounds() const {
|
| if (!content_view_core_)
|
| return default_bounds_;
|
|
|
| - if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kEnableOSKOverscroll))
|
| - return gfx::Rect(content_view_core_->GetViewSizeWithOSKHidden());
|
| -
|
| - return gfx::Rect(content_view_core_->GetViewSize());
|
| + bool osk_overscroll = base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kEnableOSKOverscroll);
|
| + gfx::Rect bounds = gfx::Rect(osk_overscroll ?
|
| + content_view_core_->GetViewSizeWithOSKHidden() :
|
| + content_view_core_->GetViewSize());
|
| + bounds.Offset(0, view_.content_offset().y());
|
| + return bounds;
|
| }
|
|
|
| gfx::Size RenderWidgetHostViewAndroid::GetVisibleViewportSize() const {
|
| @@ -1358,6 +1360,10 @@ void RenderWidgetHostViewAndroid::OnFrameMetadataUpdated(
|
| UpdateBackgroundColor(is_transparent ? SK_ColorTRANSPARENT
|
| : frame_metadata.root_background_color);
|
|
|
| + view_.set_content_offset(gfx::Vector2dF(0.0f,
|
| + frame_metadata.top_controls_height *
|
| + frame_metadata.top_controls_shown_ratio));
|
| +
|
| // All offsets and sizes are in CSS pixels.
|
| content_view_core_->UpdateFrameInfo(
|
| frame_metadata.root_scroll_offset,
|
|
|