[Chromium-Mac] Implement functions for localized time format information
authoryosin@chromium.org <yosin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Jul 2012 04:31:39 +0000 (04:31 +0000)
committeryosin@chromium.org <yosin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Jul 2012 04:31:39 +0000 (04:31 +0000)
commit0f8cd8be17d26058dedf4fa607e7aeb5a4215140
tree47e33f5c9bf99a78b5bd5fef2efe0afd00598c20
parent0d1c0e80f1c5693d0e69cfcae778424ca385be1c
[Chromium-Mac] Implement functions for localized time format information
https://bugs.webkit.org/show_bug.cgi?id=90237

Reviewed by Kent Tamura.

Source/WebCore:

This patch introduces following localized time format related
functions:
  - localizeTimeFormatText()
  - localizeShortTimeFormatText()
  - timeAMPMLabels
for Mac OSX in feature flag: ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.

These function will be used by input type "time" with multiple input
fields UI.

Note: ICU version of localized time format functions are implemented
in https://bugs.webkit.org/show_bug.cgi?id=89965

Tests: WebKit/chromium/tests/LocaleMacTest.cpp

* platform/text/mac/LocaleMac.h:
(LocaleMac): Added time format related functions and variables.
* platform/text/mac/LocaleMac.mm:
(WebCore::createDateTimeFormatter): Added. A helper function for creating date time formatter.
(WebCore::LocaleMac::createShortDateFormatter): Changed to use createDateTimeFormatter.
(WebCore::LocaleMac::createTimeFormatter): Added.
(WebCore::LocaleMac::createShortTimeFormatter): Added.
(WebCore::LocaleMac::timeFormatText): Added.
(WebCore::LocaleMac::shortTimeFormatText): Added.
(WebCore::LocaleMac::timeAMPMLabels): Added.

Source/WebKit/chromium:

* tests/LocaleMacTest.cpp:
(LocaleMacTest):
(LocaleMacTest::timeFormatText):
(LocaleMacTest::shortTimeFormatText):
(LocaleMacTest::timeAMPMLabel):
(TEST_F):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@122190 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/text/mac/LocaleMac.h
Source/WebCore/platform/text/mac/LocaleMac.mm
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/tests/LocaleMacTest.cpp