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

Unified Diff: ui/aura/window.cc

Issue 8618009: Aura: Fix window resizing for large drags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix HtmlDialogBrowserTest Created 9 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 | « ui/aura/test/test_window_delegate.cc ('k') | ui/aura/window_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window.cc
diff --git a/ui/aura/window.cc b/ui/aura/window.cc
index c58205f3ae42af0bc20862ce04c76dabfc53180c..3e6f6c62108baaaaac688b07d24eb86fd30c325a 100644
--- a/ui/aura/window.cc
+++ b/ui/aura/window.cc
@@ -440,9 +440,14 @@ void Window::WindowDetachedFromDesktop(aura::Window* window) {
void Window::SetBoundsInternal(const gfx::Rect& new_bounds) {
gfx::Rect actual_new_bounds(new_bounds);
- // Gives delegate a change to examine and change the new bounds.
- if (delegate_)
- delegate_->OnBoundsChanging(&actual_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()));
+ }
const gfx::Rect old_bounds = layer_->GetTargetBounds();
« no previous file with comments | « ui/aura/test/test_window_delegate.cc ('k') | ui/aura/window_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698