Ignore:
Timestamp:
03/01/12 01:32:13 (3 years ago)
Author:
hausmann@webkit.org
Message:

[Qt][WK2] QQuickWebView::event should lookup faster which events QQuickWebPage can handle
https://bugs.webkit.org/show_bug.cgi?id=78047

Reviewed by Kenneth Rohde Christiansen.

Source/WebKit2:

Replaced double-dispatch of events with direct forwarding of events from QQuickWebView::*Event to
QtWebPageEventHandler::handle*Event.

  • UIProcess/API/qt/qquickwebview.cpp:

(QQuickWebView::keyPressEvent):
(QQuickWebView::keyReleaseEvent):
(QQuickWebView::inputMethodEvent):
(QQuickWebView::focusInEvent):
(QQuickWebView::focusOutEvent):
(QQuickWebView::touchEvent):
(QQuickWebView::mousePressEvent):
(QQuickWebView::mouseMoveEvent):
(QQuickWebView::mouseReleaseEvent):
(QQuickWebView::mouseDoubleClickEvent):
(QQuickWebView::wheelEvent):
(QQuickWebView::hoverEnterEvent):
(QQuickWebView::hoverMoveEvent):
(QQuickWebView::hoverLeaveEvent):
(QQuickWebView::dragMoveEvent):
(QQuickWebView::dragEnterEvent):
(QQuickWebView::dragLeaveEvent):
(QQuickWebView::dropEvent):
(QQuickWebView::event):

  • UIProcess/qt/QtWebPageEventHandler.cpp:

(QtWebPageEventHandler::handleMouseMoveEvent):
(QtWebPageEventHandler::handleMousePressEvent):
(QtWebPageEventHandler::handleMouseReleaseEvent):
(QtWebPageEventHandler::handleWheelEvent):
(QtWebPageEventHandler::handleHoverLeaveEvent):
(QtWebPageEventHandler::handleHoverMoveEvent):
(QtWebPageEventHandler::handleDragEnterEvent):
(QtWebPageEventHandler::handleDragLeaveEvent):
(QtWebPageEventHandler::handleDragMoveEvent):
(QtWebPageEventHandler::handleDropEvent):
(QtWebPageEventHandler::handleKeyPressEvent):
(QtWebPageEventHandler::handleKeyReleaseEvent):
(QtWebPageEventHandler::handleFocusInEvent):
(QtWebPageEventHandler::handleFocusOutEvent):
(QtWebPageEventHandler::handleInputMethodEvent):
(QtWebPageEventHandler::handleTouchEvent):

  • UIProcess/qt/QtWebPageEventHandler.h:

(QtWebPageEventHandler):

Tools:

Send events for the webview through the QQuickCanvas instead of directly to the item. Direct
sending to the item requires the QObject::event re-implementation to dispatch to the correct
event handling function. However QQuickItem::event doesn't do that. Instead QQuickCanvas calls
the event handlers directly, and with the removal of our own dispatching we need to go through
that code path.

  • WebKitTestRunner/qt/PlatformWebViewQt.cpp:

(WTR::PlatformWebView::sendEvent):
(WTR::PlatformWebView::postEvent):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r109317 r109326  
     12012-02-29  Simon Hausmann  <simon.hausmann@nokia.com> 
     2 
     3        [Qt][WK2] QQuickWebView::event should lookup faster which events QQuickWebPage can handle 
     4        https://bugs.webkit.org/show_bug.cgi?id=78047 
     5 
     6        Reviewed by Kenneth Rohde Christiansen. 
     7 
     8        Send events for the webview through the QQuickCanvas instead of directly to the item. Direct 
     9        sending to the item requires the QObject::event re-implementation to dispatch to the correct 
     10        event handling function. However QQuickItem::event doesn't do that. Instead QQuickCanvas calls 
     11        the event handlers directly, and with the removal of our own dispatching we need to go through 
     12        that code path. 
     13 
     14        * WebKitTestRunner/qt/PlatformWebViewQt.cpp: 
     15        (WTR::PlatformWebView::sendEvent): 
     16        (WTR::PlatformWebView::postEvent): 
     17 
    1182012-02-29  Adam Barth  <abarth@webkit.org> 
    219 
Note: See TracChangeset for help on using the changeset viewer.