Bug 93045 - Consider removing PlatformEvent::GestureDoubleTap
Summary: Consider removing PlatformEvent::GestureDoubleTap
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Rick Byers
URL:
Keywords:
Depends on: 93044
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-02 16:29 PDT by Rick Byers
Modified: 2013-03-20 12:32 PDT (History)
9 users (show)

See Also:


Attachments
Patch (6.21 KB, patch)
2013-03-14 13:45 PDT, miletus
no flags Details | Formatted Diff | Diff
Patch (7.26 KB, patch)
2013-03-15 10:47 PDT, miletus
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Byers 2012-08-02 16:29:48 PDT
In bug 93044, support is added for handling double tap gestures based on a 'tap count' supplied with the GestureTap.

This makes GestureDoubleTap somewhat redundant and not very useful.  We should probably remove it.
Comment 1 miletus 2013-03-14 13:45:29 PDT
Created attachment 193178 [details]
Patch
Comment 2 Rick Byers 2013-03-14 17:42:39 PDT
Comment on attachment 193178 [details]
Patch

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

Looks good, but I've got one suggestion for making this a little cleaner.

> Source/WebCore/ChangeLog:3
> +        Consider removing PlatformEvent::GestureDoubleTap

Update bug title to 'remove' now that we're sure it can be done

> Source/WebKit/chromium/src/WebInputEventConversion.cpp:190
> +        m_type = PlatformEvent::NoType;

This is a little odd.  Ideally we could just ensure that PlatformEvent::GestureDoubleTap never got here in the first place.  I know it's used in chromium WebKit for Android (where it probably doesn't make sense to use GestureTap with a tap count check since the semantics are different on Android - DoubleTap is not preceeded by a Tap event since Tap is delayed 300ms).  Perhaps we could cut it off there and never try to create a PlatformGestureEvent for it at all (relying on the ASSERT_NOT_REACHED below as a backstop)?

That would also require landing the Aura gesture-recognizer side change first (removing ET_GESTURE_DOUBLE_TAP) since we're still dispatching that (even though it's redundant).
Comment 3 miletus 2013-03-15 10:47:52 PDT
Created attachment 193336 [details]
Patch
Comment 4 miletus 2013-03-15 10:58:45 PDT
Comment on attachment 193178 [details]
Patch

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

>> Source/WebKit/chromium/src/WebInputEventConversion.cpp:190
>> +        m_type = PlatformEvent::NoType;
> 
> This is a little odd.  Ideally we could just ensure that PlatformEvent::GestureDoubleTap never got here in the first place.  I know it's used in chromium WebKit for Android (where it probably doesn't make sense to use GestureTap with a tap count check since the semantics are different on Android - DoubleTap is not preceeded by a Tap event since Tap is delayed 300ms).  Perhaps we could cut it off there and never try to create a PlatformGestureEvent for it at all (relying on the ASSERT_NOT_REACHED below as a backstop)?
> 
> That would also require landing the Aura gesture-recognizer side change first (removing ET_GESTURE_DOUBLE_TAP) since we're still dispatching that (even though it's redundant).

Right, in the new patch I drop the WebInputEvent::GestureDoubleTap in WebViewImpl so no GestureDoubleTap will reach WebCore.
Also a chromium patch is under review that will remove the path that can generate WebInputEvent::GestureDoubleTap so to make this
WebInpuEvent -> PlatformEvent conversion safe.
Comment 5 Rick Byers 2013-03-15 11:28:57 PDT
Looks good to me.  You'll need a reviewer to take a look though.  Perhaps tonikitoo?

I don' think any other port was using GestureDoubleTap, but EWS will tell us for sure now that we'll get build errors if anyone tries to use PlatformEvent::GestureDoubleTap.
Comment 6 WebKit Review Bot 2013-03-20 12:29:42 PDT
Comment on attachment 193336 [details]
Patch

Clearing flags on attachment: 193336

Committed r146378: <http://trac.webkit.org/changeset/146378>
Comment 7 WebKit Review Bot 2013-03-20 12:29:45 PDT
All reviewed patches have been landed.  Closing bug.