Calendar picker should use zero as default step base
authorkeishi@webkit.org <keishi@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Oct 2012 02:37:27 +0000 (02:37 +0000)
committerkeishi@webkit.org <keishi@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Oct 2012 02:37:27 +0000 (02:37 +0000)
commit0e572cb6fa0ff55eeca47c26c877bbbcc1b7834f
tree2d404e4676cfc1c0a82cd4fe661cdb36da8049fd
parent1c8e3fdda1fdb89288697402bec3ddb1de2609d4
Calendar picker should use zero as default step base
https://bugs.webkit.org/show_bug.cgi?id=97976

Reviewed by Kent Tamura.

.:

* ManualTests/forms/calendar-picker.html: Added stepBase parameters.

Source/WebCore:

Calendar picker should be using zero as default step base for input type=date.
The spec says to use zero unless specified otherwise.
Since input type=week has another default step base, I am adding step base
to DateTimeChooserParameters.

Test: fast/forms/date/calendar-picker-with-step.html

* Resources/pagepopups/calendarPicker.js:
(handleArgumentsTimeout):
(CalendarPicker):
(CalendarPicker.prototype.stepMismatch): Use the new this.stepBase.
* html/shadow/PickerIndicatorElement.cpp:
(WebCore::PickerIndicatorElement::openPopup): Gets step base from step range.
* platform/DateTimeChooser.h:
(DateTimeChooserParameters): Added stepBase.

Source/WebKit/chromium:

* src/DateTimeChooserImpl.cpp:
(WebKit::DateTimeChooserImpl::writeDocument): stepBase needs 11 digits of precision when setting maximum possible date.

LayoutTests:

* fast/forms/date/calendar-picker-with-step-expected.txt: Renamed from LayoutTests/fast/forms/date/calendar-picker-appearance-with-step-expected.txt.
* fast/forms/date/calendar-picker-with-step.html: Renamed from LayoutTests/fast/forms/date/calendar-picker-appearance-with-step.html. Renamed because this does not test apeparance.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@130113 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ChangeLog
LayoutTests/ChangeLog
LayoutTests/fast/forms/date/calendar-picker-with-step-expected.txt [moved from LayoutTests/fast/forms/date/calendar-picker-appearance-with-step-expected.txt with 74% similarity]
LayoutTests/fast/forms/date/calendar-picker-with-step.html [moved from LayoutTests/fast/forms/date/calendar-picker-appearance-with-step.html with 97% similarity]
ManualTests/forms/calendar-picker.html
Source/WebCore/ChangeLog
Source/WebCore/Resources/pagepopups/calendarPicker.js
Source/WebCore/html/shadow/PickerIndicatorElement.cpp
Source/WebCore/platform/DateTimeChooser.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/DateTimeChooserImpl.cpp