Changeset 122318 in webkit
- Timestamp:
- Jul 11, 2012 2:40:23 AM (12 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r122299 r122318 1 2012-07-11 Andras Becsi <andras.becsi@nokia.com> 2 3 [Qt][WK2] ASSERT: "!m_viewportItem->isMoving()" in QtViewportHandler::flickMoveEnded() 4 https://bugs.webkit.org/show_bug.cgi?id=90875 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 Since MultiPointTouchArea and PinchArea use the childMouseEventFilter 9 method to filter touch events too, and because Flickable filters child 10 mouse events the canvas calls this function before propagating the touch 11 event to the WebView. Since Flickable does not accept touch events the 12 canvas tries to propagate a synthesized mouse event through the base 13 class childMouseEventFilter function which is accepted by Flickable and 14 interferes with the input events we send to Flicakble hence messes up 15 the internal state of the WebView. 16 This patch reimplements the virtual childMouseEventFilter method so that all 17 the mouse and touch events can be processed by WebKit before they arrive to 18 Flickable. 19 20 * UIProcess/API/qt/qquickwebview.cpp: 21 (QQuickWebView::childMouseEventFilter): 22 * UIProcess/API/qt/qquickwebview_p.h: 23 1 24 2012-07-10 Christophe Dumez <christophe.dumez@intel.com> 2 25 -
trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp
r120915 r122318 1656 1656 } 1657 1657 1658 bool QQuickWebView::childMouseEventFilter(QQuickItem* item, QEvent* event) 1659 { 1660 // This function is used by MultiPointTouchArea and PinchArea to filter 1661 // touch events, thus to hinder the canvas from sending synthesized 1662 // mouse events to the Flickable implementation we need to reimplement 1663 // childMouseEventFilter and filter incoming touch events as well. 1664 1665 if (!isVisible() || !isEnabled()) 1666 return QQuickFlickable::childMouseEventFilter(item, event); 1667 1668 switch (event->type()) { 1669 case QEvent::MouseButtonPress: 1670 mousePressEvent(static_cast<QMouseEvent*>(event)); 1671 return event->isAccepted(); 1672 case QEvent::MouseMove: 1673 mouseMoveEvent(static_cast<QMouseEvent*>(event)); 1674 return event->isAccepted(); 1675 case QEvent::MouseButtonRelease: 1676 mouseReleaseEvent(static_cast<QMouseEvent*>(event)); 1677 return event->isAccepted(); 1678 case QEvent::TouchBegin: 1679 case QEvent::TouchUpdate: 1680 case QEvent::TouchEnd: 1681 touchEvent(static_cast<QTouchEvent*>(event)); 1682 return event->isAccepted(); 1683 default: 1684 break; 1685 } 1686 1687 return QQuickFlickable::childMouseEventFilter(item, event); 1688 } 1689 1658 1690 void QQuickWebView::geometryChanged(const QRectF& newGeometry, const QRectF& oldGeometry) 1659 1691 { -
trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h
r120915 r122318 169 169 170 170 protected: 171 virtual bool childMouseEventFilter(QQuickItem*, QEvent*); 171 172 virtual void geometryChanged(const QRectF&, const QRectF&); 172 173 virtual void componentComplete();
Note: See TracChangeset
for help on using the changeset viewer.