[Qt][WK2] Make mouse over work again for QDesktopWebView.
authoralexis.menard@openbossa.org <alexis.menard@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Aug 2011 17:34:05 +0000 (17:34 +0000)
committeralexis.menard@openbossa.org <alexis.menard@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Aug 2011 17:34:05 +0000 (17:34 +0000)
https://bugs.webkit.org/show_bug.cgi?id=67200

Reviewed by Noam Rosenthal.

The API has changed after QGraphicsView, SceneGraph sends
QHoverEvents now.

* UIProcess/qt/qdesktopwebpageproxy.cpp:
(QDesktopWebPageProxy::handleEvent):
(QDesktopWebPageProxy::handleHoverMoveEvent):
* UIProcess/qt/qdesktopwebpageproxy.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94087 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/qt/qdesktopwebpageproxy.cpp
Source/WebKit2/UIProcess/qt/qdesktopwebpageproxy.h

index 238c035..efe8c43 100644 (file)
@@ -1,3 +1,18 @@
+2011-08-30  Alexis Menard  <alexis.menard@openbossa.org>
+
+        [Qt][WK2] Make mouse over work again for QDesktopWebView.
+        https://bugs.webkit.org/show_bug.cgi?id=67200
+
+        Reviewed by Noam Rosenthal.
+
+        The API has changed after QGraphicsView, SceneGraph sends
+        QHoverEvents now.
+
+        * UIProcess/qt/qdesktopwebpageproxy.cpp:
+        (QDesktopWebPageProxy::handleEvent):
+        (QDesktopWebPageProxy::handleHoverMoveEvent):
+        * UIProcess/qt/qdesktopwebpageproxy.h:
+
 2011-08-30  Kaustubh Atrawalkar  <kaustubh@motorola.com>
 
         The unused ScrollView* argument can and should be removed from
index 689c55f..48bc980 100644 (file)
@@ -91,8 +91,8 @@ bool QDesktopWebPageProxy::handleEvent(QEvent* ev)
         return handleMouseDoubleClickEvent(reinterpret_cast<QGraphicsSceneMouseEvent*>(ev));
     case QEvent::GraphicsSceneWheel:
         return handleWheelEvent(reinterpret_cast<QGraphicsSceneWheelEvent*>(ev));
-    case QEvent::GraphicsSceneHoverMove:
-        return handleHoverMoveEvent(reinterpret_cast<QGraphicsSceneHoverEvent*>(ev));
+    case QEvent::HoverMove:
+        return handleHoverMoveEvent(reinterpret_cast<QHoverEvent*>(ev));
     case QEvent::GraphicsSceneDragEnter:
         return handleDragEnterEvent(reinterpret_cast<QGraphicsSceneDragDropEvent*>(ev));
     case QEvent::GraphicsSceneDragLeave:
@@ -154,11 +154,10 @@ bool QDesktopWebPageProxy::handleWheelEvent(QGraphicsSceneWheelEvent* ev)
     return ev->isAccepted();
 }
 
-bool QDesktopWebPageProxy::handleHoverMoveEvent(QGraphicsSceneHoverEvent* ev)
+bool QDesktopWebPageProxy::handleHoverMoveEvent(QHoverEvent* ev)
 {
     QGraphicsSceneMouseEvent me(QEvent::GraphicsSceneMouseMove);
     me.setPos(ev->pos());
-    me.setScreenPos(ev->screenPos());
     me.setAccepted(ev->isAccepted());
 
     return handleMouseMoveEvent(&me);
index 7519822..83d073a 100644 (file)
@@ -54,7 +54,7 @@ private:
     bool handleMouseReleaseEvent(QGraphicsSceneMouseEvent*);
     bool handleMouseDoubleClickEvent(QGraphicsSceneMouseEvent*);
     bool handleWheelEvent(QGraphicsSceneWheelEvent*);
-    bool handleHoverMoveEvent(QGraphicsSceneHoverEvent*);
+    bool handleHoverMoveEvent(QHoverEvent*);
     bool handleDragEnterEvent(QGraphicsSceneDragDropEvent*);
     bool handleDragLeaveEvent(QGraphicsSceneDragDropEvent*);
     bool handleDragMoveEvent(QGraphicsSceneDragDropEvent*);