Changeset 130127 in webkit


Ignore:
Timestamp:
Oct 1, 2012 11:48:59 PM (12 years ago)
Author:
yosin@chromium.org
Message:

Adding Localizer::dateFormat() for multiple fields date/datetime input UI
https://bugs.webkit.org/show_bug.cgi?id=98109

Reviewed by Kent Tamura.

This patch introduces Localizer::dateFormat() function for multiple
fields date/datetime/datetime-local input UI inside ENABLE_INPUT_MULTIPLE_FIELDS_UI.

We'll have platform specific implementations in LocaleICU, LocaleMac,
and LocaleWin.

No new tests. Other patches will add tests for this change.

  • platform/text/LocaleICU.cpp:

(WebCore::LocaleICU::dateFormat): Added a stub.

  • platform/text/LocaleICU.h:

(LocaleICU): Changed to add a declaration of dateFormat().

  • platform/text/LocaleNone.cpp:

(LocaleNone): Changed to add a declaration of dateFormat().
(WebCore::LocaleNone::dateFormat): Added.

  • platform/text/LocaleWin.cpp:

(WebCore::LocaleWin::dateFormat): Added.

  • platform/text/LocaleWin.h:

(LocaleWin): Changed to add a declaration of dateFormat().

  • platform/text/Localizer.h: Updates Unicode TR35 URI in a comment.

(Localizer): Changed to add a declaration of dateFormat().

  • platform/text/mac/LocaleMac.h:

(LocaleMac): Changed to add a declaration of dateFormat().

  • platform/text/mac/LocaleMac.mm:

(WebCore::LocaleMac::dateFormat): Added a stub.

Location:
trunk/Source/WebCore
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r130125 r130127  
     12012-10-01  Yoshifumi Inoue  <yosin@chromium.org>
     2
     3        Adding Localizer::dateFormat() for multiple fields date/datetime input UI
     4        https://bugs.webkit.org/show_bug.cgi?id=98109
     5
     6        Reviewed by Kent Tamura.
     7
     8        This patch introduces Localizer::dateFormat() function for multiple
     9        fields date/datetime/datetime-local input UI inside ENABLE_INPUT_MULTIPLE_FIELDS_UI.
     10
     11        We'll have platform specific implementations in LocaleICU, LocaleMac,
     12        and LocaleWin.
     13
     14        No new tests. Other patches will add tests for this change.
     15
     16        * platform/text/LocaleICU.cpp:
     17        (WebCore::LocaleICU::dateFormat): Added a stub.
     18        * platform/text/LocaleICU.h:
     19        (LocaleICU):  Changed to add a declaration of dateFormat().
     20        * platform/text/LocaleNone.cpp:
     21        (LocaleNone):  Changed to add a declaration of dateFormat().
     22        (WebCore::LocaleNone::dateFormat): Added.
     23        * platform/text/LocaleWin.cpp:
     24        (WebCore::LocaleWin::dateFormat): Added.
     25        * platform/text/LocaleWin.h:
     26        (LocaleWin): Changed to add a declaration of dateFormat().
     27        * platform/text/Localizer.h: Updates Unicode TR35 URI in a comment.
     28        (Localizer): Changed to add a declaration of dateFormat().
     29        * platform/text/mac/LocaleMac.h:
     30        (LocaleMac): Changed to add a declaration of dateFormat().
     31        * platform/text/mac/LocaleMac.mm:
     32        (WebCore::LocaleMac::dateFormat): Added a stub.
     33
    1342012-10-01  Adam Barth  <abarth@webkit.org>
    235
  • trunk/Source/WebCore/platform/text/LocaleICU.cpp

    r129912 r130127  
    412412}
    413413
     414String LocaleICU::dateFormat()
     415{
     416    // FIXME: We should have real implementation of LocaleICU::dateFormat().
     417    return emptyString();
     418}
     419
    414420String LocaleICU::timeFormat()
    415421{
  • trunk/Source/WebCore/platform/text/LocaleICU.h

    r129912 r130127  
    6363
    6464#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
     65    virtual String dateFormat() OVERRIDE;
    6566    virtual String timeFormat() OVERRIDE;
    6667    virtual String shortTimeFormat() OVERRIDE;
  • trunk/Source/WebCore/platform/text/LocaleNone.cpp

    r129912 r130127  
    4141    virtual String dateFormatText() OVERRIDE;
    4242#endif
     43#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
     44    virtual String dateFormat() OVERRIDE;
     45#endif
    4346};
    4447
     
    7376#endif
    7477
     78#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
     79String LocaleNone::dateFormat()
     80{
     81    return ASCIILiteral("dd/mm/yyyyy");
     82}
     83#endif
     84
    7585} // namespace WebCore
  • trunk/Source/WebCore/platform/text/LocaleWin.cpp

    r129912 r130127  
    730730}
    731731
     732String LocaleWin::dateFormat()
     733{
     734    // FIXME: We should have real implementation of LocaleWin::dateFormat().
     735    return emptyString();
     736}
     737
    732738String LocaleWin::timeFormat()
    733739{
  • trunk/Source/WebCore/platform/text/LocaleWin.h

    r129912 r130127  
    5858
    5959#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
     60    virtual String dateFormat() OVERRIDE;
    6061    virtual String timeFormat() OVERRIDE;
    6162    virtual String shortTimeFormat() OVERRIDE;
  • trunk/Source/WebCore/platform/text/Localizer.h

    r129973 r130127  
    5858    String localizedDecimalSeparator();
    5959
     60    // Returns date format in Unicode TR35 LDML[1] containing day of month,
     61    // month, and year, e.g. "dd/mm/yyyy"
     62    // [1] LDML http://unicode.org/reports/tr35/#Date_Format_Patterns
     63    virtual String dateFormat() = 0;
     64
    6065    // Returns time format in Unicode TR35 LDML[1] containing hour, minute, and
    6166    // second with optional period(AM/PM), e.g. "h:mm:ss a"
    62     // [1] LDML http://unicode.org/reports/tr35/tr35-6.html#Date_Format_Patterns
     67    // [1] LDML http://unicode.org/reports/tr35/#Date_Format_Patterns
    6368    virtual String timeFormat();
    6469
  • trunk/Source/WebCore/platform/text/mac/LocaleMac.h

    r129912 r130127  
    6262
    6363#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
     64    virtual String dateFormat() OVERRIDE;
    6465    virtual String timeFormat() OVERRIDE;
    6566    virtual String shortTimeFormat() OVERRIDE;
  • trunk/Source/WebCore/platform/text/mac/LocaleMac.mm

    r129973 r130127  
    253253}
    254254
     255String LocaleMac::dateFormat()
     256{
     257    // FIXME: We should have real implementation of LocaleMac::dateFormat().
     258    return emptyString();
     259}
     260
    255261String LocaleMac::timeFormat()
    256262{
Note: See TracChangeset for help on using the changeset viewer.