diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-03 03:00:22 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-03 03:00:22 +0000 |
commit | 589eed4d2f34d744f929626c40a3992a3a7e3988 (patch) | |
tree | 5d484661e5f1376708c3a3f3eca54dfa1cfeb7c7 /chrome/views | |
parent | 7d5925a7da14d0add8409dec09dc31b3f6d756e3 (diff) | |
download | chromium_src-589eed4d2f34d744f929626c40a3992a3a7e3988.zip chromium_src-589eed4d2f34d744f929626c40a3992a3a7e3988.tar.gz chromium_src-589eed4d2f34d744f929626c40a3992a3a7e3988.tar.bz2 |
Fix interactive ui tests. There was a bug in the NonClientView::GetPreferredSize method... it was returning the preferred size of the client area not the non-client area!
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10778 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views')
-rw-r--r-- | chrome/views/non_client_view.cc | 3 | ||||
-rw-r--r-- | chrome/views/window.cc | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/chrome/views/non_client_view.cc b/chrome/views/non_client_view.cc index 166042d..ca54796 100644 --- a/chrome/views/non_client_view.cc +++ b/chrome/views/non_client_view.cc @@ -135,7 +135,8 @@ void NonClientView::ResetWindowControls() { // NonClientView, View overrides: gfx::Size NonClientView::GetPreferredSize() { - return client_view_->GetPreferredSize(); + gfx::Rect client_bounds(gfx::Point(), client_view_->GetPreferredSize()); + return GetWindowBoundsForClientBounds(client_bounds).size(); } void NonClientView::Layout() { diff --git a/chrome/views/window.cc b/chrome/views/window.cc index 5024b0c..404dc0e 100644 --- a/chrome/views/window.cc +++ b/chrome/views/window.cc @@ -373,11 +373,9 @@ void Window::UpdateFrameAfterFrameChange() { } void Window::SizeWindowToDefault() { - // CenterAndSizeWindow adjusts the window size to accommodate the non-client - // area if we're using a native frame. win_util::CenterAndSizeWindow(owning_window(), GetHWND(), non_client_view_->GetPreferredSize().ToSIZE(), - non_client_view_->UseNativeFrame()); + false); } void Window::RunSystemMenu(const gfx::Point& point) { |