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

Unified Diff: ui/gfx/screen_mac.mm

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: 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
« ui/gfx/rect_f.h ('K') | « ui/gfx/screen_gtk.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/screen_mac.mm
diff --git a/ui/gfx/screen_mac.mm b/ui/gfx/screen_mac.mm
index 325c679209d52523ba4d7927768e52384a6d2e13..79911a3294176c45158238e5df4c479ea7b1b0d0 100644
--- a/ui/gfx/screen_mac.mm
+++ b/ui/gfx/screen_mac.mm
@@ -39,7 +39,8 @@ NSScreen* GetMatchingScreen(const gfx::Rect& match_rect) {
for (NSScreen* screen in [NSScreen screens]) {
gfx::Rect monitor_area = ConvertCoordinateSystem([screen frame]);
- gfx::Rect intersection = monitor_area.Intersect(match_rect);
+ gfx::Rect intersection = monitor_area;
+ intersection.Intersect(match_rect);
int area = intersection.width() * intersection.height();
if (area > max_area) {
max_area = area;
« ui/gfx/rect_f.h ('K') | « ui/gfx/screen_gtk.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698