Diff
Modified: trunk/ChangeLog (102501 => 102502)
--- trunk/ChangeLog 2011-12-10 01:39:11 UTC (rev 102501)
+++ trunk/ChangeLog 2011-12-10 01:41:36 UTC (rev 102502)
@@ -1,3 +1,12 @@
+2011-12-09 Jesus Sanchez-Palencia <[email protected]>
+
+ [Qt] request parameter of QQuickWebView::navigationRequested is not a registered type
+ https://bugs.webkit.org/show_bug.cgi?id=73826
+
+ Reviewed by Tor Arne Vestbø.
+
+ * Source/qtwebkit-export.map: Adding QWebNavigationRequest
+
2011-12-09 Joone Hur <[email protected]>
[GTK] Initial implementation of Accelerated Compositing using Clutter
Modified: trunk/Source/WebKit/qt/ChangeLog (102501 => 102502)
--- trunk/Source/WebKit/qt/ChangeLog 2011-12-10 01:39:11 UTC (rev 102501)
+++ trunk/Source/WebKit/qt/ChangeLog 2011-12-10 01:41:36 UTC (rev 102502)
@@ -1,3 +1,13 @@
+2011-12-09 Jesus Sanchez-Palencia <[email protected]>
+
+ [Qt] request parameter of QQuickWebView::navigationRequested is not a registered type
+ https://bugs.webkit.org/show_bug.cgi?id=73826
+
+ Reviewed by Tor Arne Vestbø.
+
+ * declarative/plugin.cpp:
+ (WebKitQmlPlugin::registerTypes): Registering QWebNavigationRequest
+
2011-12-08 Pierre Rossi <[email protected]>
Drop ENABLE_NO_LISTBOX_RENDERING, and make it a runtime decision.
Modified: trunk/Source/WebKit/qt/declarative/plugin.cpp (102501 => 102502)
--- trunk/Source/WebKit/qt/declarative/plugin.cpp 2011-12-10 01:39:11 UTC (rev 102501)
+++ trunk/Source/WebKit/qt/declarative/plugin.cpp 2011-12-10 01:41:36 UTC (rev 102502)
@@ -25,6 +25,7 @@
#if defined(HAVE_WEBKIT2)
#include "qquickwebpage_p.h"
#include "qquickwebview_p.h"
+#include "qwebnavigationrequest_p.h"
#include "qwebpermissionrequest_p.h"
#include "qwebpreferences_p.h"
@@ -53,6 +54,7 @@
qmlRegisterUncreatableType<QQuickWebPage>(uri, 3, 0, "WebPage", QObject::tr("Cannot create separate instance of WebPage, use WebView"));
qmlRegisterUncreatableType<QNetworkReply>(uri, 3, 0, "NetworkReply", QObject::tr("Cannot create separate instance of NetworkReply"));
qmlRegisterUncreatableType<QWebPermissionRequest>(uri, 3, 0, "PermissionRequest", QObject::tr("Cannot create separate instance of PermissionRequest"));
+ qmlRegisterUncreatableType<QWebNavigationRequest>(uri, 3, 0, "NavigationRequest", QObject::tr("Cannot create separate instance of NavigationRequest"));
#endif
}
};
Modified: trunk/Source/WebKit2/ChangeLog (102501 => 102502)
--- trunk/Source/WebKit2/ChangeLog 2011-12-10 01:39:11 UTC (rev 102501)
+++ trunk/Source/WebKit2/ChangeLog 2011-12-10 01:41:36 UTC (rev 102502)
@@ -1,5 +1,31 @@
2011-12-09 Jesus Sanchez-Palencia <[email protected]>
+ [Qt] request parameter of QQuickWebView::navigationRequested is not a registered type
+ https://bugs.webkit.org/show_bug.cgi?id=73826
+
+ Reviewed by Tor Arne Vestbø.
+
+ Adding QWebNavigationRequest by moving NavigationRequest out of QtWebPagePolicyClient.
+
+ * Target.pri:
+ * UIProcess/API/qt/qquickwebview_p.h:
+ * UIProcess/API/qt/qwebnavigationrequest.cpp: Added.
+ (QWebNavigationRequestPrivate::QWebNavigationRequestPrivate):
+ (QWebNavigationRequestPrivate::~QWebNavigationRequestPrivate):
+ (QWebNavigationRequest::QWebNavigationRequest):
+ (QWebNavigationRequest::~QWebNavigationRequest):
+ (QWebNavigationRequest::setAction):
+ (QWebNavigationRequest::url):
+ (QWebNavigationRequest::button):
+ (QWebNavigationRequest::modifiers):
+ (QWebNavigationRequest::action):
+ * UIProcess/API/qt/qwebnavigationrequest_p.h: Added.
+ * UIProcess/qt/QtWebPagePolicyClient.cpp:
+ (QtWebPagePolicyClient::decidePolicyForNavigationAction):
+ (QtWebPagePolicyClient::decidePolicyForResponse):
+
+2011-12-09 Jesus Sanchez-Palencia <[email protected]>
+
[Qt][WK2] Unskip API tests
https://bugs.webkit.org/show_bug.cgi?id=74180
Modified: trunk/Source/WebKit2/Target.pri (102501 => 102502)
--- trunk/Source/WebKit2/Target.pri 2011-12-10 01:39:11 UTC (rev 102501)
+++ trunk/Source/WebKit2/Target.pri 2011-12-10 01:41:36 UTC (rev 102502)
@@ -177,6 +177,7 @@
UIProcess/API/qt/qwebdownloaditem_p.h \
UIProcess/API/qt/qwebdownloaditem_p_p.h \
UIProcess/API/qt/qwebpermissionrequest_p.h \
+ UIProcess/API/qt/qwebnavigationrequest_p.h \
UIProcess/API/qt/qquickwebpage_p.h \
UIProcess/API/qt/qquickwebpage_p_p.h \
UIProcess/API/qt/qquickwebview_p.h \
@@ -495,6 +496,7 @@
UIProcess/API/cpp/qt/WKURLQt.cpp \
UIProcess/API/qt/qwebdownloaditem.cpp \
UIProcess/API/qt/qwebpermissionrequest.cpp \
+ UIProcess/API/qt/qwebnavigationrequest.cpp \
UIProcess/API/qt/qquickwebpage.cpp \
UIProcess/API/qt/qquickwebview.cpp \
UIProcess/API/qt/qwebpreferences.cpp \
Modified: trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h (102501 => 102502)
--- trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h 2011-12-10 01:39:11 UTC (rev 102501)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h 2011-12-10 01:41:36 UTC (rev 102502)
@@ -24,6 +24,7 @@
#include "qwebkitglobal.h"
#include <QtQuick/qquickitem.h>
+class QWebNavigationRequest;
class QDeclarativeComponent;
class QQuickWebPage;
class QQuickWebViewAttached;
@@ -114,7 +115,7 @@
void messageReceived(const QVariantMap& message);
void linkHovered(const QUrl& url, const QString& title);
void navigationStateChanged();
- void navigationRequested(QObject* request);
+ void navigationRequested(QWebNavigationRequest* request);
protected:
virtual void geometryChanged(const QRectF&, const QRectF&);
Added: trunk/Source/WebKit2/UIProcess/API/qt/qwebnavigationrequest.cpp (0 => 102502)
--- trunk/Source/WebKit2/UIProcess/API/qt/qwebnavigationrequest.cpp (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qwebnavigationrequest.cpp 2011-12-10 01:41:36 UTC (rev 102502)
@@ -0,0 +1,85 @@
+/*
+ Copyright (C) 2011 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 "qwebnavigationrequest_p.h"
+
+#include "qquickwebview_p.h"
+
+class QWebNavigationRequestPrivate {
+public:
+ QWebNavigationRequestPrivate(const QUrl& url, Qt::MouseButton button, Qt::KeyboardModifiers modifiers)
+ : url(url)
+ , button(button)
+ , modifiers(modifiers)
+ , action(QQuickWebView::AcceptRequest)
+ {
+ }
+
+ ~QWebNavigationRequestPrivate()
+ {
+ }
+
+ QUrl url;
+ Qt::MouseButton button;
+ Qt::KeyboardModifiers modifiers;
+ int action;
+};
+
+QWebNavigationRequest::QWebNavigationRequest(const QUrl& url, Qt::MouseButton button, Qt::KeyboardModifiers modifiers, QObject* parent)
+ : QObject(parent)
+ , d(new QWebNavigationRequestPrivate(url, button, modifiers))
+{
+}
+
+QWebNavigationRequest::~QWebNavigationRequest()
+{
+ delete d;
+}
+
+void QWebNavigationRequest::setAction(int action)
+{
+ if (d->action == action)
+ return;
+
+ d->action = ""
+ emit actionChanged();
+}
+
+QUrl QWebNavigationRequest::url() const
+{
+ return d->url;
+}
+
+int QWebNavigationRequest::button() const
+{
+ return int(d->button);
+}
+
+int QWebNavigationRequest::modifiers() const
+{
+ return int(d->modifiers);
+}
+
+int QWebNavigationRequest::action() const
+{
+ return int(d->action);
+}
+
Added: trunk/Source/WebKit2/UIProcess/API/qt/qwebnavigationrequest_p.h (0 => 102502)
--- trunk/Source/WebKit2/UIProcess/API/qt/qwebnavigationrequest_p.h (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qwebnavigationrequest_p.h 2011-12-10 01:41:36 UTC (rev 102502)
@@ -0,0 +1,55 @@
+/*
+ Copyright (C) 2011 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 qwebnavigationrequest_p_h
+#define qwebnavigationrequest_p_h
+
+#include "qwebkitglobal.h"
+
+#include <QtCore/QObject>
+#include <QtCore/QUrl>
+
+class QWebNavigationRequestPrivate;
+
+class QWEBKIT_EXPORT QWebNavigationRequest : public QObject {
+ Q_OBJECT
+ Q_PROPERTY(QUrl url READ url CONSTANT FINAL)
+ Q_PROPERTY(int button READ button CONSTANT FINAL)
+ Q_PROPERTY(int modifiers READ modifiers CONSTANT FINAL)
+ Q_PROPERTY(int action READ action WRITE setAction NOTIFY actionChanged FINAL)
+
+public:
+ QWebNavigationRequest(const QUrl& url, Qt::MouseButton button, Qt::KeyboardModifiers modifiers, QObject* parent = 0);
+ ~QWebNavigationRequest();
+
+ QUrl url() const;
+ int button() const;
+ int modifiers() const;
+ int action() const;
+
+ void setAction(int action);
+
+Q_SIGNALS:
+ void actionChanged();
+
+private:
+ QWebNavigationRequestPrivate* d;
+};
+
+#endif // qwebnavigationrequest_h
Modified: trunk/Source/WebKit2/UIProcess/qt/QtWebPagePolicyClient.cpp (102501 => 102502)
--- trunk/Source/WebKit2/UIProcess/qt/QtWebPagePolicyClient.cpp 2011-12-10 01:39:11 UTC (rev 102501)
+++ trunk/Source/WebKit2/UIProcess/qt/QtWebPagePolicyClient.cpp 2011-12-10 01:41:36 UTC (rev 102502)
@@ -24,49 +24,11 @@
#include "WKURLQt.h"
#include "qquickwebview_p.h"
#include "qquickwebview_p_p.h"
+#include "qwebnavigationrequest_p.h"
#include <QtCore/QObject>
#include <WKFramePolicyListener.h>
#include <WKURLRequest.h>
-class NavigationRequest : public QObject {
- Q_OBJECT
- Q_PROPERTY(QUrl url READ url CONSTANT FINAL)
- Q_PROPERTY(int button READ button CONSTANT FINAL)
- Q_PROPERTY(int modifiers READ modifiers CONSTANT FINAL)
- Q_PROPERTY(int action READ action WRITE setAction NOTIFY actionChanged FINAL)
-
-public:
- NavigationRequest(const QUrl& url, Qt::MouseButton button, Qt::KeyboardModifiers modifiers)
- : m_url(url)
- , m_button(button)
- , m_modifiers(modifiers)
- , m_action(QQuickWebView::AcceptRequest)
- {
- }
-
- QUrl url() const { return m_url; }
- int button() const { return int(m_button); }
- int modifiers() const { return int(m_modifiers); }
-
- int action() const { return int(m_action); }
- void setAction(int action)
- {
- if (m_action == action)
- return;
- m_action = action;
- emit actionChanged();
- }
-
-Q_SIGNALS:
- void actionChanged();
-
-private:
- QUrl m_url;
- Qt::MouseButton m_button;
- Qt::KeyboardModifiers m_modifiers;
- int m_action;
-};
-
QtWebPagePolicyClient::QtWebPagePolicyClient(WKPageRef pageRef, QQuickWebView* webView)
: m_webView(webView)
{
@@ -83,7 +45,7 @@
{
// NOTE: even though the C API (and the WebKit2 IPC) supports an asynchronous answer, this is not currently working.
// We are expected to call the listener immediately. See the patch for https://bugs.webkit.org/show_bug.cgi?id=53785.
- NavigationRequest navigationRequest(url, mouseButton, keyboardModifiers);
+ QWebNavigationRequest navigationRequest(url, mouseButton, keyboardModifiers);
emit m_webView->navigationRequested(&navigationRequest);
switch (QQuickWebView::NavigationRequestAction(navigationRequest.action())) {
@@ -170,5 +132,3 @@
WKFramePolicyListenerUse(listener);
}
-
-#include "QtWebPagePolicyClient.moc"
Modified: trunk/Source/qtwebkit-export.map (102501 => 102502)
--- trunk/Source/qtwebkit-export.map 2011-12-10 01:39:11 UTC (rev 102501)
+++ trunk/Source/qtwebkit-export.map 2011-12-10 01:41:36 UTC (rev 102502)
@@ -130,6 +130,9 @@
*QWebPermissionRequest;
non-virtual?thunk?to?QWebPermissionRequest*;
QWebPermissionRequest::*;
+ *QWebNavigationRequest;
+ non-virtual?thunk?to?QWebNavigationRequest*;
+ QWebNavigationRequest::*;
# WebKit 2 C API mangled in C++