Hours field of date/time input UI should respect step attribute
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Dec 2012 09:32:28 +0000 (09:32 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Dec 2012 09:32:28 +0000 (09:32 +0000)
commita1b437272ed9c5d7f85dfb5f774b942385044013
treefda17b2d15df898c20115e6f2dc27374c82a2816
parent53472b02867df271a79fbfb3336c4f934bd7fddb
Hours field of date/time input UI should respect step attribute
https://bugs.webkit.org/show_bug.cgi?id=104993

Patch by Kunihiko Sakamoto <ksakamoto@chromium.org> on 2012-12-14
Reviewed by Kent Tamura.

Source/WebCore:

This patch makes step-up/-down UI of the hours field respect step attribute when possible.

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

* html/shadow/DateTimeEditElement.cpp:
(WebCore::DateTimeEditBuilder::visitField): Pass step parameters to the hour field constructor.
* html/shadow/DateTimeFieldElements.cpp:
(WebCore::DateTimeHourFieldElement::DateTimeHourFieldElement): Add Parameters argument.
(WebCore::DateTimeHourFieldElement::create): Ditto.
* html/shadow/DateTimeFieldElements.h:
(DateTimeHourFieldElement): Ditto.

LayoutTests:

* 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:
Added test cases for hour field.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@137733 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer-expected.txt
LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer.html
LayoutTests/platform/chromium/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/html/shadow/DateTimeEditElement.cpp
Source/WebCore/html/shadow/DateTimeFieldElements.cpp
Source/WebCore/html/shadow/DateTimeFieldElements.h