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

Unified Diff: chrome/browser/ui/window_sizer/window_sizer_common_unittest.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
Index: chrome/browser/ui/window_sizer/window_sizer_common_unittest.cc
diff --git a/chrome/browser/ui/window_sizer/window_sizer_common_unittest.cc b/chrome/browser/ui/window_sizer/window_sizer_common_unittest.cc
index c460f9cac8711699cc227297f0c2c910ffccec60..23b056b6e264698f8b3fdec92758ebfbb6937a2c 100644
--- a/chrome/browser/ui/window_sizer/window_sizer_common_unittest.cc
+++ b/chrome/browser/ui/window_sizer/window_sizer_common_unittest.cc
@@ -44,7 +44,8 @@ size_t TestMonitorInfoProvider::GetMonitorIndexMatchingBounds(
// Loop through all the monitors, finding the one that intersects the
// largest area of the supplied match rect.
for (size_t i = 0; i < work_areas_.size(); ++i) {
- gfx::Rect overlap(match_rect.Intersect(work_areas_[i]));
+ gfx::Rect overlap = work_areas_[i];
+ overlap.Intersect(match_rect);
int area = overlap.width() * overlap.height();
if (area > max_area) {
max_area = area;
« no previous file with comments | « chrome/browser/ui/window_sizer/window_sizer.cc ('k') | content/browser/renderer_host/accelerated_surface_container_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698