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.
<rdar://problem/39467668>
Created attachment 338035 [details] Patch
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.
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?
Comment on attachment 338035 [details] Patch Otherwise, looks fine to me. Can cache implementsDidStartInputSession in a boolean to avoid computing it twice.
Created attachment 338138 [details] Patch
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.
Created attachment 338139 [details] Patch
Comment on attachment 338139 [details] Patch Clearing flags on attachment: 338139 Committed r230766: <https://trac.webkit.org/changeset/230766>
All reviewed patches have been landed. Closing bug.