Bug 185926 - Fix Issues with Loupe Gesture
Summary: Fix Issues with Loupe Gesture
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: 2018-05-23 16:37 PDT by Megan Gardner
Modified: 2018-05-24 14:03 PDT (History)
4 users (show)

See Also:


Attachments
Patch (5.44 KB, patch)
2018-05-23 16:44 PDT, Megan Gardner
no flags Details | Formatted Diff | Diff
Patch (6.03 KB, patch)
2018-05-23 19:20 PDT, Megan Gardner
no flags Details | Formatted Diff | Diff
Patch (6.06 KB, patch)
2018-05-24 09:26 PDT, Megan Gardner
no flags Details | Formatted Diff | Diff
Patch for landing (6.06 KB, patch)
2018-05-24 13:25 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 2018-05-23 16:37:58 PDT
Fix Issues with Loupe Gesture
Comment 1 Megan Gardner 2018-05-23 16:44:19 PDT
Created attachment 341146 [details]
Patch
Comment 2 Megan Gardner 2018-05-23 16:45:06 PDT
<rdar://problem/40275709>
Comment 3 Tim Horton 2018-05-23 17:09:06 PDT
Comment on attachment 341146 [details]
Patch

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

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:3212
> +#if ENABLE(MINIMAL_SIMULATOR)
> +    if (!range)
> +        [self clearSelection];
> +#endif
>      if (hasAssistedNode(_assistedNodeInformation) && !range)

Possibly(?) better written

if (range)
    return;

#if !ENABLE(MINIMAL_SIMULATOR)
if (!hasAssistedNode(_assistedNodeInformation))
    return;
#endif

[self clearSelection];

> Source/WebKit/WebProcess/WebPage/WebPage.h:1545
>  #endif
> +    
> +#if PLATFORM(IOS)

Merge these sections

> Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:1147
> +                if (range->collapsed())

I’m pretty sure there’s a better way to do this (to sort two positions)
Comment 4 Megan Gardner 2018-05-23 19:20:51 PDT
Created attachment 341157 [details]
Patch
Comment 5 Wenson Hsieh 2018-05-23 20:39:31 PDT
Comment on attachment 341157 [details]
Patch

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

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:3213
> +    if (hasAssistedNode(_assistedNodeInformation))

I agree with Tim's earlier comment. It's a bit weird that we'd need to clear selection twice here in minimal simulator mode, if we are focusing an editable element.
Comment 6 Megan Gardner 2018-05-24 09:26:47 PDT
Created attachment 341197 [details]
Patch
Comment 7 Tim Horton 2018-05-24 11:07:38 PDT
Comment on attachment 341197 [details]
Patch

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

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:3212
>          [self clearSelection];

You’re still repeating yourself with the clearSelection! Mine was better :P
Comment 8 Megan Gardner 2018-05-24 13:25:14 PDT
Created attachment 341222 [details]
Patch for landing
Comment 9 WebKit Commit Bot 2018-05-24 14:03:50 PDT
Comment on attachment 341222 [details]
Patch for landing

Clearing flags on attachment: 341222

Committed r232164: <https://trac.webkit.org/changeset/232164>
Comment 10 WebKit Commit Bot 2018-05-24 14:03:51 PDT
All reviewed patches have been landed.  Closing bug.