summaryrefslogtreecommitdiff
path: root/Source/WebKit2
diff options
context:
space:
mode:
authorKonstantin Tokarev <annulen@yandex.ru>2016-09-28 16:39:37 +0300
committerKonstantin Tokarev <annulen@yandex.ru>2017-02-02 12:31:01 +0000
commit9daf1655d7e4eaaa6ed5f44055a4b4fd399fd25c (patch)
tree322337ad0acbc75732f916376ec6d36e7ec0e5bc /Source/WebKit2
parent6882a04fb36642862b11efe514251d32070c3d65 (diff)
downloadqtwebkit-9daf1655d7e4eaaa6ed5f44055a4b4fd399fd25c.tar.gz
Imported WebKit commit eb954cdcf58f9b915b2fcb6f8e4cb3a60650a4f3
Change-Id: I8dda875c38075d43b76fe3a21acb0ffa102bb82d Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Source/WebKit2')
-rw-r--r--Source/WebKit2/NetworkProcess/Downloads/qt/DownloadQt.cpp (renamed from Source/WebKit2/Shared/Downloads/qt/DownloadQt.cpp)26
-rw-r--r--Source/WebKit2/NetworkProcess/Downloads/qt/QtFileDownloader.cpp (renamed from Source/WebKit2/Shared/Downloads/qt/QtFileDownloader.cpp)14
-rw-r--r--Source/WebKit2/NetworkProcess/Downloads/qt/QtFileDownloader.h (renamed from Source/WebKit2/Shared/Downloads/qt/QtFileDownloader.h)8
-rw-r--r--Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp4
-rw-r--r--Source/WebKit2/Platform/IPC/Connection.h2
-rw-r--r--Source/WebKit2/Platform/IPC/unix/ConnectionUnix.cpp76
-rw-r--r--Source/WebKit2/Platform/SharedMemory.h3
-rw-r--r--Source/WebKit2/Platform/unix/SharedMemoryUnix.cpp36
-rw-r--r--Source/WebKit2/PlatformQt.cmake260
-rw-r--r--Source/WebKit2/Shared/API/c/qt/WKImageQt.h4
-rw-r--r--Source/WebKit2/Shared/LayerTreeContext.h4
-rw-r--r--Source/WebKit2/Shared/qt/ArgumentCodersQt.cpp2
-rw-r--r--Source/WebKit2/Shared/qt/ArgumentCodersQt.h2
-rw-r--r--Source/WebKit2/Shared/qt/LayerTreeContextQt.cpp63
-rw-r--r--Source/WebKit2/Shared/qt/NativeWebKeyboardEventQt.cpp2
-rw-r--r--Source/WebKit2/Shared/qt/NativeWebMouseEventQt.cpp2
-rw-r--r--Source/WebKit2/Shared/qt/NativeWebTouchEventQt.cpp2
-rw-r--r--Source/WebKit2/Shared/qt/NativeWebWheelEventQt.cpp2
-rw-r--r--Source/WebKit2/Shared/qt/PlatformCertificateInfo.h4
-rw-r--r--Source/WebKit2/Shared/qt/QtNetworkReplyData.cpp8
-rw-r--r--Source/WebKit2/Shared/qt/QtNetworkReplyData.h6
-rw-r--r--Source/WebKit2/Shared/qt/QtNetworkRequestData.cpp5
-rw-r--r--Source/WebKit2/Shared/qt/QtNetworkRequestData.h6
-rw-r--r--Source/WebKit2/Shared/qt/WebCoreArgumentCodersQt.cpp15
-rw-r--r--Source/WebKit2/Shared/qt/WebEventFactory.h (renamed from Source/WebKit2/Shared/qt/WebEventFactoryQt.h)0
-rw-r--r--Source/WebKit2/Shared/qt/WebEventFactoryQt.cpp11
-rw-r--r--Source/WebKit2/Shared/qt/WebURLRequestQt.cpp42
-rw-r--r--Source/WebKit2/Shared/qt/WebURLResponseQt.cpp42
-rw-r--r--Source/WebKit2/UIProcess/API/C/qt/WKIconDatabaseQt.h4
-rw-r--r--Source/WebKit2/UIProcess/API/cpp/qt/WKStringQt.h2
-rw-r--r--Source/WebKit2/UIProcess/API/cpp/qt/WKURLQt.h4
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qquicknetworkreply.cpp4
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qquicknetworkreply_p.h3
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qquicknetworkrequest.cpp1
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qquicknetworkrequest_p.h3
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qquickurlschemedelegate_p.h2
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qquickwebpage.cpp6
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp55
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h16
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qtwebsecurityorigin.cpp6
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qtwebsecurityorigin_p.h1
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qwebchannelwebkittransport.cpp9
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qwebchannelwebkittransport_p.h10
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qwebdownloaditem.cpp1
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qwebkittest_p.h2
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qwebloadrequest.cpp1
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qwebnavigationhistory.cpp17
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qwebnavigationhistory_p_p.h9
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qwebnavigationrequest.cpp1
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qwebpermissionrequest.cpp6
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qwebpermissionrequest_p.h6
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp2
-rw-r--r--Source/WebKit2/UIProcess/API/qt/raw/qrawwebview.cpp4
-rw-r--r--Source/WebKit2/UIProcess/API/qt/raw/qrawwebview_p.h4
-rw-r--r--Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.h2
-rw-r--r--Source/WebKit2/UIProcess/InspectorServer/qt/WebInspectorServerQt.cpp9
-rw-r--r--Source/WebKit2/UIProcess/InspectorServer/qt/WebSocketServerQt.cpp9
-rw-r--r--Source/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp11
-rw-r--r--Source/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp2
-rw-r--r--Source/WebKit2/UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp12
-rw-r--r--Source/WebKit2/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp5
-rw-r--r--Source/WebKit2/UIProcess/Storage/LocalStorageDatabase.cpp5
-rw-r--r--Source/WebKit2/UIProcess/WebPageProxy.cpp5
-rw-r--r--Source/WebKit2/UIProcess/WebPageProxy.h7
-rw-r--r--Source/WebKit2/UIProcess/qt/BackingStoreQt.cpp2
-rw-r--r--Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.cpp4
-rw-r--r--Source/WebKit2/UIProcess/qt/QtDialogRunner.cpp11
-rw-r--r--Source/WebKit2/UIProcess/qt/QtDialogRunner.h7
-rw-r--r--Source/WebKit2/UIProcess/qt/QtPageClient.cpp11
-rw-r--r--Source/WebKit2/UIProcess/qt/QtPageClient.h101
-rw-r--r--Source/WebKit2/UIProcess/qt/QtPinchGestureRecognizer.cpp1
-rw-r--r--Source/WebKit2/UIProcess/qt/QtWebContext.cpp3
-rw-r--r--Source/WebKit2/UIProcess/qt/QtWebError.cpp2
-rw-r--r--Source/WebKit2/UIProcess/qt/QtWebError.h2
-rw-r--r--Source/WebKit2/UIProcess/qt/QtWebIconDatabaseClient.cpp1
-rw-r--r--Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.cpp16
-rw-r--r--Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.h2
-rw-r--r--Source/WebKit2/UIProcess/qt/QtWebPagePolicyClient.cpp1
-rw-r--r--Source/WebKit2/UIProcess/qt/QtWebPageSGNode.cpp9
-rw-r--r--Source/WebKit2/UIProcess/qt/QtWebPageSGNode.h7
-rw-r--r--Source/WebKit2/UIProcess/qt/QtWebPageUIClient.cpp5
-rw-r--r--Source/WebKit2/UIProcess/qt/QtWebPageUIClient.h2
-rw-r--r--Source/WebKit2/UIProcess/qt/WebColorPickerQt.cpp12
-rw-r--r--Source/WebKit2/UIProcess/qt/WebColorPickerQt.h5
-rw-r--r--Source/WebKit2/UIProcess/qt/WebContextMenuProxyQt.cpp11
-rw-r--r--Source/WebKit2/UIProcess/qt/WebContextMenuProxyQt.h4
-rw-r--r--Source/WebKit2/UIProcess/qt/WebGeolocationProviderQt.h6
-rw-r--r--Source/WebKit2/UIProcess/qt/WebPageProxyQt.cpp16
-rw-r--r--Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.cpp10
-rw-r--r--Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.h11
-rw-r--r--Source/WebKit2/UIProcess/qt/WebProcessPoolQt.cpp (renamed from Source/WebKit2/UIProcess/qt/WebContextQt.cpp)30
-rw-r--r--Source/WebKit2/UIProcess/qt/WebProcessProxyQt.cpp35
-rw-r--r--Source/WebKit2/WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp4
-rw-r--r--Source/WebKit2/WebProcess/Plugins/Netscape/unix/NetscapePluginUnix.cpp13
-rw-r--r--Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp2
-rw-r--r--Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp4
-rw-r--r--Source/WebKit2/WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp10
-rw-r--r--Source/WebKit2/WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp35
-rw-r--r--Source/WebKit2/WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp2
-rw-r--r--Source/WebKit2/WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h12
-rw-r--r--Source/WebKit2/WebProcess/WebPage/TapHighlightController.cpp12
-rw-r--r--Source/WebKit2/WebProcess/WebPage/TapHighlightController.h11
-rw-r--r--Source/WebKit2/WebProcess/WebPage/WebPage.cpp10
-rw-r--r--Source/WebKit2/WebProcess/WebPage/WebPage.h1
-rw-r--r--Source/WebKit2/WebProcess/WebPage/qt/WebInspectorUIQt.cpp (renamed from Source/WebKit2/WebProcess/WebPage/qt/WebInspectorQt.cpp)9
-rw-r--r--Source/WebKit2/WebProcess/WebPage/qt/WebPageQt.cpp4
-rw-r--r--Source/WebKit2/WebProcess/qt/QtBuiltinBundle.cpp5
-rw-r--r--Source/WebKit2/WebProcess/qt/QtBuiltinBundle.h3
-rw-r--r--Source/WebKit2/WebProcess/qt/QtNetworkAccessManager.h2
-rw-r--r--Source/WebKit2/WebProcess/qt/QtNetworkReply.cpp3
-rw-r--r--Source/WebKit2/WebProcess/qt/WebProcessMainQt.cpp19
-rw-r--r--Source/WebKit2/WebProcess/qt/WebProcessQt.cpp16
112 files changed, 695 insertions, 706 deletions
diff --git a/Source/WebKit2/Shared/Downloads/qt/DownloadQt.cpp b/Source/WebKit2/NetworkProcess/Downloads/qt/DownloadQt.cpp
index 889e4712f..9747f5210 100644
--- a/Source/WebKit2/Shared/Downloads/qt/DownloadQt.cpp
+++ b/Source/WebKit2/NetworkProcess/Downloads/qt/DownloadQt.cpp
@@ -41,18 +41,18 @@ namespace WebKit {
void Download::start()
{
- QNetworkAccessManager* manager = WebProcess::shared().networkAccessManager();
+ QNetworkAccessManager* manager = WebProcess::singleton().networkAccessManager();
ASSERT(manager);
ASSERT(!m_qtDownloader);
- m_qtDownloader = new QtFileDownloader(this, adoptPtr(manager->get(m_request.toNetworkRequest())));
+ m_qtDownloader = new QtFileDownloader(this, manager->get(m_request.toNetworkRequest()));
m_qtDownloader->init();
}
void Download::startWithHandle(ResourceHandle* handle, const ResourceResponse& resp)
{
ASSERT(!m_qtDownloader);
- m_qtDownloader = new QtFileDownloader(this, adoptPtr(handle->getInternal()->m_job->release()));
+ m_qtDownloader = new QtFileDownloader(this, handle->getInternal()->m_job->release());
m_qtDownloader->init();
}
@@ -69,11 +69,6 @@ void Download::platformInvalidate()
m_qtDownloader = 0;
}
-void Download::didDecideDestination(const String& destination, bool allowOverwrite)
-{
- notImplemented();
-}
-
void Download::startTransfer(const String& destination)
{
m_qtDownloader->startTransfer(destination);
@@ -84,19 +79,4 @@ void Download::platformDidFinish()
notImplemented();
}
-void Download::receivedCredential(const AuthenticationChallenge& authenticationChallenge, const Credential& credential)
-{
- notImplemented();
-}
-
-void Download::receivedRequestToContinueWithoutCredential(const AuthenticationChallenge& authenticationChallenge)
-{
- notImplemented();
-}
-
-void Download::receivedCancellation(const AuthenticationChallenge& authenticationChallenge)
-{
- notImplemented();
-}
-
} // namespace WebKit
diff --git a/Source/WebKit2/Shared/Downloads/qt/QtFileDownloader.cpp b/Source/WebKit2/NetworkProcess/Downloads/qt/QtFileDownloader.cpp
index f16b0c2e5..0ec67704c 100644
--- a/Source/WebKit2/Shared/Downloads/qt/QtFileDownloader.cpp
+++ b/Source/WebKit2/NetworkProcess/Downloads/qt/QtFileDownloader.cpp
@@ -37,7 +37,7 @@ using namespace WTF;
namespace WebKit {
-QtFileDownloader::QtFileDownloader(Download* download, PassOwnPtr<QNetworkReply> reply)
+QtFileDownloader::QtFileDownloader(Download* download, QNetworkReply* reply)
: m_download(download)
, m_reply(reply)
, m_error(QNetworkReply::NoError)
@@ -102,7 +102,7 @@ void QtFileDownloader::startTransfer(const QString& decidedFilePath)
return;
}
- OwnPtr<QFile> downloadFile = adoptPtr(new QFile(decidedFilePath));
+ auto downloadFile = std::make_unique<QFile>(decidedFilePath);
if (!downloadFile->open(QIODevice::WriteOnly | QIODevice::Truncate)) {
abortDownloadWritingAndEmitError(QtFileDownloader::DownloadErrorCannotOpenFile);
@@ -111,7 +111,7 @@ void QtFileDownloader::startTransfer(const QString& decidedFilePath)
// Assigning to m_destinationFile flags that either error or
// finished shall be called in the end.
- m_destinationFile = downloadFile.release();
+ m_destinationFile = WTFMove(downloadFile);
m_download->didCreateDestination(m_destinationFile->fileName());
@@ -132,7 +132,7 @@ void QtFileDownloader::abortDownloadWritingAndEmitError(QtFileDownloader::Downlo
// On network failures it's QNetworkReplyHandler::errorForReply who will handle errors.
if (errorCode == QtFileDownloader::DownloadErrorNetworkFailure) {
- m_download->didFail(QNetworkReplyHandler::errorForReply(m_reply.get()), CoreIPC::DataReference(0, 0));
+ m_download->didFail(QNetworkReplyHandler::errorForReply(m_reply.get()), IPC::DataReference(0, 0));
return;
}
@@ -160,9 +160,9 @@ void QtFileDownloader::abortDownloadWritingAndEmitError(QtFileDownloader::Downlo
ASSERT_NOT_REACHED();
}
- ResourceError downloadError("Download", errorCode, m_reply->url().toString(), translatedErrorMessage);
+ ResourceError downloadError("Download", errorCode, m_reply->url(), translatedErrorMessage);
- m_download->didFail(downloadError, CoreIPC::DataReference(0, 0));
+ m_download->didFail(downloadError, IPC::DataReference(0, 0));
}
void QtFileDownloader::handleDownloadResponse()
@@ -224,7 +224,7 @@ void QtFileDownloader::onFinished()
if (!m_destinationFile)
return;
- m_destinationFile.clear();
+ m_destinationFile = nullptr;
if (m_error == QNetworkReply::NoError)
m_download->didFinish();
diff --git a/Source/WebKit2/Shared/Downloads/qt/QtFileDownloader.h b/Source/WebKit2/NetworkProcess/Downloads/qt/QtFileDownloader.h
index f688063af..2b096760c 100644
--- a/Source/WebKit2/Shared/Downloads/qt/QtFileDownloader.h
+++ b/Source/WebKit2/NetworkProcess/Downloads/qt/QtFileDownloader.h
@@ -23,8 +23,6 @@
#include <QNetworkReply>
#include <QNetworkRequest>
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
QT_BEGIN_NAMESPACE
class QFile;
@@ -42,7 +40,7 @@ class Download;
class QtFileDownloader : public QObject {
Q_OBJECT
public:
- QtFileDownloader(Download*, PassOwnPtr<QNetworkReply>);
+ QtFileDownloader(Download*, QNetworkReply*);
virtual ~QtFileDownloader();
void cancel();
void init();
@@ -69,8 +67,8 @@ private:
void handleDownloadResponse();
Download* m_download;
- OwnPtr<QNetworkReply> m_reply;
- OwnPtr<QFile> m_destinationFile;
+ std::unique_ptr<QNetworkReply> m_reply;
+ std::unique_ptr<QFile> m_destinationFile;
QNetworkReply::NetworkError m_error;
bool m_headersRead;
};
diff --git a/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp b/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp
index b45e4d2bd..cef04f346 100644
--- a/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp
+++ b/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp
@@ -377,8 +377,8 @@ void NetworkResourceLoader::didFailLoading(const ResourceError& error)
if (isSynchronous()) {
m_synchronousLoadData->error = error;
sendReplyToSynchronousRequest(*m_synchronousLoadData, nullptr);
- } else
- send(Messages::WebResourceLoader::DidFailResourceLoad(error));
+ } else if (auto* connection = messageSenderConnection())
+ connection->send(Messages::WebResourceLoader::DidFailResourceLoad(error), messageSenderDestinationID(), 0);
cleanup();
}
diff --git a/Source/WebKit2/Platform/IPC/Connection.h b/Source/WebKit2/Platform/IPC/Connection.h
index f339067af..14cc8851d 100644
--- a/Source/WebKit2/Platform/IPC/Connection.h
+++ b/Source/WebKit2/Platform/IPC/Connection.h
@@ -341,9 +341,7 @@ private:
bool processMessage();
Vector<uint8_t> m_readBuffer;
- size_t m_readBufferSize;
Vector<int> m_fileDescriptors;
- size_t m_fileDescriptorsSize;
int m_socketDescriptor;
#if PLATFORM(GTK)
GSocketMonitor m_socketMonitor;
diff --git a/Source/WebKit2/Platform/IPC/unix/ConnectionUnix.cpp b/Source/WebKit2/Platform/IPC/unix/ConnectionUnix.cpp
index c39086113..71f2e252f 100644
--- a/Source/WebKit2/Platform/IPC/unix/ConnectionUnix.cpp
+++ b/Source/WebKit2/Platform/IPC/unix/ConnectionUnix.cpp
@@ -135,10 +135,8 @@ private:
void Connection::platformInitialize(Identifier identifier)
{
m_socketDescriptor = identifier;
- m_readBuffer.resize(messageMaxSize);
- m_readBufferSize = 0;
- m_fileDescriptors.resize(attachmentMaxAmount);
- m_fileDescriptorsSize = 0;
+ m_readBuffer.reserveInitialCapacity(messageMaxSize);
+ m_fileDescriptors.reserveInitialCapacity(attachmentMaxAmount);
#if PLATFORM(QT)
m_socketNotifier = 0;
@@ -193,7 +191,7 @@ private:
bool Connection::processMessage()
{
- if (m_readBufferSize < sizeof(MessageInfo))
+ if (m_readBuffer.size() < sizeof(MessageInfo))
return false;
uint8_t* messageData = m_readBuffer.data();
@@ -202,7 +200,7 @@ bool Connection::processMessage()
messageData += sizeof(messageInfo);
size_t messageLength = sizeof(MessageInfo) + messageInfo.attachmentCount() * sizeof(AttachmentInfo) + (messageInfo.isMessageBodyIsOutOfLine() ? 0 : messageInfo.bodySize());
- if (m_readBufferSize < messageLength)
+ if (m_readBuffer.size() < messageLength)
return false;
size_t attachmentFileDescriptorCount = 0;
@@ -283,25 +281,25 @@ bool Connection::processMessage()
processIncomingMessage(WTFMove(decoder));
- if (m_readBufferSize > messageLength) {
- memmove(m_readBuffer.data(), m_readBuffer.data() + messageLength, m_readBufferSize - messageLength);
- m_readBufferSize -= messageLength;
+ if (m_readBuffer.size() > messageLength) {
+ memmove(m_readBuffer.data(), m_readBuffer.data() + messageLength, m_readBuffer.size() - messageLength);
+ m_readBuffer.shrink(m_readBuffer.size() - messageLength);
} else
- m_readBufferSize = 0;
+ m_readBuffer.shrink(0);
if (attachmentFileDescriptorCount) {
- if (m_fileDescriptorsSize > attachmentFileDescriptorCount) {
- memmove(m_fileDescriptors.data(), m_fileDescriptors.data() + attachmentFileDescriptorCount, (m_fileDescriptorsSize - attachmentFileDescriptorCount) * sizeof(int));
- m_fileDescriptorsSize -= attachmentFileDescriptorCount;
+ if (m_fileDescriptors.size() > attachmentFileDescriptorCount) {
+ memmove(m_fileDescriptors.data(), m_fileDescriptors.data() + attachmentFileDescriptorCount, (m_fileDescriptors.size() - attachmentFileDescriptorCount) * sizeof(int));
+ m_fileDescriptors.shrink(m_fileDescriptors.size() - attachmentFileDescriptorCount);
} else
- m_fileDescriptorsSize = 0;
+ m_fileDescriptors.shrink(0);
}
return true;
}
-static ssize_t readBytesFromSocket(int socketDescriptor, uint8_t* buffer, int count, int* fileDescriptors, size_t* fileDescriptorsCount)
+static ssize_t readBytesFromSocket(int socketDescriptor, Vector<uint8_t>& buffer, Vector<int>& fileDescriptors)
{
struct msghdr message;
memset(&message, 0, sizeof(message));
@@ -314,8 +312,10 @@ static ssize_t readBytesFromSocket(int socketDescriptor, uint8_t* buffer, int co
memset(attachmentDescriptorBuffer.get(), 0, sizeof(char) * message.msg_controllen);
message.msg_control = attachmentDescriptorBuffer.get();
- iov[0].iov_base = buffer;
- iov[0].iov_len = count;
+ size_t previousBufferSize = buffer.size();
+ buffer.grow(buffer.capacity());
+ iov[0].iov_base = buffer.data() + previousBufferSize;
+ iov[0].iov_len = buffer.size() - previousBufferSize;
message.msg_iov = iov;
message.msg_iovlen = 1;
@@ -327,33 +327,29 @@ static ssize_t readBytesFromSocket(int socketDescriptor, uint8_t* buffer, int co
if (errno == EINTR)
continue;
+ buffer.shrink(previousBufferSize);
return -1;
}
- bool found = false;
struct cmsghdr* controlMessage;
for (controlMessage = CMSG_FIRSTHDR(&message); controlMessage; controlMessage = CMSG_NXTHDR(&message, controlMessage)) {
if (controlMessage->cmsg_level == SOL_SOCKET && controlMessage->cmsg_type == SCM_RIGHTS) {
- *fileDescriptorsCount = (controlMessage->cmsg_len - CMSG_LEN(0)) / sizeof(int);
- memcpy(fileDescriptors, CMSG_DATA(controlMessage), sizeof(int) * *fileDescriptorsCount);
-
- for (size_t i = 0; i < *fileDescriptorsCount; ++i) {
- while (fcntl(fileDescriptors[i], F_SETFD, FD_CLOEXEC) == -1) {
- if (errno != EINTR) {
- ASSERT_NOT_REACHED();
- break;
- }
+ size_t previousFileDescriptorsSize = fileDescriptors.size();
+ size_t fileDescriptorsCount = (controlMessage->cmsg_len - CMSG_LEN(0)) / sizeof(int);
+ fileDescriptors.grow(fileDescriptors.size() + fileDescriptorsCount);
+ memcpy(fileDescriptors.data() + previousFileDescriptorsSize, CMSG_DATA(controlMessage), sizeof(int) * fileDescriptorsCount);
+
+ for (size_t i = 0; i < fileDescriptorsCount; ++i) {
+ if (!setCloseOnExec(fileDescriptors[previousFileDescriptorsSize + i])) {
+ ASSERT_NOT_REACHED();
+ break;
}
}
-
- found = true;
break;
}
}
- if (!found)
- *fileDescriptorsCount = 0;
-
+ buffer.shrink(previousBufferSize + bytesRead);
return bytesRead;
}
@@ -367,10 +363,7 @@ void Connection::readyReadHandler()
#endif
while (true) {
- size_t fileDescriptorsCount = 0;
- size_t bytesToRead = m_readBuffer.size() - m_readBufferSize;
- ssize_t bytesRead = readBytesFromSocket(m_socketDescriptor, m_readBuffer.data() + m_readBufferSize, bytesToRead,
- m_fileDescriptors.data() + m_fileDescriptorsSize, &fileDescriptorsCount);
+ ssize_t bytesRead = readBytesFromSocket(m_socketDescriptor, m_readBuffer, m_fileDescriptors);
if (bytesRead < 0) {
// EINTR was already handled by readBytesFromSocket.
@@ -384,9 +377,6 @@ void Connection::readyReadHandler()
return;
}
- m_readBufferSize += bytesRead;
- m_fileDescriptorsSize += fileDescriptorsCount;
-
if (!bytesRead) {
connectionDidClose();
return;
@@ -586,14 +576,14 @@ Connection::SocketPair Connection::createPlatformConnection(unsigned options)
if (options & SetCloexecOnServer) {
// Don't expose the child socket to the parent process.
- while (fcntl(sockets[1], F_SETFD, FD_CLOEXEC) == -1)
- RELEASE_ASSERT(errno != EINTR);
+ if (!setCloseOnExec(sockets[1]))
+ RELEASE_ASSERT_NOT_REACHED();
}
if (options & SetCloexecOnClient) {
// Don't expose the parent socket to potential future children.
- while (fcntl(sockets[0], F_SETFD, FD_CLOEXEC) == -1)
- RELEASE_ASSERT(errno != EINTR);
+ if (!setCloseOnExec(sockets[0]))
+ RELEASE_ASSERT_NOT_REACHED();
}
SocketPair socketPair = { sockets[0], sockets[1] };
diff --git a/Source/WebKit2/Platform/SharedMemory.h b/Source/WebKit2/Platform/SharedMemory.h
index 4fd58711f..165ecfae5 100644
--- a/Source/WebKit2/Platform/SharedMemory.h
+++ b/Source/WebKit2/Platform/SharedMemory.h
@@ -28,6 +28,7 @@
#include <wtf/Forward.h>
#include <wtf/Noncopyable.h>
+#include <wtf/Optional.h>
#include <wtf/RefCounted.h>
#if PLATFORM(QT) || PLATFORM(GTK) || PLATFORM(EFL)
@@ -122,7 +123,7 @@ private:
Protection m_protection;
#if USE(UNIX_DOMAIN_SOCKETS)
- int m_fileDescriptor;
+ Optional<int> m_fileDescriptor;
bool m_isWrappingMap { false };
#elif OS(DARWIN)
mach_port_t m_port;
diff --git a/Source/WebKit2/Platform/unix/SharedMemoryUnix.cpp b/Source/WebKit2/Platform/unix/SharedMemoryUnix.cpp
index 56835e766..220592fd1 100644
--- a/Source/WebKit2/Platform/unix/SharedMemoryUnix.cpp
+++ b/Source/WebKit2/Platform/unix/SharedMemoryUnix.cpp
@@ -152,11 +152,14 @@ RefPtr<SharedMemory> SharedMemory::map(const Handle& handle, Protection protecti
{
ASSERT(!handle.isNull());
- void* data = mmap(0, handle.m_attachment.size(), accessModeMMap(protection), MAP_SHARED, handle.m_attachment.fileDescriptor(), 0);
+ int fd = handle.m_attachment.releaseFileDescriptor();
+ void* data = mmap(0, handle.m_attachment.size(), accessModeMMap(protection), MAP_SHARED, fd, 0);
+ closeWithRetry(fd);
if (data == MAP_FAILED)
return nullptr;
- RefPtr<SharedMemory> instance = wrapMap(data, handle.m_attachment.size(), handle.m_attachment.releaseFileDescriptor());
+ RefPtr<SharedMemory> instance = wrapMap(data, handle.m_attachment.size(), -1);
+ instance->m_fileDescriptor = Nullopt;
instance->m_isWrappingMap = false;
return instance;
}
@@ -173,33 +176,26 @@ RefPtr<SharedMemory> SharedMemory::wrapMap(void* data, size_t size, int fileDesc
SharedMemory::~SharedMemory()
{
- if (!m_isWrappingMap) {
- munmap(m_data, m_size);
- closeWithRetry(m_fileDescriptor);
- }
+ if (m_isWrappingMap)
+ return;
+
+ munmap(m_data, m_size);
+ if (m_fileDescriptor)
+ closeWithRetry(m_fileDescriptor.value());
}
bool SharedMemory::createHandle(Handle& handle, Protection)
{
ASSERT_ARG(handle, handle.isNull());
+ ASSERT(m_fileDescriptor);
// FIXME: Handle the case where the passed Protection is ReadOnly.
// See https://bugs.webkit.org/show_bug.cgi?id=131542.
- int duplicatedHandle;
- while ((duplicatedHandle = dup(m_fileDescriptor)) == -1) {
- if (errno != EINTR) {
- ASSERT_NOT_REACHED();
- return false;
- }
- }
-
- while (fcntl(duplicatedHandle, F_SETFD, FD_CLOEXEC) == -1) {
- if (errno != EINTR) {
- ASSERT_NOT_REACHED();
- closeWithRetry(duplicatedHandle);
- return false;
- }
+ int duplicatedHandle = dupCloseOnExec(m_fileDescriptor.value());
+ if (duplicatedHandle == -1) {
+ ASSERT_NOT_REACHED();
+ return false;
}
handle.m_attachment = IPC::Attachment(duplicatedHandle, m_size);
return true;
diff --git a/Source/WebKit2/PlatformQt.cmake b/Source/WebKit2/PlatformQt.cmake
new file mode 100644
index 000000000..38080b1a4
--- /dev/null
+++ b/Source/WebKit2/PlatformQt.cmake
@@ -0,0 +1,260 @@
+set(WebKit2_WebProcess_OUTPUT_NAME QtWebProcess)
+set(WebKit2_NetworkProcess_OUTPUT_NAME QtWebNetworkProcess)
+set(WebKit2_PluginProcess_OUTPUT_NAME QtWebPluginProcess)
+set(WebKit2_DatabaseProcess_OUTPUT_NAME QtWebDatabaseProcess)
+
+#set(WebKit2_USE_PREFIX_HEADER ON)
+
+# FIXME: It should be in WebKitFS actually
+set(FORWARDING_HEADERS_DIR "${DERIVED_SOURCES_DIR}/ForwardingHeaders")
+
+list(APPEND WebKit2_INCLUDE_DIRECTORIES
+ "${FORWARDING_HEADERS_DIR}"
+
+ "${WEBCORE_DIR}/platform/graphics/opentype"
+ "${WEBCORE_DIR}/platform/graphics/qt"
+ "${WEBCORE_DIR}/platform/network/qt"
+ "${WEBCORE_DIR}/platform/qt"
+
+ # The WebKit2 Qt APIs depend on qwebkitglobal.h, which lives in WebKit
+ "${WEBKIT_DIR}/qt/Api"
+
+ "${WEBKIT2_DIR}/NetworkProcess/CustomProtocols/qt"
+
+ "${WEBKIT2_DIR}/Shared/CoordinatedGraphics"
+ "${WEBKIT2_DIR}/Shared/qt"
+ "${WEBKIT2_DIR}/Shared/unix"
+
+ "${WEBKIT2_DIR}/UIProcess/API/C/qt"
+ "${WEBKIT2_DIR}/UIProcess/API/qt"
+ "${WEBKIT2_DIR}/UIProcess/API/cpp/qt"
+ "${WEBKIT2_DIR}/UIProcess/CoordinatedGraphics"
+ "${WEBKIT2_DIR}/UIProcess/InspectorServer/qt"
+ "${WEBKIT2_DIR}/UIProcess/gstreamer"
+ "${WEBKIT2_DIR}/UIProcess/qt"
+ "${WEBKIT2_DIR}/WebProcess/WebCoreSupport/qt"
+ "${WEBKIT2_DIR}/WebProcess/WebPage/CoordinatedGraphics"
+ "${WEBKIT2_DIR}/WebProcess/qt"
+)
+
+list(APPEND WebKit2_SOURCES
+ NetworkProcess/CustomProtocols/qt/CustomProtocolManagerImpl.cpp
+ NetworkProcess/CustomProtocols/qt/CustomProtocolManagerQt.cpp
+
+ NetworkProcess/Downloads/qt/DownloadQt.cpp
+ NetworkProcess/Downloads/qt/QtFileDownloader.cpp
+
+ NetworkProcess/qt/NetworkProcessMainQt.cpp
+ NetworkProcess/qt/NetworkProcessQt.cpp
+ NetworkProcess/qt/RemoteNetworkingContextQt.cpp
+
+ Platform/qt/LoggingQt.cpp
+ Platform/qt/ModuleQt.cpp
+
+ PluginProcess/qt/PluginControllerProxyQt.cpp
+ PluginProcess/qt/PluginProcessMainQt.cpp
+ PluginProcess/qt/PluginProcessQt.cpp
+
+ Shared/API/c/qt/WKImageQt.cpp
+
+ Shared/Authentication/qt/AuthenticationManagerQt.cpp
+
+ Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp
+ Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp
+ Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp
+ Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp
+
+ Shared/qt/ArgumentCodersQt.cpp
+ Shared/qt/NativeWebKeyboardEventQt.cpp
+ Shared/qt/NativeWebMouseEventQt.cpp
+ Shared/qt/NativeWebTouchEventQt.cpp
+ Shared/qt/NativeWebWheelEventQt.cpp
+ Shared/qt/ProcessExecutablePathQt.cpp
+ Shared/qt/QtNetworkReplyData.cpp
+ Shared/qt/QtNetworkRequestData.cpp
+ Shared/qt/ShareableBitmapQt.cpp
+ Shared/qt/WebCoreArgumentCodersQt.cpp
+ Shared/qt/WebEventFactoryQt.cpp
+
+ Shared/unix/ChildProcessMain.cpp
+
+ UIProcess/BackingStore.cpp
+ UIProcess/DefaultUndoController.cpp
+ UIProcess/DrawingAreaProxyImpl.cpp
+ UIProcess/LegacySessionStateCodingNone.cpp
+
+ UIProcess/API/C/qt/WKIconDatabaseQt.cpp
+
+ UIProcess/API/cpp/qt/WKStringQt.cpp
+ UIProcess/API/cpp/qt/WKURLQt.cpp
+
+ UIProcess/API/qt/qquicknetworkreply.cpp
+ UIProcess/API/qt/qquicknetworkrequest.cpp
+ UIProcess/API/qt/qquickurlschemedelegate.cpp
+ UIProcess/API/qt/qquickwebpage.cpp
+ UIProcess/API/qt/qquickwebview.cpp
+ UIProcess/API/qt/qtwebsecurityorigin.cpp
+ UIProcess/API/qt/qwebchannelwebkittransport.cpp
+ UIProcess/API/qt/qwebdownloaditem.cpp
+ UIProcess/API/qt/qwebdownloaditem_p.h
+ UIProcess/API/qt/qwebdownloaditem_p_p.h
+ UIProcess/API/qt/qwebiconimageprovider.cpp
+ UIProcess/API/qt/qwebkittest.cpp
+ UIProcess/API/qt/qwebloadrequest.cpp
+ UIProcess/API/qt/qwebnavigationhistory.cpp
+ UIProcess/API/qt/qwebnavigationrequest.cpp
+ UIProcess/API/qt/qwebpermissionrequest.cpp
+ UIProcess/API/qt/qwebpreferences.cpp
+
+ UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp
+ UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp
+ UIProcess/CoordinatedGraphics/PageViewportController.cpp
+ UIProcess/CoordinatedGraphics/WebPageProxyCoordinatedGraphics.cpp
+
+ UIProcess/InspectorServer/qt/WebInspectorServerQt.cpp
+ UIProcess/InspectorServer/qt/WebSocketServerQt.cpp
+
+ UIProcess/Launcher/qt/ProcessLauncherQt.cpp
+
+ UIProcess/Network/CustomProtocols/qt/CustomProtocolManagerProxyQt.cpp
+
+ UIProcess/Plugins/qt/PluginProcessProxyQt.cpp
+
+ UIProcess/Storage/StorageManager.cpp
+
+ UIProcess/WebsiteData/unix/WebsiteDataStoreUnix.cpp
+
+ UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.cpp
+ UIProcess/gstreamer/WebPageProxyGStreamer.cpp
+
+ UIProcess/qt/BackingStoreQt.cpp
+ UIProcess/qt/PageViewportControllerClientQt.cpp
+ UIProcess/qt/QtDialogRunner.cpp
+ UIProcess/qt/QtDownloadManager.cpp
+ UIProcess/qt/QtGestureRecognizer.cpp
+ UIProcess/qt/QtPageClient.cpp
+ UIProcess/qt/QtPanGestureRecognizer.cpp
+ UIProcess/qt/QtPinchGestureRecognizer.cpp
+ UIProcess/qt/QtTapGestureRecognizer.cpp
+ UIProcess/qt/QtWebContext.cpp
+ UIProcess/qt/QtWebError.cpp
+ UIProcess/qt/QtWebIconDatabaseClient.cpp
+ UIProcess/qt/QtWebPageEventHandler.cpp
+ UIProcess/qt/QtWebPagePolicyClient.cpp
+ UIProcess/qt/QtWebPageSGNode.cpp
+ UIProcess/qt/QtWebPageUIClient.cpp
+ UIProcess/qt/TextCheckerQt.cpp
+ UIProcess/qt/WebColorPickerQt.cpp
+ UIProcess/qt/WebContextMenuProxyQt.cpp
+ UIProcess/qt/WebFullScreenManagerProxyQt.cpp
+ UIProcess/qt/WebGeolocationProviderQt.cpp
+ UIProcess/qt/WebInspectorProxyQt.cpp
+ UIProcess/qt/WebPageProxyQt.cpp
+ UIProcess/qt/WebPopupMenuProxyQt.cpp
+ UIProcess/qt/WebPreferencesQt.cpp
+ UIProcess/qt/WebProcessPoolQt.cpp
+
+ WebProcess/Cookies/qt/WebCookieManagerQt.cpp
+
+ WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp
+
+ WebProcess/Plugins/Netscape/qt/PluginProxyQt.cpp
+
+ WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp
+ WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp
+ WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp
+ WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp
+ WebProcess/WebCoreSupport/qt/WebPopupMenuQt.cpp
+
+ WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp
+ WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp
+ WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp
+
+ WebProcess/WebPage/gstreamer/WebPageGStreamer.cpp
+
+ WebProcess/WebPage/qt/WebInspectorUIQt.cpp
+ WebProcess/WebPage/qt/WebPageQt.cpp
+
+ WebProcess/qt/QtBuiltinBundle.cpp
+ WebProcess/qt/QtBuiltinBundlePage.cpp
+ WebProcess/qt/QtNetworkAccessManager.cpp
+ WebProcess/qt/QtNetworkReply.cpp
+ WebProcess/qt/SeccompFiltersWebProcessQt.cpp
+ WebProcess/qt/WebProcessMainQt.cpp
+ WebProcess/qt/WebProcessQt.cpp
+)
+
+if (APPLE)
+ list(APPEND WebKit2_INCLUDE_DIRECTORIES
+ "${WEBKIT2_DIR}/Platform/IPC/mac"
+ "${WEBKIT2_DIR}/Platform/mac"
+ )
+ list(APPEND WebKit2_SOURCES
+ Platform/IPC/mac/ConnectionMac.mm
+
+ Platform/mac/MachUtilities.cpp
+ Platform/mac/SharedMemoryMac.cpp
+ )
+elseif (WIN32)
+ list(APPEND WebKit2_SOURCES
+ Platform/IPC/win/ConnectionWin.cpp
+
+ Platform/win/SharedMemoryWin.cpp
+ )
+else ()
+ list(APPEND WebKit2_SOURCES
+ Platform/IPC/unix/AttachmentUnix.cpp
+ Platform/IPC/unix/ConnectionUnix.cpp
+
+ Platform/unix/SharedMemoryUnix.cpp
+ )
+endif ()
+
+list(APPEND WebKit2_SYSTEM_INCLUDE_DIRECTORIES
+ ${GSTREAMER_INCLUDE_DIRS}
+ ${Qt5Quick_INCLUDE_DIRS}
+ ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
+)
+
+list(APPEND WebKit2_LIBRARIES
+ ${Qt5Positioning_LIBRARIES}
+ ${Qt5Quick_LIBRARIES}
+)
+
+list(APPEND WebKit2_MESSAGES_IN_FILES
+ UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in
+
+ WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.messages.in
+)
+
+list(APPEND WebProcess_SOURCES
+ qt/MainQt.cpp
+)
+
+# FIXME: Allow building without widgets
+list(APPEND WebProcess_LIBRARIES
+ Qt5::Widgets
+ WebKitWidgets
+)
+
+list(APPEND NetworkProcess_SOURCES
+ NetworkProcess/EntryPoint/qt/NetworkProcessMain.cpp
+)
+
+# FIXME
+list(APPEND DatabaseProcess_SOURCES
+ DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp
+)
+
+list(APPEND PluginProcess_SOURCES
+ qt/PluginMainQt.cpp
+)
+
+add_custom_target(WebKit2-forwarding-headers
+ COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl --include-path ${WEBKIT2_DIR} --output ${FORWARDING_HEADERS_DIR} --platform qt
+)
+
+set(WEBKIT2_EXTRA_DEPENDENCIES
+ WebKit2-forwarding-headers
+)
+
diff --git a/Source/WebKit2/Shared/API/c/qt/WKImageQt.h b/Source/WebKit2/Shared/API/c/qt/WKImageQt.h
index 5abef4818..6bcc5a432 100644
--- a/Source/WebKit2/Shared/API/c/qt/WKImageQt.h
+++ b/Source/WebKit2/Shared/API/c/qt/WKImageQt.h
@@ -23,8 +23,8 @@
#define WKImageQt_h
#include <QImage>
-#include <WebKit2/WKBase.h>
-#include <WebKit2/WKImage.h>
+#include <WebKit/WKBase.h>
+#include <WebKit/WKImage.h>
WK_EXPORT QImage WKImageCreateQImage(WKImageRef image);
WK_EXPORT WKImageRef WKImageCreateFromQImage(const QImage& image);
diff --git a/Source/WebKit2/Shared/LayerTreeContext.h b/Source/WebKit2/Shared/LayerTreeContext.h
index f39af10e8..43314c215 100644
--- a/Source/WebKit2/Shared/LayerTreeContext.h
+++ b/Source/WebKit2/Shared/LayerTreeContext.h
@@ -52,11 +52,7 @@ public:
bool isEmpty() const;
-#if PLATFORM(QT)
- uint32_t coordinatedLayerID;
-#else
uint64_t contextID;
-#endif
};
bool operator==(const LayerTreeContext&, const LayerTreeContext&);
diff --git a/Source/WebKit2/Shared/qt/ArgumentCodersQt.cpp b/Source/WebKit2/Shared/qt/ArgumentCodersQt.cpp
index 44c855b6b..766568519 100644
--- a/Source/WebKit2/Shared/qt/ArgumentCodersQt.cpp
+++ b/Source/WebKit2/Shared/qt/ArgumentCodersQt.cpp
@@ -29,7 +29,7 @@
using namespace WebCore;
-namespace CoreIPC {
+namespace IPC {
typedef HashMap<String , Vector<uint8_t> > MIMEDataHashMap;
diff --git a/Source/WebKit2/Shared/qt/ArgumentCodersQt.h b/Source/WebKit2/Shared/qt/ArgumentCodersQt.h
index 8d66e57f3..9b3bc9c2d 100644
--- a/Source/WebKit2/Shared/qt/ArgumentCodersQt.h
+++ b/Source/WebKit2/Shared/qt/ArgumentCodersQt.h
@@ -24,7 +24,7 @@
#include "ArgumentEncoder.h"
#include "DragData.h"
-namespace CoreIPC {
+namespace IPC {
void encode(ArgumentEncoder&, const WebCore::DragData&);
bool decode(ArgumentDecoder&, WebCore::DragData&);
diff --git a/Source/WebKit2/Shared/qt/LayerTreeContextQt.cpp b/Source/WebKit2/Shared/qt/LayerTreeContextQt.cpp
deleted file mode 100644
index a2f01f953..000000000
--- a/Source/WebKit2/Shared/qt/LayerTreeContextQt.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "LayerTreeContext.h"
-
-#include "ArgumentDecoder.h"
-#include "ArgumentEncoder.h"
-
-namespace WebKit {
-
-LayerTreeContext::LayerTreeContext()
- : coordinatedLayerID(0)
-{
-}
-
-LayerTreeContext::~LayerTreeContext()
-{
-}
-
-void LayerTreeContext::encode(CoreIPC::ArgumentEncoder& encoder) const
-{
- encoder << coordinatedLayerID;
-}
-
-bool LayerTreeContext::decode(CoreIPC::ArgumentDecoder& decoder, LayerTreeContext& context)
-{
- return decoder.decode(context.coordinatedLayerID);
-}
-
-bool LayerTreeContext::isEmpty() const
-{
- return !coordinatedLayerID;
-}
-
-bool operator==(const LayerTreeContext& a, const LayerTreeContext& b)
-{
- return a.coordinatedLayerID == b.coordinatedLayerID;
-}
-
-} // namespace WebKit
diff --git a/Source/WebKit2/Shared/qt/NativeWebKeyboardEventQt.cpp b/Source/WebKit2/Shared/qt/NativeWebKeyboardEventQt.cpp
index 9a2d6663b..996b98ae2 100644
--- a/Source/WebKit2/Shared/qt/NativeWebKeyboardEventQt.cpp
+++ b/Source/WebKit2/Shared/qt/NativeWebKeyboardEventQt.cpp
@@ -26,7 +26,7 @@
#include "config.h"
#include "NativeWebKeyboardEvent.h"
-#include "WebEventFactoryQt.h"
+#include "WebEventFactory.h"
namespace WebKit {
diff --git a/Source/WebKit2/Shared/qt/NativeWebMouseEventQt.cpp b/Source/WebKit2/Shared/qt/NativeWebMouseEventQt.cpp
index e8fd39ce7..f30dccbbb 100644
--- a/Source/WebKit2/Shared/qt/NativeWebMouseEventQt.cpp
+++ b/Source/WebKit2/Shared/qt/NativeWebMouseEventQt.cpp
@@ -26,7 +26,7 @@
#include "config.h"
#include "NativeWebMouseEvent.h"
-#include "WebEventFactoryQt.h"
+#include "WebEventFactory.h"
namespace WebKit {
diff --git a/Source/WebKit2/Shared/qt/NativeWebTouchEventQt.cpp b/Source/WebKit2/Shared/qt/NativeWebTouchEventQt.cpp
index 78c0883d6..5792ef623 100644
--- a/Source/WebKit2/Shared/qt/NativeWebTouchEventQt.cpp
+++ b/Source/WebKit2/Shared/qt/NativeWebTouchEventQt.cpp
@@ -26,7 +26,7 @@
#include "config.h"
#include "NativeWebTouchEvent.h"
-#include "WebEventFactoryQt.h"
+#include "WebEventFactory.h"
namespace WebKit {
diff --git a/Source/WebKit2/Shared/qt/NativeWebWheelEventQt.cpp b/Source/WebKit2/Shared/qt/NativeWebWheelEventQt.cpp
index 3c1ba9f8f..21175cdbf 100644
--- a/Source/WebKit2/Shared/qt/NativeWebWheelEventQt.cpp
+++ b/Source/WebKit2/Shared/qt/NativeWebWheelEventQt.cpp
@@ -26,7 +26,7 @@
#include "config.h"
#include "NativeWebWheelEvent.h"
-#include "WebEventFactoryQt.h"
+#include "WebEventFactory.h"
namespace WebKit {
diff --git a/Source/WebKit2/Shared/qt/PlatformCertificateInfo.h b/Source/WebKit2/Shared/qt/PlatformCertificateInfo.h
index c1b9de698..b03b1fcd6 100644
--- a/Source/WebKit2/Shared/qt/PlatformCertificateInfo.h
+++ b/Source/WebKit2/Shared/qt/PlatformCertificateInfo.h
@@ -42,11 +42,11 @@ public:
{
}
- void encode(CoreIPC::ArgumentEncoder&) const
+ void encode(IPC::ArgumentEncoder&) const
{
}
- static bool decode(CoreIPC::ArgumentDecoder&, PlatformCertificateInfo&)
+ static bool decode(IPC::ArgumentDecoder&, PlatformCertificateInfo&)
{
return true;
}
diff --git a/Source/WebKit2/Shared/qt/QtNetworkReplyData.cpp b/Source/WebKit2/Shared/qt/QtNetworkReplyData.cpp
index b835af2b2..22a9b7d44 100644
--- a/Source/WebKit2/Shared/qt/QtNetworkReplyData.cpp
+++ b/Source/WebKit2/Shared/qt/QtNetworkReplyData.cpp
@@ -27,8 +27,8 @@
#include "QtNetworkReplyData.h"
#include "ArgumentCodersQt.h"
-#include "URL.h"
#include "SharedMemory.h"
+#include "URL.h"
#include "WebCoreArgumentCoders.h"
#include <QNetworkAccessManager>
#include <QNetworkRequest>
@@ -41,7 +41,7 @@ QtNetworkReplyData::QtNetworkReplyData()
: m_contentLength(0)
{ }
-void QtNetworkReplyData::encode(CoreIPC::ArgumentEncoder& encoder) const
+void QtNetworkReplyData::encode(IPC::ArgumentEncoder& encoder) const
{
encoder << m_urlString;
encoder << m_contentType;
@@ -50,7 +50,7 @@ void QtNetworkReplyData::encode(CoreIPC::ArgumentEncoder& encoder) const
encoder << m_dataHandle;
}
-bool QtNetworkReplyData::decode(CoreIPC::ArgumentDecoder& decoder, QtNetworkReplyData& destination)
+bool QtNetworkReplyData::decode(IPC::ArgumentDecoder& decoder, QtNetworkReplyData& destination)
{
if (!decoder.decode(destination.m_urlString))
return false;
@@ -66,5 +66,3 @@ bool QtNetworkReplyData::decode(CoreIPC::ArgumentDecoder& decoder, QtNetworkRepl
}
} // namespace WebKit
-
-
diff --git a/Source/WebKit2/Shared/qt/QtNetworkReplyData.h b/Source/WebKit2/Shared/qt/QtNetworkReplyData.h
index 6480fb2f2..19d16c6a7 100644
--- a/Source/WebKit2/Shared/qt/QtNetworkReplyData.h
+++ b/Source/WebKit2/Shared/qt/QtNetworkReplyData.h
@@ -32,7 +32,7 @@
#include <wtf/RefCounted.h>
#include <wtf/text/WTFString.h>
-namespace CoreIPC {
+namespace IPC {
class ArgumentEncoder;
class ArgumentDecoder;
};
@@ -42,8 +42,8 @@ namespace WebKit {
struct QtNetworkReplyData {
QtNetworkReplyData();
- void encode(CoreIPC::ArgumentEncoder&) const;
- static bool decode(CoreIPC::ArgumentDecoder&, QtNetworkReplyData&);
+ void encode(IPC::ArgumentEncoder&) const;
+ static bool decode(IPC::ArgumentDecoder&, QtNetworkReplyData&);
WTF::String m_urlString;
diff --git a/Source/WebKit2/Shared/qt/QtNetworkRequestData.cpp b/Source/WebKit2/Shared/qt/QtNetworkRequestData.cpp
index 5a2877451..a345dd32f 100644
--- a/Source/WebKit2/Shared/qt/QtNetworkRequestData.cpp
+++ b/Source/WebKit2/Shared/qt/QtNetworkRequestData.cpp
@@ -49,14 +49,14 @@ QtNetworkRequestData::QtNetworkRequestData(const QNetworkRequest& request, QNetw
m_replyUuid = QUuid::createUuid().toString();
}
-void QtNetworkRequestData::encode(CoreIPC::ArgumentEncoder& encoder) const
+void QtNetworkRequestData::encode(IPC::ArgumentEncoder& encoder) const
{
encoder << m_scheme;
encoder << m_urlString;
encoder << m_replyUuid;
}
-bool QtNetworkRequestData::decode(CoreIPC::ArgumentDecoder& decoder, QtNetworkRequestData& destination)
+bool QtNetworkRequestData::decode(IPC::ArgumentDecoder& decoder, QtNetworkRequestData& destination)
{
if (!decoder.decode(destination.m_scheme))
return false;
@@ -68,4 +68,3 @@ bool QtNetworkRequestData::decode(CoreIPC::ArgumentDecoder& decoder, QtNetworkRe
}
} // namespace WebKit
-
diff --git a/Source/WebKit2/Shared/qt/QtNetworkRequestData.h b/Source/WebKit2/Shared/qt/QtNetworkRequestData.h
index 22a4a8d4a..2a9b98a4c 100644
--- a/Source/WebKit2/Shared/qt/QtNetworkRequestData.h
+++ b/Source/WebKit2/Shared/qt/QtNetworkRequestData.h
@@ -29,7 +29,7 @@
#include <wtf/RefCounted.h>
#include <wtf/text/WTFString.h>
-namespace CoreIPC {
+namespace IPC {
class ArgumentEncoder;
class ArgumentDecoder;
};
@@ -44,8 +44,8 @@ namespace WebKit {
struct QtNetworkRequestData {
QtNetworkRequestData();
QtNetworkRequestData(const QNetworkRequest&, QNetworkReply*);
- void encode(CoreIPC::ArgumentEncoder&) const;
- static bool decode(CoreIPC::ArgumentDecoder&, QtNetworkRequestData&);
+ void encode(IPC::ArgumentEncoder&) const;
+ static bool decode(IPC::ArgumentDecoder&, QtNetworkRequestData&);
String m_scheme;
String m_urlString;
diff --git a/Source/WebKit2/Shared/qt/WebCoreArgumentCodersQt.cpp b/Source/WebKit2/Shared/qt/WebCoreArgumentCodersQt.cpp
index 35bf22f0b..f0b71844e 100644
--- a/Source/WebKit2/Shared/qt/WebCoreArgumentCodersQt.cpp
+++ b/Source/WebKit2/Shared/qt/WebCoreArgumentCodersQt.cpp
@@ -32,7 +32,7 @@
using namespace WebCore;
-namespace CoreIPC {
+namespace IPC {
void ArgumentCoder<ResourceRequest>::encodePlatformData(ArgumentEncoder& encoder, const ResourceRequest& resourceRequest)
{
@@ -43,17 +43,6 @@ bool ArgumentCoder<ResourceRequest>::decodePlatformData(ArgumentDecoder& decoder
return true;
}
-
-void ArgumentCoder<ResourceResponse>::encodePlatformData(ArgumentEncoder& encoder, const ResourceResponse& resourceResponse)
-{
-}
-
-bool ArgumentCoder<ResourceResponse>::decodePlatformData(ArgumentDecoder& decoder, ResourceResponse& resourceResponse)
-{
- return true;
-}
-
-
void ArgumentCoder<ResourceError>::encodePlatformData(ArgumentEncoder& encoder, const ResourceError& resourceError)
{
}
@@ -63,4 +52,4 @@ bool ArgumentCoder<ResourceError>::decodePlatformData(ArgumentDecoder& decoder,
return true;
}
-} // namespace CoreIPC
+} // namespace IPC
diff --git a/Source/WebKit2/Shared/qt/WebEventFactoryQt.h b/Source/WebKit2/Shared/qt/WebEventFactory.h
index e5e3a101b..e5e3a101b 100644
--- a/Source/WebKit2/Shared/qt/WebEventFactoryQt.h
+++ b/Source/WebKit2/Shared/qt/WebEventFactory.h
diff --git a/Source/WebKit2/Shared/qt/WebEventFactoryQt.cpp b/Source/WebKit2/Shared/qt/WebEventFactoryQt.cpp
index 0240729c0..ebf9d5f43 100644
--- a/Source/WebKit2/Shared/qt/WebEventFactoryQt.cpp
+++ b/Source/WebKit2/Shared/qt/WebEventFactoryQt.cpp
@@ -25,7 +25,8 @@
*/
#include "config.h"
-#include "WebEventFactoryQt.h"
+#include "WebEventFactory.h"
+
#include <QKeyEvent>
#include <QLineF>
#include <QTransform>
@@ -186,13 +187,13 @@ WebTouchEvent WebEventFactory::createWebTouchEvent(const QTouchEvent* event, con
{
WebEvent::Type type = webEventTypeForEvent(event);
WebPlatformTouchPoint::TouchPointState state = static_cast<WebPlatformTouchPoint::TouchPointState>(0);
- unsigned int id;
+ unsigned id;
WebEvent::Modifiers modifiers = modifiersForEvent(event->modifiers());
double timestamp = currentTimeForEvent(event);
const QList<QTouchEvent::TouchPoint>& points = event->touchPoints();
- Vector<WebPlatformTouchPoint, 6> m_touchPoints;
+ Vector<WebPlatformTouchPoint> touchPoints;
for (int i = 0; i < points.count(); ++i) {
const QTouchEvent::TouchPoint& touchPoint = points.at(i);
id = static_cast<unsigned>(touchPoint.id());
@@ -220,10 +221,10 @@ WebTouchEvent WebEventFactory::createWebTouchEvent(const QTouchEvent* event, con
state = WebPlatformTouchPoint::TouchCancelled;
IntSize radius(touchPoint.rect().width()/ 2, touchPoint.rect().height() / 2);
- m_touchPoints.append(WebPlatformTouchPoint(id, state, touchPoint.screenPos().toPoint(), fromItemTransform.map(touchPoint.pos()).toPoint(), radius, 0.0, touchPoint.pressure()));
+ touchPoints.append(WebPlatformTouchPoint(id, state, touchPoint.screenPos().toPoint(), fromItemTransform.map(touchPoint.pos()).toPoint(), radius, 0.0, touchPoint.pressure()));
}
- return WebTouchEvent(type, m_touchPoints, modifiers, timestamp);
+ return WebTouchEvent(type, WTFMove(touchPoints), modifiers, timestamp);
}
#endif
diff --git a/Source/WebKit2/Shared/qt/WebURLRequestQt.cpp b/Source/WebKit2/Shared/qt/WebURLRequestQt.cpp
deleted file mode 100644
index 717a4cc47..000000000
--- a/Source/WebKit2/Shared/qt/WebURLRequestQt.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WebURLRequest.h"
-
-namespace WebKit {
-
-WebURLRequest::WebURLRequest(PlatformRequest)
-{
- ASSERT_NOT_REACHED();
-}
-
-PlatformRequest WebURLRequest::platformRequest() const
-{
- ASSERT_NOT_REACHED();
- return 0;
-}
-
-} // namespace WebKit
diff --git a/Source/WebKit2/Shared/qt/WebURLResponseQt.cpp b/Source/WebKit2/Shared/qt/WebURLResponseQt.cpp
deleted file mode 100644
index 35625e339..000000000
--- a/Source/WebKit2/Shared/qt/WebURLResponseQt.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WebURLResponse.h"
-
-namespace WebKit {
-
-WebURLResponse::WebURLResponse(PlatformResponse)
-{
- ASSERT_NOT_REACHED();
-}
-
-PlatformResponse WebURLResponse::platformResponse() const
-{
- ASSERT_NOT_REACHED();
- return 0;
-}
-
-} // namespace WebKit
diff --git a/Source/WebKit2/UIProcess/API/C/qt/WKIconDatabaseQt.h b/Source/WebKit2/UIProcess/API/C/qt/WKIconDatabaseQt.h
index d9352a271..2035c3c0f 100644
--- a/Source/WebKit2/UIProcess/API/C/qt/WKIconDatabaseQt.h
+++ b/Source/WebKit2/UIProcess/API/C/qt/WKIconDatabaseQt.h
@@ -27,8 +27,8 @@
#ifndef WKIconDatabaseQt_h
#define WKIconDatabaseQt_h
-#include <WebKit2/WKBase.h>
-#include <WebKit2/WKGeometry.h>
+#include <WebKit/WKBase.h>
+#include <WebKit/WKGeometry.h>
QT_BEGIN_NAMESPACE
class QImage;
diff --git a/Source/WebKit2/UIProcess/API/cpp/qt/WKStringQt.h b/Source/WebKit2/UIProcess/API/cpp/qt/WKStringQt.h
index ff2cfa837..3c2fda240 100644
--- a/Source/WebKit2/UIProcess/API/cpp/qt/WKStringQt.h
+++ b/Source/WebKit2/UIProcess/API/cpp/qt/WKStringQt.h
@@ -22,7 +22,7 @@
#define WKStringQt_h
#include <QString>
-#include <WebKit2/WKBase.h>
+#include <WebKit/WKBase.h>
WK_EXPORT WKStringRef WKStringCreateWithQString(const QString& string);
WK_EXPORT QString WKStringCopyQString(WKStringRef string);
diff --git a/Source/WebKit2/UIProcess/API/cpp/qt/WKURLQt.h b/Source/WebKit2/UIProcess/API/cpp/qt/WKURLQt.h
index b12f97459..6cef82f7c 100644
--- a/Source/WebKit2/UIProcess/API/cpp/qt/WKURLQt.h
+++ b/Source/WebKit2/UIProcess/API/cpp/qt/WKURLQt.h
@@ -22,8 +22,8 @@
#define WKURLQt_h
#include <QUrl>
-#include <WebKit2/WKBase.h>
-#include <WebKit2/WKURL.h>
+#include <WebKit/WKBase.h>
+#include <WebKit/WKURL.h>
WK_EXPORT WKURLRef WKURLCreateWithQString(const QString& url);
WK_EXPORT QString WKURLCopyQString(WKURLRef url);
diff --git a/Source/WebKit2/UIProcess/API/qt/qquicknetworkreply.cpp b/Source/WebKit2/UIProcess/API/qt/qquicknetworkreply.cpp
index 38ac7b909..79a67bc76 100644
--- a/Source/WebKit2/UIProcess/API/qt/qquicknetworkreply.cpp
+++ b/Source/WebKit2/UIProcess/API/qt/qquicknetworkreply.cpp
@@ -82,14 +82,14 @@ void QQuickNetworkReply::send()
return;
}
- WTF::RefPtr<WebKit::SharedMemory> sharedMemory = SharedMemory::create(smLength);
+ WTF::RefPtr<WebKit::SharedMemory> sharedMemory = SharedMemory::allocate(smLength);
if (!sharedMemory)
return;
// The size of the allocated shared memory can be bigger than requested.
// Usually the size will be rounded up to the next multiple of a page size.
memcpy(sharedMemory->data(), ptrData, smLength);
- if (sharedMemory->createHandle(m_networkReplyData->data().m_dataHandle, SharedMemory::ReadOnly)) {
+ if (sharedMemory->createHandle(m_networkReplyData->data().m_dataHandle, SharedMemory::Protection::ReadOnly)) {
m_networkReplyData->data().m_contentLength = smLength;
if (m_webViewExperimental)
m_webViewExperimental.data()->sendApplicationSchemeReply(this);
diff --git a/Source/WebKit2/UIProcess/API/qt/qquicknetworkreply_p.h b/Source/WebKit2/UIProcess/API/qt/qquicknetworkreply_p.h
index 2f87acf1e..453e766b0 100644
--- a/Source/WebKit2/UIProcess/API/qt/qquicknetworkreply_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/qquicknetworkreply_p.h
@@ -23,8 +23,8 @@
#include "QtNetworkReplyData.h"
#include "QtNetworkRequestData.h"
-#include "qquickwebview_p.h"
#include "SharedMemory.h"
+#include "qquickwebview_p.h"
#include "qwebkitglobal.h"
#include <QNetworkAccessManager>
#include <QObject>
@@ -64,4 +64,3 @@ private:
QML_DECLARE_TYPE(QQuickNetworkReply)
#endif // qquicknetworkreply_p_h
-
diff --git a/Source/WebKit2/UIProcess/API/qt/qquicknetworkrequest.cpp b/Source/WebKit2/UIProcess/API/qt/qquicknetworkrequest.cpp
index 152ef4e5d..1db8100d8 100644
--- a/Source/WebKit2/UIProcess/API/qt/qquicknetworkrequest.cpp
+++ b/Source/WebKit2/UIProcess/API/qt/qquicknetworkrequest.cpp
@@ -45,4 +45,3 @@ QUrl QQuickNetworkRequest::url() const
}
#include "moc_qquicknetworkrequest_p.cpp"
-
diff --git a/Source/WebKit2/UIProcess/API/qt/qquicknetworkrequest_p.h b/Source/WebKit2/UIProcess/API/qt/qquicknetworkrequest_p.h
index 69a2d48df..399c45ccd 100644
--- a/Source/WebKit2/UIProcess/API/qt/qquicknetworkrequest_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/qquicknetworkrequest_p.h
@@ -22,11 +22,11 @@
#define qquicknetworkrequest_p_h
#include "QtNetworkRequestData.h"
-#include "wtf/RefPtr.h"
#include "qwebkitglobal.h"
#include <QObject>
#include <QtQml/qqmllist.h>
#include <QtQuick/qquickitem.h>
+#include <wtf/RefPtr.h>
class QWEBKIT_EXPORT QQuickNetworkRequest : public QObject {
Q_OBJECT
@@ -46,4 +46,3 @@ private:
QML_DECLARE_TYPE(QQuickNetworkRequest)
#endif // qquicknetworkrequest_p_h
-
diff --git a/Source/WebKit2/UIProcess/API/qt/qquickurlschemedelegate_p.h b/Source/WebKit2/UIProcess/API/qt/qquickurlschemedelegate_p.h
index 98de616cc..3080a0a2c 100644
--- a/Source/WebKit2/UIProcess/API/qt/qquickurlschemedelegate_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/qquickurlschemedelegate_p.h
@@ -68,5 +68,3 @@ private:
};
#endif // qquickurlschemedelegate_p_h
-
-
diff --git a/Source/WebKit2/UIProcess/API/qt/qquickwebpage.cpp b/Source/WebKit2/UIProcess/API/qt/qquickwebpage.cpp
index e8e646a7f..a991bcfdd 100644
--- a/Source/WebKit2/UIProcess/API/qt/qquickwebpage.cpp
+++ b/Source/WebKit2/UIProcess/API/qt/qquickwebpage.cpp
@@ -21,6 +21,7 @@
#include "config.h"
#include "qquickwebpage_p.h"
+#include "CoordinatedGraphicsScene.h"
#include "QtWebPageEventHandler.h"
#include "QtWebPageSGNode.h"
#include "TransformationMatrix.h"
@@ -30,7 +31,6 @@
#include "qwebkittest_p.h"
#include <QQuickWindow>
#include <WKPage.h>
-#include <WebCore/CoordinatedGraphicsScene.h>
using namespace WebKit;
@@ -61,7 +61,7 @@ QQuickWebPagePrivate::QQuickWebPagePrivate(QQuickWebPage* q, QQuickWebView* view
void QQuickWebPagePrivate::paint(QPainter* painter)
{
- if (WebCore::CoordinatedGraphicsScene* scene = QQuickWebViewPrivate::get(viewportItem)->coordinatedGraphicsScene())
+ if (CoordinatedGraphicsScene* scene = QQuickWebViewPrivate::get(viewportItem)->coordinatedGraphicsScene())
scene->paintToGraphicsContext(painter);
}
@@ -70,7 +70,7 @@ QSGNode* QQuickWebPage::updatePaintNode(QSGNode* oldNode, UpdatePaintNodeData*)
{
QQuickWebViewPrivate* webViewPrivate = QQuickWebViewPrivate::get(d->viewportItem);
- WebCore::CoordinatedGraphicsScene* scene = webViewPrivate->coordinatedGraphicsScene();
+ CoordinatedGraphicsScene* scene = webViewPrivate->coordinatedGraphicsScene();
if (!scene)
return oldNode;
diff --git a/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp b/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp
index 32ac886f3..4c412e1dd 100644
--- a/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp
+++ b/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp
@@ -23,6 +23,7 @@
#include "config.h"
#include "qquickwebview_p.h"
+#include "CoordinatedGraphicsScene.h"
#include "CoordinatedLayerTreeHostProxy.h"
#include "DownloadProxy.h"
#include "DrawingAreaProxyImpl.h"
@@ -35,7 +36,6 @@
#include "QtWebPageEventHandler.h"
#include "QtWebPagePolicyClient.h"
#include "WebBackForwardList.h"
-#include "WebContext.h"
#include "WebFindOptions.h"
#if ENABLE(INSPECTOR_SERVER)
#include "WebInspectorProxy.h"
@@ -46,6 +46,7 @@
#endif
#include "WebPageGroup.h"
#include "WebPreferences.h"
+#include "WebProcessPool.h"
#include "qglobal.h"
#include "qquicknetworkreply_p.h"
#include "qquicknetworkrequest_p.h"
@@ -70,12 +71,11 @@
#include <WKNumber.h>
#include <WKOpenPanelResultListener.h>
#include <WKPageGroup.h>
-#include <WKPreferences.h>
+#include <WKPreferencesRef.h>
#include <WKSerializedScriptValue.h>
#include <WKString.h>
#include <WKStringQt.h>
#include <WKURLQt.h>
-#include <WebCore/CoordinatedGraphicsScene.h>
#include <WebCore/IntPoint.h>
#include <WebCore/IntRect.h>
#include <limits>
@@ -85,8 +85,8 @@
#include <wtf/text/WTFString.h>
#ifdef HAVE_WEBCHANNEL
-#include <QtWebChannel/QQmlWebChannel>
#include "qwebchannelwebkittransport_p.h"
+#include <QtWebChannel/QQmlWebChannel>
#endif
using namespace WebCore;
@@ -331,7 +331,7 @@ void QQuickWebViewPrivate::initialize(WKContextRef contextRef, WKPageGroupRef pa
pageGroup = adoptWK(WKPageGroupCreateWithIdentifier(0));
context = contextRef ? QtWebContext::create(contextRef) : QtWebContext::defaultContext();
- webPageProxy = toImpl(context->context())->createWebPage(&pageClient, toImpl(pageGroup.get()));
+ webPageProxy = toImpl(context->context())->createWebPage(pageClient, toImpl(pageGroup.get()));
webPage = toAPI(webPageProxy.get());
pageToView()->insert(webPage.get(), this);
@@ -376,7 +376,7 @@ void QQuickWebViewPrivate::initialize(WKContextRef contextRef, WKPageGroupRef pa
pagePolicyClient.reset(new QtWebPagePolicyClient(webPage.get(), q_ptr));
pageUIClient.reset(new QtWebPageUIClient(webPage.get(), q_ptr));
- navigationHistory = adoptPtr(QWebNavigationHistoryPrivate::createHistory(webPage.get()));
+ navigationHistory.reset(QWebNavigationHistoryPrivate::createHistory(webPage.get()));
QtWebIconDatabaseClient* iconDatabase = context->iconDatabase();
QObject::connect(iconDatabase, SIGNAL(iconChangedForPageURL(QString)), q_ptr, SLOT(_q_onIconChangedForPageURL(QString)));
@@ -389,7 +389,7 @@ void QQuickWebViewPrivate::initialize(WKContextRef contextRef, WKPageGroupRef pa
WKPreferencesSetCompositingRepaintCountersVisible(preferencesRef, showDebugVisuals);
WKPreferencesSetFrameFlatteningEnabled(preferencesRef, true);
WKPreferencesSetWebGLEnabled(preferencesRef, true);
- webPageProxy->pageGroup()->preferences()->setForceCompositingMode(true);
+ webPageProxy->pageGroup().preferences().setForceCompositingMode(true);
pageClient.initialize(q_ptr, pageEventHandler.data(), &undoController);
webPageProxy->initializeWebPage();
@@ -526,13 +526,12 @@ void QQuickWebViewPrivate::didChangeBackForwardList(WKPageRef, WKBackForwardList
void QQuickWebViewPrivate::setTransparentBackground(bool enable)
{
- webPageProxy->setDrawsTransparentBackground(enable);
webPageProxy->setDrawsBackground(!enable);
}
bool QQuickWebViewPrivate::transparentBackground() const
{
- return webPageProxy->drawsTransparentBackground();
+ return !webPageProxy->drawsBackground();
}
void QQuickWebViewPrivate::loadProgressDidChange(int loadProgress)
@@ -644,7 +643,7 @@ void QQuickWebViewPrivate::processDidBecomeResponsive(WKPageRef, const void* cli
std::unique_ptr<DrawingAreaProxy> QQuickWebViewPrivate::createDrawingAreaProxy()
{
- return std::make_unique<WebKit::DrawingAreaProxyImpl>(webPageProxy.get());
+ return std::make_unique<WebKit::DrawingAreaProxyImpl>(*webPageProxy.get());
}
void QQuickWebViewPrivate::handleDownloadRequest(DownloadProxy* download)
@@ -663,7 +662,7 @@ void QQuickWebViewPrivate::handleDownloadRequest(DownloadProxy* download)
void QQuickWebViewPrivate::_q_onVisibleChanged()
{
- webPageProxy->viewStateDidChange(WebPageProxy::ViewIsVisible);
+ webPageProxy->viewStateDidChange(ViewState::IsVisible);
}
void QQuickWebViewPrivate::_q_onUrlChanged()
@@ -806,11 +805,11 @@ void QQuickWebViewPrivate::chooseFiles(WKOpenPanelResultListenerRef listenerRef,
if (dialogRunner.wasAccepted()) {
QStringList selectedPaths = dialogRunner.filePaths();
- Vector<RefPtr<APIObject> > wkFiles(selectedPaths.size());
+ Vector<RefPtr<API::Object> > wkFiles(selectedPaths.size());
for (unsigned i = 0; i < selectedPaths.size(); ++i)
- wkFiles[i] = WebURL::create(QUrl::fromLocalFile(selectedPaths.at(i)).toString());
+ wkFiles[i] = API::URL::create(QUrl::fromLocalFile(selectedPaths.at(i)).toString());
- WKOpenPanelResultListenerChooseFiles(listenerRef, toAPI(ImmutableArray::adopt(wkFiles).leakRef()));
+ WKOpenPanelResultListenerChooseFiles(listenerRef, toAPI(&API::Array::create(WTFMove(wkFiles)).leakRef()));
} else
WKOpenPanelResultListenerCancel(listenerRef);
@@ -1064,7 +1063,7 @@ void QQuickWebViewFlickablePrivate::onComponentComplete()
Q_Q(QQuickWebView);
m_pageViewportControllerClient.reset(new PageViewportControllerClientQt(q, pageView.data()));
- m_pageViewportController.reset(new PageViewportController(webPageProxy.get(), m_pageViewportControllerClient.data()));
+ m_pageViewportController.reset(new PageViewportController(webPageProxy.get(), *m_pageViewportControllerClient.data()));
pageEventHandler->setViewportController(m_pageViewportControllerClient.data());
// Trigger setting of correct visibility flags after everything was allocated and initialized.
@@ -1173,18 +1172,18 @@ void QQuickWebViewExperimental::setUseDefaultContentItemSize(bool enable)
int QQuickWebViewExperimental::preferredMinimumContentsWidth() const
{
Q_D(const QQuickWebView);
- return d->webPageProxy->pageGroup()->preferences()->layoutFallbackWidth();
+ return d->webPageProxy->pageGroup().preferences().layoutFallbackWidth();
}
void QQuickWebViewExperimental::setPreferredMinimumContentsWidth(int width)
{
Q_D(QQuickWebView);
- WebPreferences* webPreferences = d->webPageProxy->pageGroup()->preferences();
+ WebPreferences& webPreferences = d->webPageProxy->pageGroup().preferences();
- if (width == webPreferences->layoutFallbackWidth())
+ if (width == webPreferences.layoutFallbackWidth())
return;
- webPreferences->setLayoutFallbackWidth(width);
+ webPreferences.setLayoutFallbackWidth(width);
emit preferredMinimumContentsWidthChanged();
}
@@ -1295,7 +1294,7 @@ QWebPreferences* QQuickWebViewExperimental::preferences() const
{
QQuickWebViewPrivate* const d = d_ptr;
if (!d->preferences)
- d->preferences = adoptPtr(QWebPreferencesPrivate::createPreferences(d));
+ d->preferences.reset(QWebPreferencesPrivate::createPreferences(d));
return d->preferences.get();
}
@@ -1446,13 +1445,13 @@ void QQuickWebViewExperimental::setUserAgent(const QString& userAgent)
int QQuickWebViewExperimental::deviceWidth() const
{
Q_D(const QQuickWebView);
- return d->webPageProxy->pageGroup()->preferences()->deviceWidth();
+ return d->webPageProxy->pageGroup().preferences().deviceWidth();
}
void QQuickWebViewExperimental::setDeviceWidth(int value)
{
Q_D(QQuickWebView);
- d->webPageProxy->pageGroup()->preferences()->setDeviceWidth(qMax(0, value));
+ d->webPageProxy->pageGroup().preferences().setDeviceWidth(qMax(0, value));
emit deviceWidthChanged();
}
@@ -1470,13 +1469,13 @@ void QQuickWebViewExperimental::setDeviceWidth(int value)
int QQuickWebViewExperimental::deviceHeight() const
{
Q_D(const QQuickWebView);
- return d->webPageProxy->pageGroup()->preferences()->deviceHeight();
+ return d->webPageProxy->pageGroup().preferences().deviceHeight();
}
void QQuickWebViewExperimental::setDeviceHeight(int value)
{
Q_D(QQuickWebView);
- d->webPageProxy->pageGroup()->preferences()->setDeviceHeight(qMax(0, value));
+ d->webPageProxy->pageGroup().preferences().setDeviceHeight(qMax(0, value));
emit deviceHeightChanged();
}
@@ -1557,7 +1556,7 @@ void QQuickWebViewExperimental::setUserStyleSheets(const QList<QUrl>& userStyleS
QUrl QQuickWebViewExperimental::remoteInspectorUrl() const
{
#if ENABLE(INSPECTOR_SERVER)
- return QUrl(WebInspectorServer::shared().inspectorUrlForPageID(d_ptr->webPageProxy->inspector()->remoteInspectionPageID()));
+ return QUrl(WebInspectorServer::singleton().inspectorUrlForPageID(d_ptr->webPageProxy->inspector()->remoteInspectionPageID()));
#else
return QUrl();
#endif
@@ -1822,7 +1821,7 @@ void QQuickWebView::reload()
// about the unreachable url yet. If we just do a reload at this point WebCore will try to
// reload the currently committed url instead of the unrachable url. To work around this
// we override the reload here by doing a manual load.
- d->webPageProxy->loadURL(mainFrame->unreachableURL());
+ d->webPageProxy->loadRequest(mainFrame->unreachableURL());
// FIXME: We should make WebCore aware of the unreachable url regardless of substitute-loads
return;
}
@@ -1866,7 +1865,7 @@ void QQuickWebView::emitUrlChangeIfNeeded()
{
Q_D(QQuickWebView);
- QString activeUrl = d->webPageProxy->activeURL();
+ QString activeUrl = d->webPageProxy->pageLoadState().activeURL();
if (activeUrl != d->m_currentUrl) {
d->m_currentUrl = activeUrl;
emit urlChanged();
@@ -2002,7 +2001,7 @@ QVariant QQuickWebView::inputMethodQuery(Qt::InputMethodQuery property) const
Q_D(const QQuickWebView);
const EditorState& state = d->webPageProxy->editorState();
- switch(property) {
+ switch (property) {
case Qt::ImCursorRectangle:
return QRectF(state.cursorRect);
case Qt::ImFont:
diff --git a/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h b/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h
index 2d1e5d911..5dcdb1a27 100644
--- a/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h
@@ -27,21 +27,17 @@
#include "QtPageClient.h"
#include "QtWebPageUIClient.h"
-#include "qquickwebview_p.h"
#include "qquickwebpage_p.h"
+#include "qquickwebview_p.h"
#include <QtCore/QElapsedTimer>
#include <QtCore/QObject>
#include <QtCore/QScopedPointer>
#include <WebCore/ViewportArguments.h>
-#include <WebKit2/WKRetainPtr.h>
-#include <wtf/OwnPtr.h>
+#include <WebKit/WKRetainPtr.h>
#include <wtf/RefPtr.h>
-namespace WebCore {
-class CoordinatedGraphicsScene;
-}
-
namespace WebKit {
+class CoordinatedGraphicsScene;
class DownloadProxy;
class DrawingAreaProxy;
class QtDialogRunner;
@@ -143,7 +139,7 @@ public:
void didReceiveMessageFromNavigatorQtWebChannelTransportObject(WKStringRef message);
#endif
- WebCore::CoordinatedGraphicsScene* coordinatedGraphicsScene();
+ WebKit::CoordinatedGraphicsScene* coordinatedGraphicsScene();
float deviceScaleFactor();
void setIntrinsicDeviceScaleFactor(float);
@@ -189,8 +185,8 @@ protected:
WebKit::QtPageClient pageClient;
WebKit::DefaultUndoController undoController;
- OwnPtr<QWebNavigationHistory> navigationHistory;
- OwnPtr<QWebPreferences> preferences;
+ std::unique_ptr<QWebNavigationHistory> navigationHistory;
+ std::unique_ptr<QWebPreferences> preferences;
QScopedPointer<WebKit::QtWebPagePolicyClient> pagePolicyClient;
QScopedPointer<WebKit::QtWebPageUIClient> pageUIClient;
diff --git a/Source/WebKit2/UIProcess/API/qt/qtwebsecurityorigin.cpp b/Source/WebKit2/UIProcess/API/qt/qtwebsecurityorigin.cpp
index 4491dc40a..fad9748cf 100644
--- a/Source/WebKit2/UIProcess/API/qt/qtwebsecurityorigin.cpp
+++ b/Source/WebKit2/UIProcess/API/qt/qtwebsecurityorigin.cpp
@@ -24,9 +24,9 @@
#include <QtCore/QStringList>
#include <SchemeRegistry.h>
#include <SecurityOrigin.h>
-#include <WebKit2/WKBase.h>
-#include <WebKit2/WKRetainPtr.h>
-#include <WebKit2/WKSecurityOrigin.h>
+#include <WebKit/WKBase.h>
+#include <WebKit/WKRetainPtr.h>
+#include <WebKit/WKSecurityOriginRef.h>
using namespace WebCore;
diff --git a/Source/WebKit2/UIProcess/API/qt/qtwebsecurityorigin_p.h b/Source/WebKit2/UIProcess/API/qt/qtwebsecurityorigin_p.h
index df09fb8ea..e6d59acba 100644
--- a/Source/WebKit2/UIProcess/API/qt/qtwebsecurityorigin_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/qtwebsecurityorigin_p.h
@@ -21,7 +21,6 @@
#include "qwebkitglobal.h"
-#include <QtCore/QDataStream>
#include <QtCore/QObject>
#include <QtCore/QString>
#include <QtCore/QUrl>
diff --git a/Source/WebKit2/UIProcess/API/qt/qwebchannelwebkittransport.cpp b/Source/WebKit2/UIProcess/API/qt/qwebchannelwebkittransport.cpp
index 209596954..b74c45b3c 100644
--- a/Source/WebKit2/UIProcess/API/qt/qwebchannelwebkittransport.cpp
+++ b/Source/WebKit2/UIProcess/API/qt/qwebchannelwebkittransport.cpp
@@ -39,13 +39,16 @@
**
****************************************************************************/
+#include "config.h"
#include "qwebchannelwebkittransport_p.h"
-#include <QJsonObject>
-#include <QJsonDocument>
+#ifdef HAVE_WEBCHANNEL
#include "qquickwebview_p.h"
+#include <QJsonDocument>
+#include <QJsonObject>
+
QWebChannelWebKitTransport::QWebChannelWebKitTransport(QQuickWebViewExperimental* experimental)
: QWebChannelAbstractTransport(experimental)
, m_experimental(experimental)
@@ -72,3 +75,5 @@ void QWebChannelWebKitTransport::receiveMessage(const QByteArray& message)
}
emit messageReceived(doc.object(), this);
}
+
+#endif // HAVE_WEBCHANNEL
diff --git a/Source/WebKit2/UIProcess/API/qt/qwebchannelwebkittransport_p.h b/Source/WebKit2/UIProcess/API/qt/qwebchannelwebkittransport_p.h
index ef6140359..2cbfdafee 100644
--- a/Source/WebKit2/UIProcess/API/qt/qwebchannelwebkittransport_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/qwebchannelwebkittransport_p.h
@@ -39,15 +39,15 @@
**
****************************************************************************/
-#ifndef QWEBCHANNELWEBKITTRANSPORT_H
-#define QWEBCHANNELWEBKITTRANSPORT_H
+#pragma once
+
+#ifdef HAVE_WEBCHANNEL
#include <QtWebChannel/QWebChannelAbstractTransport>
class QQuickWebViewExperimental;
-class QWebChannelWebKitTransport : public QWebChannelAbstractTransport
-{
+class QWebChannelWebKitTransport : public QWebChannelAbstractTransport {
Q_OBJECT
public:
explicit QWebChannelWebKitTransport(QQuickWebViewExperimental* experimental);
@@ -60,4 +60,4 @@ private:
QQuickWebViewExperimental* m_experimental;
};
-#endif // QWEBCHANNELWEBKITTRANSPORT_H
+#endif // HAVE_WEBCHANNEL
diff --git a/Source/WebKit2/UIProcess/API/qt/qwebdownloaditem.cpp b/Source/WebKit2/UIProcess/API/qt/qwebdownloaditem.cpp
index 85476431f..949636a0c 100644
--- a/Source/WebKit2/UIProcess/API/qt/qwebdownloaditem.cpp
+++ b/Source/WebKit2/UIProcess/API/qt/qwebdownloaditem.cpp
@@ -93,4 +93,3 @@ void QWebDownloadItem::start()
d->downloadProxy->startTransfer(d->destinationPath);
}
-
diff --git a/Source/WebKit2/UIProcess/API/qt/qwebkittest_p.h b/Source/WebKit2/UIProcess/API/qt/qwebkittest_p.h
index 5cbdddd54..e017d906f 100644
--- a/Source/WebKit2/UIProcess/API/qt/qwebkittest_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/qwebkittest_p.h
@@ -21,8 +21,8 @@
#ifndef qwebkittest_p_h
#define qwebkittest_p_h
-#include "qwebkitglobal.h"
#include "qquickwebview_p.h"
+#include "qwebkitglobal.h"
#include <QtCore/QJsonObject>
#include <QtCore/QObject>
diff --git a/Source/WebKit2/UIProcess/API/qt/qwebloadrequest.cpp b/Source/WebKit2/UIProcess/API/qt/qwebloadrequest.cpp
index 8aaadb73c..6271ebfa6 100644
--- a/Source/WebKit2/UIProcess/API/qt/qwebloadrequest.cpp
+++ b/Source/WebKit2/UIProcess/API/qt/qwebloadrequest.cpp
@@ -18,7 +18,6 @@
*/
#include "config.h"
-
#include "qwebloadrequest_p.h"
class QWebLoadRequestPrivate {
diff --git a/Source/WebKit2/UIProcess/API/qt/qwebnavigationhistory.cpp b/Source/WebKit2/UIProcess/API/qt/qwebnavigationhistory.cpp
index 95f40498f..fa8982c4f 100644
--- a/Source/WebKit2/UIProcess/API/qt/qwebnavigationhistory.cpp
+++ b/Source/WebKit2/UIProcess/API/qt/qwebnavigationhistory.cpp
@@ -26,7 +26,7 @@
#include "config.h"
#include "qwebnavigationhistory_p.h"
-#include "WKBackForwardList.h"
+#include "WKBackForwardListRef.h"
#include "WKStringQt.h"
#include "WKURL.h"
#include "WKURLQt.h"
@@ -35,12 +35,11 @@
#include <QString>
#include <QUrl>
#include <QtQml/QQmlEngine>
-#include <WebKit2/WKArray.h>
-#include <WebKit2/WKBackForwardListItem.h>
-#include <WebKit2/WKBase.h>
-#include <WebKit2/WKPage.h>
-#include <WebKit2/WKRetainPtr.h>
-#include <wtf/PassOwnPtr.h>
+#include <WebKit/WKArray.h>
+#include <WebKit/WKBackForwardListItemRef.h>
+#include <WebKit/WKBase.h>
+#include <WebKit/WKPage.h>
+#include <WebKit/WKRetainPtr.h>
using namespace WebKit;
@@ -61,8 +60,8 @@ QWebNavigationListModel* QWebNavigationListModelPrivate::createWebNavigationMode
QWebNavigationHistoryPrivate::QWebNavigationHistoryPrivate(WKPageRef page)
: m_page(page)
, m_backForwardList(WKPageGetBackForwardList(page))
- , m_backNavigationModel(adoptPtr(QWebNavigationListModelPrivate::createWebNavigationModel(m_backForwardList.get())))
- , m_forwardNavigationModel(adoptPtr(QWebNavigationListModelPrivate::createWebNavigationModel(m_backForwardList.get())))
+ , m_backNavigationModel(QWebNavigationListModelPrivate::createWebNavigationModel(m_backForwardList.get()))
+ , m_forwardNavigationModel(QWebNavigationListModelPrivate::createWebNavigationModel(m_backForwardList.get()))
{
m_backNavigationModel->d->count = &WKBackForwardListGetBackListCount;
m_backNavigationModel->d->indexSign = -1;
diff --git a/Source/WebKit2/UIProcess/API/qt/qwebnavigationhistory_p_p.h b/Source/WebKit2/UIProcess/API/qt/qwebnavigationhistory_p_p.h
index c8cc5ab32..527aa4658 100644
--- a/Source/WebKit2/UIProcess/API/qt/qwebnavigationhistory_p_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/qwebnavigationhistory_p_p.h
@@ -29,9 +29,8 @@
#include "qwebkitglobal.h"
#include <QObject>
-#include <WebKit2/WKBase.h>
-#include <WebKit2/WKRetainPtr.h>
-#include <wtf/OwnPtr.h>
+#include <WebKit/WKBase.h>
+#include <WebKit/WKRetainPtr.h>
#include <wtf/PassRefPtr.h>
namespace WebKit {
@@ -63,8 +62,8 @@ public:
WKRetainPtr<WKPageRef> m_page;
WKRetainPtr<WKBackForwardListRef> m_backForwardList;
- OwnPtr<QWebNavigationListModel> m_backNavigationModel;
- OwnPtr<QWebNavigationListModel> m_forwardNavigationModel;
+ std::unique_ptr<QWebNavigationListModel> m_backNavigationModel;
+ std::unique_ptr<QWebNavigationListModel> m_forwardNavigationModel;
};
#endif /* qwebnavigationhistory_p_p_h */
diff --git a/Source/WebKit2/UIProcess/API/qt/qwebnavigationrequest.cpp b/Source/WebKit2/UIProcess/API/qt/qwebnavigationrequest.cpp
index 7a75c583a..4d835fa2c 100644
--- a/Source/WebKit2/UIProcess/API/qt/qwebnavigationrequest.cpp
+++ b/Source/WebKit2/UIProcess/API/qt/qwebnavigationrequest.cpp
@@ -18,7 +18,6 @@
*/
#include "config.h"
-
#include "qwebnavigationrequest_p.h"
#include "qquickwebview_p.h"
diff --git a/Source/WebKit2/UIProcess/API/qt/qwebpermissionrequest.cpp b/Source/WebKit2/UIProcess/API/qt/qwebpermissionrequest.cpp
index 45697a22b..e059d9c11 100644
--- a/Source/WebKit2/UIProcess/API/qt/qwebpermissionrequest.cpp
+++ b/Source/WebKit2/UIProcess/API/qt/qwebpermissionrequest.cpp
@@ -18,12 +18,11 @@
*/
#include "config.h"
-
#include "qwebpermissionrequest_p.h"
#include "WKStringQt.h"
-#include <WebKit2/WKBase.h>
-#include <WebKit2/WKRetainPtr.h>
+#include <WebKit/WKBase.h>
+#include <WebKit/WKRetainPtr.h>
class QWebPermissionRequestPrivate : public QSharedData {
public:
@@ -118,4 +117,3 @@ QtWebSecurityOrigin* QWebPermissionRequest::securityOrigin()
{
return &(d->securityInfo);
}
-
diff --git a/Source/WebKit2/UIProcess/API/qt/qwebpermissionrequest_p.h b/Source/WebKit2/UIProcess/API/qt/qwebpermissionrequest_p.h
index 000252bdb..5f2daa811 100644
--- a/Source/WebKit2/UIProcess/API/qt/qwebpermissionrequest_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/qwebpermissionrequest_p.h
@@ -25,9 +25,9 @@
#include <QtCore/QObject>
#include <QtCore/qshareddata.h>
-#include <WebKit2/WKGeolocationPermissionRequest.h>
-#include <WebKit2/WKNotificationPermissionRequest.h>
-#include <WebKit2/WKSecurityOrigin.h>
+#include <WebKit/WKGeolocationPermissionRequest.h>
+#include <WebKit/WKNotificationPermissionRequest.h>
+#include <WebKit/WKSecurityOriginRef.h>
class QWebPermissionRequestPrivate;
diff --git a/Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp b/Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp
index edca4c901..b486e9391 100644
--- a/Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp
+++ b/Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp
@@ -23,7 +23,7 @@
#include "qquickwebview_p_p.h"
#include "qwebpreferences_p_p.h"
#include <WKPageGroup.h>
-#include <WKPreferences.h>
+#include <WKPreferencesRef.h>
#include <WKRetainPtr.h>
#include <WKStringQt.h>
diff --git a/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview.cpp b/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview.cpp
index 31b3d8177..3206481c8 100644
--- a/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview.cpp
+++ b/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview.cpp
@@ -20,6 +20,7 @@
#include "config.h"
#include "qrawwebview_p.h"
+#include "CoordinatedGraphicsScene.h"
#include "CoordinatedLayerTreeHostProxy.h"
#include "Cursor.h"
#include "DrawingAreaProxyImpl.h"
@@ -34,7 +35,6 @@
#include "WebPageGroup.h"
#include "WebPreferences.h"
#include "qrawwebview_p_p.h"
-#include <WebCore/CoordinatedGraphicsScene.h>
#include <WebKit2/qrawwebview_p.h>
void QRawWebViewPrivate::didChangeViewportProperties(const WebCore::ViewportAttributes& attr)
@@ -352,7 +352,7 @@ WKPageRef QRawWebView::pageRef()
return toAPI(d->m_webPageProxy.get());
}
-WebCore::CoordinatedGraphicsScene* QRawWebView::coordinatedGraphicsScene() const
+WebKit::CoordinatedGraphicsScene* QRawWebView::coordinatedGraphicsScene() const
{
WebKit::DrawingAreaProxy* drawingArea = d->m_webPageProxy->drawingArea();
if (!drawingArea)
diff --git a/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview_p.h b/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview_p.h
index 4ae3e5e53..00cf438b4 100644
--- a/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview_p.h
@@ -47,7 +47,7 @@ QT_END_NAMESPACE
class QRawWebViewPrivate;
-namespace WebCore {
+namespace WebKit {
class CoordinatedGraphicsScene;
}
@@ -101,7 +101,7 @@ public:
void sendTouchEvent(QTouchEvent*);
private:
- WebCore::CoordinatedGraphicsScene* coordinatedGraphicsScene() const;
+ WebKit::CoordinatedGraphicsScene* coordinatedGraphicsScene() const;
QRawWebViewPrivate* d;
};
diff --git a/Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.h b/Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.h
index 8472eefb5..206cc6a81 100644
--- a/Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.h
+++ b/Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.h
@@ -82,7 +82,7 @@ private:
String m_bindAddress;
unsigned short m_port;
#if PLATFORM(QT)
- OwnPtr<QtTcpServerHandler> m_tcpServerHandler;
+ std::unique_ptr<QtTcpServerHandler> m_tcpServerHandler;
#elif USE(SOUP)
GRefPtr<GSocketService> m_socketService;
#endif
diff --git a/Source/WebKit2/UIProcess/InspectorServer/qt/WebInspectorServerQt.cpp b/Source/WebKit2/UIProcess/InspectorServer/qt/WebInspectorServerQt.cpp
index 2d060d068..317508b76 100644
--- a/Source/WebKit2/UIProcess/InspectorServer/qt/WebInspectorServerQt.cpp
+++ b/Source/WebKit2/UIProcess/InspectorServer/qt/WebInspectorServerQt.cpp
@@ -28,6 +28,7 @@
#include "WebPageProxy.h"
#include <QFile>
#include <WebCore/MIMETypeRegistry.h>
+#include <wtf/NeverDestroyed.h>
#include <wtf/text/CString.h>
#include <wtf/text/StringBuilder.h>
@@ -35,7 +36,7 @@ namespace WebKit {
static String remoteInspectorPagePath()
{
- DEFINE_STATIC_LOCAL(String, pagePath, (ASCIILiteral("/webkit/inspector/inspector.html?page=")));
+ static NeverDestroyed<WTF::String> pagePath(ASCIILiteral("/webkit/inspector/inspector.html?page="));
return pagePath;
}
@@ -84,15 +85,15 @@ void WebInspectorServer::buildPageList(Vector<char>& data, String& contentType)
builder.appendLiteral("[ ");
ClientMap::iterator end = m_clientMap.end();
for (ClientMap::iterator it = m_clientMap.begin(); it != end; ++it) {
- WebPageProxy* webPage = it->value->page();
+ WebPageProxy* webPage = it->value->inspectedPage();
if (it != m_clientMap.begin())
builder.appendLiteral(", ");
builder.appendLiteral("{ \"id\": ");
builder.appendNumber(it->key);
builder.appendLiteral(", \"title\": \"");
- builder.append(webPage->pageTitle());
+ builder.append(webPage->pageLoadState().title());
builder.appendLiteral("\", \"url\": \"");
- builder.append(webPage->activeURL());
+ builder.append(webPage->pageLoadState().activeURL());
builder.appendLiteral("\", \"inspectorUrl\": \"");
builder.append(remoteInspectorPagePath());
builder.appendNumber(it->key);
diff --git a/Source/WebKit2/UIProcess/InspectorServer/qt/WebSocketServerQt.cpp b/Source/WebKit2/UIProcess/InspectorServer/qt/WebSocketServerQt.cpp
index 4503104a3..fd7ad123b 100644
--- a/Source/WebKit2/UIProcess/InspectorServer/qt/WebSocketServerQt.cpp
+++ b/Source/WebKit2/UIProcess/InspectorServer/qt/WebSocketServerQt.cpp
@@ -25,7 +25,6 @@
#include "WebSocketServer.h"
#include "WebSocketServerConnection.h"
#include <WebCore/SocketStreamHandle.h>
-#include <wtf/PassOwnPtr.h>
using namespace WebCore;
@@ -33,7 +32,7 @@ namespace WebKit {
void WebSocketServer::platformInitialize()
{
- m_tcpServerHandler = adoptPtr(new QtTcpServerHandler(this));
+ m_tcpServerHandler.reset(new QtTcpServerHandler(this));
}
bool WebSocketServer::platformListen(const String& bindAddress, unsigned short port)
@@ -56,9 +55,9 @@ void QtTcpServerHandler::handleNewConnection()
{
QTcpSocket* socket = m_serverSocket.nextPendingConnection();
ASSERT(socket);
- OwnPtr<WebSocketServerConnection> conection = adoptPtr(new WebSocketServerConnection(m_webSocketServer->client(), m_webSocketServer));
- conection->setSocketHandle(SocketStreamHandle::create(socket, conection.get()));
- m_webSocketServer->didAcceptConnection(conection.release());
+ auto connection = std::make_unique<WebSocketServerConnection>(m_webSocketServer->client(), m_webSocketServer);
+ connection->setSocketHandle(SocketStreamHandle::create(socket, connection.get()));
+ m_webSocketServer->didAcceptConnection(WTFMove(connection));
}
bool QtTcpServerHandler::listen(const String& bindAddress, unsigned short port)
diff --git a/Source/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp b/Source/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp
index 7d0203478..653dfb52f 100644
--- a/Source/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp
+++ b/Source/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp
@@ -36,9 +36,9 @@
#include <QProcess>
#include <QString>
#include <QtCore/qglobal.h>
-#include <WebCore/RunLoop.h>
#include <wtf/HashSet.h>
#include <wtf/PassRefPtr.h>
+#include <wtf/RunLoop.h>
#include <wtf/Threading.h>
#include <wtf/text/WTFString.h>
@@ -54,8 +54,8 @@
#endif
#if defined(Q_OS_LINUX)
-#include <sys/prctl.h>
#include <signal.h>
+#include <sys/prctl.h>
#endif
#if OS(WINDOWS)
@@ -84,8 +84,7 @@ using namespace WebCore;
namespace WebKit {
-class QtWebProcess : public QProcess
-{
+class QtWebProcess : public QProcess {
Q_OBJECT
public:
QtWebProcess(QObject* parent = 0)
@@ -143,8 +142,8 @@ void ProcessLauncher::launchProcess()
commandLine = commandLine.arg(serviceName);
#elif OS(WINDOWS)
- CoreIPC::Connection::Identifier connector, clientIdentifier;
- if (!CoreIPC::Connection::createServerAndClientIdentifiers(connector, clientIdentifier)) {
+ IPC::Connection::Identifier connector, clientIdentifier;
+ if (!IPC::Connection::createServerAndClientIdentifiers(connector, clientIdentifier)) {
// FIXME: What should we do here?
ASSERT_NOT_REACHED();
}
diff --git a/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp b/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp
index 294c77117..eeb5087da 100644
--- a/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp
+++ b/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp
@@ -93,7 +93,7 @@ void PluginInfoStore::loadPluginsIfNecessary()
m_plugins.clear();
for (const auto& pluginPath : uniquePluginPaths)
- loadPlugin(m_plugins, *it);
+ loadPlugin(m_plugins, pluginPath);
m_pluginListIsUpToDate = true;
diff --git a/Source/WebKit2/UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp b/Source/WebKit2/UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp
index cfe9bd7b4..35afe9fab 100644
--- a/Source/WebKit2/UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp
+++ b/Source/WebKit2/UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp
@@ -33,6 +33,7 @@
#include "NetscapePluginModule.h"
#include "PluginSearchPath.h"
+#include "ProcessExecutablePath.h"
#include <WebCore/FileSystem.h>
#if PLATFORM(GTK)
@@ -69,8 +70,17 @@ Vector<String> PluginInfoStore::individualPluginPaths()
bool PluginInfoStore::getPluginInfo(const String& pluginPath, PluginModuleInfo& plugin)
{
#if PLATFORM(GTK)
- if (PluginInfoCache::singleton().getPluginInfo(pluginPath, plugin))
+ if (PluginInfoCache::singleton().getPluginInfo(pluginPath, plugin)) {
+#if ENABLE(PLUGIN_PROCESS_GTK2)
+ if (plugin.requiresGtk2) {
+ String pluginProcessPath = executablePathOfPluginProcess();
+ pluginProcessPath.append('2');
+ if (!fileExists(pluginProcessPath))
+ return false;
+ }
+#endif
return true;
+ }
if (NetscapePluginModule::getPluginInfo(pluginPath, plugin)) {
PluginInfoCache::singleton().updatePluginInfo(pluginPath, plugin);
diff --git a/Source/WebKit2/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp b/Source/WebKit2/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp
index 8569450ba..a6c52f8b4 100644
--- a/Source/WebKit2/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp
+++ b/Source/WebKit2/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp
@@ -83,12 +83,15 @@ bool PluginProcessProxy::scanPlugin(const String& pluginPath, RawPluginMetaData&
#if PLATFORM(GTK)
bool requiresGtk2 = pluginRequiresGtk2(pluginPath);
- if (requiresGtk2)
+ if (requiresGtk2) {
#if ENABLE(PLUGIN_PROCESS_GTK2)
pluginProcessPath.append('2');
+ if (!fileExists(pluginProcessPath))
+ return false;
#else
return false;
#endif
+ }
#endif
CString binaryPath = fileSystemRepresentation(pluginProcessPath);
diff --git a/Source/WebKit2/UIProcess/Storage/LocalStorageDatabase.cpp b/Source/WebKit2/UIProcess/Storage/LocalStorageDatabase.cpp
index 1367438af..3468b5df6 100644
--- a/Source/WebKit2/UIProcess/Storage/LocalStorageDatabase.cpp
+++ b/Source/WebKit2/UIProcess/Storage/LocalStorageDatabase.cpp
@@ -181,7 +181,10 @@ void LocalStorageDatabase::importItems(StorageMap& storageMap)
int result = query.step();
while (result == SQLITE_ROW) {
- items.set(query.getColumnText(0), query.getColumnBlobAsString(1));
+ String key = query.getColumnText(0);
+ String value = query.getColumnBlobAsString(1);
+ if (!key.isNull() && !value.isNull())
+ items.set(key, value);
result = query.step();
}
diff --git a/Source/WebKit2/UIProcess/WebPageProxy.cpp b/Source/WebKit2/UIProcess/WebPageProxy.cpp
index 85fdbf8ed..3e221a920 100644
--- a/Source/WebKit2/UIProcess/WebPageProxy.cpp
+++ b/Source/WebKit2/UIProcess/WebPageProxy.cpp
@@ -348,7 +348,6 @@ WebPageProxy::WebPageProxy(PageClient& pageClient, WebProcessProxy& process, uin
, m_alwaysRunsAtForegroundPriority(m_configuration->alwaysRunsAtForegroundPriority())
#endif
, m_backForwardList(WebBackForwardList::create(*this))
- , m_loadStateAtProcessExit(FrameLoadState::LoadStateFinished)
, m_maintainsInactiveSelection(false)
, m_isEditable(false)
, m_textZoomFactor(1)
@@ -5137,10 +5136,8 @@ void WebPageProxy::resetStateAfterProcessExited()
m_editorState = EditorState();
- if (m_mainFrame) {
+ if (m_mainFrame)
m_urlAtProcessExit = m_mainFrame->url();
- m_loadStateAtProcessExit = m_mainFrame->loadState();
- }
m_pageClient.processDidExit();
diff --git a/Source/WebKit2/UIProcess/WebPageProxy.h b/Source/WebKit2/UIProcess/WebPageProxy.h
index 8c9bad74d..fb39d86f4 100644
--- a/Source/WebKit2/UIProcess/WebPageProxy.h
+++ b/Source/WebKit2/UIProcess/WebPageProxy.h
@@ -110,6 +110,7 @@ OBJC_CLASS _WKRemoteObjectRegistry;
#endif
#if PLATFORM(QT)
+#include "ArgumentCodersQt.h"
#include "QtNetworkRequestData.h"
#endif
@@ -865,7 +866,6 @@ public:
bool isValid() const;
const String& urlAtProcessExit() const { return m_urlAtProcessExit; }
- FrameLoadState::LoadState loadStateAtProcessExit() const { return m_loadStateAtProcessExit; }
#if ENABLE(DRAG_SUPPORT)
WebCore::DragOperation currentDragOperation() const { return m_currentDragOperation; }
@@ -1147,8 +1147,8 @@ private:
virtual void failedToShowPopupMenu() override;
#endif
#if PLATFORM(QT)
- virtual void changeSelectedIndex(int32_t newSelectedIndex);
- virtual void closePopupMenu();
+ void changeSelectedIndex(int32_t newSelectedIndex) override;
+ void closePopupMenu() override;
#endif
void didCreateMainFrame(uint64_t frameID);
@@ -1631,7 +1631,6 @@ private:
String m_toolTip;
String m_urlAtProcessExit;
- FrameLoadState::LoadState m_loadStateAtProcessExit;
EditorState m_editorState;
bool m_isEditable;
diff --git a/Source/WebKit2/UIProcess/qt/BackingStoreQt.cpp b/Source/WebKit2/UIProcess/qt/BackingStoreQt.cpp
index 1af16d842..a44ed681d 100644
--- a/Source/WebKit2/UIProcess/qt/BackingStoreQt.cpp
+++ b/Source/WebKit2/UIProcess/qt/BackingStoreQt.cpp
@@ -28,8 +28,8 @@
#include "config.h"
#include "BackingStore.h"
-#include "UpdateInfo.h"
#include "ShareableBitmap.h"
+#include "UpdateInfo.h"
#include <WebCore/GraphicsContext.h>
#include <WebCore/IntRect.h>
diff --git a/Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.cpp b/Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.cpp
index f72946529..0dbaa651e 100644
--- a/Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.cpp
+++ b/Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.cpp
@@ -274,7 +274,7 @@ void PageViewportControllerClientQt::zoomToAreaGestureEnded(const QPointF& touch
// Zoom back out if attempting to scale to the same current scale, or
// attempting to continue scaling out from the inner most level.
// Use fuzzy compare with a fixed error to be able to deal with largish differences due to pixel rounding.
- if (!m_scaleStack.isEmpty() && fuzzyCompare(targetScale, currentScale, 0.01)) {
+ if (!m_scaleStack.isEmpty() && WTF::areEssentiallyEqual(targetScale, currentScale, qreal(0.01))) {
// If moving the viewport would expose more of the targetRect and move at least 40 pixels, update position but do not scale out.
QRectF currentContentRect(m_viewportItem->mapRectToWebContent(viewportRect));
QRectF targetIntersection = endVisibleContentRect.intersected(targetArea);
@@ -284,7 +284,7 @@ void PageViewportControllerClientQt::zoomToAreaGestureEnded(const QPointF& touch
zoomAction = NoZoom;
else
zoomAction = ZoomBack;
- } else if (fuzzyCompare(targetScale, m_zoomOutScale, 0.01))
+ } else if (WTF::areEssentiallyEqual(targetScale, m_zoomOutScale, qreal(0.01)))
zoomAction = ZoomBack;
else if (targetScale < currentScale)
zoomAction = ZoomOut;
diff --git a/Source/WebKit2/UIProcess/qt/QtDialogRunner.cpp b/Source/WebKit2/UIProcess/qt/QtDialogRunner.cpp
index 0dd547102..6d1949830 100644
--- a/Source/WebKit2/UIProcess/qt/QtDialogRunner.cpp
+++ b/Source/WebKit2/UIProcess/qt/QtDialogRunner.cpp
@@ -29,7 +29,6 @@
#include <QtQml/QQmlContext>
#include <QtQml/QQmlEngine>
#include <QtQuick/QQuickItem>
-#include <wtf/PassOwnPtr.h>
namespace WebKit {
@@ -413,7 +412,7 @@ bool QtDialogRunner::createDialog(QQmlComponent* component, QObject* contextObje
QQmlContext* baseContext = component->creationContext();
if (!baseContext)
baseContext = QQmlEngine::contextForObject(m_webView);
- m_dialogContext = adoptPtr(new QQmlContext(baseContext));
+ m_dialogContext = std::make_unique<QQmlContext>(baseContext);
// This makes both "message" and "model.message" work for the dialog,
// just like QtQuick's ListView delegates.
@@ -423,14 +422,13 @@ bool QtDialogRunner::createDialog(QQmlComponent* component, QObject* contextObje
QObject* object = component->beginCreate(m_dialogContext.get());
if (!object) {
- m_dialogContext.clear();
+ m_dialogContext = nullptr;
return false;
}
- m_dialog = adoptPtr(qobject_cast<QQuickItem*>(object));
+ m_dialog.reset(qobject_cast<QQuickItem*>(object));
if (!m_dialog) {
- m_dialogContext.clear();
- m_dialog.clear();
+ m_dialogContext = nullptr;
return false;
}
@@ -480,4 +478,3 @@ void QtDialogRunner::onDatabaseQuotaAccepted(quint64 quota)
#include "QtDialogRunner.moc"
#include "moc_QtDialogRunner.cpp"
-
diff --git a/Source/WebKit2/UIProcess/qt/QtDialogRunner.h b/Source/WebKit2/UIProcess/qt/QtDialogRunner.h
index b70044076..fcb276080 100644
--- a/Source/WebKit2/UIProcess/qt/QtDialogRunner.h
+++ b/Source/WebKit2/UIProcess/qt/QtDialogRunner.h
@@ -21,11 +21,10 @@
#ifndef QtDialogRunner_h
#define QtDialogRunner_h
-#include "WKSecurityOrigin.h"
+#include "WKSecurityOriginRef.h"
#include "qquickwebview_p.h"
#include <QtCore/QEventLoop>
#include <QtCore/QStringList>
-#include <wtf/OwnPtr.h>
QT_BEGIN_NAMESPACE
class QQmlComponent;
@@ -75,8 +74,8 @@ private:
bool createDialog(QQmlComponent*, QObject* contextObject);
QQuickWebView* m_webView;
- OwnPtr<QQmlContext> m_dialogContext;
- OwnPtr<QQuickItem> m_dialog;
+ std::unique_ptr<QQmlContext> m_dialogContext;
+ std::unique_ptr<QQuickItem> m_dialog;
QString m_result;
bool m_wasAccepted;
diff --git a/Source/WebKit2/UIProcess/qt/QtPageClient.cpp b/Source/WebKit2/UIProcess/qt/QtPageClient.cpp
index 8c0e0c31a..1b62c94ba 100644
--- a/Source/WebKit2/UIProcess/qt/QtPageClient.cpp
+++ b/Source/WebKit2/UIProcess/qt/QtPageClient.cpp
@@ -209,14 +209,14 @@ IntRect QtPageClient::windowToScreen(const IntRect& rect)
return rect;
}
-PassRefPtr<WebPopupMenuProxy> QtPageClient::createPopupMenuProxy(WebPageProxy* webPageProxy)
+RefPtr<WebPopupMenuProxy> QtPageClient::createPopupMenuProxy(WebPageProxy& webPageProxy)
{
return WebPopupMenuProxyQt::create(webPageProxy, m_webView);
}
-PassRefPtr<WebContextMenuProxy> QtPageClient::createContextMenuProxy(WebPageProxy* webPageProxy)
+std::unique_ptr<WebContextMenuProxy> QtPageClient::createContextMenuProxy(WebPageProxy&, const ContextMenuContextData& context, const UserData& userData)
{
- return WebContextMenuProxyQt::create(webPageProxy);
+ return std::make_unique<WebContextMenuProxyQt>(context, userData);
}
#if ENABLE(INPUT_TYPE_COLOR)
@@ -226,11 +226,6 @@ PassRefPtr<WebColorPicker> QtPageClient::createColorPicker(WebPageProxy* webPage
}
#endif
-void QtPageClient::flashBackingStoreUpdates(const Vector<IntRect>&)
-{
- notImplemented();
-}
-
void QtPageClient::pageTransitionViewportReady()
{
PageViewportController* pvc = QQuickWebViewPrivate::get(m_webView)->viewportController();
diff --git a/Source/WebKit2/UIProcess/qt/QtPageClient.h b/Source/WebKit2/UIProcess/qt/QtPageClient.h
index 3cb5a8e07..2f63db4b6 100644
--- a/Source/WebKit2/UIProcess/qt/QtPageClient.h
+++ b/Source/WebKit2/UIProcess/qt/QtPageClient.h
@@ -21,7 +21,6 @@
#ifndef QtPageClient_h
#define QtPageClient_h
-#include "FindIndicator.h"
#include "PageClient.h"
class QQuickWebView;
@@ -42,65 +41,63 @@ public:
void initialize(QQuickWebView*, QtWebPageEventHandler*, WebKit::DefaultUndoController*);
// QQuickWebView.
- virtual void setViewNeedsDisplay(const WebCore::IntRect&);
- virtual void didRenderFrame(const WebCore::IntSize& contentsSize, const WebCore::IntRect& coveredRect);
- virtual WebCore::IntSize viewSize();
- virtual bool isViewFocused();
- virtual bool isViewVisible();
- virtual void pageDidRequestScroll(const WebCore::IntPoint&);
- virtual void didChangeContentsSize(const WebCore::IntSize&);
- virtual void didChangeViewportProperties(const WebCore::ViewportAttributes&);
- virtual void processDidCrash();
- virtual void didRelaunchProcess();
- virtual std::unique_ptr<DrawingAreaProxy> createDrawingAreaProxy();
- virtual void handleDownloadRequest(DownloadProxy*);
- virtual void handleApplicationSchemeRequest(PassRefPtr<QtRefCountedNetworkRequestData>);
- virtual void handleAuthenticationRequiredRequest(const String& hostname, const String& realm, const String& prefilledUsername, String& username, String& password);
- virtual void handleCertificateVerificationRequest(const String& hostname, bool& ignoreErrors);
- virtual void handleProxyAuthenticationRequiredRequest(const String& hostname, uint16_t port, const String& prefilledUsername, String& username, String& password);
+ void setViewNeedsDisplay(const WebCore::IntRect&) override;
+ void didRenderFrame(const WebCore::IntSize& contentsSize, const WebCore::IntRect& coveredRect) override;
+ WebCore::IntSize viewSize() override;
+ bool isViewFocused() override;
+ bool isViewVisible() override;
+ void pageDidRequestScroll(const WebCore::IntPoint&) override;
+ void didChangeContentsSize(const WebCore::IntSize&) override;
+ void didChangeViewportProperties(const WebCore::ViewportAttributes&) override;
+ void processDidCrash() override;
+ void didRelaunchProcess() override;
+ std::unique_ptr<DrawingAreaProxy> createDrawingAreaProxy() override;
+ void handleDownloadRequest(DownloadProxy*) override;
+ void handleApplicationSchemeRequest(PassRefPtr<QtRefCountedNetworkRequestData>) override;
+ void handleAuthenticationRequiredRequest(const String& hostname, const String& realm, const String& prefilledUsername, String& username, String& password) override;
+ void handleCertificateVerificationRequest(const String& hostname, bool& ignoreErrors) override;
+ void handleProxyAuthenticationRequiredRequest(const String& hostname, uint16_t port, const String& prefilledUsername, String& username, String& password) override;
- virtual void displayView();
- virtual bool canScrollView() { return false; }
- virtual void scrollView(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset);
- virtual bool isViewWindowActive();
- virtual bool isViewInWindow();
-#if USE(ACCELERATED_COMPOSITING)
- virtual void enterAcceleratedCompositingMode(const LayerTreeContext&);
- virtual void exitAcceleratedCompositingMode();
- virtual void updateAcceleratedCompositingMode(const LayerTreeContext&);
-#endif // USE(ACCELERATED_COMPOSITING)
- virtual void pageClosed() { }
- virtual void preferencesDidChange() { }
- virtual void startDrag(const WebCore::DragData&, PassRefPtr<ShareableBitmap> dragImage);
- virtual void setCursor(const WebCore::Cursor&);
- virtual void setCursorHiddenUntilMouseMoves(bool);
- virtual void toolTipChanged(const String&, const String&);
+ void displayView() override;
+ bool canScrollView() override { return false; }
+ void scrollView(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset) override;
+ bool isViewWindowActive() override;
+ bool isViewInWindow() override;
+ void enterAcceleratedCompositingMode(const LayerTreeContext&) override;
+ void exitAcceleratedCompositingMode() override;
+ void updateAcceleratedCompositingMode(const LayerTreeContext&) override;
+ void pageClosed() override { }
+ void preferencesDidChange() override { }
+ void startDrag(const WebCore::DragData&, PassRefPtr<ShareableBitmap> dragImage) override;
+ void setCursor(const WebCore::Cursor&) override;
+ void setCursorHiddenUntilMouseMoves(bool) override;
+ void toolTipChanged(const String&, const String&) override;
// DefaultUndoController
- virtual void registerEditCommand(PassRefPtr<WebEditCommandProxy>, WebPageProxy::UndoOrRedo);
- virtual void clearAllEditCommands();
- virtual bool canUndoRedo(WebPageProxy::UndoOrRedo);
- virtual void executeUndoRedo(WebPageProxy::UndoOrRedo);
+ void registerEditCommand(PassRefPtr<WebEditCommandProxy>, WebPageProxy::UndoOrRedo) override;
+ void clearAllEditCommands() override;
+ bool canUndoRedo(WebPageProxy::UndoOrRedo) override;
+ void executeUndoRedo(WebPageProxy::UndoOrRedo) override;
- virtual WebCore::FloatRect convertToDeviceSpace(const WebCore::FloatRect&);
- virtual WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&);
- virtual WebCore::IntPoint screenToWindow(const WebCore::IntPoint&);
- virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&);
- virtual void doneWithKeyEvent(const NativeWebKeyboardEvent&, bool wasEventHandled) { }
- virtual PassRefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy*);
- virtual PassRefPtr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy*);
+ WebCore::FloatRect convertToDeviceSpace(const WebCore::FloatRect&) override;
+ WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&) override;
+ WebCore::IntPoint screenToWindow(const WebCore::IntPoint&) override;
+ WebCore::IntRect windowToScreen(const WebCore::IntRect&) override;
+ void doneWithKeyEvent(const NativeWebKeyboardEvent&, bool wasEventHandled) override { }
+ RefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy&) override;
+ std::unique_ptr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy&, const ContextMenuContextData&, const UserData&) override;
#if ENABLE(INPUT_TYPE_COLOR)
virtual PassRefPtr<WebColorPicker> createColorPicker(WebPageProxy*, const WebCore::Color& initialColor, const WebCore::IntRect&);
#endif
- virtual void setFindIndicator(PassRefPtr<FindIndicator>, bool fadeOut, bool animate) { }
- virtual void flashBackingStoreUpdates(const Vector<WebCore::IntRect>& updateRects);
- virtual void pageTransitionViewportReady();
- virtual void didFindZoomableArea(const WebCore::IntPoint&, const WebCore::IntRect&);
- virtual void updateTextInputState();
- virtual void handleWillSetInputMethodState();
- virtual void doneWithGestureEvent(const WebGestureEvent&, bool wasEventHandled);
+ void pageTransitionViewportReady() override;
+ void didFindZoomableArea(const WebCore::IntPoint&, const WebCore::IntRect&) override;
+ void updateTextInputState() override;
+ void handleWillSetInputMethodState() override;
+#if ENABLE(GESTURE_EVENTS)
+ void doneWithGestureEvent(const WebGestureEvent&, bool wasEventHandled) override;
+#endif
#if ENABLE(TOUCH_EVENTS)
- virtual void doneWithTouchEvent(const NativeWebTouchEvent&, bool wasEventHandled);
+ void doneWithTouchEvent(const NativeWebTouchEvent&, bool wasEventHandled) override;
#endif
private:
diff --git a/Source/WebKit2/UIProcess/qt/QtPinchGestureRecognizer.cpp b/Source/WebKit2/UIProcess/qt/QtPinchGestureRecognizer.cpp
index 7fa58014f..a26c01062 100644
--- a/Source/WebKit2/UIProcess/qt/QtPinchGestureRecognizer.cpp
+++ b/Source/WebKit2/UIProcess/qt/QtPinchGestureRecognizer.cpp
@@ -103,4 +103,3 @@ void QtPinchGestureRecognizer::cancel()
}
} // namespace WebKit
-
diff --git a/Source/WebKit2/UIProcess/qt/QtWebContext.cpp b/Source/WebKit2/UIProcess/qt/QtWebContext.cpp
index 6d80596dd..7d3ecc920 100644
--- a/Source/WebKit2/UIProcess/qt/QtWebContext.cpp
+++ b/Source/WebKit2/UIProcess/qt/QtWebContext.cpp
@@ -67,7 +67,7 @@ static void initInspectorServer()
return;
}
- bool success = WebInspectorServer::shared().listen(bindAddress, port);
+ bool success = WebInspectorServer::singleton().listen(bindAddress, port);
if (success) {
QString inspectorServerUrl = QString::fromLatin1("http://%1:%2").arg(bindAddress).arg(port);
qWarning("Inspector server started successfully. Try pointing a WebKit browser to %s", qPrintable(inspectorServerUrl));
@@ -206,4 +206,3 @@ QString QtWebContext::preparedStoragePath(StorageType type)
}
} // namespace WebKit
-
diff --git a/Source/WebKit2/UIProcess/qt/QtWebError.cpp b/Source/WebKit2/UIProcess/qt/QtWebError.cpp
index c2f506c8f..940e2a510 100644
--- a/Source/WebKit2/UIProcess/qt/QtWebError.cpp
+++ b/Source/WebKit2/UIProcess/qt/QtWebError.cpp
@@ -21,6 +21,8 @@
#include "config.h"
#include "QtWebError.h"
+#include "WKErrorRef.h"
+
#include <QtCore/QUrl>
#include <WKSharedAPICast.h>
#include <WKString.h>
diff --git a/Source/WebKit2/UIProcess/qt/QtWebError.h b/Source/WebKit2/UIProcess/qt/QtWebError.h
index c2b922603..660aee855 100644
--- a/Source/WebKit2/UIProcess/qt/QtWebError.h
+++ b/Source/WebKit2/UIProcess/qt/QtWebError.h
@@ -22,8 +22,8 @@
#define QtWebError_h
#include "qwebdownloaditem_p.h"
+#include <APIError.h>
#include <QtNetwork/QNetworkReply>
-#include <WKError.h>
#include <WKRetainPtr.h>
QT_BEGIN_NAMESPACE
diff --git a/Source/WebKit2/UIProcess/qt/QtWebIconDatabaseClient.cpp b/Source/WebKit2/UIProcess/qt/QtWebIconDatabaseClient.cpp
index 86ac710bf..f28fb4163 100644
--- a/Source/WebKit2/UIProcess/qt/QtWebIconDatabaseClient.cpp
+++ b/Source/WebKit2/UIProcess/qt/QtWebIconDatabaseClient.cpp
@@ -92,4 +92,3 @@ void QtWebIconDatabaseClient::releaseIconForPageURL(const QString& pageURL)
} // namespace WebKit
#include "moc_QtWebIconDatabaseClient.cpp"
-
diff --git a/Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.cpp b/Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.cpp
index 8e7c5c221..9b620fb9d 100644
--- a/Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.cpp
+++ b/Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.cpp
@@ -188,7 +188,7 @@ void QtWebPageEventHandler::handleDragEnterEvent(QDragEnterEvent* ev)
QTransform fromItemTransform = m_webPage->transformFromItem();
// FIXME: Should not use QCursor::pos()
DragData dragData(ev->mimeData(), fromItemTransform.map(ev->pos()), QCursor::pos(), dropActionToDragOperation(ev->possibleActions()));
- m_webPageProxy->dragEntered(&dragData);
+ m_webPageProxy->dragEntered(dragData);
ev->acceptProposedAction();
}
@@ -198,7 +198,7 @@ void QtWebPageEventHandler::handleDragLeaveEvent(QDragLeaveEvent* ev)
// FIXME: Should not use QCursor::pos()
DragData dragData(0, IntPoint(), QCursor::pos(), DragOperationNone);
- m_webPageProxy->dragExited(&dragData);
+ m_webPageProxy->dragExited(dragData);
m_webPageProxy->resetDragOperation();
ev->setAccepted(accepted);
@@ -211,7 +211,7 @@ void QtWebPageEventHandler::handleDragMoveEvent(QDragMoveEvent* ev)
QTransform fromItemTransform = m_webPage->transformFromItem();
// FIXME: Should not use QCursor::pos()
DragData dragData(ev->mimeData(), fromItemTransform.map(ev->pos()), QCursor::pos(), dropActionToDragOperation(ev->possibleActions()));
- m_webPageProxy->dragUpdated(&dragData);
+ m_webPageProxy->dragUpdated(dragData);
ev->setDropAction(dragOperationToDropAction(m_webPageProxy->dragSession().operation));
if (m_webPageProxy->dragSession().operation != DragOperationNone)
ev->accept();
@@ -227,7 +227,7 @@ void QtWebPageEventHandler::handleDropEvent(QDropEvent* ev)
DragData dragData(ev->mimeData(), fromItemTransform.map(ev->pos()), QCursor::pos(), dropActionToDragOperation(ev->possibleActions()));
SandboxExtension::Handle handle;
SandboxExtension::HandleArray sandboxExtensionForUpload;
- m_webPageProxy->performDrag(&dragData, String(), handle, sandboxExtensionForUpload);
+ m_webPageProxy->performDragOperation(dragData, String(), handle, sandboxExtensionForUpload);
ev->setDropAction(dragOperationToDropAction(m_webPageProxy->dragSession().operation));
ev->accept();
@@ -261,12 +261,14 @@ void QtWebPageEventHandler::deactivateTapHighlight()
void QtWebPageEventHandler::handleSingleTapEvent(const QTouchEvent::TouchPoint& point)
{
+#if ENABLE(GESTURE_EVENTS)
deactivateTapHighlight();
m_postponeTextInputStateChanged = true;
QTransform fromItemTransform = m_webPage->transformFromItem();
WebGestureEvent gesture(WebEvent::GestureSingleTap, fromItemTransform.map(point.pos()).toPoint(), point.screenPos().toPoint(), WebEvent::Modifiers(0), 0, IntSize(point.rect().size().toSize()), FloatPoint(0, 0));
m_webPageProxy->handleGestureEvent(gesture);
+#endif
}
void QtWebPageEventHandler::handleDoubleTapEvent(const QTouchEvent::TouchPoint& point)
@@ -300,12 +302,12 @@ void QtWebPageEventHandler::handleKeyReleaseEvent(QKeyEvent* ev)
void QtWebPageEventHandler::handleFocusInEvent(QFocusEvent*)
{
- m_webPageProxy->viewStateDidChange(WebPageProxy::ViewIsFocused | WebPageProxy::ViewWindowIsActive);
+ m_webPageProxy->viewStateDidChange(ViewState::IsFocused | ViewState::WindowIsActive);
}
void QtWebPageEventHandler::handleFocusLost()
{
- m_webPageProxy->viewStateDidChange(WebPageProxy::ViewIsFocused | WebPageProxy::ViewWindowIsActive);
+ m_webPageProxy->viewStateDidChange(ViewState::IsFocused | ViewState::WindowIsActive);
}
void QtWebPageEventHandler::setViewportController(PageViewportControllerClientQt* controller)
@@ -446,6 +448,7 @@ void QtWebPageEventHandler::handleWillSetInputMethodState()
void QtWebPageEventHandler::doneWithGestureEvent(const WebGestureEvent& event, bool wasEventHandled)
{
+#if ENABLE(GESTURE_EVENTS)
if (event.type() != WebEvent::GestureSingleTap)
return;
@@ -455,6 +458,7 @@ void QtWebPageEventHandler::doneWithGestureEvent(const WebGestureEvent& event, b
return;
updateTextInputState();
+#endif
}
void QtWebPageEventHandler::handleInputEvent(const QInputEvent* event)
diff --git a/Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.h b/Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.h
index 005cb4ca0..cd44ddc85 100644
--- a/Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.h
+++ b/Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.h
@@ -84,7 +84,7 @@ public:
void didFindZoomableArea(const WebCore::IntPoint& target, const WebCore::IntRect& area);
void updateTextInputState();
- void doneWithGestureEvent(const WebGestureEvent& event, bool wasEventHandled);
+ void doneWithGestureEvent(const WebGestureEvent&, bool wasEventHandled);
#if ENABLE(TOUCH_EVENTS)
void doneWithTouchEvent(const NativeWebTouchEvent&, bool wasEventHandled);
#endif
diff --git a/Source/WebKit2/UIProcess/qt/QtWebPagePolicyClient.cpp b/Source/WebKit2/UIProcess/qt/QtWebPagePolicyClient.cpp
index 0c800ed64..88a9436af 100644
--- a/Source/WebKit2/UIProcess/qt/QtWebPagePolicyClient.cpp
+++ b/Source/WebKit2/UIProcess/qt/QtWebPagePolicyClient.cpp
@@ -158,4 +158,3 @@ void QtWebPagePolicyClient::decidePolicyForResponse(WKPageRef page, WKFrameRef f
}
} // namespace WebKit
-
diff --git a/Source/WebKit2/UIProcess/qt/QtWebPageSGNode.cpp b/Source/WebKit2/UIProcess/qt/QtWebPageSGNode.cpp
index 9a7b34951..1382312db 100644
--- a/Source/WebKit2/UIProcess/qt/QtWebPageSGNode.cpp
+++ b/Source/WebKit2/UIProcess/qt/QtWebPageSGNode.cpp
@@ -21,11 +21,12 @@
#include "config.h"
#include "QtWebPageSGNode.h"
+#include "CoordinatedGraphicsScene.h"
+
#include <QtGui/QPolygonF>
#include <QtQuick/QQuickItem>
#include <QtQuick/QQuickWindow>
#include <QtQuick/QSGSimpleRectNode>
-#include <WebCore/CoordinatedGraphicsScene.h>
#include <WebCore/TransformationMatrix.h>
#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
@@ -110,7 +111,7 @@ public:
return parent;
}
- WebCore::CoordinatedGraphicsScene* coordinatedGraphicsScene() const { return m_scene.get(); }
+ CoordinatedGraphicsScene* coordinatedGraphicsScene() const { return m_scene.get(); }
private:
QRectF clipRect() const
@@ -159,7 +160,7 @@ private:
return resultRect;
}
- RefPtr<WebCore::CoordinatedGraphicsScene> m_scene;
+ RefPtr<CoordinatedGraphicsScene> m_scene;
};
QtWebPageSGNode::QtWebPageSGNode()
@@ -183,7 +184,7 @@ void QtWebPageSGNode::setScale(float scale)
setMatrix(matrix);
}
-void QtWebPageSGNode::setCoordinatedGraphicsScene(PassRefPtr<WebCore::CoordinatedGraphicsScene> scene)
+void QtWebPageSGNode::setCoordinatedGraphicsScene(PassRefPtr<CoordinatedGraphicsScene> scene)
{
if (m_contentsNode && m_contentsNode->coordinatedGraphicsScene() == scene)
return;
diff --git a/Source/WebKit2/UIProcess/qt/QtWebPageSGNode.h b/Source/WebKit2/UIProcess/qt/QtWebPageSGNode.h
index 77ad81b6f..22d3767bf 100644
--- a/Source/WebKit2/UIProcess/qt/QtWebPageSGNode.h
+++ b/Source/WebKit2/UIProcess/qt/QtWebPageSGNode.h
@@ -29,20 +29,17 @@ class QQuickItem;
class QSGSimpleRectNode;
QT_END_NAMESPACE
-namespace WebCore {
-class CoordinatedGraphicsScene;
-}
-
namespace WebKit {
class ContentsSGNode;
+class CoordinatedGraphicsScene;
class QtWebPageSGNode : public QSGTransformNode {
public:
QtWebPageSGNode();
void setBackground(const QRectF&, const QColor&);
void setScale(float);
- void setCoordinatedGraphicsScene(PassRefPtr<WebCore::CoordinatedGraphicsScene>);
+ void setCoordinatedGraphicsScene(PassRefPtr<CoordinatedGraphicsScene>);
qreal devicePixelRatio() const { return m_devicePixelRatio; }
void setDevicePixelRatio(qreal devicePixelRatio) { m_devicePixelRatio = devicePixelRatio; }
diff --git a/Source/WebKit2/UIProcess/qt/QtWebPageUIClient.cpp b/Source/WebKit2/UIProcess/qt/QtWebPageUIClient.cpp
index af88423c6..482076370 100644
--- a/Source/WebKit2/UIProcess/qt/QtWebPageUIClient.cpp
+++ b/Source/WebKit2/UIProcess/qt/QtWebPageUIClient.cpp
@@ -119,8 +119,8 @@ bool QtWebPageUIClient::runJavaScriptConfirm(WKPageRef, WKStringRef message, WKF
static inline WKStringRef createNullWKString()
{
- RefPtr<WebString> webString = WebString::createNull();
- return toAPI(webString.release().leakRef());
+ RefPtr<API::String> apiString = API::String::createNull();
+ return toAPI(apiString.release().leakRef());
}
WKStringRef QtWebPageUIClient::runJavaScriptPrompt(WKPageRef, WKStringRef message, WKStringRef defaultValue, WKFrameRef, const void* clientInfo)
@@ -174,4 +174,3 @@ void QtWebPageUIClient::policyForNotificationPermissionRequest(WKPageRef page, W
}
} // namespace WebKit
-
diff --git a/Source/WebKit2/UIProcess/qt/QtWebPageUIClient.h b/Source/WebKit2/UIProcess/qt/QtWebPageUIClient.h
index e8aaa826b..b608d5880 100644
--- a/Source/WebKit2/UIProcess/qt/QtWebPageUIClient.h
+++ b/Source/WebKit2/UIProcess/qt/QtWebPageUIClient.h
@@ -26,7 +26,7 @@
#include <WKFrame.h>
#include <WKGeolocationPermissionRequest.h>
#include <WKPage.h>
-#include <WKSecurityOrigin.h>
+#include <WKSecurityOriginRef.h>
class QQuickWebView;
class QWebPermissionRequest;
diff --git a/Source/WebKit2/UIProcess/qt/WebColorPickerQt.cpp b/Source/WebKit2/UIProcess/qt/WebColorPickerQt.cpp
index 1bfa37624..d23cff04a 100644
--- a/Source/WebKit2/UIProcess/qt/WebColorPickerQt.cpp
+++ b/Source/WebKit2/UIProcess/qt/WebColorPickerQt.cpp
@@ -82,13 +82,13 @@ void WebColorPickerQt::createItem(QObject* contextObject)
createContext(component, contextObject);
QObject* object = component->beginCreate(m_context.get());
if (!object) {
- m_context.clear();
+ m_context = nullptr;
return;
}
- m_colorChooser = adoptPtr(qobject_cast<QQuickItem*>(object));
+ m_colorChooser.reset(qobject_cast<QQuickItem*>(object));
if (!m_colorChooser) {
- m_context.clear();
+ m_context = nullptr;
return;
}
@@ -107,7 +107,7 @@ void WebColorPickerQt::createContext(QQmlComponent* component, QObject* contextO
QQmlContext* baseContext = component->creationContext();
if (!baseContext)
baseContext = QQmlEngine::contextForObject(m_webView);
- m_context = adoptPtr(new QQmlContext(baseContext));
+ m_context.reset(new QQmlContext(baseContext));
contextObject->setParent(m_context.get());
m_context->setContextProperty(QLatin1String("model"), contextObject);
@@ -137,8 +137,8 @@ void WebColorPickerQt::notifyColorSelected(const QColor& color)
void WebColorPickerQt::endPicker()
{
- m_colorChooser.clear();
- m_context.clear();
+ m_colorChooser = nullptr;
+ m_context = nullptr;
if (!m_client)
return;
diff --git a/Source/WebKit2/UIProcess/qt/WebColorPickerQt.h b/Source/WebKit2/UIProcess/qt/WebColorPickerQt.h
index 00c72d7ab..08c4e7dcd 100644
--- a/Source/WebKit2/UIProcess/qt/WebColorPickerQt.h
+++ b/Source/WebKit2/UIProcess/qt/WebColorPickerQt.h
@@ -24,7 +24,6 @@
#include "IntRect.h"
#include "WebColorPicker.h"
#include <QtCore/QObject>
-#include <wtf/OwnPtr.h>
QT_BEGIN_NAMESPACE
class QQmlComponent;
@@ -64,8 +63,8 @@ private:
void createItem(QObject*);
void createContext(QQmlComponent*, QObject*);
- OwnPtr<QQmlContext> m_context;
- OwnPtr<QQuickItem> m_colorChooser;
+ std::unique_ptr<QQmlContext> m_context;
+ std::unique_ptr<QQuickItem> m_colorChooser;
QQuickWebView* m_webView;
};
diff --git a/Source/WebKit2/UIProcess/qt/WebContextMenuProxyQt.cpp b/Source/WebKit2/UIProcess/qt/WebContextMenuProxyQt.cpp
index d510c53ff..1ff57e9c9 100644
--- a/Source/WebKit2/UIProcess/qt/WebContextMenuProxyQt.cpp
+++ b/Source/WebKit2/UIProcess/qt/WebContextMenuProxyQt.cpp
@@ -31,16 +31,12 @@ using namespace WebCore;
namespace WebKit {
-WebContextMenuProxyQt::WebContextMenuProxyQt(WebPageProxy*)
+WebContextMenuProxyQt::WebContextMenuProxyQt(const ContextMenuContextData& context, const UserData& userData)
+ : WebContextMenuProxy(context, userData)
{
}
-PassRefPtr<WebContextMenuProxyQt> WebContextMenuProxyQt::create(WebPageProxy* webPageProxy)
-{
- return adoptRef(new WebContextMenuProxyQt(webPageProxy));
-}
-
-void WebContextMenuProxyQt::showContextMenu(const IntPoint& position, const Vector<WebContextMenuItemData>& items)
+void WebContextMenuProxyQt::showContextMenu(const IntPoint&, const Vector<WebContextMenuItemData>&)
{
}
@@ -51,4 +47,3 @@ void WebContextMenuProxyQt::hideContextMenu()
#include "moc_WebContextMenuProxyQt.cpp"
} // namespace WebKit
-
diff --git a/Source/WebKit2/UIProcess/qt/WebContextMenuProxyQt.h b/Source/WebKit2/UIProcess/qt/WebContextMenuProxyQt.h
index bd7aebd6f..a0cc82d0a 100644
--- a/Source/WebKit2/UIProcess/qt/WebContextMenuProxyQt.h
+++ b/Source/WebKit2/UIProcess/qt/WebContextMenuProxyQt.h
@@ -37,11 +37,9 @@ class WebPageProxy;
class WebContextMenuProxyQt : public QObject, public WebContextMenuProxy {
Q_OBJECT
public:
- static PassRefPtr<WebContextMenuProxyQt> create(WebPageProxy*);
+ WebContextMenuProxyQt(const ContextMenuContextData&, const UserData&);
private:
- WebContextMenuProxyQt(WebPageProxy*);
-
virtual void showContextMenu(const WebCore::IntPoint&, const Vector<WebContextMenuItemData>&);
virtual void hideContextMenu();
};
diff --git a/Source/WebKit2/UIProcess/qt/WebGeolocationProviderQt.h b/Source/WebKit2/UIProcess/qt/WebGeolocationProviderQt.h
index e476b128d..177266b4e 100644
--- a/Source/WebKit2/UIProcess/qt/WebGeolocationProviderQt.h
+++ b/Source/WebKit2/UIProcess/qt/WebGeolocationProviderQt.h
@@ -22,9 +22,9 @@
#define WebGeolocationProviderQt_h
#include <QObject>
-#include <WebKit2/WKGeolocationManager.h>
-#include <WebKit2/WKGeolocationPosition.h>
-#include <WebKit2/WKRetainPtr.h>
+#include <WebKit/WKGeolocationManager.h>
+#include <WebKit/WKGeolocationPosition.h>
+#include <WebKit/WKRetainPtr.h>
QT_BEGIN_NAMESPACE
class QGeoPositionInfoSource;
diff --git a/Source/WebKit2/UIProcess/qt/WebPageProxyQt.cpp b/Source/WebKit2/UIProcess/qt/WebPageProxyQt.cpp
index a89782506..541cca01f 100644
--- a/Source/WebKit2/UIProcess/qt/WebPageProxyQt.cpp
+++ b/Source/WebKit2/UIProcess/qt/WebPageProxyQt.cpp
@@ -62,7 +62,7 @@ void WebPageProxy::loadRecentSearches(const String&, Vector<String>&)
void WebPageProxy::registerApplicationScheme(const String& scheme)
{
- process()->send(Messages::WebPage::RegisterApplicationScheme(scheme), m_pageID);
+ process().send(Messages::WebPage::RegisterApplicationScheme(scheme), m_pageID);
}
void WebPageProxy::resolveApplicationSchemeRequest(QtNetworkRequestData request)
@@ -80,7 +80,7 @@ void WebPageProxy::sendApplicationSchemeReply(const QQuickNetworkReply* reply)
RefPtr<QtRefCountedNetworkRequestData> requestData = reply->networkRequestData();
if (m_applicationSchemeRequests.contains(requestData)) {
RefPtr<QtRefCountedNetworkReplyData> replyData = reply->networkReplyData();
- process()->send(Messages::WebPage::ApplicationSchemeReply(replyData->data()), pageID());
+ process().send(Messages::WebPage::ApplicationSchemeReply(replyData->data()), pageID());
m_applicationSchemeRequests.remove(requestData);
}
#endif
@@ -88,17 +88,17 @@ void WebPageProxy::sendApplicationSchemeReply(const QQuickNetworkReply* reply)
void WebPageProxy::authenticationRequiredRequest(const String& hostname, const String& realm, const String& prefilledUsername, String& username, String& password)
{
- m_pageClient->handleAuthenticationRequiredRequest(hostname, realm, prefilledUsername, username, password);
+ m_pageClient.handleAuthenticationRequiredRequest(hostname, realm, prefilledUsername, username, password);
}
void WebPageProxy::proxyAuthenticationRequiredRequest(const String& hostname, uint16_t port, const String& prefilledUsername, String& username, String& password)
{
- m_pageClient->handleProxyAuthenticationRequiredRequest(hostname, port, prefilledUsername, username, password);
+ m_pageClient.handleProxyAuthenticationRequiredRequest(hostname, port, prefilledUsername, username, password);
}
void WebPageProxy::certificateVerificationRequest(const String& hostname, bool& ignoreErrors)
{
- m_pageClient->handleCertificateVerificationRequest(hostname, ignoreErrors);
+ m_pageClient.handleCertificateVerificationRequest(hostname, ignoreErrors);
}
#if PLUGIN_ARCHITECTURE(X11)
@@ -115,17 +115,17 @@ void WebPageProxy::windowedPluginGeometryDidChange(const WebCore::IntRect& frame
void WebPageProxy::changeSelectedIndex(int32_t selectedIndex)
{
- process()->send(Messages::WebPage::SelectedIndex(selectedIndex), m_pageID);
+ process().send(Messages::WebPage::SelectedIndex(selectedIndex), m_pageID);
}
void WebPageProxy::closePopupMenu()
{
- process()->send(Messages::WebPage::HidePopupMenu(), m_pageID);
+ process().send(Messages::WebPage::HidePopupMenu(), m_pageID);
}
void WebPageProxy::willSetInputMethodState()
{
- m_pageClient->handleWillSetInputMethodState();
+ m_pageClient.handleWillSetInputMethodState();
}
} // namespace WebKit
diff --git a/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.cpp b/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.cpp
index 128379f26..d82aa23ad 100644
--- a/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.cpp
+++ b/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.cpp
@@ -262,7 +262,7 @@ void PopupMenuItemModel::buildItems(const Vector<WebPopupItem>& webPopupItems)
}
}
-WebPopupMenuProxyQt::WebPopupMenuProxyQt(WebPopupMenuProxy::Client* client, QQuickWebView* webView)
+WebPopupMenuProxyQt::WebPopupMenuProxyQt(WebPopupMenuProxy::Client& client, QQuickWebView* webView)
: WebPopupMenuProxy(client)
, m_webView(webView)
{
@@ -287,8 +287,8 @@ void WebPopupMenuProxyQt::showPopupMenu(const IntRect& rect, WebCore::TextDirect
void WebPopupMenuProxyQt::hidePopupMenu()
{
- m_itemSelector.clear();
- m_context.clear();
+ m_itemSelector = nullptr;
+ m_context = nullptr;
if (m_client) {
m_client->closePopupMenu();
@@ -314,7 +314,7 @@ void WebPopupMenuProxyQt::createItem(QObject* contextObject)
if (!object)
return;
- m_itemSelector = adoptPtr(qobject_cast<QQuickItem*>(object));
+ m_itemSelector.reset(qobject_cast<QQuickItem*>(object));
if (!m_itemSelector)
return;
@@ -339,7 +339,7 @@ void WebPopupMenuProxyQt::createContext(QQmlComponent* component, QObject* conte
QQmlContext* baseContext = component->creationContext();
if (!baseContext)
baseContext = QQmlEngine::contextForObject(m_webView);
- m_context = adoptPtr(new QQmlContext(baseContext));
+ m_context.reset(new QQmlContext(baseContext));
contextObject->setParent(m_context.get());
m_context->setContextProperty(QLatin1String("model"), contextObject);
diff --git a/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.h b/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.h
index e622f9006..fa03dbf07 100644
--- a/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.h
+++ b/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.h
@@ -29,7 +29,6 @@
#include "WebPopupMenuProxy.h"
#include <QtCore/QObject>
-#include <wtf/OwnPtr.h>
QT_BEGIN_NAMESPACE
class QQmlComponent;
@@ -50,9 +49,9 @@ public:
MultipleSelection
};
- static PassRefPtr<WebPopupMenuProxyQt> create(WebPopupMenuProxy::Client* client, QQuickWebView* webView)
+ static Ref<WebPopupMenuProxyQt> create(WebPopupMenuProxy::Client& client, QQuickWebView* webView)
{
- return adoptRef(new WebPopupMenuProxyQt(client, webView));
+ return adoptRef(*new WebPopupMenuProxyQt(client, webView));
}
~WebPopupMenuProxyQt();
@@ -65,12 +64,12 @@ private Q_SLOTS:
void selectIndex(int);
private:
- WebPopupMenuProxyQt(WebPopupMenuProxy::Client*, QQuickWebView*);
+ WebPopupMenuProxyQt(WebPopupMenuProxy::Client&, QQuickWebView*);
void createItem(QObject*);
void createContext(QQmlComponent*, QObject*);
- OwnPtr<QQmlContext> m_context;
- OwnPtr<QQuickItem> m_itemSelector;
+ std::unique_ptr<QQmlContext> m_context;
+ std::unique_ptr<QQuickItem> m_itemSelector;
QQuickWebView* m_webView;
SelectionType m_selectionType;
diff --git a/Source/WebKit2/UIProcess/qt/WebContextQt.cpp b/Source/WebKit2/UIProcess/qt/WebProcessPoolQt.cpp
index 7661559fe..11ef5e380 100644
--- a/Source/WebKit2/UIProcess/qt/WebContextQt.cpp
+++ b/Source/WebKit2/UIProcess/qt/WebProcessPoolQt.cpp
@@ -25,12 +25,12 @@
*/
#include "config.h"
-#include "WebContext.h"
+#include "WebProcessPool.h"
-#include "ApplicationCacheStorage.h"
#include "WKSharedAPICast.h"
#include "WebProcessCreationParameters.h"
#include <QProcess>
+#include <WebCore/ApplicationCacheStorage.h>
#if ENABLE(GEOLOCATION)
#include "WebGeolocationManagerProxy.h"
@@ -39,7 +39,7 @@
namespace WebKit {
-String WebContext::platformDefaultApplicationCacheDirectory() const
+String WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory()
{
const String cacheDirectory = WebCore::cacheStorage().cacheDirectory();
@@ -49,40 +49,26 @@ String WebContext::platformDefaultApplicationCacheDirectory() const
return cacheDirectory;
}
-void WebContext::platformInitializeWebProcess(WebProcessCreationParameters& parameters)
+void WebProcessPool::platformInitializeWebProcess(WebProcessCreationParameters& parameters)
{
qRegisterMetaType<QProcess::ExitStatus>("QProcess::ExitStatus");
-#if ENABLE(GEOLOCATION) && HAVE(QTLOCATION)
+#if ENABLE(GEOLOCATION) && HAVE(QTPOSITIONING)
static WebGeolocationProviderQt* location = WebGeolocationProviderQt::create(toAPI(supplement<WebGeolocationManagerProxy>()));
WKGeolocationManagerSetProvider(toAPI(supplement<WebGeolocationManagerProxy>()), WebGeolocationProviderQt::provider(location));
#endif
}
-void WebContext::platformInvalidateContext()
+void WebProcessPool::platformInvalidateContext()
{
}
-String WebContext::platformDefaultDatabaseDirectory() const
-{
- return String();
-}
-
-String WebContext::platformDefaultIconDatabasePath() const
-{
- return String();
-}
-
-String WebContext::platformDefaultLocalStorageDirectory() const
-{
- return String();
-}
-String WebContext::platformDefaultDiskCacheDirectory() const
+String WebProcessPool::platformDefaultIconDatabasePath() const
{
return String();
}
-String WebContext::platformDefaultCookieStorageDirectory() const
+String WebProcessPool::platformDefaultLocalStorageDirectory() const
{
return String();
}
diff --git a/Source/WebKit2/UIProcess/qt/WebProcessProxyQt.cpp b/Source/WebKit2/UIProcess/qt/WebProcessProxyQt.cpp
deleted file mode 100644
index e8b173d07..000000000
--- a/Source/WebKit2/UIProcess/qt/WebProcessProxyQt.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2012 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WebProcessProxy.h"
-
-namespace WebKit {
-
-void WebProcessProxy::platformGetLaunchOptions(ProcessLauncher::LaunchOptions&)
-{
-}
-
-} // namespace WebKit
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp b/Source/WebKit2/WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp
index a5183b135..9f5ff5d0e 100644
--- a/Source/WebKit2/WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp
+++ b/Source/WebKit2/WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp
@@ -54,8 +54,4 @@ bool InjectedBundle::load(APIObject* initializationUserData)
return true;
}
-void InjectedBundle::activateMacFontAscentHack()
-{
-}
-
} // namespace WebKit
diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/unix/NetscapePluginUnix.cpp b/Source/WebKit2/WebProcess/Plugins/Netscape/unix/NetscapePluginUnix.cpp
index b396b0b34..8b8eaa0bc 100644
--- a/Source/WebKit2/WebProcess/Plugins/Netscape/unix/NetscapePluginUnix.cpp
+++ b/Source/WebKit2/WebProcess/Plugins/Netscape/unix/NetscapePluginUnix.cpp
@@ -51,13 +51,14 @@ bool NetscapePlugin::platformPostInitialize()
}
#endif
- if (m_impl) {
- m_npWindow.type = m_impl->windowType();
- m_npWindow.window = m_impl->window();
- m_npWindow.ws_info = m_impl->windowSystemInfo();
- callSetWindow();
- }
+ // Windowed plugins need a platform implementation.
+ if (!m_impl)
+ return !m_isWindowed;
+ m_npWindow.type = m_impl->windowType();
+ m_npWindow.window = m_impl->window();
+ m_npWindow.ws_info = m_impl->windowSystemInfo();
+ callSetWindow();
return true;
}
diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp b/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp
index 175a20006..61cf8130f 100644
--- a/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp
+++ b/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp
@@ -221,7 +221,7 @@ void WebEditorClient::discardedComposition(Frame*)
void WebEditorClient::updateGlobalSelection(Frame* frame)
{
if (supportsGlobalSelection() && frame->selection().isRange())
- Pasteboard::createForGlobalSelection()->writeSelection(frame->selection().toNormalizedRange().get(), frame->editor().canSmartCopyOrDelete(), frame);
+ Pasteboard::createForGlobalSelection()->writeSelection(*frame->selection().toNormalizedRange(), frame->editor().canSmartCopyOrDelete(), *frame);
}
#endif
diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp b/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
index 00828dde6..5c341bacf 100644
--- a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
+++ b/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
@@ -1155,9 +1155,9 @@ bool WebFrameLoaderClient::shouldFallBack(const ResourceError& error)
return false;
#if PLATFORM(QT)
- DEFINE_STATIC_LOCAL(const ResourceError, errorInterruptedForPolicyChange, (this->interruptedForPolicyChangeError(ResourceRequest())));
+ static NeverDestroyed<const ResourceError> errorInterruptedForPolicyChange(this->interruptedForPolicyChangeError(ResourceRequest()));
- if (error.errorCode() == errorInterruptedForPolicyChange.errorCode() && error.domain() == errorInterruptedForPolicyChange.domain())
+ if (error.errorCode() == errorInterruptedForPolicyChange.get().errorCode() && error.domain() == errorInterruptedForPolicyChange.get().domain())
return false;
#endif
diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp b/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp
index 056412894..380208a46 100644
--- a/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp
+++ b/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp
@@ -26,7 +26,7 @@
#include "config.h"
#include "WebDragClient.h"
-#include "Clipboard.h"
+#include "DataTransfer.h"
#include "DragData.h"
#include "GraphicsContext.h"
#include "Pasteboard.h"
@@ -51,11 +51,11 @@ static PassRefPtr<ShareableBitmap> convertQPixmapToShareableBitmap(QPixmap* pixm
return bitmap.release();
}
-void WebDragClient::startDrag(DragImageRef dragImage, const IntPoint& clientPosition, const IntPoint& globalPosition, Clipboard* clipboard, Frame*, bool)
+void WebDragClient::startDrag(DragImageRef dragImage, const IntPoint& clientPosition, const IntPoint& globalPosition, DataTransfer& dataTransfer, Frame&, bool)
{
- QMimeData* clipboardData = clipboard->pasteboard().clipboardData();
- DragOperation dragOperationMask = clipboard->sourceOperation();
- clipboard->pasteboard().invalidateWritableData();
+ QMimeData* clipboardData = dataTransfer.pasteboard().clipboardData();
+ DragOperation dragOperationMask = dataTransfer.sourceOperation();
+ dataTransfer.pasteboard().invalidateWritableData();
DragData dragData(clipboardData, clientPosition, globalPosition, dragOperationMask);
RefPtr<ShareableBitmap> bitmap = convertQPixmapToShareableBitmap(dragImage);
diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp b/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp
index 7f2e74ce8..db024165d 100644
--- a/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp
+++ b/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp
@@ -27,22 +27,21 @@
#include "config.h"
#include "WebErrors.h"
-#include "WKError.h"
-#include "WebError.h"
+#include "APIError.h"
+#include "WKErrorRef.h"
+#include <QCoreApplication>
+#include <QNetworkReply>
#include <WebCore/ResourceError.h>
#include <WebCore/ResourceRequest.h>
#include <WebCore/ResourceResponse.h>
-#include <QCoreApplication>
-#include <QNetworkReply>
-
using namespace WebCore;
namespace WebKit {
ResourceError cancelledError(const ResourceRequest& request)
{
- ResourceError error = ResourceError("QtNetwork", QNetworkReply::OperationCanceledError, request.url().string(),
+ ResourceError error = ResourceError("QtNetwork", QNetworkReply::OperationCanceledError, request.url(),
QCoreApplication::translate("QWebFrame", "Request cancelled"));
error.setIsCancellation(true);
return error;
@@ -50,38 +49,50 @@ ResourceError cancelledError(const ResourceRequest& request)
ResourceError blockedError(const ResourceRequest& request)
{
- return ResourceError(WebError::webKitErrorDomain(), kWKErrorCodeCannotUseRestrictedPort, request.url().string(),
+ return ResourceError(API::Error::webKitErrorDomain(), kWKErrorCodeCannotUseRestrictedPort, request.url(),
QCoreApplication::translate("QWebFrame", "Request blocked"));
}
+ResourceError blockedByContentBlockerError(const WebCore::ResourceRequest& request)
+{
+ return ResourceError(API::Error::webKitErrorDomain(), kWKErrorCodeFrameLoadBlockedByContentBlocker, request.url(),
+ QCoreApplication::translate("QWebFrame", "The URL was blocked by a content blocker"));
+}
+
ResourceError cannotShowURLError(const ResourceRequest& request)
{
- return ResourceError(WebError::webKitErrorDomain(), kWKErrorCodeCannotShowURL, request.url().string(),
+ return ResourceError(API::Error::webKitErrorDomain(), kWKErrorCodeCannotShowURL, request.url(),
QCoreApplication::translate("QWebFrame", "Cannot show URL"));
}
ResourceError interruptedForPolicyChangeError(const ResourceRequest& request)
{
- return ResourceError(WebError::webKitErrorDomain(), kWKErrorCodeFrameLoadInterruptedByPolicyChange, request.url().string(),
+ return ResourceError(API::Error::webKitErrorDomain(), kWKErrorCodeFrameLoadInterruptedByPolicyChange, request.url(),
QCoreApplication::translate("QWebFrame", "Frame load interrupted by policy change"));
}
ResourceError cannotShowMIMETypeError(const ResourceResponse& response)
{
- return ResourceError(WebError::webKitErrorDomain(), kWKErrorCodeCannotShowMIMEType, response.url().string(),
+ return ResourceError(API::Error::webKitErrorDomain(), kWKErrorCodeCannotShowMIMEType, response.url(),
QCoreApplication::translate("QWebFrame", "Cannot show mimetype"));
}
ResourceError fileDoesNotExistError(const ResourceResponse& response)
{
- return ResourceError("QtNetwork", QNetworkReply::ContentNotFoundError, response.url().string(),
+ return ResourceError("QtNetwork", QNetworkReply::ContentNotFoundError, response.url(),
QCoreApplication::translate("QWebFrame", "File does not exist"));
}
ResourceError pluginWillHandleLoadError(const ResourceResponse& response)
{
- return ResourceError(WebError::webKitErrorDomain(), kWKErrorCodePlugInWillHandleLoad, response.url().string(),
+ return ResourceError(API::Error::webKitErrorDomain(), kWKErrorCodePlugInWillHandleLoad, response.url(),
QCoreApplication::translate("QWebFrame", "Loading is handled by the media engine"));
}
+ResourceError internalError(const WebCore::URL& url)
+{
+ return ResourceError(API::Error::webKitErrorDomain(), kWKErrorInternal, url,
+ QCoreApplication::translate("QWebFrame", "WebKit encountered an internal error"));
+}
+
} // namespace WebKit
diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp b/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp
index 7d8a7908e..e17ca0376 100644
--- a/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp
+++ b/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp
@@ -33,7 +33,7 @@ WebFrameNetworkingContext::WebFrameNetworkingContext(WebFrame* frame)
{
// Save the page ID for a valid page as it is needed later for HTTP authentication and SSL errors.
if (frame->page()) {
- m_originatingObject = adoptPtr(new QObject);
+ m_originatingObject.reset(new QObject);
m_originatingObject->setProperty("pageID", qulonglong(frame->page()->pageID()));
}
}
diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h b/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h
index 966e6d2e9..8e72baef6 100644
--- a/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h
+++ b/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h
@@ -22,7 +22,6 @@
#include "WebProcess.h"
#include <WebCore/FrameNetworkingContext.h>
-#include <wtf/OwnPtr.h>
namespace WebKit {
@@ -31,17 +30,18 @@ class WebFrame;
class WebFrameNetworkingContext : public WebCore::FrameNetworkingContext {
public:
static PassRefPtr<WebFrameNetworkingContext> create(WebFrame*);
- QObject* originatingObject() const { return m_originatingObject.get(); }
+
+ QObject* originatingObject() const override { return m_originatingObject.get(); }
private:
WebFrameNetworkingContext(WebFrame*);
~WebFrameNetworkingContext() { }
- QNetworkAccessManager* networkAccessManager() const { return WebProcess::shared().networkAccessManager(); }
- bool mimeSniffingEnabled() const { return m_mimeSniffingEnabled; }
- bool thirdPartyCookiePolicyPermission(const QUrl&) const { /*TODO. Used QWebSettings in WK1.*/ return true; }
+ QNetworkAccessManager* networkAccessManager() const override { return WebProcess::singleton().networkAccessManager(); }
+ bool mimeSniffingEnabled() const override { return m_mimeSniffingEnabled; }
+ bool thirdPartyCookiePolicyPermission(const QUrl&) const override { /*TODO. Used QWebSettings in WK1.*/ return true; }
- OwnPtr<QObject> m_originatingObject;
+ std::unique_ptr<QObject> m_originatingObject;
bool m_mimeSniffingEnabled;
};
diff --git a/Source/WebKit2/WebProcess/WebPage/TapHighlightController.cpp b/Source/WebKit2/WebProcess/WebPage/TapHighlightController.cpp
index 508595b0f..e086edab4 100644
--- a/Source/WebKit2/WebProcess/WebPage/TapHighlightController.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/TapHighlightController.cpp
@@ -75,11 +75,11 @@ void TapHighlightController::hideHighlight()
m_webPage->mainFrame()->pageOverlayController().uninstallPageOverlay(m_overlay, PageOverlay::FadeMode::Fade);
}
-void TapHighlightController::pageOverlayDestroyed(PageOverlay*)
+void TapHighlightController::pageOverlayDestroyed(PageOverlay&)
{
}
-void TapHighlightController::willMoveToWebPage(PageOverlay*, WebPage* webPage)
+void TapHighlightController::willMoveToPage(PageOverlay&, WebCore::Page* webPage)
{
if (webPage)
return;
@@ -89,7 +89,7 @@ void TapHighlightController::willMoveToWebPage(PageOverlay*, WebPage* webPage)
m_overlay = 0;
}
-void TapHighlightController::didMoveToWebPage(PageOverlay*, WebPage*)
+void TapHighlightController::didMoveToPage(PageOverlay&, WebCore::Page*)
{
}
@@ -98,19 +98,19 @@ static Color highlightColor(Color baseColor, float fractionFadedIn)
return Color(baseColor.red(), baseColor.green(), baseColor.blue(), int(baseColor.alpha() * fractionFadedIn));
}
-void TapHighlightController::drawRect(PageOverlay* /*pageOverlay*/, GraphicsContext& context, const IntRect& /*dirtyRect*/)
+void TapHighlightController::drawRect(PageOverlay& /*pageOverlay*/, GraphicsContext& context, const IntRect& /*dirtyRect*/)
{
if (m_path.isEmpty())
return;
{
GraphicsContextStateSaver stateSaver(context);
- context.setFillColor(highlightColor(m_color, 0.5f), ColorSpaceSRGB);
+ context.setFillColor(highlightColor(m_color, 0.5f));
context.fillPath(m_path);
}
}
-bool TapHighlightController::mouseEvent(PageOverlay*, const WebMouseEvent&)
+bool TapHighlightController::mouseEvent(PageOverlay&, const WebCore::PlatformMouseEvent&)
{
return false;
}
diff --git a/Source/WebKit2/WebProcess/WebPage/TapHighlightController.h b/Source/WebKit2/WebProcess/WebPage/TapHighlightController.h
index 5c39f7e64..f78b7f469 100644
--- a/Source/WebKit2/WebProcess/WebPage/TapHighlightController.h
+++ b/Source/WebKit2/WebProcess/WebPage/TapHighlightController.h
@@ -36,6 +36,7 @@ namespace WebCore {
class Frame;
class IntRect;
class Node;
+class Page;
}
namespace WebKit {
@@ -54,11 +55,11 @@ public:
private:
// PageOverlay::Client.
- virtual void pageOverlayDestroyed(WebCore::PageOverlay*);
- virtual void willMoveToWebPage(WebCore::PageOverlay*, WebPage*);
- virtual void didMoveToWebPage(WebCore::PageOverlay*, WebPage*);
- virtual bool mouseEvent(WebCore::PageOverlay*, const WebMouseEvent&);
- virtual void drawRect(WebCore::PageOverlay*, WebCore::GraphicsContext&, const WebCore::IntRect& dirtyRect);
+ void pageOverlayDestroyed(WebCore::PageOverlay&) override;
+ void willMoveToPage(WebCore::PageOverlay&, WebCore::Page*) override;
+ void didMoveToPage(WebCore::PageOverlay&, WebCore::Page*) override;
+ bool mouseEvent(WebCore::PageOverlay&, const WebCore::PlatformMouseEvent&) override;
+ void drawRect(WebCore::PageOverlay&, WebCore::GraphicsContext&, const WebCore::IntRect& dirtyRect) override;
private:
WebPage* m_webPage;
diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
index 71fe0688e..2cd709f22 100644
--- a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
@@ -834,8 +834,8 @@ EditorState WebPage::editorState(IncludePostLayoutDataHint shouldIncludePostLayo
if (!scope)
return result;
- if (isHTMLInputElement(scope)) {
- HTMLInputElement* input = toHTMLInputElement(scope);
+ if (is<HTMLInputElement>(scope)) {
+ HTMLInputElement* input = downcast<HTMLInputElement>(scope);
if (input->isTelephoneField())
result.inputMethodHints |= Qt::ImhDialableCharactersOnly;
else if (input->isNumberField())
@@ -881,8 +881,8 @@ EditorState WebPage::editorState(IncludePostLayoutDataHint shouldIncludePostLayo
// FIXME: We should only transfer innerText when it changes and do this on the UI side.
if (result.isContentEditable) {
- if (isHTMLTextFormControlElement(scope))
- result.surroundingText = toHTMLTextFormControlElement(scope)->innerTextValue();
+ if (is<HTMLTextFormControlElement>(scope))
+ result.surroundingText = downcast<HTMLTextFormControlElement>(scope)->innerTextValue();
else
result.surroundingText = scope->innerText();
@@ -2306,7 +2306,7 @@ void WebPage::highlightPotentialActivation(const IntPoint& point, const IntSize&
break;
// We always highlight focusable (form-elements), image links or content-editable elements.
- if ((node->isElementNode() && toElement(node)->isMouseFocusable()) || node->isLink() || node->isContentEditable())
+ if ((node->isElementNode() && downcast<Element>(node)->isMouseFocusable()) || node->isLink() || node->isContentEditable())
activationNode = node;
else if (node->willRespondToMouseClickEvents()) {
// Highlight elements with default mouse-click handlers, but highlight only inline elements with
diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.h b/Source/WebKit2/WebProcess/WebPage/WebPage.h
index 0a7516c12..8be9a42a9 100644
--- a/Source/WebKit2/WebProcess/WebPage/WebPage.h
+++ b/Source/WebKit2/WebProcess/WebPage/WebPage.h
@@ -83,6 +83,7 @@
#include "QtNetworkReply.h"
#include "QtNetworkReplyData.h"
#include "QtNetworkRequestData.h"
+#include "TapHighlightController.h"
#include <QNetworkReply>
#include <QNetworkRequest>
#endif
diff --git a/Source/WebKit2/WebProcess/WebPage/qt/WebInspectorQt.cpp b/Source/WebKit2/WebProcess/WebPage/qt/WebInspectorUIQt.cpp
index 1d7d539cc..838627309 100644
--- a/Source/WebKit2/WebProcess/WebPage/qt/WebInspectorQt.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/qt/WebInspectorUIQt.cpp
@@ -24,7 +24,7 @@
*/
#include "config.h"
-#include "WebInspector.h"
+#include "WebInspectorUI.h"
#if ENABLE(INSPECTOR)
@@ -33,15 +33,14 @@
namespace WebKit {
-bool WebInspector::canSave() const
+bool WebInspectorUI::canSave()
{
return false;
}
-String WebInspector::localizedStringsURL() const
+String WebInspectorUI::localizedStringsURL()
{
- notImplemented();
- return String();
+ return ASCIILiteral("qrc:///org/webkitgtk/inspector/Localizations/en.lproj/localizedStrings.js");
}
} // namespace WebKit
diff --git a/Source/WebKit2/WebProcess/WebPage/qt/WebPageQt.cpp b/Source/WebKit2/WebProcess/WebPage/qt/WebPageQt.cpp
index 6ee8a1d12..654829487 100644
--- a/Source/WebKit2/WebProcess/WebPage/qt/WebPageQt.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/qt/WebPageQt.cpp
@@ -300,7 +300,7 @@ PassRefPtr<SharedBuffer> WebPage::cachedResponseDataForURL(const URL&)
void WebPage::registerApplicationScheme(const String& scheme)
{
- QtNetworkAccessManager* qnam = qobject_cast<QtNetworkAccessManager*>(WebProcess::shared().networkAccessManager());
+ QtNetworkAccessManager* qnam = qobject_cast<QtNetworkAccessManager*>(WebProcess::singleton().networkAccessManager());
if (!qnam)
return;
qnam->registerApplicationScheme(this, QString(scheme));
@@ -334,7 +334,7 @@ void WebPage::hidePopupMenu()
return;
m_activePopupMenu->client()->popupDidHide();
- m_activePopupMenu = 0;
+ m_activePopupMenu = nullptr;
}
} // namespace WebKit
diff --git a/Source/WebKit2/WebProcess/qt/QtBuiltinBundle.cpp b/Source/WebKit2/WebProcess/qt/QtBuiltinBundle.cpp
index 3bb795cad..c0894bff7 100644
--- a/Source/WebKit2/WebProcess/qt/QtBuiltinBundle.cpp
+++ b/Source/WebKit2/WebProcess/qt/QtBuiltinBundle.cpp
@@ -33,13 +33,12 @@
#include "WKString.h"
#include "WKStringQt.h"
#include "WKType.h"
-#include <wtf/PassOwnPtr.h>
namespace WebKit {
QtBuiltinBundle::~QtBuiltinBundle()
{
- // For OwnPtr's sake.
+ // For unique_ptr's sake.
}
QtBuiltinBundle& QtBuiltinBundle::shared()
@@ -79,7 +78,7 @@ void QtBuiltinBundle::didReceiveMessageToPage(WKBundleRef, WKBundlePageRef page,
void QtBuiltinBundle::didCreatePage(WKBundlePageRef page)
{
- m_pages.add(page, adoptPtr(new QtBuiltinBundlePage(this, page)));
+ m_pages.add(page, std::make_unique<QtBuiltinBundlePage>(this, page));
}
void QtBuiltinBundle::willDestroyPage(WKBundlePageRef page)
diff --git a/Source/WebKit2/WebProcess/qt/QtBuiltinBundle.h b/Source/WebKit2/WebProcess/qt/QtBuiltinBundle.h
index 55f042b6c..fea74f8c5 100644
--- a/Source/WebKit2/WebProcess/qt/QtBuiltinBundle.h
+++ b/Source/WebKit2/WebProcess/qt/QtBuiltinBundle.h
@@ -30,7 +30,6 @@
#include "WKBundle.h"
#include "WKBundlePage.h"
#include <wtf/HashMap.h>
-#include <wtf/OwnPtr.h>
namespace WebKit {
@@ -61,7 +60,7 @@ private:
void handleMessageToNavigatorQtWebChannelTransport(WKBundlePageRef, WKTypeRef messageBody);
#endif
- HashMap<WKBundlePageRef, OwnPtr<QtBuiltinBundlePage> > m_pages;
+ HashMap<WKBundlePageRef, std::unique_ptr<QtBuiltinBundlePage>> m_pages;
WKBundleRef m_bundle;
};
diff --git a/Source/WebKit2/WebProcess/qt/QtNetworkAccessManager.h b/Source/WebKit2/WebProcess/qt/QtNetworkAccessManager.h
index fe37bda1f..5a3934b0e 100644
--- a/Source/WebKit2/WebProcess/qt/QtNetworkAccessManager.h
+++ b/Source/WebKit2/WebProcess/qt/QtNetworkAccessManager.h
@@ -44,7 +44,7 @@ public:
void registerApplicationScheme(const WebPage*, const QString& scheme);
protected:
- virtual QNetworkReply* createRequest(Operation, const QNetworkRequest&, QIODevice* outgoingData = 0) OVERRIDE;
+ QNetworkReply* createRequest(Operation, const QNetworkRequest&, QIODevice* outgoingData = 0) override;
private Q_SLOTS:
void onAuthenticationRequired(QNetworkReply *, QAuthenticator *);
diff --git a/Source/WebKit2/WebProcess/qt/QtNetworkReply.cpp b/Source/WebKit2/WebProcess/qt/QtNetworkReply.cpp
index 87689d971..bcda4380b 100644
--- a/Source/WebKit2/WebProcess/qt/QtNetworkReply.cpp
+++ b/Source/WebKit2/WebProcess/qt/QtNetworkReply.cpp
@@ -51,7 +51,7 @@ void QtNetworkReply::setData(const SharedMemory::Handle& handle, qint64 dataSize
{
if (handle.isNull())
return;
- m_sharedMemory = SharedMemory::create(handle, SharedMemory::ReadOnly);
+ m_sharedMemory = SharedMemory::map(handle, SharedMemory::Protection::ReadOnly);
if (!m_sharedMemory)
return;
@@ -98,4 +98,3 @@ void QtNetworkReply::finalize()
}
} // namespace WebKit
-
diff --git a/Source/WebKit2/WebProcess/qt/WebProcessMainQt.cpp b/Source/WebKit2/WebProcess/qt/WebProcessMainQt.cpp
index 474b6c6fe..1c202cf08 100644
--- a/Source/WebKit2/WebProcess/qt/WebProcessMainQt.cpp
+++ b/Source/WebKit2/WebProcess/qt/WebProcessMainQt.cpp
@@ -36,8 +36,8 @@
#include <QString>
#include <QStringList>
#include <QUrl>
-#include <WebCore/RunLoop.h>
#include <errno.h>
+#include <wtf/RunLoop.h>
#ifndef NDEBUG
#if !OS(WINDOWS)
@@ -72,14 +72,13 @@ static void sleep(unsigned seconds)
#endif
#endif
-class EnvHttpProxyFactory : public QNetworkProxyFactory
-{
+class EnvHttpProxyFactory : public QNetworkProxyFactory {
public:
EnvHttpProxyFactory() { }
bool initializeFromEnvironment();
- QList<QNetworkProxy> queryProxy(const QNetworkProxyQuery& query = QNetworkProxyQuery());
+ QList<QNetworkProxy> queryProxy(const QNetworkProxyQuery& = QNetworkProxyQuery());
private:
QList<QNetworkProxy> m_httpProxy;
@@ -132,9 +131,9 @@ static void initializeProxy()
if (proxylist.count() == 1) {
QNetworkProxy proxy = proxylist.first();
if (proxy == QNetworkProxy::NoProxy || proxy == QNetworkProxy::DefaultProxy) {
- OwnPtr<EnvHttpProxyFactory> proxyFactory = adoptPtr(new EnvHttpProxyFactory());
+ auto proxyFactory = std::make_unique<EnvHttpProxyFactory>();
if (proxyFactory->initializeFromEnvironment()) {
- QNetworkProxyFactory::setApplicationProxyFactory(proxyFactory.leakPtr());
+ QNetworkProxyFactory::setApplicationProxyFactory(proxyFactory.release());
return;
}
}
@@ -232,13 +231,13 @@ Q_DECL_EXPORT int WebProcessMainQt(QGuiApplication* app)
qDebug() << "Error: connection identifier wrong.";
return 1;
}
- CoreIPC::Connection::Identifier identifier;
+ IPC::Connection::Identifier identifier;
#if OS(WINDOWS)
// Convert to HANDLE
- identifier = reinterpret_cast<CoreIPC::Connection::Identifier>(id);
+ identifier = reinterpret_cast<IPC::Connection::Identifier>(id);
#else
// Convert to int
- identifier = static_cast<CoreIPC::Connection::Identifier>(id);
+ identifier = static_cast<IPC::Connection::Identifier>(id);
#endif
#endif
@@ -246,7 +245,7 @@ Q_DECL_EXPORT int WebProcessMainQt(QGuiApplication* app)
WebKit::ChildProcessInitializationParameters parameters;
parameters.connectionIdentifier = identifier;
- WebKit::WebProcess::shared().initialize(parameters);
+ WebKit::WebProcess::singleton().initialize(parameters);
RunLoop::run();
diff --git a/Source/WebKit2/WebProcess/qt/WebProcessQt.cpp b/Source/WebKit2/WebProcess/qt/WebProcessQt.cpp
index 4035f6734..f395198ef 100644
--- a/Source/WebKit2/WebProcess/qt/WebProcessQt.cpp
+++ b/Source/WebKit2/WebProcess/qt/WebProcessQt.cpp
@@ -72,7 +72,7 @@ void WebProcess::platformSetCacheModel(CacheModel cacheModel)
unsigned cacheTotalCapacity = 0;
unsigned cacheMinDeadCapacity = 0;
unsigned cacheMaxDeadCapacity = 0;
- double deadDecodedDataDeletionInterval = 0;
+ auto deadDecodedDataDeletionInterval = std::chrono::seconds { 0 };
unsigned pageCacheCapacity = 0;
unsigned long urlCacheMemoryCapacity = 0;
unsigned long urlCacheDiskCapacity = 0;
@@ -84,10 +84,11 @@ void WebProcess::platformSetCacheModel(CacheModel cacheModel)
if (diskCache)
diskCache->setMaximumCacheSize(urlCacheDiskCapacity);
- memoryCache()->setCapacities(cacheMinDeadCapacity, cacheMaxDeadCapacity, cacheTotalCapacity);
- memoryCache()->setDeadDecodedDataDeletionInterval(deadDecodedDataDeletionInterval);
+ auto& memoryCache = MemoryCache::singleton();
+ memoryCache.setCapacities(cacheMinDeadCapacity, cacheMaxDeadCapacity, cacheTotalCapacity);
+ memoryCache.setDeadDecodedDataDeletionInterval(deadDecodedDataDeletionInterval);
- pageCache()->setCapacity(pageCacheCapacity);
+ PageCache::singleton().setMaxSize(pageCacheCapacity);
// FIXME: Implement hybrid in-memory- and disk-caching as e.g. the Mac port does.
}
@@ -103,7 +104,7 @@ static void parentProcessDiedCallback(void*)
}
#endif
-void WebProcess::platformInitializeWebProcess(const WebProcessCreationParameters& parameters, CoreIPC::MessageDecoder&)
+void WebProcess::platformInitializeWebProcess(const WebProcessCreationParameters& parameters, IPC::MessageDecoder&)
{
#if ENABLE(SECCOMP_FILTERS)
{
@@ -138,13 +139,10 @@ void WebProcess::platformInitializeWebProcess(const WebProcessCreationParameters
}
#endif
- WebCore::RuntimeEnabledFeatures::sharedFeatures().setSpeechInputEnabled(false);
-
// We'll only install the Qt builtin bundle if we don't have one given by the UI process.
// Currently only WTR provides its own bundle.
if (parameters.injectedBundlePath.isEmpty()) {
- m_injectedBundle = InjectedBundle::create(String());
- m_injectedBundle->setSandboxExtension(SandboxExtension::create(parameters.injectedBundlePathExtensionHandle));
+ InjectedBundle::create(parameters, transformHandlesToObjects(parameters.initializationUserData.object()).get());
QtBuiltinBundle::shared().initialize(toAPI(m_injectedBundle.get()));
}
}