[Extra zoom mode] Add basic support for <input type='date'> using date picker UI
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Feb 2018 14:35:49 +0000 (14:35 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Feb 2018 14:35:49 +0000 (14:35 +0000)
commit39bf105aabbbb6b91f23ef49b5bb8792a29e7bb4
tree98a95bc357b1573b8c39f07f1b4393dd83012ca7
parentea9fcb9a263e8a761c69d1e0baf93dfb1f5d8df2
[Extra zoom mode] Add basic support for <input type='date'> using date picker UI
https://bugs.webkit.org/show_bug.cgi?id=182847
<rdar://problem/35143111>

Reviewed by Tim Horton.

Source/WebCore:

Add new localized strings for "month", "day" and "year" as they appear in the date picker.

* English.lproj/Localizable.strings:
* platform/LocalizedStrings.cpp:
(WebCore::textInputModeWriteButtonTitle):
(WebCore::textInputModeSpeechButtonTitle):
(WebCore::datePickerDayLabelTitle):
(WebCore::datePickerMonthLabelTitle):
(WebCore::datePickerYearLabelTitle):
(WebCore::textInputModeWriteButton): Deleted.
(WebCore::textInputModeSpeechButton): Deleted.
* platform/LocalizedStrings.h:

Source/WebKit:

Add support for presenting date pickers when focusing a date input.

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _stopAssistingNode]):
(-[WKContentView dismissAllInputViewControllers]):

Pull logic to dismiss input view controllers into a single helper.

(-[WKContentView presentDatePickerViewController:]):
(-[WKContentView dismissDatePickerViewController:]):
(-[WKContentView presentViewControllerForAssistedNode:]):
(-[WKContentView textInputController:didCommitText:]):
(-[WKContentView _wheelChangedWithEvent:]):

Delegate wheel events to the date picker.

* UIProcess/ios/forms/WKDatePickerViewController.h: Added.
* UIProcess/ios/forms/WKDatePickerViewController.mm: Added.

Add harness files for the WKDatePickerViewController implementation in WebKitAdditions.

* WebKit.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@228557 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/English.lproj/Localizable.strings
Source/WebCore/platform/LocalizedStrings.cpp
Source/WebCore/platform/LocalizedStrings.h
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
Source/WebKit/UIProcess/ios/forms/WKDatePickerViewController.h [new file with mode: 0644]
Source/WebKit/UIProcess/ios/forms/WKDatePickerViewController.mm [new file with mode: 0644]
Source/WebKit/WebKit.xcodeproj/project.pbxproj