Add support for eventSender.mouseMove to DRT.
authorlars <lars@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Oct 2007 09:10:53 +0000 (09:10 +0000)
committerlars <lars@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Oct 2007 09:10:53 +0000 (09:10 +0000)
        Fixes fast/css/hover-affects-child.html

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

WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/DumpRenderTree.qtproj/jsobjects.cpp

index 397ff228393cad673096b182d7a93c5f03f2d2d1..673ad283e38f26155b703e509d41bb66b49dc897 100644 (file)
@@ -1,3 +1,13 @@
+2007-10-02  Lars Knoll  <lars@trolltech.com>
+
+        Reviewed by Maciej.
+
+        Add support for eventSender.mouseMove to DRT.
+        Fixes fast/css/hover-affects-child.html
+
+        * DumpRenderTree/DumpRenderTree.qtproj/jsobjects.cpp:
+        (EventSender::mouseMoveTo):
+
 2007-10-01  Mark Rowe  <mrowe@apple.com>
 
         * BuildSlaveSupport/build-launcher-dmg: Tweak once more to handle nightly builds for branches.
index 0d52aa43419b16ef45d146cabcbfa476f34c3142..ce4f52460b74d2f682fb1c6579650eb7bf6a2a18 100644 (file)
@@ -40,6 +40,9 @@ public:
     void mouseReleaseEvent(QMouseEvent *e) {
         QWebFrame::mouseReleaseEvent(e);
     }
+    void mouseMoveEvent(QMouseEvent *e) {
+        QWebFrame::mouseMoveEvent(e);
+    }
 
 protected:
     HackWebFrame(QWebPage *parent, QWebFrameData *frameData) : QWebFrame(parent, frameData) {}
@@ -152,8 +155,11 @@ void EventSender::mouseUp()
 
 void EventSender::mouseMoveTo(int x, int y)
 {
+    QWebFrame *frame = frameUnderMouse();
 //     qDebug() << "EventSender::mouseMoveTo" << x << y;
     m_mousePos = QPoint(x, y);
+    QMouseEvent event(QEvent::MouseMove, m_mousePos - frame->pos(), Qt::NoButton, Qt::NoButton, Qt::NoModifier);
+    static_cast<HackWebFrame *>(frame)->mouseMoveEvent(&event);
 }
 
 void EventSender::leapForward(int ms)