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

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

Issue 11364052: Revert "Disabled WorkspaceWindowResizerTest.Edge since it got broken by https://chromiumcodereview.… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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/workspace/frame_maximize_button.cc ('k') | ash/wm/workspace/workspace_window_resizer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8369f66f6a2aa87e0a09c4f8f8358f3778cf47cc..67145f5db38384e0c769d536bc5a31f3e1a2abbb 100644
--- a/ash/wm/workspace/workspace_window_resizer.cc
+++ b/ash/wm/workspace/workspace_window_resizer.cc
@@ -327,13 +327,10 @@ void WorkspaceWindowResizer::CompleteDrag(int event_flags) {
// is called, so it does not matter.
if (wm::IsWindowNormal(window()) &&
(snap_type_ == SNAP_LEFT_EDGE || snap_type_ == SNAP_RIGHT_EDGE)) {
- if (!GetRestoreBoundsInScreen(window())) {
- gfx::Rect initial_bounds = ScreenAsh::ConvertRectToScreen(
- window()->parent(), details_.initial_bounds_in_parent);
- SetRestoreBoundsInScreen(window(), details_.restore_bounds.IsEmpty() ?
- initial_bounds :
- details_.restore_bounds);
- }
+ if (!GetRestoreBoundsInScreen(window()))
+ SetRestoreBoundsInParent(window(), details_.restore_bounds.IsEmpty() ?
+ details_.initial_bounds :
+ details_.restore_bounds);
window()->SetBounds(snap_sizer_->target_bounds());
return;
}
@@ -365,12 +362,12 @@ void WorkspaceWindowResizer::RevertDrag() {
if (!did_move_or_resize_)
return;
- window()->SetBounds(details_.initial_bounds_in_parent);
+ window()->SetBounds(details_.initial_bounds);
if (!details_.restore_bounds.IsEmpty())
SetRestoreBoundsInScreen(details_.window, details_.restore_bounds);
if (details_.window_component == HTRIGHT) {
- int last_x = details_.initial_bounds_in_parent.right();
+ int last_x = details_.initial_bounds.right();
for (size_t i = 0; i < attached_windows_.size(); ++i) {
gfx::Rect bounds(attached_windows_[i]->bounds());
bounds.set_x(last_x);
@@ -379,7 +376,7 @@ void WorkspaceWindowResizer::RevertDrag() {
last_x = attached_windows_[i]->bounds().right();
}
} else {
- int last_y = details_.initial_bounds_in_parent.bottom();
+ int last_y = details_.initial_bounds.bottom();
for (size_t i = 0; i < attached_windows_.size(); ++i) {
gfx::Rect bounds(attached_windows_[i]->bounds());
bounds.set_y(last_y);
@@ -477,7 +474,7 @@ void WorkspaceWindowResizer::LayoutAttachedWindows(
gfx::Rect work_area(ScreenAsh::GetDisplayWorkAreaBoundsInParent(window()));
std::vector<int> sizes;
CalculateAttachedSizes(
- PrimaryAxisSize(details_.initial_bounds_in_parent.size()),
+ PrimaryAxisSize(details_.initial_bounds.size()),
PrimaryAxisSize(bounds.size()),
PrimaryAxisCoordinate(bounds.right(), bounds.bottom()),
PrimaryAxisCoordinate(work_area.right(), work_area.bottom()),
« no previous file with comments | « ash/wm/workspace/frame_maximize_button.cc ('k') | ash/wm/workspace/workspace_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698