Author: stippi Date: Sat Apr 24 00:46:24 2010 New Revision: 460 URL: http://mmlr.dyndns.org/changeset/460 Log: Never apply the new page policy if we already have the BWebView. If we already have it, it was created by the ChromeClient and navigation is soon going to happen with it. Modified: webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp Modified: webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp ============================================================================== --- webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp Fri Apr 23 17:00:08 2010 (r459) +++ webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp Sat Apr 24 00:46:24 2010 (r460) @@ -743,8 +743,9 @@ void BrowserWindow::CreateNewTab(const BString& _url, bool select, BWebView* webView) { + bool applyNewPagePolicy = webView == NULL; // Executed in app thread (new BWebPage needs to be created in app thread). - if (!webView) + if (webView == NULL) webView = new BWebView("web view"); bool isNewWindow = fTabManager->CountTabs() == 0; @@ -752,7 +753,7 @@ fTabManager->AddTab(webView, "New tab"); BString url(_url); - if (url.Length() == 0) { + if (applyNewPagePolicy && url.Length() == 0) { uint32 policy = isNewWindow ? fNewWindowPolicy : fNewTabPolicy; // Implement new page policy switch (policy) {