Bug 213530

Summary: [iOS] Open element actions sometimes result in a hover instead of a click
Product: WebKit Reporter: Andy Estes <aestes>
Component: New BugsAssignee: Andy Estes <aestes>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, dino, megan_gardner, thorton, webkit-bug-importer, wenson_hsieh, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

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].