summaryrefslogtreecommitdiff
path: root/Source/WebKit2/UIProcess/WebContext.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-09-11 19:54:20 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-09-11 19:54:20 +0200
commit88a04ac016f57c2d78e714682445dff2e7db4ade (patch)
treea48ca81ee3b29953121308168db22532d5b57fe2 /Source/WebKit2/UIProcess/WebContext.cpp
parent284837daa07b29d6a63a748544a90b1f5842ac5c (diff)
downloadqtwebkit-88a04ac016f57c2d78e714682445dff2e7db4ade.tar.gz
Imported WebKit commit 42d95198c30c2d1a94a5081181aad0b2be7c316c (http://svn.webkit.org/repository/webkit/trunk@128206)
This includes the rewrite of the configure part of the build system which should fix the QtQuick2 detection and allow for further simplifications in the future
Diffstat (limited to 'Source/WebKit2/UIProcess/WebContext.cpp')
-rw-r--r--Source/WebKit2/UIProcess/WebContext.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/WebKit2/UIProcess/WebContext.cpp b/Source/WebKit2/UIProcess/WebContext.cpp
index 0003387d0..fdd363ac6 100644
--- a/Source/WebKit2/UIProcess/WebContext.cpp
+++ b/Source/WebKit2/UIProcess/WebContext.cpp
@@ -501,20 +501,21 @@ void WebContext::disconnectProcess(WebProcessProxy* process)
m_processes.remove(m_processes.find(process));
}
-PassRefPtr<WebPageProxy> WebContext::createWebPage(PageClient* pageClient, WebPageGroup* pageGroup)
+PassRefPtr<WebPageProxy> WebContext::createWebPage(PageClient* pageClient, WebPageGroup* pageGroup, WebPageProxy* relatedPage)
{
RefPtr<WebProcessProxy> process;
if (m_processModel == ProcessModelSharedSecondaryProcess) {
ensureSharedWebProcess();
process = m_processes[0];
} else {
- // FIXME (Multi-WebProcess): Add logic for sharing a process.
- // <rdar://problem/12218164> window.open() should create pages in the same process.
- // <rdar://problem/12239661> Consider limiting the number of web processes in per-tab process model
if (m_haveInitialEmptyProcess) {
process = m_processes.last();
m_haveInitialEmptyProcess = false;
+ } else if (relatedPage) {
+ // Sharing processes, e.g. when creating the page via window.open().
+ process = relatedPage->process();
} else {
+ // FIXME (Multi-WebProcess): <rdar://problem/12239661> Consider limiting the number of web processes in per-tab process model.
process = createNewWebProcess();
m_processes.append(process);
}