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

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

Issue 2219823002: Move content offset to ViewAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated comments Created 3 years, 11 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 | « content/browser/renderer_host/render_widget_host_impl.cc ('k') | ui/android/view_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 14a6ee88667a08016c6308181c668b9c0ec8afec..76c7f8c46273d5920d8c96b2d08af6e3130457f4 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -1357,6 +1357,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,
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.cc ('k') | ui/android/view_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698