From 88a04ac016f57c2d78e714682445dff2e7db4ade Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 11 Sep 2012 19:54:20 +0200 Subject: 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 --- Source/WebKit2/UIProcess/WebContext.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Source/WebKit2/UIProcess/WebContext.cpp') 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 WebContext::createWebPage(PageClient* pageClient, WebPageGroup* pageGroup) +PassRefPtr WebContext::createWebPage(PageClient* pageClient, WebPageGroup* pageGroup, WebPageProxy* relatedPage) { RefPtr process; if (m_processModel == ProcessModelSharedSecondaryProcess) { ensureSharedWebProcess(); process = m_processes[0]; } else { - // FIXME (Multi-WebProcess): Add logic for sharing a process. - // window.open() should create pages in the same process. - // 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): Consider limiting the number of web processes in per-tab process model. process = createNewWebProcess(); m_processes.append(process); } -- cgit v1.2.1