Bug 199739 - Turn off two finger gestures for editable non-scaled content
Summary: Turn off two finger gestures for editable non-scaled content
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Megan Gardner
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-07-11 17:32 PDT by Megan Gardner
Modified: 2019-07-12 18:50 PDT (History)
3 users (show)

See Also:


Attachments
Patch (6.10 KB, patch)
2019-07-11 17:33 PDT, Megan Gardner
no flags Details | Formatted Diff | Diff
Patch (6.27 KB, patch)
2019-07-11 17:34 PDT, Megan Gardner
no flags Details | Formatted Diff | Diff
Patch (3.29 KB, patch)
2019-07-12 15:38 PDT, Megan Gardner
no flags Details | Formatted Diff | Diff
Patch (2.17 KB, patch)
2019-07-12 17:55 PDT, Megan Gardner
no flags Details | Formatted Diff | Diff
Patch for landing (2.16 KB, patch)
2019-07-12 18:08 PDT, Megan Gardner
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Megan Gardner 2019-07-11 17:32:06 PDT
Turn off two finger gestures for editable non-scaled content
Comment 1 Megan Gardner 2019-07-11 17:33:42 PDT
Created attachment 373981 [details]
Patch
Comment 2 Megan Gardner 2019-07-11 17:34:06 PDT
Created attachment 373982 [details]
Patch
Comment 3 Megan Gardner 2019-07-11 17:34:33 PDT
<rdar://problem/52107190>
Comment 4 Tim Horton 2019-07-11 22:22:28 PDT
Comment on attachment 373982 [details]
Patch

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

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:-763
> -    _twoFingerDoubleTapGestureRecognizer = adoptNS([[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(_twoFingerDoubleTapRecognized:)]);

Why did two finger double tap code move? It's still clearly called (by the line just prior to this), and not disabled anywhere, so this seems pointless? But maybe I'm missing something.

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:806
> +    if (!_webView._editable)

I have a Question! Presumably single-finger-single-tap on links is also disabled in editable contexts... how is that achieved? Can this follow the same path? (maybe not!)

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:3967
> +- (void)_setTwoFingerSingleTapGesturesEnabled:(BOOL)enabled
> +{
> +    [_twoFingerSingleTapGestureRecognizer setEnabled:enabled];
> +}

This seems like a rather unnecessary method.
Comment 5 Megan Gardner 2019-07-12 15:38:43 PDT
Created attachment 374044 [details]
Patch
Comment 6 Megan Gardner 2019-07-12 17:55:30 PDT
Created attachment 374057 [details]
Patch
Comment 7 Tim Horton 2019-07-12 18:00:13 PDT
Comment on attachment 374057 [details]
Patch

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

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:793
> +    [_twoFingerSingleTapGestureRecognizer setEnabled:!_webView._editable];

I am sold! Though I would probably put it before the add, with all the other setters.
Comment 8 Megan Gardner 2019-07-12 18:08:28 PDT
Created attachment 374061 [details]
Patch for landing
Comment 9 WebKit Commit Bot 2019-07-12 18:50:32 PDT
Comment on attachment 374061 [details]
Patch for landing

Clearing flags on attachment: 374061

Committed r247411: <https://trac.webkit.org/changeset/247411>
Comment 10 WebKit Commit Bot 2019-07-12 18:50:33 PDT
All reviewed patches have been landed.  Closing bug.