[iOS] Move calls to [UIKeyboard isInHardwareKeyboardMode] to the UI process.
authorpvollan@apple.com <pvollan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Feb 2019 21:39:52 +0000 (21:39 +0000)
committerpvollan@apple.com <pvollan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Feb 2019 21:39:52 +0000 (21:39 +0000)
commitc5c426461cab82bf2b947e8a403bbff065467ec9
tree30dfb4be896e46e9a65a02c10c51baf83b71b0a0
parent164e3b6cf43a6082401a27c330dfba3973740bcf
[iOS] Move calls to [UIKeyboard isInHardwareKeyboardMode] to the UI process.
https://bugs.webkit.org/show_bug.cgi?id=193683
<rdar://problem/47634345>

Reviewed by Brent Fulgham.

When a keyboard is attached/deattached or the application becomes foreground, send a message from
the UI process to the WebContent process, notifying whether a keyboard is attached or not. Also,
cache the value of [UIKeyboard isInHardwareKeyboardMode] in the UI process, since this call seems
to be expensive.

* UIProcess/API/Cocoa/WKWebView.mm:
(hardwareKeyboardAvailabilityChangedCallback):
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::setKeyboardIsAttached):
(WebKit::WebProcessProxy::keyboardIsAttached const):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::applicationWillEnterForeground):
(WebKit::WebPageProxy::hardwareKeyboardAvailabilityChanged):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::platformEditorState const):
(WebKit::WebPage::hardwareKeyboardAvailabilityChanged):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242222 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit/UIProcess/WebPageProxy.h
Source/WebKit/UIProcess/WebProcessProxy.h
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
Source/WebKit/WebProcess/WebPage/WebPage.h
Source/WebKit/WebProcess/WebPage/WebPage.messages.in
Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm