RESOLVED FIXED 73089
[Qt][WK2] Move event handling out of QtWebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=73089
Summary [Qt][WK2] Move event handling out of QtWebPageProxy
Jesus Sanchez-Palencia
Reported 2011-11-24 11:33:06 PST
In order to clean-up QtWebPageProxy we can remove all code related to event handling, including gestures and the interaction engine, and concentrate everything in a new entity: QtWebPageEventHandler.
Attachments
Patch (51.72 KB, patch)
2011-11-24 12:19 PST, Jesus Sanchez-Palencia
no flags
Jesus Sanchez-Palencia
Comment 1 2011-11-24 12:19:06 PST
Kenneth Rohde Christiansen
Comment 2 2011-11-25 02:39:00 PST
Comment on attachment 116530 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=116530&action=review I like this > Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp:57 > + eventHandler.reset(new QtWebPageEventHandler(pageProxy->pageRef())); Why does this needs to be reset? comment? > Source/WebKit2/UIProcess/qt/QtTapGestureRecognizer.cpp:37 > + , m_qtEventHandler(eventHandler) why the m_qt*? > Source/WebKit2/UIProcess/qt/QtTapGestureRecognizer.h:52 > - QtTapGestureRecognizer(QtViewportInteractionEngine*, QtWebPageProxy*); > + QtTapGestureRecognizer(QtViewportInteractionEngine*, QtWebPageEventHandler*); Makes so much more sense :-) > Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.cpp:144 > + // For some reason mouse press results in mouse hover (which is > + // converted to mouse move for WebKit). We ignore these hover > + // events by comparing lastPos with newPos. > + // NOTE: lastPos from the event always comes empty, so we work > + // around that here. I wouldnt compress this comment so much,,, hard to read > Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.cpp:157 > + if (m_tripleClickTimer.isActive() && (ev->pos() - m_tripleClick).manhattanLength() < qApp->styleHints()->startDragDistance()) { Im not sure qApp is correct here, simon? > Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.cpp:158 > + m_webPageProxy->handleMouseEvent(NativeWebMouseEvent(ev, /*eventClickCount=*/3)); /* eventClickCount */ 3 would be more readable
Jesus Sanchez-Palencia
Comment 3 2011-11-25 04:49:24 PST
Note You need to log in before you can comment on or make changes to this bug.