Changeset 130243 in webkit


Ignore:
Timestamp:
Oct 2, 2012 6:25:29 PM (12 years ago)
Author:
tkent@chromium.org
Message:

[Mac][Chromium-Mac] Implement LocaleMac::dateFormat
https://bugs.webkit.org/show_bug.cgi?id=98116

Reviewed by Hajime Morita.

http://trac.webkit.org/changeset/130127 introduced
Localizer::dateFormat, and this is its implementation for LocaleICU
classs. The code is going to be used when
ENABLE_INPUT_MULTIPLE_FIELDS_UI is enabled.

No new tests. The function is not used yet.

  • platform/text/mac/LocaleMac.h:

(LocaleMac): Declare m_dateFormat.

  • platform/text/mac/LocaleMac.mm:

(WebCore::LocaleMac::dateFormat): Implemented.

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r130242 r130243  
     12012-10-02  Kent Tamura  <tkent@chromium.org>
     2
     3        [Mac][Chromium-Mac] Implement LocaleMac::dateFormat
     4        https://bugs.webkit.org/show_bug.cgi?id=98116
     5
     6        Reviewed by Hajime Morita.
     7
     8        http://trac.webkit.org/changeset/130127 introduced
     9        Localizer::dateFormat, and this is its implementation for LocaleICU
     10        classs. The code is going to be used when
     11        ENABLE_INPUT_MULTIPLE_FIELDS_UI is enabled.
     12
     13        No new tests. The function is not used yet.
     14
     15        * platform/text/mac/LocaleMac.h:
     16        (LocaleMac): Declare m_dateFormat.
     17        * platform/text/mac/LocaleMac.mm:
     18        (WebCore::LocaleMac::dateFormat): Implemented.
     19
    1202012-10-02  Kent Tamura  <tkent@chromium.org>
    221
  • trunk/Source/WebCore/platform/text/mac/LocaleMac.h

    r130127 r130243  
    8383    NSDateFormatter *createShortTimeFormatter();
    8484
     85    String m_dateFormat;
    8586    String m_localizedTimeFormatText;
    8687    String m_localizedShortTimeFormatText;
  • trunk/Source/WebCore/platform/text/mac/LocaleMac.mm

    r130127 r130243  
    255255String LocaleMac::dateFormat()
    256256{
    257     // FIXME: We should have real implementation of LocaleMac::dateFormat().
    258     return emptyString();
     257    if (!m_dateFormat.isEmpty())
     258        return m_dateFormat;
     259    RetainPtr<NSDateFormatter> formatter(AdoptNS, createShortDateFormatter());
     260    m_dateFormat = String([formatter.get() dateFormat]);
     261    return m_dateFormat;
    259262}
    260263
Note: See TracChangeset for help on using the changeset viewer.