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

Unified Diff: ui/views/win/hwnd_message_handler.cc

Issue 11110004: Make gfx::Rect class operations consistently mutate the class they are called on. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: cc/ fixes Created 8 years, 2 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 | « ui/views/widget/widget.cc ('k') | webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/win/hwnd_message_handler.cc
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index c52deb53156bbe562d5acdd2bfbb693e1f5434a2..c96a474928b0328566b511fa613e3e0866a86e44 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -842,7 +842,7 @@ void HWNDMessageHandler::SchedulePaintInRect(const gfx::Rect& rect) {
if (use_layered_buffer_) {
// We must update the back-buffer immediately, since Windows' handling of
// invalid rects is somewhat mysterious.
- invalid_rect_ = invalid_rect_.Union(rect);
+ invalid_rect_.Union(rect);
// In some situations, such as drag and drop, when Windows itself runs a
// nested message loop our message loop appears to be starved and we don't
@@ -2034,7 +2034,8 @@ void HWNDMessageHandler::OnWindowPosChanging(WINDOWPOS* window_pos) {
int border_thickness = GetSystemMetrics(SM_CXSIZEFRAME);
new_window_rect.Inset(-border_thickness, -border_thickness);
} else {
- new_window_rect = gfx::Rect(window_rect).AdjustToFit(work_area);
+ new_window_rect = gfx::Rect(window_rect);
+ new_window_rect.AdjustToFit(work_area);
}
window_pos->x = new_window_rect.x();
window_pos->y = new_window_rect.y();
« no previous file with comments | « ui/views/widget/widget.cc ('k') | webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698