diff options
Diffstat (limited to 'webkit/tools/test_shell/test_shell_mac.mm')
-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]; } |