REGRESSION(r119948): [Form] HTMLInputElement.valueAsNumber for input type "month...
authoryosin@chromium.org <yosin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Jul 2012 02:25:18 +0000 (02:25 +0000)
committeryosin@chromium.org <yosin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Jul 2012 02:25:18 +0000 (02:25 +0000)
commit8718c5ed9e670dce202e22000a14e361fc4573da
treee4ed235512b2e4ebe7aa42815358476a7b1da6c5
parent0590b727503931132184fd37f2c053373700cd1b
REGRESSION(r119948): [Form] HTMLInputElement.valueAsNumber for input type "month" should return number of month since January 1970
https://bugs.webkit.org/show_bug.cgi?id=91211

Reviewed by Kent Tamura.

This patch changes BaseDateAndTimeInputType::valueAsDouble() to call
virtual function parseToNumber() which "month" input type overrides
instead of non-virtual function parseToDouble() which returns number
of milliseconds.

No new tests. Existing test (fast/form/month/input-valueasnumber-month.html) coverts this, although it is disabled.

* html/BaseDateAndTimeInputType.cpp:
(WebCore::BaseDateAndTimeInputType::valueAsDouble): Changed to call parseToNumber().
(WebCore::BaseDateAndTimeInputType::parseToNumber): Changed to what parseToDouble() did.
* html/BaseDateAndTimeInputType.h:
(BaseDateAndTimeInputType): Remove parseToDouble().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@122797 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/BaseDateAndTimeInputType.cpp
Source/WebCore/html/BaseDateAndTimeInputType.h