Summary: | [Qt] Improve the tap gesture recognizer | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Kenneth Rohde Christiansen <kenneth> | ||||
Component: | WebKit2 | Assignee: | Kenneth Rohde Christiansen <kenneth> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | allan.jensen, hausmann, menard, webkit.review.bot, zoltan | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Kenneth Rohde Christiansen
2012-04-04 03:17:13 PDT
Created attachment 135547 [details]
Patch
Comment on attachment 135547 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=135547&action=review r=me We really need unit tests for this state machine though :( > Source/WebKit2/UIProcess/qt/QtTapGestureRecognizer.cpp:71 > + if (!withinDistance(touchPoint, maxDoubleTapDistance)) { > + reset(); // Received a new tap, that is unrelated to the previous one. Ignore previous. > m_tapState = SingleTapStarted; > - } > - } else > - m_tapState = SingleTapStarted; > - m_touchBeginEventForTap = adoptPtr(new QTouchEvent(*event)); > + } else > + m_tapState = DoubleTapCandidate; I kind of like logic the "positive" way, i.e. if (withinDistance(touchPoint, ...) m_tapState = DoubleTapCandidate; } else { reset(); m_tapState = SingleTapStarted; } But that's also a kind of nitpick which you can freely ignore if you want :) Landed in 113165 |