Changes between Version 1 and Version 2 of EnableFormFeatures
- Timestamp:
- Feb 13, 2013, 1:28:33 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
EnableFormFeatures
v1 v2 4 4 5 5 If you have never done anything for input[type=number], it lacks the following features: 6 Spin button UI7 Number localization6 * Spin button UI 7 * Number localization 8 8 9 9 === Spin button UI === 10 10 11 11 This is optional. Opera has similar UI, but IE10 has no spin button. 12 If you want the spin button UI, implement RenderTheme::adjustInnerSpinButtonStyle and paintInnerSpinButtonStyle. 12 If you want the spin button UI, implement `RenderTheme::adjustInnerSpinButtonStyle` and `paintInnerSpinButtonStyle`. 13 13 14 Test: fast/forms/number/number-{appearance,spinbutton}*.html 14 15 … … 16 17 17 18 This is optional. IE10 localizes numbers, but Opera doesn't. 18 This feature requires Locale class implementation. If your port is using WebCore/platform/text/LocaleNone.cpp, this feature is disabled. Use WebCore/platform/text/{LocaleICU.cpp,mac/LocaleMac.mm,win/LocaleWin.cpp}, or implement your own Locale class. 19 20 This feature requires `Locale` class implementation. If your port is using `WebCore/platform/text/LocaleNone.cpp`, this feature is disabled. Use `WebCore/platform/text/{LocaleICU.cpp,mac/LocaleMac.mm,win/LocaleWin.cpp}`, or implement your own Locale class. 21 19 22 Test: fast/forms/number/number-l10n-input.html 20 23 21 24 == Interactive form validation == 22 25 23 1. Implement WebCore/page/ValidationMessageClient.hfor your port24 2. Set it to PageClients::validationMessageClient25 3. Page::settings()->setInteractiveFormValidationEnabled(true)26 1. Implement `WebCore/page/ValidationMessageClient.h` for your port 27 2. Set it to `PageClients::validationMessageClient` 28 3. `Page::settings()->setInteractiveFormValidationEnabled(true)` 26 29 27 Doing step 3 without step 1 and 2 enables platform-neutral form validation UI. But it has some unresolvable bugs. You should provide your ValidationMessageClient.30 Doing step 3 without step 1 and 2 enables platform-neutral form validation UI. But it has some unresolvable bugs. You should provide your `ValidationMessageClient`. 28 31 29 32 == input[type=color] == 30 33 31 Enable ENABLE_INPUT_TYPE_COLOR flag, and implement ChromeClient::createColorChooser.34 Enable `ENABLE_INPUT_TYPE_COLOR` flag, and implement `ChromeClient::createColorChooser`. 32 35 33 36 == Date, datetime-local, month, time, week input types == 34 37 35 38 WebCore provides two UI types for them. 36 Multiple-fields UI (ENABLE_INPUT_MULTIPLE_FIELDS_UIflag)37 Chooser-only UI (no ENABLE_INPUT_MULTIPLE_FIELDS_UIflag)39 * Multiple-fields UI (`ENABLE_INPUT_MULTIPLE_FIELDS_UI` flag) 40 * Chooser-only UI (no `ENABLE_INPUT_MULTIPLE_FIELDS_UI` flag) 38 41 39 42 In the multiple-fields UI, users can specify values quickly with keyboard or mouse input. This UI is not suitable for mobile devices with touch input. Optionally we can provide platform-specific chooser dialog UI. … … 42 45 === Chooser-only UI === 43 46 44 1. Enable ENABLE_INPUT_TYPE_FOO without ENABLE_INPUT_MULTIPLE_FIELDS_UI45 2. Implement Localeclass (See "Number localization" section)46 3. Implement ChromeClient::openDateTimeChooser47 1. Enable `ENABLE_INPUT_TYPE_`''FOO'' without `ENABLE_INPUT_MULTIPLE_FIELDS_UI` 48 2. Implement `Locale` class (See "Number localization" section) 49 3. Implement `ChromeClient::openDateTimeChooser` 47 50 48 51 === Multiple-fields UI === 49 52 50 1. Enable ENABLE_INPUT_TYPE_FOO and ENABLE_INPUT_MULTIPLE_FIELDS_UI51 2. Implement Localeclass (See "Number localization" section)52 2. Implement RenderTheme::adjustInnerSpinButonStyle and paintInnerSpinButtonStyle53 1. Enable `ENABLE_INPUT_TYPE_`''FOO'' and `ENABLE_INPUT_MULTIPLE_FIELDS_UI` 54 2. Implement `Locale` class (See "Number localization" section) 55 2. Implement `RenderTheme::adjustInnerSpinButonStyle` and `paintInnerSpinButtonStyle` 53 56 3. Optionally, provide chooser dialog UI. 54 3.1 Implement RenderTheme::supportsCalendarPicker so that it returns true for supported input types. 55 3.2 Implement ChromeClient::openDateTimeChooser 56 Note that WebCore has calendar chooser implementation built with HTML. It supports date type, month type, week type, and year-month-day part of datetime-local type. It requires ENABLE_CALENDAR_PICKER and ENABLE_PAGE_POPUP. This implementation doesn't support time type and the time part of datetime-local type. 57 If we add their support in the future, ENABLE_CALENDAR_PICKER can be used for the chooser-only UI too. 57 1. Implement `RenderTheme::supportsCalendarPicker` so that it returns true for supported input types. 58 2. Implement `ChromeClient::openDateTimeChooser` 59 60 Note that WebCore has calendar chooser implementation built with HTML. It supports date type, month type, week type, and year-month-day part of datetime-local type. 61 It requires `ENABLE_CALENDAR_PICKER` and `ENABLE_PAGE_POPUP`. This implementation doesn't support time type and the time part of datetime-local type. 62 If we add their support in the future, `ENABLE_CALENDAR_PICKER` can be used for the chooser-only UI too. 58 63 59 64 == input[type=datetime] == … … 67 72 === Text field types === 68 73 69 1. Enable ENABLE_DATALIST_ELEMENT70 2. Implement RenderTheme::supportsDataListUIso that it returns true for supported types.71 3. In WebKit layer, hook keyboard input, focus, or touch events for a target text field, and show UI to choose values of HTMLInputElement::dataList.74 1. Enable `ENABLE_DATALIST_ELEMENT` 75 2. Implement `RenderTheme::supportsDataListUI` so that it returns true for supported types. 76 3. In WebKit layer, hook keyboard input, focus, or touch events for a target text field, and show UI to choose values of `HTMLInputElement::dataList`. 72 77 73 78 === Range type === 74 79 75 1. Enable ENABLE_DATALIST_ELEMENT76 2. Implement RenderTheme::supportsDataListUIso that it returns true for range type.77 3. Implement/override RenderTheme::slideTickSnappingThreshold, sliderTickSize, sliderTickOffsetFromTrackCenter.80 1. Enable `ENABLE_DATALIST_ELEMENT` 81 2. Implement `RenderTheme::supportsDataListUI` so that it returns true for range type. 82 3. Implement/override `RenderTheme::slideTickSnappingThreshold`, `sliderTickSize`, `sliderTickOffsetFromTrackCenter`. 78 83 79 84 === Color type === 80 85 81 1. Enable ENABLE_DATALIST_ELEMENT82 2. Implement RenderTheme::supportsDataListUIso that it returns true for color type.83 3. Your ColorChooser implementation should respect ColorChooserClient::shouldShowSuggestions and suggestions.86 1. Enable `ENABLE_DATALIST_ELEMENT` 87 2. Implement `RenderTheme::supportsDataListUI` so that it returns true for color type. 88 3. Your `ColorChooser` implementation should respect `ColorChooserClient::shouldShowSuggestions` and `suggestions`. 84 89 85 90 === Date, datetime-local, month, time, week types === 86 91 87 1. Enable ENABLE_DATALIST_ELEMENT88 2. Implement RenderTheme::supportsDataListUIso that it returns true for supported types.89 3. Implement ChromeClient::openDateTimeChooser so that it handles DateTimeChooserParameters::suggestionValues.92 1. Enable `ENABLE_DATALIST_ELEMENT` 93 2. Implement `RenderTheme::supportsDataListUI` so that it returns true for supported types. 94 3. Implement `ChromeClient::openDateTimeChooser` so that it handles `DateTimeChooserParameters::suggestionValues`. 90 95