[Forms] Multiple fields week input UI
https://bugs.webkit.org/show_bug.cgi?id=97877
Reviewed by Kent Tamura.
Source/WebCore:
This patch introduces multiple fields "week" input UI in DRT. We'll
enable this feature once we add tests.
Note: This patch affects ports which enable both ENABLE_INPUT_TYPE_WEEK
and ENABLE_INPUT_MULTIPLE_FIELDS_UI.
No new tests. To reduce size of this patch, other patches add tests
for multiple fields week input UI.
Note: Actual outputs of two tests
- fast/forms/week/week-input-visible-string.html
- fast/forms/week/week-stepup-stepdown-from-renderer.html
are different.
* css/thml.css:
(input::-webkit-datetime-edit-week-field): Added for field appearance.
(input::-webkit-datetime-edit-week-field:focus): Added to remove focus ring.
* html/WeekInputType.cpp:
(WebCore::WeekInputType::formatDateTimeFieldsState): Added to format numeric value to string value as specified in HTML5 specification.
(WebCore::WeekInputType::setupLayoutParameters): Added to set layout of multiple fields.
* html/WeekInputType.h: Changed to include BaseMultipleFieldsDateAndTimeInputType.h and introduce BaseWeekInputType typedef.
(WebCore::WeekInputType::WeekInputType): Changed base class name to BaseWeekInputType.
(WeekInputType): Changed to add declarations for formatDateTimeFieldsState() and setupLayoutParameters().
* html/shadow/DateTimeEditElement.cpp:
(WebCore::DateTimeEditBuilder::visitField): Changed to support week field.
LayoutTests:
This patch adds Chromium port specific expectations for "week" input
type tests for multiple fields week input UI.
Note: This patch affects ports which enable both ENABLE_INPUT_TYPE_WEEK
and ENABLE_INPUT_MULTIPLE_FIELDS_UI.
* platform/chromium/fast/forms/week/week-input-visible-string-expected.txt: Added. Multiple fields week input UI doesn't have selection.
* platform/chromium/fast/forms/week/week-stepup-stepdown-from-renderer-expected.txt: Added. On multiple fields week input UI, step down/up decrement/increment a field rather than whole value.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk/LayoutTests@130024 268f45cc-cd09-0410-ab3c-d52691b4dbfc
3 files changed