iOS: Updating input mode should update the software keyboard
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Jan 2019 07:53:14 +0000 (07:53 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Jan 2019 07:53:14 +0000 (07:53 +0000)
commit472f25057385c1b82e03406ddf51a7ede0525f81
tree742b60ea8e6e622de8fd270fb52c8063c828a7c2
parent88a8c2b7ce74949d0544b669e97bb2594c9f9bcd
iOS: Updating input mode should update the software keyboard
https://bugs.webkit.org/show_bug.cgi?id=193565
<rdar://problem/47376334>

Reviewed by Wenson Hsieh.

Source/WebCore:

Let the chrome client know that the focused element's inputmode had changed.

Test: fast/forms/ios/inputmode-none-removed.html

* html/HTMLElement.cpp:
(WebCore::HTMLElement::parseAttribute):
* page/ChromeClient.h:

Source/WebKit:

Update the software keyboard when the inputmode content attribute on the focused element had been mutated.

* Scripts/webkit/messages.py:
* Shared/WebCoreArgumentCoders.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::focusedElementDidChangeInputMode):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _didUpdateInputMode:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::focusedElementDidChangeInputMode):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::focusedElementDidChangeInputMode):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::focusedElementDidChangeInputMode):
* WebProcess/WebPage/WebPage.h:

LayoutTests:

Added a regression test for removing inputmode content attribute with the value of "none".

The test methodology is different between testRunner and in-browser since we don't force
software keyboard while running layout tests inside simulator which can elimiate
the visual viewport difference inside the test runner, and in-browser testing obviously
doesn't have access to the internal keyboard metrics.

* fast/forms/ios/inputmode-none-removed-expected.txt: Added.
* fast/forms/ios/inputmode-none-removed.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/forms/ios/inputmode-none-removed-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/ios/inputmode-none-removed.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLElement.cpp
Source/WebCore/page/ChromeClient.h
Source/WebKit/ChangeLog
Source/WebKit/Scripts/webkit/messages.py
Source/WebKit/Shared/WebCoreArgumentCoders.h
Source/WebKit/UIProcess/PageClient.h
Source/WebKit/UIProcess/WebPageProxy.h
Source/WebKit/UIProcess/WebPageProxy.messages.in
Source/WebKit/UIProcess/ios/PageClientImplIOS.h
Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h
Source/WebKit/WebProcess/WebPage/WebPage.cpp
Source/WebKit/WebProcess/WebPage/WebPage.h