Title: [101804] trunk/Source/WebKit2
Revision
101804
Author
[email protected]
Date
2011-12-02 08:36:36 -0800 (Fri, 02 Dec 2011)

Log Message

[Qt][WK2] Set event timestamps on custom input events

Reviewed by Simon Hausmann.

Since r101791 WebEventFactoryQt uses input event timestamps for WebEvents,
thus set the timestamp on the custom events as well.

* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::handleHoverLeaveEvent):
(QtWebPageEventHandler::handleHoverMoveEvent):
* UIProcess/qt/WebPopupMenuProxyQtDesktop.cpp:
(WebKit::WebPopupMenuProxyQtDesktop::showPopupMenu):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (101803 => 101804)


--- trunk/Source/WebKit2/ChangeLog	2011-12-02 16:33:56 UTC (rev 101803)
+++ trunk/Source/WebKit2/ChangeLog	2011-12-02 16:36:36 UTC (rev 101804)
@@ -1,5 +1,20 @@
 2011-12-02  Andras Becsi  <[email protected]>
 
+        [Qt][WK2] Set event timestamps on custom input events
+
+        Reviewed by Simon Hausmann.
+
+        Since r101791 WebEventFactoryQt uses input event timestamps for WebEvents,
+        thus set the timestamp on the custom events as well.
+
+        * UIProcess/qt/QtWebPageEventHandler.cpp:
+        (QtWebPageEventHandler::handleHoverLeaveEvent):
+        (QtWebPageEventHandler::handleHoverMoveEvent):
+        * UIProcess/qt/WebPopupMenuProxyQtDesktop.cpp:
+        (WebKit::WebPopupMenuProxyQtDesktop::showPopupMenu):
+
+2011-12-02  Andras Becsi  <[email protected]>
+
         [Qt] [WK2] Use input event timestamps in WebEvents if available
         https://bugs.webkit.org/show_bug.cgi?id=73647
 

Modified: trunk/Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.cpp (101803 => 101804)


--- trunk/Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.cpp	2011-12-02 16:33:56 UTC (rev 101803)
+++ trunk/Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.cpp	2011-12-02 16:36:36 UTC (rev 101804)
@@ -192,6 +192,7 @@
     // To get the correct behavior of mouseout, we need to turn the Leave event of our webview into a mouse move
     // to a very far region.
     QHoverEvent fakeEvent(QEvent::HoverMove, QPoint(INT_MIN, INT_MIN), ev->oldPos());
+    fakeEvent.setTimestamp(ev->timestamp());
     return handleHoverMoveEvent(&fakeEvent);
 }
 
@@ -199,6 +200,7 @@
 {
     QMouseEvent me(QEvent::MouseMove, ev->pos(), Qt::NoButton, Qt::NoButton, Qt::NoModifier);
     me.setAccepted(ev->isAccepted());
+    me.setTimestamp(ev->timestamp());
 
     return handleMouseMoveEvent(&me);
 }

Modified: trunk/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQtDesktop.cpp (101803 => 101804)


--- trunk/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQtDesktop.cpp	2011-12-02 16:33:56 UTC (rev 101803)
+++ trunk/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQtDesktop.cpp	2011-12-02 16:36:36 UTC (rev 101804)
@@ -34,6 +34,7 @@
 #include <QMouseEvent>
 #include <QStandardItemModel>
 #include "WebPopupItem.h"
+#include <wtf/CurrentTime.h>
 
 using namespace WebCore;
 
@@ -68,6 +69,7 @@
 
     QMouseEvent event(QEvent::MouseButtonPress, QCursor::pos(), Qt::LeftButton,
                       Qt::LeftButton, Qt::NoModifier);
+    event.setTimestamp(static_cast<qint64>(WTF::currentTimeMS()));
     QCoreApplication::sendEvent(this, &event);
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to