Add -[_WKInputDelegateDelegate willStartInputSession:] for clients that want to confi...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Apr 2018 17:31:41 +0000 (17:31 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Apr 2018 17:31:41 +0000 (17:31 +0000)
commit6ec1bfe54c8aa401f9026689910caede815909d2
treec4115295480497fb1e19fa5d754e0518ef722f54
parente15e6fc3e54d31c2a227b8742d7bc4e8ea052276
Add -[_WKInputDelegateDelegate willStartInputSession:] for clients that want to configure input session before assisting form node
https://bugs.webkit.org/show_bug.cgi?id=184662

Patch by Paul Knight <pknight@apple.com> on 2018-04-18
Reviewed by Beth Dakin.

Clients may wish to configure a WKInputSession before we start assisting
a node. Add a -[_WKInputDelegateDelegate _webView:willStartInputSession:]
callback.

For example, clients that wish to present a custom input view will 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 in later.

* UIProcess/API/Cocoa/_WKInputDelegate.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
    Call -_webView:willStartInputSession: before assisting the node.
    Only create the form session if the delegate implements either
    the willStart or didStartInputSession callbacks.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/Cocoa/_WKInputDelegate.h
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm