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

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: Fix compile for real 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..a8964a3bd65fc92b8b77b0de7792a3c423039ed7 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,13 @@ void RenderWidgetHostViewAndroid::SetContentViewCore(
overscroll_controller_.reset();
selection_controller_.reset();
ReleaseLocksOnSurface();
- resize = true;
+ // TODO(yusufo) : Get rid of the below conditions and have a better handling
+ // for resizing after crbug.com/628302 is handled.
+ bool is_size_initialized = !content_view_core
+ || content_view_core->GetViewportSizeDip().width() != 0
+ || content_view_core->GetViewportSizeDip().height() != 0;
+ if (content_view_core_ || is_size_initialized)
+ 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