Bug 140967 - Immediate action gesture recognizer still doesn't work well with IB
Summary: Immediate action gesture recognizer still doesn't work well with IB
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-27 15:54 PST by Beth Dakin
Modified: 2015-01-27 17:07 PST (History)
3 users (show)

See Also:


Attachments
Patch (7.73 KB, patch)
2015-01-27 16:00 PST, Beth Dakin
thorton: review-
Details | Formatted Diff | Diff
Patch (6.44 KB, patch)
2015-01-27 16:53 PST, Beth Dakin
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Beth Dakin 2015-01-27 15:54:28 PST
Immediate action gesture recognizer still doesn't work well with IB

rdar://problem/19621509
Comment 1 Beth Dakin 2015-01-27 16:00:11 PST
Created attachment 245489 [details]
Patch
Comment 2 Tim Horton 2015-01-27 16:30:16 PST
Comment on attachment 245489 [details]
Patch

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

> Source/WebKit2/UIProcess/API/mac/WKView.mm:2571
> +#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000

It looks to me (with a tiny test app) like you're not guaranteed to move to a nil window when moving between windows, so I think this needs to be restructured to avoid re-adding the GR.

> Source/WebKit2/UIProcess/API/mac/WKView.mm:2576
> +            [self addGestureRecognizer:_data->_immediateActionGestureRecognizer.get()];

We could keep the controller/GR instantiation in init/commoninit and just add/remove here, for minimal change, if you want.

> Source/WebKit2/UIProcess/API/mac/WKView.mm:2593
> +        if (NSClassFromString(@"NSImmediateActionGestureRecognizer"))

This could check _immediateActionGestureRecognizer instead of this.
Comment 3 Beth Dakin 2015-01-27 16:53:52 PST
Created attachment 245494 [details]
Patch
Comment 4 Tim Horton 2015-01-27 16:59:38 PST
Comment on attachment 245494 [details]
Patch

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

> Source/WebKit/mac/WebView/WebView.mm:5300
> +            if (![[self gestureRecognizers] containsObject:recognizer])

As discussed, I think we should not add the GR if _data->_ignoresNonWheelEvents is true.
Comment 5 Beth Dakin 2015-01-27 17:07:18 PST
Thank you! http://trac.webkit.org/changeset/179230