Bug 182718

Summary: Set the appropriate AutoFill context for suggested passwords
Product: WebKit Reporter: rabbasian
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dbates, rabbasian, thorton, webkit-bug-importer, wenson_hsieh, yongjun_zhang
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Description rabbasian 2018-02-12 16:08:18 PST
Provide ability to set the appropriate AutoFill context for AutoFill password suggestion.
Comment 1 rabbasian 2018-02-12 16:08:42 PST
<rdar://problem/36326863>
Comment 2 rabbasian 2018-02-12 16:21:54 PST
Created attachment 333642 [details]
Patch
Comment 3 rabbasian 2018-02-14 16:10:42 PST
Created attachment 333856 [details]
Patch
Comment 4 Tim Horton 2018-02-14 17:02:23 PST
Comment on attachment 333856 [details]
Patch

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

> Source/WebKit/UIProcess/API/Cocoa/_WKFormInputSession.h:47
> +@property (nonatomic, readonly) BOOL requiresStrongPasswordAssistance WK_API_AVAILABLE(ios(12.0));

This should use WK_IOS_TBD or whatever.
Comment 5 rabbasian 2018-02-15 08:23:40 PST
I will update the patch with WK_IOS_TBD.
Comment 6 rabbasian 2018-02-15 08:31:20 PST
Created attachment 333903 [details]
Patch
Comment 7 Wenson Hsieh 2018-02-16 09:19:37 PST
Comment on attachment 333903 [details]
Patch

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

r=me (I'm not a WebKit2 owner though, so a WebKit2 owner should r+ if looks OK)

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:4035
> +        _firstResponderRequiresStrongPasswordAssistance = [inputDelegate _webView:_webView focusRequiresStrongPasswordAssistance:focusedElementInfo.get()];

Nit - it's a tiny bit weird for the thing that "requires strong password assistance" to be different between the ivar and the delegate method (firstResponder(…) vs. focus(…)). Could we choose one to make it consistent?
Comment 8 Tim Horton 2018-02-16 11:10:30 PST
Comment on attachment 333903 [details]
Patch

Agree with Wenson’s comment about the oddly slightly different names.
Comment 9 rabbasian 2018-02-16 11:27:47 PST
I will use 'focus' terminology.

Thanks!
Comment 10 rabbasian 2018-02-16 12:41:25 PST
Created attachment 334061 [details]
Patch
Comment 11 WebKit Commit Bot 2018-02-18 09:51:54 PST
Comment on attachment 334061 [details]
Patch

Clearing flags on attachment: 334061

Committed r228605: <https://trac.webkit.org/changeset/228605>
Comment 12 WebKit Commit Bot 2018-02-18 09:51:56 PST
All reviewed patches have been landed.  Closing bug.