RESOLVED FIXED 184662
Add -[_WKInputDelegate willStartInputSession:] for clients that want to configure input session before assisting form node
https://bugs.webkit.org/show_bug.cgi?id=184662
Summary Add -[_WKInputDelegate willStartInputSession:] for clients that want to confi...
Paul Knight
Reported 2018-04-16 13:34:49 PDT
Clients may wish to configure a WKInputSession before we start assisting a node. Add a -[_WKInputDelegateDelegate willStartInputSession:] callback for this reason. For example, clients that wish to present a custom input view may want to configure the WKFormInputSession's customInputView before the keyboard is presented. Otherwise the standard keyboard will begin to animate and then the custom input view will swap places later.
Attachments
Patch (4.66 KB, patch)
2018-04-16 13:49 PDT, Paul Knight
no flags
Patch (4.94 KB, patch)
2018-04-17 12:04 PDT, Paul Knight
no flags
Patch (4.94 KB, patch)
2018-04-17 12:10 PDT, Paul Knight
no flags
Radar WebKit Bug Importer
Comment 1 2018-04-16 13:39:07 PDT
Paul Knight
Comment 2 2018-04-16 13:49:14 PDT
Wenson Hsieh
Comment 3 2018-04-16 13:57:10 PDT
This looks reasonable to me, especially since this bookends the existing -didStartInputSession: delegate method. It might require a WebKit2 owner to rubber-stamp, though...adding a few more folks.
Darin Adler
Comment 4 2018-04-16 17:59:37 PDT
Comment on attachment 338035 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=338035&action=review > Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:4040 > + _formInputSession = adoptNS([[WKFormInputSession alloc] initWithContentView:self focusedElementInfo:focusedElementInfo.get() requiresStrongPasswordAssistance:_focusRequiresStrongPasswordAssistance]); Wouldn’t it be nicer to create this only if the input delegate implements one of the two will/startInputSession methods?
Darin Adler
Comment 5 2018-04-16 18:00:22 PDT
Comment on attachment 338035 [details] Patch Otherwise, looks fine to me. Can cache implementsDidStartInputSession in a boolean to avoid computing it twice.
Paul Knight
Comment 6 2018-04-17 12:04:01 PDT
Wenson Hsieh
Comment 7 2018-04-17 12:08:01 PDT
Comment on attachment 338138 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=338138&action=review > Source/WebKit/ChangeLog:6 > + Clients may wish to configure a WKInputSession before we start assisting Nit - ChangeLog descriptions go below the "Reviewed by" line.
Paul Knight
Comment 8 2018-04-17 12:10:05 PDT
WebKit Commit Bot
Comment 9 2018-04-18 10:31:47 PDT
Comment on attachment 338139 [details] Patch Clearing flags on attachment: 338139 Committed r230766: <https://trac.webkit.org/changeset/230766>
WebKit Commit Bot
Comment 10 2018-04-18 10:31:48 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.