summaryrefslogtreecommitdiffstats
path: root/Source/WebKit2/WebProcess/WebCoreSupport/qt
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-05-13 16:23:25 +0100
committerBen Murdoch <benm@google.com>2011-05-16 11:35:02 +0100
commit65f03d4f644ce73618e5f4f50dd694b26f55ae12 (patch)
treef478babb801e720de7bfaee23443ffe029f58731 /Source/WebKit2/WebProcess/WebCoreSupport/qt
parent47de4a2fb7262c7ebdb9cd133ad2c54c187454d0 (diff)
downloadexternal_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.zip
external_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.tar.gz
external_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.tar.bz2
Merge WebKit at r75993: Initial merge by git.
Change-Id: I602bbdc3974787a3b0450456a30a7868286921c3
Diffstat (limited to 'Source/WebKit2/WebProcess/WebCoreSupport/qt')
-rw-r--r--Source/WebKit2/WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp55
-rw-r--r--Source/WebKit2/WebProcess/WebCoreSupport/qt/WebDatabaseManagerQt.cpp36
-rw-r--r--Source/WebKit2/WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp95
-rw-r--r--Source/WebKit2/WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp51
-rw-r--r--Source/WebKit2/WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h42
-rw-r--r--Source/WebKit2/WebProcess/WebCoreSupport/qt/WebPopupMenuQt.cpp38
6 files changed, 317 insertions, 0 deletions
diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp b/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp
new file mode 100644
index 0000000..abfb70a
--- /dev/null
+++ b/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp
@@ -0,0 +1,55 @@
+/*
+ * 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 "WebContextMenuClient.h"
+
+#include "NotImplemented.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WebContextMenuClient::lookUpInDictionary(Frame*)
+{
+ notImplemented();
+}
+
+bool WebContextMenuClient::isSpeaking()
+{
+ notImplemented();
+ return false;
+}
+
+void WebContextMenuClient::speak(const String&)
+{
+ notImplemented();
+}
+
+void WebContextMenuClient::stopSpeaking()
+{
+ notImplemented();
+}
+
+} // namespace WebKit
diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebDatabaseManagerQt.cpp b/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebDatabaseManagerQt.cpp
new file mode 100644
index 0000000..11f929c
--- /dev/null
+++ b/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebDatabaseManagerQt.cpp
@@ -0,0 +1,36 @@
+/*
+ * 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 "WebDatabaseManager.h"
+
+namespace WebKit {
+
+String WebDatabaseManager::databaseDirectory() const
+{
+ // FIXME: Implement.
+ return "";
+}
+
+} // namespace WebKit
diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp b/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp
new file mode 100644
index 0000000..cee6842
--- /dev/null
+++ b/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp
@@ -0,0 +1,95 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * 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 "WebErrors.h"
+
+#include <WebCore/ResourceRequest.h>
+#include <WebCore/ResourceResponse.h>
+
+#include <QCoreApplication>
+#include <QNetworkReply>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+// copied from WebKit/Misc/WebKitErrors[Private].h
+enum {
+ WebKitErrorCannotShowMIMEType = 100,
+ WebKitErrorCannotShowURL = 101,
+ WebKitErrorFrameLoadInterruptedByPolicyChange = 102,
+ WebKitErrorCannotUseRestrictedPort = 103,
+ WebKitErrorCannotFindPlugIn = 200,
+ WebKitErrorCannotLoadPlugIn = 201,
+ WebKitErrorJavaUnavailable = 202,
+ WebKitErrorPluginWillHandleLoad = 203
+};
+
+ResourceError cancelledError(const ResourceRequest& request)
+{
+ ResourceError error = ResourceError("QtNetwork", QNetworkReply::OperationCanceledError, request.url().prettyURL(),
+ QCoreApplication::translate("QWebFrame", "Request cancelled", 0, QCoreApplication::UnicodeUTF8));
+ error.setIsCancellation(true);
+ return error;
+}
+
+ResourceError blockedError(const ResourceRequest& request)
+{
+ return ResourceError("WebKit", WebKitErrorCannotUseRestrictedPort, request.url().prettyURL(),
+ QCoreApplication::translate("QWebFrame", "Request blocked", 0, QCoreApplication::UnicodeUTF8));
+}
+
+ResourceError cannotShowURLError(const ResourceRequest& request)
+{
+ return ResourceError("WebKit", WebKitErrorCannotShowURL, request.url().string(),
+ QCoreApplication::translate("QWebFrame", "Cannot show URL", 0, QCoreApplication::UnicodeUTF8));
+}
+
+ResourceError interruptForPolicyChangeError(const ResourceRequest& request)
+{
+ return ResourceError("WebKit", WebKitErrorFrameLoadInterruptedByPolicyChange, request.url().string(),
+ QCoreApplication::translate("QWebFrame", "Frame load interrupted by policy change", 0, QCoreApplication::UnicodeUTF8));
+}
+
+ResourceError cannotShowMIMETypeError(const ResourceResponse& response)
+{
+ return ResourceError("WebKit", WebKitErrorCannotShowMIMEType, response.url().string(),
+ QCoreApplication::translate("QWebFrame", "Cannot show mimetype", 0, QCoreApplication::UnicodeUTF8));
+}
+
+ResourceError fileDoesNotExistError(const ResourceResponse& response)
+{
+ return ResourceError("QtNetwork", QNetworkReply::ContentNotFoundError, response.url().string(),
+ QCoreApplication::translate("QWebFrame", "File does not exist", 0, QCoreApplication::UnicodeUTF8));
+}
+
+ResourceError pluginWillHandleLoadError(const ResourceResponse& response)
+{
+ return ResourceError("WebKit", WebKitErrorPluginWillHandleLoad, response.url().string(),
+ QCoreApplication::translate("QWebFrame", "Loading is handled by the media engine", 0, QCoreApplication::UnicodeUTF8));
+}
+
+} // namespace WebKit
diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp b/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp
new file mode 100644
index 0000000..55552e1
--- /dev/null
+++ b/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp
@@ -0,0 +1,51 @@
+/*
+ Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "config.h"
+
+#include "WebFrameNetworkingContext.h"
+
+#include "WebProcess.h"
+#include <QNetworkAccessManager>
+#include <QObject>
+
+namespace WebCore {
+
+WebFrameNetworkingContext::WebFrameNetworkingContext(Frame* frame)
+ : FrameNetworkingContext(frame)
+ , m_originatingObject(0)
+{
+}
+
+PassRefPtr<WebFrameNetworkingContext> WebFrameNetworkingContext::create(Frame* frame)
+{
+ return adoptRef(new WebFrameNetworkingContext(frame));
+}
+
+QObject* WebFrameNetworkingContext::originatingObject() const
+{
+ return m_originatingObject;
+}
+
+QNetworkAccessManager* WebFrameNetworkingContext::networkAccessManager() const
+{
+ return WebKit::WebProcess::shared().networkAccessManager();
+}
+
+}
diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h b/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h
new file mode 100644
index 0000000..9c87785
--- /dev/null
+++ b/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h
@@ -0,0 +1,42 @@
+/*
+ Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef WebFrameNetworkingContext_h
+#define WebFrameNetworkingContext_h
+
+#include <WebCore/FrameNetworkingContext.h>
+
+namespace WebCore {
+
+class WebFrameNetworkingContext : public FrameNetworkingContext {
+public:
+ static PassRefPtr<WebFrameNetworkingContext> create(Frame*);
+
+private:
+ WebFrameNetworkingContext(Frame*);
+
+ virtual QObject* originatingObject() const;
+ virtual QNetworkAccessManager* networkAccessManager() const;
+
+ QObject* m_originatingObject;
+};
+
+}
+
+#endif // WebFrameNetworkingContext_h
diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebPopupMenuQt.cpp b/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebPopupMenuQt.cpp
new file mode 100644
index 0000000..4d3d167
--- /dev/null
+++ b/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebPopupMenuQt.cpp
@@ -0,0 +1,38 @@
+/*
+ * 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 "WebPopupMenu.h"
+
+#include "PlatformPopupMenuData.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WebPopupMenu::setUpPlatformData(const IntRect&, PlatformPopupMenuData&)
+{
+}
+
+} // namespace WebKit