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

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

Issue 847893002: Implemented explicit resizing from guestview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 8513644817c5e9004456b687bf0a6c2b779f8ea4..71e389569faaaae44348a9cf7a2a7f7200181958 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -598,7 +598,14 @@ void RenderWidgetHostImpl::WasResized() {
// Skip if the |delegate_| has already been detached because
// it's web contents is being deleted.
if (resize_ack_pending_ || !process_->HasConnection() || !view_ ||
- !renderer_initialized_ || auto_resize_enabled_ || !delegate_) {
+ !renderer_initialized_ || !delegate_)
+ return;
+
+ // |old_resize_params_| needs to be cleared when autoresize is enabled,
+ // because the next time a regular resize occurs, it is not meaningful to
+ // compare its new size to the old size from before autoresizing.
+ if (auto_resize_enabled_) {
+ old_resize_params_.reset();
Fady Samuel 2015/01/12 23:13:56 To land this, you're going to need to put it in a
paulmeyer 2015/01/12 23:25:19 Acknowledged.
return;
}

Powered by Google App Engine
This is Rietveld 408576698