From 0026387d76bcab8405a73038c5734b05f0f786fe Mon Sep 17 00:00:00 2001 From: "rfevang@chromium.org" Date: Fri, 6 Sep 2013 05:08:43 +0000 Subject: Limit constrained windows to the size of the parent view. Constrained windows would get drawn partially outside the browser window, obscuring some of the contents. This CL limits their size so everything is in view. This mimics the behavior of the old style dialogs. This CL also changes the size request to use the current preferred size of the view, instead of reusing the existing size. Some dialogs (like the print preview) changes their size preferences when the browser window size changes, so the old size might not be optimal any more. Additionally, added a GetMinimumSize to the bubble frame view, as previously GetPreferredSize would get used, effectively undoing the additional restrictions placed based on Window sizes. BUG=272760,274236,276150 Review URL: https://chromiumcodereview.appspot.com/22903022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221573 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/printing/print_preview_test.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'chrome/browser/printing') diff --git a/chrome/browser/printing/print_preview_test.cc b/chrome/browser/printing/print_preview_test.cc index c4223a7..b6d0f23 100644 --- a/chrome/browser/printing/print_preview_test.cc +++ b/chrome/browser/printing/print_preview_test.cc @@ -46,6 +46,10 @@ class PrintPreviewTestBrowserWindow return gfx::Point(); } + virtual gfx::Size GetMaximumDialogSize() OVERRIDE { + return gfx::Size(); + } + virtual void AddObserver( WebContentsModalDialogHostObserver* observer) OVERRIDE {} virtual void RemoveObserver( -- cgit v1.1