Bug 204748 - [iOS] Introduce a gesture recognizer that can be used to defer recognition of other gestures
Summary: [iOS] Introduce a gesture recognizer that can be used to defer recognition of...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-12-02 08:09 PST by Wenson Hsieh
Modified: 2020-01-06 14:00 PST (History)
6 users (show)

See Also:


Attachments
Patch (21.78 KB, patch)
2019-12-02 08:58 PST, Wenson Hsieh
thorton: review+
Details | Formatted Diff | Diff
Address comments (22.26 KB, patch)
2019-12-02 10:01 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Address comments (22.71 KB, patch)
2019-12-02 10:10 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2019-12-02 08:09:56 PST
Work towards webkit.org/b/204664.
Comment 1 Wenson Hsieh 2019-12-02 08:51:22 PST
<rdar://problem/38670692>
Comment 2 Wenson Hsieh 2019-12-02 08:58:19 PST
Created attachment 384628 [details]
Patch
Comment 3 Tim Horton 2019-12-02 09:35:41 PST
Comment on attachment 384628 [details]
Patch

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

> Source/WebKit/ChangeLog:25
> +        gesture from connecting the entire gesture subgraph under WKWebView through failure depencies. This would result

sp depencies

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.h:209
> +    RetainPtr<WKDeferringGestureRecognizer> _touchEventDeferringGestureRecognizerForImmediatelyResettableGestures;
> +    RetainPtr<WKDeferringGestureRecognizer> _touchEventDeferringGestureRecognizerForDelayedResettableGestures;

Are these "touch-event-deferring" (that's how I read it)? Don't they defer many things /pending/ touch event reply?

> Source/WebKit/UIProcess/ios/WKDeferringGestureRecognizer.h:36
> +- (instancetype)initWithView:(WKContentView *)view;

In an ideally-generic world this would probably be 

- (instancetype)initWithView:(UIView *)view delegate:(id <WKDeferringGestureRecognizerDelegate>)delegate;

And not know anything about WKContentView.

Does that make it any more useful? It does seem like it could be useful outside of WKContentView.
Comment 4 Wenson Hsieh 2019-12-02 09:45:12 PST
Comment on attachment 384628 [details]
Patch

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

Thanks for taking a look!

>> Source/WebKit/ChangeLog:25
>> +        gesture from connecting the entire gesture subgraph under WKWebView through failure depencies. This would result
> 
> sp depencies

oops! fixed.

>> Source/WebKit/UIProcess/ios/WKContentViewInteraction.h:209
>> +    RetainPtr<WKDeferringGestureRecognizer> _touchEventDeferringGestureRecognizerForDelayedResettableGestures;
> 
> Are these "touch-event-deferring" (that's how I read it)? Don't they defer many things /pending/ touch event reply?

That’s true. Maybe these should just be _deferringGestureRecognizerForImmediatelyResettableGestures and _deferringGestureRecognizerForDelayedResettableGestures (would make the names a little bit less of a mouthful as well).

>> Source/WebKit/UIProcess/ios/WKDeferringGestureRecognizer.h:36
>> +- (instancetype)initWithView:(WKContentView *)view;
> 
> In an ideally-generic world this would probably be 
> 
> - (instancetype)initWithView:(UIView *)view delegate:(id <WKDeferringGestureRecognizerDelegate>)delegate;
> 
> And not know anything about WKContentView.
> 
> Does that make it any more useful? It does seem like it could be useful outside of WKContentView.

While I don’t foresee any use outside of WKContentView, it wouldn’t hurt to architect it this way from the get-go; I’ll change it to be delegate-based instead of directly talking to the content view.
Comment 5 Wenson Hsieh 2019-12-02 10:01:42 PST Comment hidden (obsolete)
Comment 6 Wenson Hsieh 2019-12-02 10:10:30 PST
Created attachment 384637 [details]
Address comments
Comment 7 Wenson Hsieh 2019-12-02 11:25:07 PST
The Windows test failure (webanimations/accelerated-animation-removal-upon-transition-completion.html) is not relevant to this change.
Comment 8 WebKit Commit Bot 2019-12-02 12:21:20 PST
Comment on attachment 384637 [details]
Address comments

Clearing flags on attachment: 384637

Committed r253005: <https://trac.webkit.org/changeset/253005>