Changeset 96402 in webkit
- Timestamp:
- Sep 30, 2011 7:54:02 AM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r96392 r96402 1 2011-09-30 Zeno Albisser <zeno.albisser@nokia.com> 2 3 [Qt][WK2] Change WebKitTestRunner to use QMouseEvents instead of QGraphicsSceneMouseEvents 4 https://bugs.webkit.org/show_bug.cgi?id=69145 5 6 This is a follow up to https://bugs.webkit.org/show_bug.cgi?id=69105 7 Due to refactorings in Qt5, QMouseEvent now supports floating point coordinates 8 and is perfectly suitable for SceneGraph as well. GraphicsScene events 9 will not be available in QtGui anymore in future. Therefore we also have to change 10 QtWebKit to use QMouseEvents instead of QGraphicsSceneMouseEvents. 11 12 Reviewed by Chang Shu. 13 14 * WebKitTestRunner/EventSenderProxy.h: 15 * WebKitTestRunner/qt/EventSenderProxyQt.cpp: 16 (WTR::EventSenderProxy::createMouseEvent): 17 (WTR::EventSenderProxy::mouseDown): 18 (WTR::EventSenderProxy::mouseUp): 19 (WTR::EventSenderProxy::mouseMoveTo): 20 1 21 2011-09-30 James Robinson <jamesr@chromium.org> 2 22 -
trunk/Tools/WebKitTestRunner/EventSenderProxy.h
r95878 r96402 52 52 void sendOrQueueEvent(QEvent*); 53 53 void replaySavedEvents(); 54 QGraphicsSceneMouseEvent* createGraphicsSceneMouseEvent(QEvent::Type, const QPoint& pos, const QPoint& screenPos, Qt::MouseButton, Qt::MouseButtons, Qt::KeyboardModifiers);55 54 #endif 56 55 -
trunk/Tools/WebKitTestRunner/qt/EventSenderProxyQt.cpp
r96345 r96402 256 256 } 257 257 258 QGraphicsSceneMouseEvent* EventSenderProxy::createGraphicsSceneMouseEvent(QEvent::Type type, const QPoint& pos, const QPoint& screenPos, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers)259 {260 QGraphicsSceneMouseEvent* event;261 event = new QGraphicsSceneMouseEvent(type);262 event->setPos(pos);263 event->setScreenPos(screenPos);264 event->setButton(button);265 event->setButtons(buttons);266 event->setModifiers(modifiers);267 268 return event;269 }270 271 258 void EventSenderProxy::mouseDown(unsigned button, WKEventModifiers wkModifiers) 272 259 { … … 279 266 280 267 QPoint mousePos(m_position.x, m_position.y); 281 Q GraphicsSceneMouseEvent* event = createGraphicsSceneMouseEvent((m_clickCount == 2) ? QEvent::GraphicsSceneMouseDoubleClick : QEvent::GraphicsSceneMousePress,268 QMouseEvent* event = new QMouseEvent((m_clickCount == 2) ? QEvent::MouseButtonDblClick : QEvent::MouseButtonPress, 282 269 mousePos, mousePos, mouseButton, m_mouseButtons, modifiers); 283 270 … … 291 278 292 279 QPoint mousePos(m_position.x, m_position.y); 293 Q GraphicsSceneMouseEvent* event = createGraphicsSceneMouseEvent(QEvent::GraphicsSceneMouseRelease,280 QMouseEvent* event = new QMouseEvent(QEvent::MouseButtonRelease, 294 281 mousePos, mousePos, mouseButton, m_mouseButtons, Qt::NoModifier); 295 282 … … 303 290 304 291 QPoint mousePos(m_position.x, m_position.y); 305 Q GraphicsSceneMouseEvent* event = createGraphicsSceneMouseEvent(QEvent::GraphicsSceneMouseMove,292 QMouseEvent* event = new QMouseEvent(QEvent::MouseMove, 306 293 mousePos, mousePos, Qt::NoButton, m_mouseButtons, Qt::NoModifier); 307 294
Note: See TracChangeset
for help on using the changeset viewer.