56 | | |
57 | | === Multiple-fields UI === |
58 | | |
59 | | 1. Enable `ENABLE_INPUT_TYPE_`''FOO'' and `ENABLE_INPUT_MULTIPLE_FIELDS_UI` |
60 | | 2. Implement `Locale` class (See "Number localization" section) |
61 | | 2. Implement `RenderTheme::adjustInnerSpinButonStyle` and `paintInnerSpinButtonStyle` |
62 | | 3. Optionally, provide chooser dialog UI. |
63 | | 1. Implement `RenderTheme::supportsCalendarPicker` so that it returns true for supported input types. |
64 | | 2. Implement `ChromeClient::openDateTimeChooser` |
65 | | |
66 | | === ENABLE_CALENDAR_PICKER === |
67 | | WebCore has a calendar chooser implementation built with HTML. |
68 | | It supports date type, month type, week type, and year-month-day part of datetime-local type, and |
69 | | doesn't support time type and the time part of datetime-local type for now. |
70 | | So, the implementation is not enough for the chooser-only UI. |
71 | | |
72 | | 1. Enable `ENABLE_PAGE_POPUP` flag.[[BR]] |
73 | | This feature requires `V8EnabledPerContext` extended attribute. |
74 | | If your port uses JavaScriptCore, dont't use `WebCore/page/DOMWindowPagePopup.idl` and setup `pagePopupController` property in C++ code. |
75 | | 2. Implement `ChromeClient::openPagePopup` and `closePagePopup`. |
76 | | 3. Enable `ENABLE_CALENDAR_PICKER` flag |
77 | | 4. Update your build files so that it converts `WebCore/Resources/pagepopups/{pickerCommon.js,pickerCommon.css,calendarPicker.js,calendarPicker.css}` to C++ files by `WebCore/make-file-arrays.py` |
78 | | 5. Implement `RenderTheme::supportsCalendarPicker` so that it returns true for supported input types. |
79 | | 6. Implement `ChromeClient::openDateTimeChooser`. It should use ChromeClient::openPagePopup and the converted resources. See `WebKit/chromium/src/DateTimeChooserImpl.cpp`. |
80 | | |
81 | | [[Image(calendar-picker.png)]] [[BR]] |
82 | | Figure: ENABLE_CALENDAR_PICKER |