Bug 213530 - [iOS] Open element actions sometimes result in a hover instead of a click
Summary: [iOS] Open element actions sometimes result in a hover instead of a click
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: Andy Estes
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-06-23 14:02 PDT by Andy Estes
Modified: 2020-06-24 13:52 PDT (History)
7 users (show)

See Also:


Attachments
Patch (34.13 KB, patch)
2020-06-23 14:55 PDT, Andy Estes
no flags Details | Formatted Diff | Diff
Patch (34.08 KB, patch)
2020-06-24 13:11 PDT, Andy Estes
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Estes 2020-06-23 14:02:15 PDT
[iOS] Open element actions sometimes result in a hover instead of a click
Comment 1 Andy Estes 2020-06-23 14:02:48 PDT
rdar://problem/64176707
Comment 2 Andy Estes 2020-06-23 14:55:19 PDT
Created attachment 402595 [details]
Patch
Comment 3 Darin Adler 2020-06-24 12:48:05 PDT
Comment on attachment 402595 [details]
Patch

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

> Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm:815
> +    auto delegate = _delegate.getAutoreleased();

Why autoreleased? Autoreleased has unwanted performance cost. We need it when the result is being used as a non-smart-pointer return value, and not in any other cases I can think of.

Let's use RetainPtr here, not autorelease. Just "auto delegate = _delegate.get()". This is analogous to what would be generated if we were using ARC, in fact.

At some point, most calls to getAutoreleased elsewhere should also be replaced with calls to get, with some minor refactoring possibly needed to work with RetainPtr rather than a raw pointer.
Comment 4 Andy Estes 2020-06-24 13:05:16 PDT
(In reply to Darin Adler from comment #3)
> Comment on attachment 402595 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=402595&action=review
> 
> > Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm:815
> > +    auto delegate = _delegate.getAutoreleased();
> 
> Let's use RetainPtr here, not autorelease.

Will do.
Comment 5 Andy Estes 2020-06-24 13:11:54 PDT
Created attachment 402675 [details]
Patch
Comment 6 EWS 2020-06-24 13:52:34 PDT
Committed r263472: <https://trac.webkit.org/changeset/263472>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 402675 [details].