summaryrefslogtreecommitdiffstats
path: root/Source/WebKit2/UIProcess
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit2/UIProcess')
-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
64 files changed, 250 insertions, 323 deletions
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