Bug 73089 - [Qt][WK2] Move event handling out of QtWebPageProxy
Summary: [Qt][WK2] Move event handling out of QtWebPageProxy
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jesus Sanchez-Palencia
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks: 72943 73096
  Show dependency treegraph
 
Reported: 2011-11-24 11:33 PST by Jesus Sanchez-Palencia
Modified: 2011-11-25 04:50 PST (History)
0 users

See Also:


Attachments
Patch (51.72 KB, patch)
2011-11-24 12:19 PST, Jesus Sanchez-Palencia
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesus Sanchez-Palencia 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.
Comment 1 Jesus Sanchez-Palencia 2011-11-24 12:19:06 PST
Created attachment 116530 [details]
Patch
Comment 2 Kenneth Rohde Christiansen 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
Comment 3 Jesus Sanchez-Palencia 2011-11-25 04:49:24 PST
Committed r101164: <http://trac.webkit.org/changeset/101164>