[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
eric at webkit.org
eric at webkit.org
Wed Mar 17 18:17:46 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit a7d9fe33768a17d54673d9bd2d9c577f1f3d76c0
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Mar 4 19:30:42 2010 +0000
2010-03-04 Diego Gonzalez <diego.gonzalez at openbossa.org>
Reviewed by Simon Hausmann.
Make Qt DumpRenderTree EventSender able to send double click events
LayoutTests:
fast/events/dblclick-addEventListener.html
[Qt] DRT: Send double click event from EventSender
https://bugs.webkit.org/show_bug.cgi?id=35255
* platform/qt/Skipped:
2010-03-04 Diego Gonzalez <diego.gonzalez at openbossa.org>
Reviewed by Simon Hausmann.
Make Qt DumpRenderTree EventSender able to send double click events
LayoutTests:
fast/events/dblclick-addEventListener.html
[Qt] DRT: Send double click event from EventSender
https://bugs.webkit.org/show_bug.cgi?id=35255
* DumpRenderTree/qt/DumpRenderTreeQt.cpp:
(WebCore::DumpRenderTree::resetToConsistentStateBeforeTesting):
* DumpRenderTree/qt/EventSenderQt.cpp:
(EventSender::EventSender):
(EventSender::mouseDown):
* DumpRenderTree/qt/EventSenderQt.h:
(EventSender::resetClickCount):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55541 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index f9aed7b..5dffe7f 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2010-03-04 Diego Gonzalez <diego.gonzalez at openbossa.org>
+
+ Reviewed by Simon Hausmann.
+
+ Make Qt DumpRenderTree EventSender able to send double click events
+
+ LayoutTests:
+ fast/events/dblclick-addEventListener.html
+
+ [Qt] DRT: Send double click event from EventSender
+ https://bugs.webkit.org/show_bug.cgi?id=35255
+
+ * platform/qt/Skipped:
+
2010-03-04 Shu Chang <Chang.Shu at nokia.com>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index 4b2439c..0a7a2ff 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -444,7 +444,6 @@ fast/events/5056619.html
fast/events/autoscroll.html
fast/events/click-count.html
fast/events/content-changed-during-drop.html
-fast/events/dblclick-addEventListener.html
fast/events/drag-in-frames.html
fast/events/focusingUnloadedFrame.html
fast/events/js-keyboard-event-creation.html
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index a7f2148..d0ac45b 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,23 @@
+2010-03-04 Diego Gonzalez <diego.gonzalez at openbossa.org>
+
+ Reviewed by Simon Hausmann.
+
+ Make Qt DumpRenderTree EventSender able to send double click events
+
+ LayoutTests:
+ fast/events/dblclick-addEventListener.html
+
+ [Qt] DRT: Send double click event from EventSender
+ https://bugs.webkit.org/show_bug.cgi?id=35255
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::resetToConsistentStateBeforeTesting):
+ * DumpRenderTree/qt/EventSenderQt.cpp:
+ (EventSender::EventSender):
+ (EventSender::mouseDown):
+ * DumpRenderTree/qt/EventSenderQt.h:
+ (EventSender::resetClickCount):
+
2010-03-04 Jocelyn Turcotte <jocelyn.turcotte at nokia.com>
Reviewed by Tor Arne Vestbø.
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
index 3eca72e..4dbabe1 100644
--- a/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
@@ -392,6 +392,9 @@ void DumpRenderTree::resetToConsistentStateBeforeTesting()
// of the DRT.
m_controller->reset();
+ // reset mouse clicks counter
+ m_eventSender->resetClickCount();
+
closeRemainingWindows();
m_page->resetSettings();
diff --git a/WebKitTools/DumpRenderTree/qt/EventSenderQt.cpp b/WebKitTools/DumpRenderTree/qt/EventSenderQt.cpp
index c42d65e..7432052 100644
--- a/WebKitTools/DumpRenderTree/qt/EventSenderQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/EventSenderQt.cpp
@@ -67,6 +67,8 @@ EventSender::EventSender(QWebPage* parent)
endOfQueue = 0;
startOfQueue = 0;
m_eventLoop = 0;
+ m_currentButton = 0;
+ resetClickCount();
m_page->view()->installEventFilter(this);
}
@@ -92,11 +94,28 @@ void EventSender::mouseDown(int button)
break;
}
+ // only consider a click to count, an event originated by the
+ // same previous button and at the same position.
+ if (m_currentButton == button
+ && m_mousePos == m_clickPos
+ && m_clickTimer.isActive())
+ m_clickCount++;
+ else
+ m_clickCount = 1;
+
+ m_currentButton = button;
+ m_clickPos = m_mousePos;
m_mouseButtons |= mouseButton;
// qDebug() << "EventSender::mouseDown" << frame;
- QMouseEvent* event = new QMouseEvent(QEvent::MouseButtonPress, m_mousePos, m_mousePos, mouseButton, m_mouseButtons, Qt::NoModifier);
+ QMouseEvent* event;
+ event = new QMouseEvent((m_clickCount == 2) ? QEvent::MouseButtonDblClick :
+ QEvent::MouseButtonPress, m_mousePos, m_mousePos,
+ mouseButton, m_mouseButtons, Qt::NoModifier);
+
sendOrQueueEvent(event);
+
+ m_clickTimer.start(QApplication::doubleClickInterval(), this);
}
void EventSender::mouseUp(int button)
@@ -514,3 +533,8 @@ bool EventSender::eventFilter(QObject* watched, QEvent* event)
}
return false;
}
+
+void EventSender::timerEvent(QTimerEvent* ev)
+{
+ m_clickTimer.stop();
+}
diff --git a/WebKitTools/DumpRenderTree/qt/EventSenderQt.h b/WebKitTools/DumpRenderTree/qt/EventSenderQt.h
index 38bca89..e824e0f 100644
--- a/WebKitTools/DumpRenderTree/qt/EventSenderQt.h
+++ b/WebKitTools/DumpRenderTree/qt/EventSenderQt.h
@@ -30,6 +30,7 @@
#define EventSenderQt_h
#include <QApplication>
+#include <QBasicTimer>
#include <QEvent>
#include <QEventLoop>
#include <QMouseEvent>
@@ -50,6 +51,7 @@ class EventSender : public QObject {
public:
EventSender(QWebPage* parent);
virtual bool eventFilter(QObject* watched, QEvent* event);
+ void resetClickCount() { m_clickCount = 0; }
public slots:
void mouseDown(int button = 0);
@@ -73,18 +75,24 @@ public slots:
void clearTouchPoints();
void releaseTouchPoint(int index);
+protected:
+ void timerEvent(QTimerEvent*);
+
private:
void sendTouchEvent(QEvent::Type);
void sendOrQueueEvent(QEvent*);
void replaySavedEvents(bool flush);
QPoint m_mousePos;
+ QPoint m_clickPos;
Qt::MouseButtons m_mouseButtons;
QWebPage* m_page;
- int m_timeLeap;
+ int m_clickCount;
+ int m_currentButton;
bool m_mouseButtonPressed;
bool m_drag;
QEventLoop* m_eventLoop;
QWebFrame* frameUnderMouse() const;
+ QBasicTimer m_clickTimer;
#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
QList<QTouchEvent::TouchPoint> m_touchPoints;
Qt::KeyboardModifiers m_touchModifiers;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list