Calendar Picker: Localize numbers in a calendar picker
authortkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Aug 2012 03:54:03 +0000 (03:54 +0000)
committertkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Aug 2012 03:54:03 +0000 (03:54 +0000)
commit539182c6dff19fa098231d30b0d821f8c5a8e4c3
treefd55effa0181462c1c38c3b87df61781b14048ca
parentd166bf607a0c2a00be637e418708fcf8ba08b1c9
Calendar Picker: Localize numbers in a calendar picker
https://bugs.webkit.org/show_bug.cgi?id=93704

Reviewed by Hajime Morita.

.:

* ManualTests/forms/calendar-picker.html:
Add a mock pagePopupController.localizeNumberString().

Source/WebCore:

Because Number.toLocaleString() of V8 returns no localized
numbers, we provide a localization function via
PagePopupController.

No new tests. We have no ways to change the locale in layout tests.

* Resources/pagepopups/calendarPicker.js:
(localizeNumber): Added. A wrapper for pagePopupController.localizeNumberString().
(formatJapaneseImperialEra): Use localizeNumber().
(formatYearMonth): ditto.
(DaysTable.prototype._renderMonth): ditto.
* page/PagePopupController.cpp:
(WebCore::PagePopupController::localizeNumberString):
Added. Just calls WebCore::convertToLocalizedNumber().
* page/PagePopupController.h:
(PagePopupController): Declare localizeNumberString().
* page/PagePopupController.idl: Add localizeNumberString().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@125741 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ChangeLog
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