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

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

Issue 11421166: Update screen rects when showing an infobar. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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 a2a664bab1ad92b698b175a010827d754a6fbb42..9e64811e523fb6a2318c5d084765bcc30deaeecf 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -273,10 +273,15 @@ void RenderWidgetHostImpl::SendScreenRects() {
if (!view_)
return;
- last_view_screen_rect_ = view_->GetViewBounds();
- last_window_screen_rect_ = view_->GetBoundsInRootWindow();
+ gfx::Rect new_view_screen_rect = view_->GetViewBounds();
+ gfx::Rect new_window_screen_rect = view_->GetBoundsInRootWindow();
+ if (last_view_screen_rect_ == new_view_screen_rect &&
+ last_window_screen_rect_ == new_window_screen_rect)
+ return;
Send(new ViewMsg_UpdateScreenRects(
- GetRoutingID(), last_view_screen_rect_, last_window_screen_rect_));
+ GetRoutingID(), new_view_screen_rect, new_window_screen_rect));
+ last_view_screen_rect_ = new_view_screen_rect;
+ last_window_screen_rect_ = new_window_screen_rect;
waiting_for_screen_rects_ack_ = true;
}

Powered by Google App Engine
This is Rietveld 408576698