Author: stippi Date: Mon May 3 13:09:54 2010 New Revision: 476 URL: http://mmlr.dyndns.org/changeset/476 Log: Avoid loading the start page before loading the requested URL in new windows by passing the url to the constructor already. Modified: webkit/trunk/WebKit/haiku/WebPositive/BrowserApp.cpp webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.h Modified: webkit/trunk/WebKit/haiku/WebPositive/BrowserApp.cpp ============================================================================== --- webkit/trunk/WebKit/haiku/WebPositive/BrowserApp.cpp Mon May 3 13:03:37 2010 (r475) +++ webkit/trunk/WebKit/haiku/WebPositive/BrowserApp.cpp Mon May 3 13:09:54 2010 (r476) @@ -169,7 +169,8 @@ fLaunchRefsMessage = 0; } if (pagesCreated == 0) { - BrowserWindow* window = new BrowserWindow(fLastWindowFrame, fSettings); + BrowserWindow* window = new BrowserWindow(fLastWindowFrame, fSettings, + ""); window->Show(); } PostMessage(PRELOAD_BROWSING_HISTORY); @@ -347,10 +348,9 @@ if (!BScreen().Frame().Contains(fLastWindowFrame)) fLastWindowFrame.OffsetTo(50, 50); - BrowserWindow* window = new BrowserWindow(fLastWindowFrame, fSettings); + BrowserWindow* window = new BrowserWindow(fLastWindowFrame, fSettings, + url); window->Show(); - if (url.Length()) - window->CurrentWebView()->LoadURL(url.String()); } Modified: webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp ============================================================================== --- webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp Mon May 3 13:03:37 2010 (r475) +++ webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp Mon May 3 13:09:54 2010 (r476) @@ -183,7 +183,7 @@ BrowserWindow::BrowserWindow(BRect frame, SettingsMessage* appSettings, - ToolbarPolicy toolbarPolicy, BWebView* webView) + const BString& url, ToolbarPolicy toolbarPolicy, BWebView* webView) : BWebWindow(frame, kApplicationName, B_DOCUMENT_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL, @@ -391,7 +391,7 @@ fFindGroup = layoutItemFor(findGroup); fStatusGroup = layoutItemFor(statusGroup); - CreateNewTab("", true, webView); + CreateNewTab(url, true, webView); fFindGroup->SetVisible(false); @@ -911,7 +911,7 @@ { if (windowFrame.IsValid()) { BrowserWindow* window = new BrowserWindow(windowFrame, fAppSettings, - DoNotHaveToolbar, view); + BString(), DoNotHaveToolbar, view); window->Show(); } else CreateNewTab(BString(), activate, view); Modified: webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.h ============================================================================== --- webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.h Mon May 3 13:03:37 2010 (r475) +++ webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.h Mon May 3 13:09:54 2010 (r476) @@ -79,6 +79,7 @@ public: BrowserWindow(BRect frame, SettingsMessage* appSettings, + const BString& url, ToolbarPolicy = HaveToolbar, BWebView* webView = NULL); virtual ~BrowserWindow();