INPUT_MULTIPLE_FIELDS_UI: Unable to enter "24" to hour field
https://bugs.webkit.org/show_bug.cgi?id=110431

Patch by Kunihiko Sakamoto <ksakamoto@chromium.org> on 2013-02-22
Reviewed by Kent Tamura.

Source/WebCore:

Fixed a bug that hour-field does not accept "24" as a valid input when hour format is 1-24.
To test <input> against different time formats, added "pattern" attribute to DateTimeEditElement.

Test: fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer.html

* html/BaseMultipleFieldsDateAndTimeInputType.cpp:
(WebCore::BaseMultipleFieldsDateAndTimeInputType::updateInnerTextValue): Overwrites layoutParameters.dateTimeFormat by pattern attribute of DateTimeEditElement (if exists).
* html/shadow/DateTimeFieldElements.cpp:
(WebCore::DateTimeHourFieldElement::populateDateTimeFieldsState): Fixed a bug where AM/PM value was passed to setHour().
(WebCore::DateTimeHourFieldElement::setValueAsInteger): Clamps the given value to 0-24 when the range of the field is 1-12 or 1-24. Renamed the parameter as it may not be an hour23 value (0-23).

LayoutTests:

Added test cases for hour formats 0-11 and 1-24.

* fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer-expected.txt:
* fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143770 268f45cc-cd09-0410-ab3c-d52691b4dbfc