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

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

Issue 9517010: Change panels to be able to turn off autoresize. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix assert at the end of RenderWidget::Resize which fixes the tests on OSX. Created 8 years, 10 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_view_host.cc ('k') | content/browser/tab_contents/tab_contents.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.cc
diff --git a/content/browser/renderer_host/render_widget_host.cc b/content/browser/renderer_host/render_widget_host.cc
index d08f150c21fc49d9f01efbd0561775a90fcc2242..ea2013e50298b3d5e5dbc206104438656b967b2b 100644
--- a/content/browser/renderer_host/render_widget_host.cc
+++ b/content/browser/renderer_host/render_widget_host.cc
@@ -941,17 +941,7 @@ bool RenderWidgetHostImpl::IsFullscreen() const {
}
void RenderWidgetHostImpl::SetShouldAutoResize(bool enable) {
- // Note if this switches from true to false then one has to verify that the
- // mechanics about all the messaging works. For example, what happens to a
- // update message rect that was in progress from the render widget. Perhaps,
- // on a transition to false, this should do a WasResized, but what if that
- // will not trigger a resize message...etc. Due to these complications it is
- // fitting that this method doesn't look like a simple set method.
- DCHECK(enable);
-
- // TODO: Change this to enable instead of true when this supports turning
- // off auto-resize.
- should_auto_resize_ = true;
+ should_auto_resize_ = enable;
}
void RenderWidgetHostImpl::Destroy() {
@@ -1077,12 +1067,10 @@ void RenderWidgetHostImpl::OnMsgUpdateRect(
// resize_ack_pending_ needs to be cleared before we call DidPaintRect, since
// that will end up reaching GetBackingStore.
- if (is_resize_ack || should_auto_resize_) {
- if (is_resize_ack) {
- DCHECK(resize_ack_pending_);
- resize_ack_pending_ = false;
- in_flight_size_.SetSize(0, 0);
- }
+ if (is_resize_ack) {
+ DCHECK(resize_ack_pending_);
+ resize_ack_pending_ = false;
+ in_flight_size_.SetSize(0, 0);
}
bool is_repaint_ack =
« no previous file with comments | « content/browser/renderer_host/render_view_host.cc ('k') | content/browser/tab_contents/tab_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698