Support stand-alone month names in calendar picker
authortkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Nov 2012 09:47:46 +0000 (09:47 +0000)
committertkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Nov 2012 09:47:46 +0000 (09:47 +0000)
commit2ed44647d2c8f4b77a63c3d6a18789540c55ab86
treed467c9f135998a77c3cd70dfd960e46b3cc59f80
parenta7c10331044dfbc7032e01f1cc9d73b10c719ef9
Support stand-alone month names in calendar picker
https://bugs.webkit.org/show_bug.cgi?id=102196

Reviewed by Kentaro Hara.

.:

* ManualTests/forms/calendar-picker.html:
- Remove monthLabels arguments.
- Add a mock implementation of pagePopupController.formatMonth.

Source/WebCore:

We have showed non stand-alone month names in any locales. However
we should show stand-alone month names in some locales such as
Russian.

This patch introduce PagePopupController::formatMonth. It is
exposed to page-popups, and format year-month pairs in the same
way as input[type=month].

No new tests. Affects platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-ru.html.

* Resources/pagepopups/calendarPicker.js:
(Month.prototype.toLocaleString):
Calls pagePopupController.formatMonth except Japanese locale.
(handleArgumentsTimeout):
Remove unnecessary default monthLabels.
* page/PagePopupController.cpp:
(WebCore::PagePopupController::formatMonth): Added.
* page/PagePopupController.h:
(PagePopupController): Declare formatMonth.
* page/PagePopupController.idl: Add formatMonth.

Source/WebKit/chromium:

* src/DateTimeChooserImpl.cpp:
(WebKit::DateTimeChooserImpl::writeDocument):
We don't need to pass monthLabels any more.

LayoutTests:

Update a pixel result for Russian calendar picker. Now it contains
a stand-alone month name.

* platform/chromium-mac/platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@134753 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ChangeLog
LayoutTests/ChangeLog
LayoutTests/platform/chromium-mac/platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png
ManualTests/forms/calendar-picker.html
Source/WebCore/ChangeLog
Source/WebCore/Resources/pagepopups/calendarPicker.js
Source/WebCore/page/PagePopupController.cpp
Source/WebCore/page/PagePopupController.h
Source/WebCore/page/PagePopupController.idl
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/DateTimeChooserImpl.cpp