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

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

Issue 12430010: Avoid sending nonempty view size with empty backing size. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 9 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 | « no previous file | 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 1514c5ac77e3378b2c97fbcc7bdd9fe016855769..006797e2d6ae81c109fcf49094bde77c9906da65 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -308,6 +308,12 @@ gfx::Rect RenderWidgetHostViewAndroid::GetViewBounds() const {
if (!content_view_core_)
return gfx::Rect();
+ // If the backing hasn't been initialized yet, report empty view bounds
+ // as well. Otherwise, we may end up stuck in a white-screen state because
+ // the resize ack is sent after swapbuffers.
+ if (GetPhysicalBackingSize().IsEmpty())
+ return gfx::Rect();
+
return gfx::Rect(content_view_core_->GetViewportSizeDip());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698