diff options
Diffstat (limited to 'webkit/tools/test_shell/test_shell_gtk.cc')
-rw-r--r-- | webkit/tools/test_shell/test_shell_gtk.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/webkit/tools/test_shell/test_shell_gtk.cc b/webkit/tools/test_shell/test_shell_gtk.cc index 28dceaaa..fa09346 100644 --- a/webkit/tools/test_shell/test_shell_gtk.cc +++ b/webkit/tools/test_shell/test_shell_gtk.cc @@ -232,14 +232,16 @@ bool TestShell::Initialize(const std::wstring& startingURL) { // output. webView()->SetUseEditorDelegate(true); - if (!startingURL.empty()) - LoadURL(startingURL.c_str()); - gtk_container_add(GTK_CONTAINER(m_mainWnd), vbox); gtk_widget_show_all(m_mainWnd); toolbar_height_ = toolbar->allocation.height + gtk_box_get_spacing(GTK_BOX(vbox)); + // LoadURL will do a resize (which uses toolbar_height_), so make sure we + // don't call LoadURL until we've completed all of our GTK setup. + if (!startingURL.empty()) + LoadURL(startingURL.c_str()); + bool bIsSVGTest = startingURL.find(L"W3C-SVG-1.1") != std::wstring::npos; if (bIsSVGTest) SizeToSVG(); |