Changes between Version 1 and Version 2 of EnableFormFeatures


Ignore:
Timestamp:
Feb 13, 2013 1:28:33 AM (7 years ago)
Author:
tkent@chromium.org
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • EnableFormFeatures

    v1 v2  
    44
    55If you have never done anything for input[type=number], it lacks the following features:
    6 Spin button UI
    7 Number localization
     6* Spin button UI
     7* Number localization
    88
    99=== Spin button UI ===
    1010
    1111This 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.
     12If you want the spin button UI, implement `RenderTheme::adjustInnerSpinButtonStyle` and `paintInnerSpinButtonStyle`.
     13
    1314Test: fast/forms/number/number-{appearance,spinbutton}*.html
    1415
     
    1617
    1718This 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
     20This 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
    1922Test: fast/forms/number/number-l10n-input.html
    2023
    2124== Interactive form validation ==
    2225
    23 1. Implement WebCore/page/ValidationMessageClient.h for your port
    24 2. Set it to PageClients::validationMessageClient
    25 3. Page::settings()->setInteractiveFormValidationEnabled(true)
     261. Implement `WebCore/page/ValidationMessageClient.h` for your port
     272. Set it to `PageClients::validationMessageClient`
     283. `Page::settings()->setInteractiveFormValidationEnabled(true)`
    2629
    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.
     30Doing step 3 without step 1 and 2 enables platform-neutral form validation UI. But it has some unresolvable bugs.  You should provide your `ValidationMessageClient`.
    2831
    2932== input[type=color] ==
    3033
    31 Enable ENABLE_INPUT_TYPE_COLOR flag, and implement ChromeClient::createColorChooser.
     34Enable `ENABLE_INPUT_TYPE_COLOR` flag, and implement `ChromeClient::createColorChooser`.
    3235
    3336== Date, datetime-local, month, time, week input types ==
    3437
    3538WebCore provides two UI types for them.
    36 Multiple-fields UI (ENABLE_INPUT_MULTIPLE_FIELDS_UI flag)
    37 Chooser-only UI (no ENABLE_INPUT_MULTIPLE_FIELDS_UI flag)
     39* Multiple-fields UI (`ENABLE_INPUT_MULTIPLE_FIELDS_UI` flag)
     40* Chooser-only UI (no `ENABLE_INPUT_MULTIPLE_FIELDS_UI` flag)
    3841
    3942In 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.
     
    4245=== Chooser-only UI ===
    4346
    44 1. Enable ENABLE_INPUT_TYPE_FOO without ENABLE_INPUT_MULTIPLE_FIELDS_UI
    45 2. Implement Locale class (See "Number localization" section)
    46 3. Implement ChromeClient::openDateTimeChooser
     471. Enable `ENABLE_INPUT_TYPE_`''FOO'' without `ENABLE_INPUT_MULTIPLE_FIELDS_UI`
     482. Implement `Locale` class (See "Number localization" section)
     493. Implement `ChromeClient::openDateTimeChooser`
    4750
    4851=== Multiple-fields UI ===
    4952
    50 1. Enable ENABLE_INPUT_TYPE_FOO and ENABLE_INPUT_MULTIPLE_FIELDS_UI
    51 2. Implement Locale class (See "Number localization" section)
    52 2. Implement RenderTheme::adjustInnerSpinButonStyle and paintInnerSpinButtonStyle
     531. Enable `ENABLE_INPUT_TYPE_`''FOO'' and `ENABLE_INPUT_MULTIPLE_FIELDS_UI`
     542. Implement `Locale` class (See "Number localization" section)
     552. Implement `RenderTheme::adjustInnerSpinButonStyle` and `paintInnerSpinButtonStyle`
    53563. 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
     60Note 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.
     61It requires `ENABLE_CALENDAR_PICKER` and `ENABLE_PAGE_POPUP`. This implementation doesn't support time type and the time part of datetime-local type.
     62If we add their support in the future, `ENABLE_CALENDAR_PICKER` can be used for the chooser-only UI too.
    5863
    5964== input[type=datetime] ==
     
    6772=== Text field types ===
    6873
    69 1. Enable ENABLE_DATALIST_ELEMENT
    70 2. Implement RenderTheme::supportsDataListUI so 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.
     741. Enable `ENABLE_DATALIST_ELEMENT`
     752. Implement `RenderTheme::supportsDataListUI` so that it returns true for supported types.
     763. In WebKit layer, hook keyboard input, focus, or touch events for a target text field, and show UI to choose values of `HTMLInputElement::dataList`.
    7277
    7378=== Range type ===
    7479
    75 1. Enable ENABLE_DATALIST_ELEMENT
    76 2. Implement RenderTheme::supportsDataListUI so that it returns true for range type.
    77 3. Implement/override RenderTheme::slideTickSnappingThreshold, sliderTickSize, sliderTickOffsetFromTrackCenter.
     801. Enable `ENABLE_DATALIST_ELEMENT`
     812. Implement `RenderTheme::supportsDataListUI` so that it returns true for range type.
     823. Implement/override `RenderTheme::slideTickSnappingThreshold`, `sliderTickSize`, `sliderTickOffsetFromTrackCenter`.
    7883
    7984=== Color type ===
    8085
    81 1. Enable ENABLE_DATALIST_ELEMENT
    82 2. Implement RenderTheme::supportsDataListUI so that it returns true for color type.
    83 3. Your ColorChooser implementation should respect ColorChooserClient::shouldShowSuggestions and suggestions.
     861. Enable `ENABLE_DATALIST_ELEMENT`
     872. Implement `RenderTheme::supportsDataListUI` so that it returns true for color type.
     883. Your `ColorChooser` implementation should respect `ColorChooserClient::shouldShowSuggestions` and `suggestions`.
    8489
    8590=== Date, datetime-local, month, time, week types ===
    8691
    87 1. Enable ENABLE_DATALIST_ELEMENT
    88 2. Implement RenderTheme::supportsDataListUI so that it returns true for supported types.
    89 3. Implement ChromeClient::openDateTimeChooser so that it handles DateTimeChooserParameters::suggestionValues.
     921. Enable `ENABLE_DATALIST_ELEMENT`
     932. Implement `RenderTheme::supportsDataListUI` so that it returns true for supported types.
     943. Implement `ChromeClient::openDateTimeChooser` so that it handles `DateTimeChooserParameters::suggestionValues`.
    9095