Avoid loading the start page before loading the requested URL in new windows
by passing the url to the constructor already. git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@476 94f232f2-1747-11df-bad5-a5bfde151594
This commit is contained in:
parent
d5c4471790
commit
1a2246ccf9
@ -169,7 +169,8 @@ BrowserApp::ReadyToRun()
|
||||
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 @@ BrowserApp::_CreateNewWindow(const BString& url)
|
||||
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());
|
||||
}
|
||||
|
||||
|
||||
|
@ -183,7 +183,7 @@ private:
|
||||
|
||||
|
||||
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 @@ BrowserWindow::BrowserWindow(BRect frame, SettingsMessage* appSettings,
|
||||
fFindGroup = layoutItemFor(findGroup);
|
||||
fStatusGroup = layoutItemFor(statusGroup);
|
||||
|
||||
CreateNewTab("", true, webView);
|
||||
CreateNewTab(url, true, webView);
|
||||
|
||||
fFindGroup->SetVisible(false);
|
||||
|
||||
@ -911,7 +911,7 @@ BrowserWindow::NewPageCreated(BWebView* view, BRect windowFrame,
|
||||
{
|
||||
if (windowFrame.IsValid()) {
|
||||
BrowserWindow* window = new BrowserWindow(windowFrame, fAppSettings,
|
||||
DoNotHaveToolbar, view);
|
||||
BString(), DoNotHaveToolbar, view);
|
||||
window->Show();
|
||||
} else
|
||||
CreateNewTab(BString(), activate, view);
|
||||
|
@ -79,6 +79,7 @@ class BrowserWindow : public BWebWindow {
|
||||
public:
|
||||
BrowserWindow(BRect frame,
|
||||
SettingsMessage* appSettings,
|
||||
const BString& url,
|
||||
ToolbarPolicy = HaveToolbar,
|
||||
BWebView* webView = NULL);
|
||||
virtual ~BrowserWindow();
|
||||
|
Loading…
Reference in New Issue
Block a user