Bug 92412

Summary: Double tap gesture should send dblclick event
Product: WebKit Reporter: Rick Byers <rbyers>
Component: UI EventsAssignee: Rick Byers <rbyers>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, dglazkov, fishd, jamesr, rjkroege, tkent+wkapi, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Description Rick Byers 2012-07-26 12:29:08 PDT
With ENABLE(GESTURE_EVENTS), we turn GestureTap into mousemove, mousedown, mouseup events (and so also a click event).  Similarly for GestureDoupleTab we should be adding a final dblclick event, and setting event.detail on each event correctly (1 for the first mousedown,mouseup,click, and 2 for the second).
Comment 1 Rick Byers 2012-08-02 17:54:14 PDT
We can't actually do this with GestureDoubleTap.  Instead GestureTap is being modified to carry a tap count.
Comment 2 Rick Byers 2012-08-02 18:04:36 PDT
Created attachment 156224 [details]
Patch
Comment 3 WebKit Review Bot 2012-08-02 18:07:42 PDT
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Comment 4 Adam Barth 2012-08-02 18:11:05 PDT
Comment on attachment 156224 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=156224&action=review

> Source/WebCore/page/EventHandler.cpp:2420
> +      return false;

Four-space indent
Comment 5 Rick Byers 2012-08-02 18:13:20 PDT
Created attachment 156226 [details]
Patch
Comment 6 Adam Barth 2012-08-02 18:18:48 PDT
Comment on attachment 156226 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=156226&action=review

> Source/WebCore/page/EventHandler.cpp:2418
> +    // a tap count. FIXME: We should probably remove GestureDoubleTap (http://wkb.uk/93045).

http://wkb.uk/93045   <--- This link doesn't work for me.  Is there a typo?

> Source/WebCore/page/EventHandler.cpp:2494
> +        tapCount = static_cast<int>(gestureEvent.deltaX());

Why is the tapCount stored in the deltaX?  That seems strange.
Comment 7 Rick Byers 2012-08-03 07:23:30 PDT
*** Bug 93044 has been marked as a duplicate of this bug. ***
Comment 8 Rick Byers 2012-08-03 08:02:53 PDT
Comment on attachment 156226 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=156226&action=review

>> Source/WebCore/page/EventHandler.cpp:2418
>> +    // a tap count. FIXME: We should probably remove GestureDoubleTap (http://wkb.uk/93045).
> 
> http://wkb.uk/93045   <--- This link doesn't work for me.  Is there a typo?

Yes, sorry - fixed.

>> Source/WebCore/page/EventHandler.cpp:2494
>> +        tapCount = static_cast<int>(gestureEvent.deltaX());
> 
> Why is the tapCount stored in the deltaX?  That seems strange.

Yes it is strange.  Right now deltaX/deltaY are overloaded for a variety of things depending on the event type, and rjkroege@ suggested I continue that pattern here temporarily until we clean this up.  I've just filed https://bugs.webkit.org/show_bug.cgi?id=93123 for myself to clean this up (one way or another).  Would you prefer I hold off on this CL (which makes the problem worse) until we do that?  I was concerned it would take a bit of time to update the various places properly without breaking anything, but I can start working on that right away.
Comment 9 Rick Byers 2012-08-03 08:08:14 PDT
Created attachment 156383 [details]
Patch
Comment 10 Adam Barth 2012-08-03 10:09:03 PDT
Comment on attachment 156383 [details]
Patch

I think it's ok to land this patch first because I trust you to work on Bug 93123 in the near term.
Comment 11 Rick Byers 2012-08-03 11:27:23 PDT
Comment on attachment 156383 [details]
Patch

Thanks!  CQ?
Comment 12 WebKit Review Bot 2012-08-03 12:49:48 PDT
Comment on attachment 156383 [details]
Patch

Rejecting attachment 156383 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2

Last 500 characters of output:
Kit/chromium/third_party/yasm/source/patched-yasm --revision 134927 --non-interactive --force --accept theirs-conflict --ignore-externals' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium'
48>At revision 134927.

________ running '/usr/bin/python tools/clang/scripts/update.py --mac-only' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium'

________ running '/usr/bin/python gyp_webkit' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium'
Updating webkit projects from gyp files...

Full output: http://queues.webkit.org/results/13423901
Comment 13 Rick Byers 2012-08-03 12:54:27 PDT
Created attachment 156439 [details]
Patch
Comment 14 Rick Byers 2012-08-03 12:55:39 PDT
Comment on attachment 156439 [details]
Patch

I thought the CQ would auto-merge ChangeLogs properly?  Why would there be a merge conflict?

Patch updated to ToT (auto-merge worked fine for me).  Try CQ again?
Comment 15 WebKit Review Bot 2012-08-03 16:45:21 PDT
Comment on attachment 156439 [details]
Patch

Clearing flags on attachment: 156439

Committed r124673: <http://trac.webkit.org/changeset/124673>
Comment 16 WebKit Review Bot 2012-08-03 16:45:27 PDT
All reviewed patches have been landed.  Closing bug.