Changes between Initial Version and Version 1 of EnableFormFeatures


Ignore:
Timestamp:
Feb 13, 2013, 1:21:00 AM (12 years ago)
Author:
tkent@chromium.org
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • EnableFormFeatures

    v1 v1  
     1= How to enable Form features =
     2
     3== input[type=number] ==
     4
     5If you have never done anything for input[type=number], it lacks the following features:
     6Spin button UI
     7Number localization
     8
     9=== Spin button UI ===
     10
     11This is optional. Opera has similar UI, but IE10 has no spin button.
     12If you want the spin button UI, implement RenderTheme::adjustInnerSpinButtonStyle and paintInnerSpinButtonStyle.
     13Test: fast/forms/number/number-{appearance,spinbutton}*.html
     14
     15=== Number localization ===
     16
     17This is optional. IE10 localizes numbers, but Opera doesn't.
     18This 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.
     19Test: fast/forms/number/number-l10n-input.html
     20
     21== Interactive form validation ==
     22
     231. Implement WebCore/page/ValidationMessageClient.h for your port
     242. Set it to PageClients::validationMessageClient
     253. Page::settings()->setInteractiveFormValidationEnabled(true)
     26
     27Doing 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
     29== input[type=color] ==
     30
     31Enable ENABLE_INPUT_TYPE_COLOR flag, and implement ChromeClient::createColorChooser.
     32
     33== Date, datetime-local, month, time, week input types ==
     34
     35WebCore provides two UI types for them.
     36Multiple-fields UI (ENABLE_INPUT_MULTIPLE_FIELDS_UI flag)
     37Chooser-only UI (no ENABLE_INPUT_MULTIPLE_FIELDS_UI flag)
     38
     39In 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.
     40The Chooser-only UI is simple. We provide only platform-specific chooser dialog UI.
     41
     42=== Chooser-only UI ===
     43
     441. Enable ENABLE_INPUT_TYPE_FOO without ENABLE_INPUT_MULTIPLE_FIELDS_UI
     452. Implement Locale class (See "Number localization" section)
     463. Implement ChromeClient::openDateTimeChooser
     47
     48=== Multiple-fields UI ===
     49
     501. Enable ENABLE_INPUT_TYPE_FOO and ENABLE_INPUT_MULTIPLE_FIELDS_UI
     512. Implement Locale class (See "Number localization" section)
     522. Implement RenderTheme::adjustInnerSpinButonStyle and paintInnerSpinButtonStyle
     533. 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.
     57If we add their support in the future, ENABLE_CALENDAR_PICKER can be used for the chooser-only UI too.
     58
     59== input[type=datetime] ==
     60
     61Do not enable it.  You can not make an appropriate UI with the current WebCore code.
     62
     63== Datalist element ==
     64
     65This depends on input types.
     66
     67=== Text field types ===
     68
     691. Enable ENABLE_DATALIST_ELEMENT
     702. Implement RenderTheme::supportsDataListUI so that it returns true for supported types.
     713. 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
     73=== Range type ===
     74
     751. Enable ENABLE_DATALIST_ELEMENT
     762. Implement RenderTheme::supportsDataListUI so that it returns true for range type.
     773. Implement/override RenderTheme::slideTickSnappingThreshold, sliderTickSize, sliderTickOffsetFromTrackCenter.
     78
     79=== Color type ===
     80
     811. Enable ENABLE_DATALIST_ELEMENT
     822. Implement RenderTheme::supportsDataListUI so that it returns true for color type.
     833. Your ColorChooser implementation should respect ColorChooserClient::shouldShowSuggestions and suggestions.
     84
     85=== Date, datetime-local, month, time, week types ===
     86
     871. Enable ENABLE_DATALIST_ELEMENT
     882. Implement RenderTheme::supportsDataListUI so that it returns true for supported types.
     893. Implement ChromeClient::openDateTimeChooser so that it handles DateTimeChooserParameters::suggestionValues.
     90