[Extra zoom mode] Support resigning first responder status when focusing a form control
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Mar 2018 23:07:30 +0000 (23:07 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Mar 2018 23:07:30 +0000 (23:07 +0000)
commit0f994b9e78626899f77100dd9aeba1dc3c3e0e02
tree8678b3ed15814402db0fdbe28afb536df693d15a
parent50b34855a2b24ebd265e6b94455fd00b7e2a0245
[Extra zoom mode] Support resigning first responder status when focusing a form control
https://bugs.webkit.org/show_bug.cgi?id=183477
<rdar://problem/38225994>

Reviewed by Tim Horton.

Currently, when presenting an input view controller in extra zoom mode, if the web view loses first responder
status, we will blur the focused element, which dismisses all focused form control UI. For certain types of form
controls, this prevents the user from using key pieces of functionality.

To address this, disconnect the notion of first responder status from DOM element focus while the form control
overlay is shown. Later, when the active input session ends, if the web content view was first responder before
upon focusing the element, restore first responder status on the web view. This extra tweak is needed to ensure
that certain UI affordances which require first responder status on the web view continue to work after
interacting with a form control that changes the first responder.

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView presentFocusedFormControlViewController:]):
(-[WKContentView dismissFocusedFormControlViewController:]):

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