Bug 206863

Summary: macCatalyst: Triple clicking to select a sentence results in an empty selection
Product: WebKit Reporter: Tim Horton <thorton>
Component: New BugsAssignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: berto, cgarcia, commit-queue, ews-watchlist, gustavo, mifenton, sam, simon.fraser, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

Description Tim Horton 2020-01-27 21:25:27 PST
macCatalyst: Triple clicking to select a sentence results in an empty selection
Comment 1 Tim Horton 2020-01-27 21:26:09 PST
Created attachment 388965 [details]
Patch
Comment 2 Tim Horton 2020-01-27 21:26:12 PST
<rdar://problem/58776993>
Comment 3 Sam Weinig 2020-01-28 06:01:17 PST
Can this be tested? I know there are no layout tests for macCatalyst yet, but what about an API test or something else?
Comment 4 Tim Horton 2020-01-28 15:02:32 PST
Created attachment 389070 [details]
Patch
Comment 5 Tim Horton 2020-01-28 15:14:05 PST
Created attachment 389072 [details]
Patch
Comment 6 EWS Watchlist 2020-01-28 15:15:09 PST
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 7 Wenson Hsieh 2020-01-28 15:24:03 PST
Comment on attachment 389072 [details]
Patch

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

> Source/WebKit/UIProcess/WebPageProxy.cpp:2492
> +void WebPageProxy::doAfterProcessingAllPendingMouseEvents(WTF::Function<void (void)>&& action)

Nit - I think we usually write this WTF::Function<void()>&& (i.e. no second void)

> Tools/TestWebKitAPI/Tests/WebKitCocoa/MacCatalystMouseSupport.mm:28
> +#if PLATFORM(MACCATALYST)

Is it possible to adjust this such that we'll run these tests in automation?

> Tools/TestWebKitAPI/Tests/WebKitCocoa/MacCatalystMouseSupport.mm:131
> +    [gesture _hoverEntered:touchSet.get() withEvent:event.get()];
> +    [contentView _mouseGestureRecognizerChanged:gesture];
> +    [touch setTapCount:1];
> +    [event _setButtonMask:UIEventButtonMaskSecondary];
> +    [gesture touchesBegan:touchSet.get() withEvent:event.get()];
> +    [contentView _mouseGestureRecognizerChanged:gesture];
> +    [gesture touchesEnded:touchSet.get() withEvent:event.get()];
> +    [contentView _mouseGestureRecognizerChanged:gesture];

Very exciting!

Not for this patch, but this seems good to one day unify under the existing macOS click simulation helpers in TestWKWebView.
Comment 8 Tim Horton 2020-01-28 15:38:50 PST
Created attachment 389078 [details]
Patch
Comment 9 WebKit Commit Bot 2020-01-28 16:23:08 PST
Comment on attachment 389078 [details]
Patch

Clearing flags on attachment: 389078

Committed r255322: <https://trac.webkit.org/changeset/255322>
Comment 10 WebKit Commit Bot 2020-01-28 16:23:10 PST
All reviewed patches have been landed.  Closing bug.
Comment 11 Tim Horton 2020-01-28 21:55:36 PST
Reopening to attach new patch.
Comment 12 Tim Horton 2020-01-28 21:55:37 PST
Created attachment 389103 [details]
Patch
Comment 13 Tim Horton 2020-01-28 21:56:02 PST
Whoops