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

Unified Diff: ash/wm/shelf_layout_manager.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 | « ash/wm/partial_screenshot_view.cc ('k') | ash/wm/system_modal_container_layout_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/shelf_layout_manager.cc
diff --git a/ash/wm/shelf_layout_manager.cc b/ash/wm/shelf_layout_manager.cc
index 8aff1aea8fd8bebd95f15909ea02b43a3e00d172..307c3ba3fc90826153ed889802d250108900bf38 100644
--- a/ash/wm/shelf_layout_manager.cc
+++ b/ash/wm/shelf_layout_manager.cc
@@ -746,7 +746,8 @@ void ShelfLayoutManager::UpdateTargetBoundsForGesture(
target_bounds->launcher_bounds_in_root.height() + move - translate);
// The statusbar should be in the center.
- gfx::Rect status_y = target_bounds->launcher_bounds_in_root.Center(
+ gfx::Rect status_y = target_bounds->launcher_bounds_in_root;
+ status_y.ClampToCenteredSize(
target_bounds->status_bounds_in_root.size());
target_bounds->status_bounds_in_root.set_y(status_y.y());
}
@@ -774,7 +775,8 @@ void ShelfLayoutManager::UpdateTargetBoundsForGesture(
}
// The statusbar should be in the center.
- gfx::Rect status_x = target_bounds->launcher_bounds_in_root.Center(
+ gfx::Rect status_x = target_bounds->launcher_bounds_in_root;
+ status_x.ClampToCenteredSize(
target_bounds->status_bounds_in_root.size());
target_bounds->status_bounds_in_root.set_x(status_x.x());
}
« no previous file with comments | « ash/wm/partial_screenshot_view.cc ('k') | ash/wm/system_modal_container_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698