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

Unified Diff: ui/gfx/screen_mac.mm

Issue 11270042: Add non-member non-mutating methods for common gfx::Rect operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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/gfx/screen_gtk.cc ('k') | ui/views/animation/bounds_animator.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 d3301f1b4ec0b6ee94f580abd77c86713d301d6f..595ca3eb2d466bbfe107e0dc9174eab0042bd049 100644
--- a/ui/gfx/screen_mac.mm
+++ b/ui/gfx/screen_mac.mm
@@ -39,8 +39,7 @@ 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;
- intersection.Intersect(match_rect);
+ gfx::Rect intersection = gfx::IntersectRects(monitor_area, match_rect);
int area = intersection.width() * intersection.height();
if (area > max_area) {
max_area = area;
« no previous file with comments | « ui/gfx/screen_gtk.cc ('k') | ui/views/animation/bounds_animator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698