Index: ui/aura/window.cc |
diff --git a/ui/aura/window.cc b/ui/aura/window.cc |
index fe1ba06a4fa241b0e44b8f1c5676f48d62025790..98808ddc2b84aa2946e30ec3835c7c1239ba08a1 100644 |
--- a/ui/aura/window.cc |
+++ b/ui/aura/window.cc |
@@ -426,17 +426,8 @@ |
void Window::SetBounds(const gfx::Rect& new_bounds) { |
if (parent_ && parent_->layout_manager()) |
parent_->layout_manager()->SetChildBounds(this, new_bounds); |
- else { |
- // Ensure we don't go smaller than our minimum bounds. |
- gfx::Rect final_bounds(new_bounds); |
- if (delegate_) { |
- const gfx::Size& min_size = delegate_->GetMinimumSize(); |
- final_bounds.set_width(std::max(min_size.width(), final_bounds.width())); |
- final_bounds.set_height(std::max(min_size.height(), |
- final_bounds.height())); |
- } |
- SetBoundsInternal(final_bounds); |
- } |
+ else |
+ SetBoundsInternal(new_bounds); |
} |
void Window::SetBoundsInScreen(const gfx::Rect& new_bounds_in_screen, |
@@ -874,6 +865,16 @@ |
void Window::SetBoundsInternal(const gfx::Rect& new_bounds) { |
gfx::Rect actual_new_bounds(new_bounds); |
+ |
+ // Ensure we don't go smaller than our minimum bounds. |
+ if (delegate_) { |
+ const gfx::Size& min_size = delegate_->GetMinimumSize(); |
+ actual_new_bounds.set_width( |
+ std::max(min_size.width(), actual_new_bounds.width())); |
+ actual_new_bounds.set_height( |
+ std::max(min_size.height(), actual_new_bounds.height())); |
+ } |
+ |
gfx::Rect old_bounds = GetTargetBounds(); |
// Always need to set the layer's bounds -- even if it is to the same thing. |