Title: [124625] trunk
- Revision
- 124625
- Author
- [email protected]
- Date
- 2012-08-03 10:21:17 -0700 (Fri, 03 Aug 2012)
Log Message
[Qt][WK2] There's no way to test the gesture tap on WTR
https://bugs.webkit.org/show_bug.cgi?id=92895
Reviewed by Kenneth Rohde Christiansen.
Source/WebKit2:
Add an instance of QtViewportHandler to QQuickWebViewPrivate, so it's
now available on mobile and desktop modes, as a side effect gesture tap
events can now be created and sent to WebCore.
This is needed to test tap gestures and to get tap gestures working
when you have a WebView (in desktop mode) on notebooks equipped with
touch screens.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::onComponentComplete):
(QQuickWebViewFlickablePrivate::onComponentComplete): Implementation
moved to QQuickWebViewPrivate::onComponentComplete.
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
(QQuickWebViewFlickablePrivate):
Tools:
WTR doesn't create the QQuickItem from C++, not from QML, so a call
to componentComplete() was added to mimic the QML behaviour.
* WebKitTestRunner/qt/PlatformWebViewQt.cpp:
(WTR::PlatformWebView::PlatformWebView):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (124624 => 124625)
--- trunk/Source/WebKit2/ChangeLog 2012-08-03 16:47:06 UTC (rev 124624)
+++ trunk/Source/WebKit2/ChangeLog 2012-08-03 17:21:17 UTC (rev 124625)
@@ -1,3 +1,26 @@
+2012-08-03 Hugo Parente Lima <[email protected]>
+
+ [Qt][WK2] There's no way to test the gesture tap on WTR
+ https://bugs.webkit.org/show_bug.cgi?id=92895
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add an instance of QtViewportHandler to QQuickWebViewPrivate, so it's
+ now available on mobile and desktop modes, as a side effect gesture tap
+ events can now be created and sent to WebCore.
+
+ This is needed to test tap gestures and to get tap gestures working
+ when you have a WebView (in desktop mode) on notebooks equipped with
+ touch screens.
+
+ * UIProcess/API/qt/qquickwebview.cpp:
+ (QQuickWebViewPrivate::onComponentComplete):
+ (QQuickWebViewFlickablePrivate::onComponentComplete): Implementation
+ moved to QQuickWebViewPrivate::onComponentComplete.
+ * UIProcess/API/qt/qquickwebview_p_p.h:
+ (QQuickWebViewPrivate):
+ (QQuickWebViewFlickablePrivate):
+
2012-08-02 Alexey Proskuryakov <[email protected]>
[WK2] Move some WebContext messages to WebProcessProxy
Modified: trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp (124624 => 124625)
--- trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp 2012-08-03 16:47:06 UTC (rev 124624)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp 2012-08-03 17:21:17 UTC (rev 124625)
@@ -321,6 +321,13 @@
webPageProxy->initializeWebPage();
}
+void QQuickWebViewPrivate::onComponentComplete()
+{
+ Q_Q(QQuickWebView);
+ m_viewportHandler.reset(new QtViewportHandler(webPageProxy.get(), q, pageView.data()));
+ pageView->eventHandler()->setViewportHandler(m_viewportHandler.data());
+}
+
void QQuickWebViewPrivate::setTransparentBackground(bool enable)
{
webPageProxy->setDrawsTransparentBackground(enable);
@@ -852,11 +859,8 @@
void QQuickWebViewFlickablePrivate::onComponentComplete()
{
- Q_Q(QQuickWebView);
+ QQuickWebViewPrivate::onComponentComplete();
- m_viewportHandler.reset(new QtViewportHandler(webPageProxy.get(), q, pageView.data()));
- pageView->eventHandler()->setViewportHandler(m_viewportHandler.data());
-
// Trigger setting of correct visibility flags after everything was allocated and initialized.
_q_onVisibleChanged();
}
Modified: trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h (124624 => 124625)
--- trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h 2012-08-03 16:47:06 UTC (rev 124624)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h 2012-08-03 17:21:17 UTC (rev 124625)
@@ -69,7 +69,7 @@
virtual void initialize(WKContextRef contextRef = 0, WKPageGroupRef pageGroupRef = 0);
- virtual void onComponentComplete() { }
+ virtual void onComponentComplete();
virtual void enableMouseEvents() { }
virtual void disableMouseEvents() { }
@@ -175,6 +175,7 @@
QScopedPointer<QQuickWebPage> pageView;
QQuickWebView* q_ptr;
+ QScopedPointer<WebKit::QtViewportHandler> m_viewportHandler;
FlickableAxisLocker axisLocker;
QQmlComponent* alertDialog;
@@ -230,9 +231,6 @@
virtual void pageDidRequestScroll(const QPoint& pos);
virtual void didChangeContentsSize(const QSize& newSize);
virtual void handleMouseEvent(QMouseEvent*);
-
-private:
- QScopedPointer<WebKit::QtViewportHandler> m_viewportHandler;
};
#endif // qquickwebview_p_p_h
Modified: trunk/Tools/ChangeLog (124624 => 124625)
--- trunk/Tools/ChangeLog 2012-08-03 16:47:06 UTC (rev 124624)
+++ trunk/Tools/ChangeLog 2012-08-03 17:21:17 UTC (rev 124625)
@@ -1,3 +1,16 @@
+2012-08-03 Hugo Parente Lima <[email protected]>
+
+ [Qt][WK2] There's no way to test the gesture tap on WTR
+ https://bugs.webkit.org/show_bug.cgi?id=92895
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ WTR doesn't create the QQuickItem from C++, not from QML, so a call
+ to componentComplete() was added to mimic the QML behaviour.
+
+ * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
+ (WTR::PlatformWebView::PlatformWebView):
+
2012-08-03 Balazs Kelemen <[email protected]>
Unreviewed, rolling out r124567.
Modified: trunk/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp (124624 => 124625)
--- trunk/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp 2012-08-03 16:47:06 UTC (rev 124624)
+++ trunk/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp 2012-08-03 17:21:17 UTC (rev 124625)
@@ -77,6 +77,7 @@
QQuickWebViewExperimental experimental(m_view);
experimental.setRenderToOffscreenBuffer(true);
m_view->setAllowAnyHTTPSCertificateForLocalHost(true);
+ m_view->componentComplete();
}
PlatformWebView::~PlatformWebView()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes