Day of week labels are wrong if WebCore::firstDayOfWeek() is not 0
authortkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 15 Apr 2012 03:31:43 +0000 (03:31 +0000)
committertkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 15 Apr 2012 03:31:43 +0000 (03:31 +0000)
commit03b93e0a2a1a519e2bffe72f1b8ec5bacd590db4
tree5cf08d7a15cb47b660e008095d5e104788dbc06e
parentba271b608a5b390ab11945b751af26aa8296c9c3
Day of week labels are wrong if WebCore::firstDayOfWeek() is not 0
https://bugs.webkit.org/show_bug.cgi?id=83990

Reviewed by Kentaro Hara.

We passed the "weekStartDay" property value as a
string. CalendarPickerElement::writeDocument() created:
    weekStartDay: "1",
and the JavaScript code used it in the following code:
    dayLabels[(weekStartDay + i) % 7]
If weekStartDay was "1", the expression (weekStartDay + i)
produced "10", "11", "12", ... We expected "1", "2", "3", ...

We need to pass the "weekStartDay" property as a number.

No new tests because we have no ways to test this for now. We'll
introduce tests for the calendar picker later.

* html/shadow/CalendarPickerElement.cpp:
(WebCore::addProperty): Add addProperty() function for a number.
(WebCore::CalendarPickerElement::writeDocument):
Pass a number, not a serialized number.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114210 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/shadow/CalendarPickerElement.cpp