diff options
author | pinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-29 20:10:34 +0000 |
---|---|---|
committer | pinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-29 20:10:34 +0000 |
commit | 68376337046f7e3e53ebca1b262a3fe70ed3e296 (patch) | |
tree | e8fe821ac5d7b8b40bd8aa6274424b4b57a959b4 | |
parent | 04476d4ed0cc1e3555ae14ffbd7fb706164604bf (diff) | |
download | chromium_src-68376337046f7e3e53ebca1b262a3fe70ed3e296.zip chromium_src-68376337046f7e3e53ebca1b262a3fe70ed3e296.tar.gz chromium_src-68376337046f7e3e53ebca1b262a3fe70ed3e296.tar.bz2 |
adjust for our "toolbar" when resizing the window and content area, as it is part of the content (it's not a real toolbar)
Review URL: http://codereview.chromium.org/8711
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4159 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | webkit/tools/test_shell/test_shell_mac.mm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/webkit/tools/test_shell/test_shell_mac.mm b/webkit/tools/test_shell/test_shell_mac.mm index 50ce4b8..2117e67 100644 --- a/webkit/tools/test_shell/test_shell_mac.mm +++ b/webkit/tools/test_shell/test_shell_mac.mm @@ -41,7 +41,7 @@ #define MAX_LOADSTRING 100 #define BUTTON_WIDTH 72 -#define URLBAR_HEIGHT 24 +#define URLBAR_HEIGHT 32 // Global Variables: @@ -484,9 +484,12 @@ void TestShell::SizeToDefault() { } void TestShell::SizeTo(int width, int height) { + // WebViewHost::Create() sets the HTML content rect to start 32 pixels below + // the top of the window to account for the "toolbar". We need to match that + // here otherwise the HTML content area will be too short. NSRect r = [m_mainWnd contentRectForFrameRect:[m_mainWnd frame]]; r.size.width = width; - r.size.height = height; + r.size.height = height + URLBAR_HEIGHT; [m_mainWnd setFrame:[m_mainWnd frameRectForContentRect:r] display:YES]; } |