2010-01-18 Kent Tamura <[email protected]>
Reviewed by Darin Adler.
HTMLInputElement::valueAsDate setter support for type=month.
https://bugs.webkit.org/show_bug.cgi?id=33021
Expose the following functions to be used by WebCore:
- WTF::msToyear()
- WTF::dayInYear()
- WTF::monthFromDayInYear()
- WTF::dayInMonthFromDayInYear()
- JavaScriptCore.exp:
- JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
- wtf/DateMath.cpp:
(WTF::msToYear): Remove "static inline".
(WTF::dayInYear): Remove "static inline".
(WTF::monthFromDayInYear): Remove "static inline".
(WTF::dayInMonthFromDayInYear): Remove "static inline".
- wtf/DateMath.h: Declare the above functions.
2010-01-18 Kent Tamura <[email protected]>
Reviewed by Darin Adler.
HTMLInputElement::valueAsDate setter support for type=month.
https://bugs.webkit.org/show_bug.cgi?id=33021
Add setter tests to input-valueasdate-month.js, and update the
expectation.
- fast/forms/input-valueasdate-expected.txt:
- fast/forms/input-valueasdate-month-expected.txt:
- fast/forms/script-tests/input-valueasdate-month.js:
- fast/forms/script-tests/input-valueasdate.js:
2010-01-18 Kent Tamura <[email protected]>
Reviewed by Darin Adler.
HTMLInputElement::valueAsDate setter support for type=month.
https://bugs.webkit.org/show_bug.cgi?id=33021
Introduce ISODateTime::setMillisecondsSinceEpochForMonth() and
toString() for the Month type, and HTMLInputElement::setValueAsDate()
calls them.
- html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setValueAsDate):
- html/ISODateTime.cpp:
(WebCore::beforeGregorianStartDate):
(WebCore::ISODateTime::addDay): Use beforeGregorianStartDate().
(WebCore::ISODateTime::parseMonth): Use beforeGregorianStartDate().
(WebCore::ISODateTime::setMillisecondsSinceEpochForDateInternal):
(WebCore::ISODateTime::setMillisecondsSinceEpochForMonth):
(WebCore::ISODateTime::toString): Implement only for the Month type.
- html/ISODateTime.h: