Changeset 55541 in webkit
- Timestamp:
- Mar 4, 2010 11:30:42 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r55533 r55541 1 2010-03-04 Diego Gonzalez <diego.gonzalez@openbossa.org> 2 3 Reviewed by Simon Hausmann. 4 5 Make Qt DumpRenderTree EventSender able to send double click events 6 7 LayoutTests: 8 fast/events/dblclick-addEventListener.html 9 10 [Qt] DRT: Send double click event from EventSender 11 https://bugs.webkit.org/show_bug.cgi?id=35255 12 13 * platform/qt/Skipped: 14 1 15 2010-03-04 Shu Chang <Chang.Shu@nokia.com> 2 16 -
trunk/LayoutTests/platform/qt/Skipped
r55533 r55541 445 445 fast/events/click-count.html 446 446 fast/events/content-changed-during-drop.html 447 fast/events/dblclick-addEventListener.html448 447 fast/events/drag-in-frames.html 449 448 fast/events/focusingUnloadedFrame.html -
trunk/WebKitTools/ChangeLog
r55520 r55541 1 2010-03-04 Diego Gonzalez <diego.gonzalez@openbossa.org> 2 3 Reviewed by Simon Hausmann. 4 5 Make Qt DumpRenderTree EventSender able to send double click events 6 7 LayoutTests: 8 fast/events/dblclick-addEventListener.html 9 10 [Qt] DRT: Send double click event from EventSender 11 https://bugs.webkit.org/show_bug.cgi?id=35255 12 13 * DumpRenderTree/qt/DumpRenderTreeQt.cpp: 14 (WebCore::DumpRenderTree::resetToConsistentStateBeforeTesting): 15 * DumpRenderTree/qt/EventSenderQt.cpp: 16 (EventSender::EventSender): 17 (EventSender::mouseDown): 18 * DumpRenderTree/qt/EventSenderQt.h: 19 (EventSender::resetClickCount): 20 1 21 2010-03-04 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> 2 22 -
trunk/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
r55280 r55541 393 393 m_controller->reset(); 394 394 395 // reset mouse clicks counter 396 m_eventSender->resetClickCount(); 397 395 398 closeRemainingWindows(); 396 399 -
trunk/WebKitTools/DumpRenderTree/qt/EventSenderQt.cpp
r55230 r55541 68 68 startOfQueue = 0; 69 69 m_eventLoop = 0; 70 m_currentButton = 0; 71 resetClickCount(); 70 72 m_page->view()->installEventFilter(this); 71 73 } … … 93 95 } 94 96 97 // only consider a click to count, an event originated by the 98 // same previous button and at the same position. 99 if (m_currentButton == button 100 && m_mousePos == m_clickPos 101 && m_clickTimer.isActive()) 102 m_clickCount++; 103 else 104 m_clickCount = 1; 105 106 m_currentButton = button; 107 m_clickPos = m_mousePos; 95 108 m_mouseButtons |= mouseButton; 96 109 97 110 // qDebug() << "EventSender::mouseDown" << frame; 98 QMouseEvent* event = new QMouseEvent(QEvent::MouseButtonPress, m_mousePos, m_mousePos, mouseButton, m_mouseButtons, Qt::NoModifier); 111 QMouseEvent* event; 112 event = new QMouseEvent((m_clickCount == 2) ? QEvent::MouseButtonDblClick : 113 QEvent::MouseButtonPress, m_mousePos, m_mousePos, 114 mouseButton, m_mouseButtons, Qt::NoModifier); 115 99 116 sendOrQueueEvent(event); 117 118 m_clickTimer.start(QApplication::doubleClickInterval(), this); 100 119 } 101 120 … … 515 534 return false; 516 535 } 536 537 void EventSender::timerEvent(QTimerEvent* ev) 538 { 539 m_clickTimer.stop(); 540 } -
trunk/WebKitTools/DumpRenderTree/qt/EventSenderQt.h
r55019 r55541 31 31 32 32 #include <QApplication> 33 #include <QBasicTimer> 33 34 #include <QEvent> 34 35 #include <QEventLoop> … … 51 52 EventSender(QWebPage* parent); 52 53 virtual bool eventFilter(QObject* watched, QEvent* event); 54 void resetClickCount() { m_clickCount = 0; } 53 55 54 56 public slots: … … 74 76 void releaseTouchPoint(int index); 75 77 78 protected: 79 void timerEvent(QTimerEvent*); 80 76 81 private: 77 82 void sendTouchEvent(QEvent::Type); … … 79 84 void replaySavedEvents(bool flush); 80 85 QPoint m_mousePos; 86 QPoint m_clickPos; 81 87 Qt::MouseButtons m_mouseButtons; 82 88 QWebPage* m_page; 83 int m_timeLeap; 89 int m_clickCount; 90 int m_currentButton; 84 91 bool m_mouseButtonPressed; 85 92 bool m_drag; 86 93 QEventLoop* m_eventLoop; 87 94 QWebFrame* frameUnderMouse() const; 95 QBasicTimer m_clickTimer; 88 96 #if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) 89 97 QList<QTouchEvent::TouchPoint> m_touchPoints;
Note: See TracChangeset
for help on using the changeset viewer.