DescriptionMerge 135131 - input.value="" should clear date/time input elements with partial values
https://bugs.webkit.org/show_bug.cgi?id=102645
Reviewed by Kentaro Hara.
Source/WebCore:
Tests: fast/forms/date-multiple-fields/date-multiple-fields-value-set-empty.html
fast/forms/datetime-multiple-fields/datetime-multiple-fields-value-set-empty.html
fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-value-set-empty.html
fast/forms/month-multiple-fields/month-multiple-fields-value-set-empty.html
fast/forms/time-multiple-fields/time-multiple-fields-value-set-empty.html
fast/forms/week-multiple-fields/week-multiple-fields-value-set-empty.html
* html/BaseMultipleFieldsDateAndTimeInputType.cpp:
(WebCore::BaseMultipleFieldsDateAndTimeInputType::setValue):
If the new value is an empty string and sub-fields has values, we should
update the UI value to the empty state.
* html/DateTimeFieldsState.h:
(WebCore::DateTimeFieldsState::hasAnyValue):
Added. It returns true if one or more sub-fields are not empty.
LayoutTests:
- Add tests for each of date/time input types.
- Add them to TextExpectations for platforms without ENABLE_INPUT_MULTIPLE_FIELDS_UI.
* fast/forms/date-multiple-fields/date-multiple-fields-value-set-empty-expected.txt: Added.
* fast/forms/date-multiple-fields/date-multiple-fields-value-set-empty.html: Added.
* fast/forms/datetime-multiple-fields/datetime-multiple-fields-value-set-empty-expected.txt: Added.
* fast/forms/datetime-multiple-fields/datetime-multiple-fields-value-set-empty.html: Added.
* fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-value-set-empty-expected.txt: Added.
* fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-value-set-empty.html: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-value-set-empty-expected.txt: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-value-set-empty.html: Added.
* fast/forms/resources/multiple-fields-value-set-empty.js: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-value-set-empty-expected.txt: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-value-set-empty.html: Added.
* fast/forms/week-multiple-fields/week-multiple-fields-value-set-empty-expected.txt: Added.
* fast/forms/week-multiple-fields/week-multiple-fields-value-set-empty.html: Added.
* platform/chromium-android/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:
TBR=tkent@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=135371
Patch Set 1 #Messages
Total messages: 1 (0 generated)
|