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

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

Issue 2147543006: Set the prerender size right and avoid resets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java ('k') | no next file » | 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 a19684296d47d212b74f11595977d049fb0e9f4a..5e67cd632a75a0bac6fbae38f2d1ff2406c46196 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -1696,7 +1696,11 @@ void RenderWidgetHostViewAndroid::SetContentViewCore(
overscroll_controller_.reset();
selection_controller_.reset();
ReleaseLocksOnSurface();
- resize = true;
+ bool new_content_view_core = content_view_core
no sievers 2016/07/13 21:59:40 nit: i'd call this !|is_size_initialized| or somet
Yusuf 2016/07/14 17:23:37 Done.
+ && content_view_core->GetViewportSizeDip().width() == 0
+ && content_view_core->GetViewportSizeDip().height() == 0;
+ if (content_view_core_ || !new_content_view_core)
+ resize = true;
if (content_view_core_) {
content_view_core_->RemoveObserver(this);
content_view_core_->GetViewAndroid()->RemoveChild(&view_);
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698