Changeset 124625 in webkit


Ignore:
Timestamp:
Aug 3, 2012 10:21:17 AM (12 years ago)
Author:
Hugo Parente Lima
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):

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r124622 r124625  
     12012-08-03  Hugo Parente Lima  <hugo.lima@openbossa.org>
     2
     3        [Qt][WK2] There's no way to test the gesture tap on WTR
     4        https://bugs.webkit.org/show_bug.cgi?id=92895
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Add an instance of QtViewportHandler to QQuickWebViewPrivate, so it's
     9        now available on mobile and desktop modes, as a side effect gesture tap
     10        events can now be created and sent to WebCore.
     11
     12        This is needed to test tap gestures and to get tap gestures working
     13        when you have a WebView (in desktop mode) on notebooks equipped with
     14        touch screens.
     15
     16        * UIProcess/API/qt/qquickwebview.cpp:
     17        (QQuickWebViewPrivate::onComponentComplete):
     18        (QQuickWebViewFlickablePrivate::onComponentComplete): Implementation
     19        moved to QQuickWebViewPrivate::onComponentComplete.
     20        * UIProcess/API/qt/qquickwebview_p_p.h:
     21        (QQuickWebViewPrivate):
     22        (QQuickWebViewFlickablePrivate):
     23
    1242012-08-02  Alexey Proskuryakov  <ap@apple.com>
    225
  • trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp

    r124462 r124625  
    322322}
    323323
     324void QQuickWebViewPrivate::onComponentComplete()
     325{
     326    Q_Q(QQuickWebView);
     327    m_viewportHandler.reset(new QtViewportHandler(webPageProxy.get(), q, pageView.data()));
     328    pageView->eventHandler()->setViewportHandler(m_viewportHandler.data());
     329}
     330
    324331void QQuickWebViewPrivate::setTransparentBackground(bool enable)
    325332{
     
    853860void QQuickWebViewFlickablePrivate::onComponentComplete()
    854861{
    855     Q_Q(QQuickWebView);
    856 
    857     m_viewportHandler.reset(new QtViewportHandler(webPageProxy.get(), q, pageView.data()));
    858     pageView->eventHandler()->setViewportHandler(m_viewportHandler.data());
     862    QQuickWebViewPrivate::onComponentComplete();
    859863
    860864    // Trigger setting of correct visibility flags after everything was allocated and initialized.
  • trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h

    r124462 r124625  
    7070    virtual void initialize(WKContextRef contextRef = 0, WKPageGroupRef pageGroupRef = 0);
    7171
    72     virtual void onComponentComplete() { }
     72    virtual void onComponentComplete();
    7373
    7474    virtual void enableMouseEvents() { }
     
    176176    QQuickWebView* q_ptr;
    177177
     178    QScopedPointer<WebKit::QtViewportHandler> m_viewportHandler;
    178179    FlickableAxisLocker axisLocker;
    179180
     
    231232    virtual void didChangeContentsSize(const QSize& newSize);
    232233    virtual void handleMouseEvent(QMouseEvent*);
    233 
    234 private:
    235     QScopedPointer<WebKit::QtViewportHandler> m_viewportHandler;
    236234};
    237235
  • trunk/Tools/ChangeLog

    r124618 r124625  
     12012-08-03  Hugo Parente Lima  <hugo.lima@openbossa.org>
     2
     3        [Qt][WK2] There's no way to test the gesture tap on WTR
     4        https://bugs.webkit.org/show_bug.cgi?id=92895
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        WTR doesn't create the QQuickItem from C++, not from QML, so a call
     9        to componentComplete() was added to mimic the QML behaviour.
     10
     11        * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
     12        (WTR::PlatformWebView::PlatformWebView):
     13
    1142012-08-03  Balazs Kelemen  <kbalazs@webkit.org>
    215
  • trunk/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp

    r121967 r124625  
    7878    experimental.setRenderToOffscreenBuffer(true);
    7979    m_view->setAllowAnyHTTPSCertificateForLocalHost(true);
     80    m_view->componentComplete();
    8081}
    8182
Note: See TracChangeset for help on using the changeset viewer.