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

Unified Diff: ash/wm/workspace/workspace_window_resizer.cc

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: 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: ash/wm/workspace/workspace_window_resizer.cc
diff --git a/ash/wm/workspace/workspace_window_resizer.cc b/ash/wm/workspace/workspace_window_resizer.cc
index d3cc9b7c116d2ec577c3c7e3b74edab9c961bbff..82c7f6c12b7efbfca1cfa7b283b137353a61ea50 100644
--- a/ash/wm/workspace/workspace_window_resizer.cc
+++ b/ash/wm/workspace/workspace_window_resizer.cc
@@ -688,8 +688,8 @@ void WorkspaceWindowResizer::UpdateDragPhantomWindow(const gfx::Rect& bounds,
const gfx::Rect root_bounds_in_screen(another_root->GetBoundsInScreen());
const gfx::Rect bounds_in_screen =
ScreenAsh::ConvertRectToScreen(window()->parent(), bounds);
- gfx::Rect bounds_in_another_root = root_bounds_in_screen;
- bounds_in_another_root.Intersect(bounds_in_screen);
+ gfx::Rect bounds_in_another_root =
+ gfx::Intersection(root_bounds_in_screen, bounds_in_screen);
const float fraction_in_another_window =
(bounds_in_another_root.width() * bounds_in_another_root.height()) /

Powered by Google App Engine
This is Rietveld 408576698